Preserve untouched bytes during partial texture read-back #794
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from fxceless/victory-fork. Originally posted by Lilith133T on 2026-11-25T08:04:18Z.
A 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.Imported from fxceless/victory-fork. Originally posted by MamaLeVrai on 2026-11-25T10:20:26Z.
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
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.