Preserve untouched bytes during partial texture read-back #794
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!794
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-794"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Lilith133T on GitHub · 2026-11-25 08:04 UTC · original
Lilith133T:fix/partial-texture-readback→main· +195 −33 · 3 files · 1 commits · draftA texture-to-buffer copy can use a source box smaller than the destination footprint. The old write-back copied the whole footprint from staging, including bytes the GPU never wrote. In a synthetic 2×2 copy into a 4×4 footprint, the byte immediately after the first copied row changed from
0xa5to zero.Size the staging footprint to the source box and write only its rows. Keep the destination's original row and slice pitches when writing into guest memory. The same layout validates the destination span before recording the copy.
Verification
9376fd6at byte 8 and passes with this change.cargo test --locked --profile diag -p victory-gpu --features diagnostics --lib list::testsand Clippy for the library. Strict Clippy required allowing one existingunnecessary_sort_bydiagnostic indraw.rs.@MamaLeVrai on GitHub · 2026-11-25 10:20 UTC · original
Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present. I merged this PR's head
f61fe97intomain9376fd6in a throwaway tree (no conflict).cargo clippy --workspace --all-targets --locked -- -D warningsfails with exactly the errorsmainitself has on this machine (placed_filler_twinsnever used,depth_writtennever read, invictory-gpu); with--all-featuresit fails with the same number of errors asmain(4). This PR adds none and removes none.cargo test --workspace --locked: 541 passed, 0 failed, 10 ignored, two runs (mainalone: 540 passed, 0 failed, 10 ignored). The title was not run, so this says nothing about in-game effect. No game data.AI-assisted (Claude Code); no game data.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.