Repository navigation
fix(gpu): preserve pixels outside texture readback regions - #1
Closed
jeremygold02 wants to merge 1 commit into
Closed
jeremygold02 wants to merge 1 commit into
jeremygold02 wants to merge 1 commit into
Conversation
Copy only the rows, columns and depth slices written into the staging footprint. Preserve surrounding texels for boxed and whole-subresource copies into larger destinations. Refs: Marvisak#67
Author
|
I moved the follow-up review to Marvisak#137. That upstream draft depends on Marvisak#67 and links the one-commit fix. |
alessiodeia
pushed a commit
that referenced
this pull request
Nov 25, 2026
Exercise the descriptor cursor regression on the actual heap capacity
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.
The texture-to-buffer path introduced in Marvisak#67 can copy pixels outside the requested destination rectangle. The GPU fills only part of its staging buffer, then the host copies the whole footprint into title memory. This change uses the source box or selected subresource extent and destination coordinates to copy back only the affected rows of each depth slice.
On a physical RTX 5070 (driver 621.01), I copied a 2×2 box into a prefilled 4×4 RGBA8 destination. At
b5c38fa, all 4 requested pixels were correct and 0 of the 12 neighboring pixels retained their values. With this change, all 4 requested pixels were correct and all 12 neighbors retained their values. A whole 4×4 source copied to (1,1) in a packed 6×6 destination also matched all 36 expected pixels.The added checks exercise the existing synthetic GPU fixture. On Windows, all 37
victory-gpulibrary tests passed in the default configuration.cargo clippy -p victory-gpu --all-targets --features diagnostics -- -D warningsandgit diff --checkpassed. AI-assisted.