GPU: invalidate prefetched indirect arguments on recorded writes #663
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!663
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-663"
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?
@Pin0d1 on GitHub · 2026-11-25 04:12 UTC · original
Pin0d1:fix/indirect-window→main· +30 −5 · 2 files · 2 commits · openWith
VICTORY_INDIRECT_WINDOW=1, a recorded write could leave a prefetched indirect argument valid in the command list. Two three-vertex draws prefetched the next record. A deferred copy then set its vertex count to zero. The third draw still executed three vertices, giving nine IA vertices where the input called for six.The list now records whether its indirect window is reusable. Recording a copy, a GPU Shadow write or a callback that may write guest memory makes the next eligible draw rebuild the window. A coalesced copy does the same. Resetting the list resets this state. Consecutive eligible draws with no intervening writes can still share a clamp pass. An unrelated write can cause an extra clamp.
I verified the vertex count on an RTX 2060 SUPER and WARP, twice per adapter, against
310c6eband this commit. The fixture uses the deferred copy path used byCopyBufferRegion. A second test covers an adjacent copy and an unknown writer.Run
cargo test --locked -p victory-gpu --features diagnostics --lib indirect_window_ends_at_a_copy_or_unknown_writerfor the recording test. Run the independentmainandindirect-windowcases for the GPU comparison. Source, commands and transcriptsOn the clean PR head, Windows workspace tests passed (511 default, 519 with all features, 9 ignored in each configuration). The release workspace build and repository asset-policy test passed. Both Clippy configurations reported the same lints as on the base commit. Applying this change and #662 to #642 passed both Clippy commands. The workspace formatting check also failed on both. Commands and diagnostics
Prepared with the help of Codex 6.2 Astra Max.
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.