Repository navigation
Conversation
Overlapping writable views can grow the shadow buffer's before-image many times in one submission. Each growth recopies bytes already saved. Distant writes also snapshot the untouched gap between them. Large heap views make this work expensive during command preparation. Keep the first originals in sorted disjoint ranges and capture only newly covered bytes. Borrow a contiguous original page directly or reassemble it in reusable scratch when it spans several ranges. This keeps the existing title read, writeback merge, and write-watch stamps page-based. Return captured storage after the last pending range. Verify overlaps, distant ranges, page reconstruction, and reuse across submissions. A 174 MiB CPU fixture with 49 growing ranges reduced bytes copied from 4,116 MiB to 156 MiB and median time from 440 to 90 ms. Based-on: Marvisak#3318 Tested-on: RX 6800 and Lavapipe, Fedora Linux 45, Linux native Assisted-by: gpt-6.2 sol xhigh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Writable views of a large GPU shadow can overlap or extend the before-image many times in one submission. The current code recopies previously saved bytes as the range grows and copies the gap between distant views.
This Linux native adaptation of Marvisak/VIctory #3318 stores disjoint original ranges. An overlapping declaration captures only newly covered bytes. Copy-back still reads and merges title memory in the original 64 KiB pieces, including when a piece spans several saved ranges.
The independent contribution passed all 44 regular
victory-gputests on each backend. The integration with the pending Linux native changes passed all 74 regular GPU tests on each backend. The regression checks first-write contents, gaps, page reconstruction, and reset between submissions. Lavapipe emitted the existing descriptor validation messageVUID-VkWriteDescriptorSet-dstSet-04611. The fixture measures CPU snapshot preparation. In-game frame timing remains unmeasured for this patch.Tested-on: RX 6800 and Lavapipe, Fedora Linux 45, Linux native
Assisted-by: gpt-6.2 sol xhigh