GPU: copy-back reads into scratch sized to the changed stretch, not a zeroed 64 KiB per range #240
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!240
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-240"
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?
@fffluffy-dev on GitHub · 2026-11-24 22:58 UTC · original
fffluffy-dev:gpu/copy-back-scratch→main· +107 −33 · 1 files · 1 commits · openShadow::copy_back_withallocated and zeroed a 64 KiB scratch (vec![0u8; PIECE]) on every call, once per joined span, though it only reads the stretch from the first to the last changed byte of each differing piece. The merge moves intoback_pieceunchanged; the scratch now starts empty and is sized to each stretch, ascard_mergealready does.Same bytes compared, read and written back as before; only the scratch changes. Every scratch byte used is first filled by
read_intofor exactly that stretch, and a failed read returns before the merge, as before.Model of one submission (8 MiB copy, overlapping and repeated ranges): scratch bytes zeroed 40,763,392 (622 allocations) → 10,912 (171); bytes compared, pieces and bytes written back unchanged. Marvisak/VIctory#1656 found the same allocation before upstream redesigned
Shadow.Validation (cargo-xwin, tests under Wine):
cargo test -p victory-gpu111 passed, 1 ignored, new testa_piece_put_back_reads_only_its_stretch; clippy clean both ways; policy ok. On a real frame: "copying back" ms should fall at the same MB.AI use: written with Claude Code (Claude Opus 5.5); reviewed and posted with my approval. No game files were used.
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.