Shaders: guard divergent single-console-wave barriers on narrow-wave (NVIDIA) GPUs #109
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!109
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-109"
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?
@rivaldodev on GitHub · 2026-11-26 03:42 UTC · original
rivaldodev:fix/nvidia-auto-barrier-guards→main· +245 −15 · 5 files · 2 commits · openSummary
Two focused improvements for narrow-wave (wave32) / capped-heap GPUs such as NVIDIA, tested live on hardware:
Shaders: automatically guard divergent single-console-wave barriers on narrow-wave GPUs
group_threads <= console_wave), preventing deadlocks on wave32 GPUs when only part of a console wave enterss_barrier.TGSM_FENCE/UAV_FENCE) and explicitVICTORY_GROUP_SYNCoverrides.an_automatic_barrier_inside_a_lane_branch_runs_on_narrow_hardware).Tests: verify null heap clamp slot with small and exact-fit allocations
view_heaps_keep_the_clamp_slot_nullto verify small, exact-fit, and overflowing title heaps all keep the final clamp slot null on capped-heap GPUs (e.g., 1,000,000 views on NVIDIA).Verification
cargo test --locked -p victory-shader an_automatic_barrier_inside_a_lane_branch_runs_on_narrow_hardware -- --nocapture— passed on live wave32 hardware (max wave 32: 1, 10, 32, 33 and 64 active lanes)cargo test --locked -p victory-gpu clamp -- --nocapture— passed on live hardware (1000000 slots, 262144 dynamic slots; small, exact-fit and overflowing title heaps leave slot 999999 null)cargo build --locked --profile diag -p victory --features diagnostics— passed@copilot-pull-request-reviewer[bot] on GitHub · 2026-11-26 03:42 UTC · original · reviewed
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
@avatarmanz on GitHub · 2026-11-26 07:36 UTC · original
Left open: same barriers on 64-lane AMD hosts, but the new default (auto) changes the shader cache key, so every AMD cache would be translated again once; maintainer's call.
@juliptree on GitHub · 2026-11-26 07:50 UTC · original
Independently validated head
23921a7on Windows with an RTX 5060 Ti 16 GB, driver 616.92. The shader test dispatched on the physical GPU with min/max wave width 32. All five cases (1, 10, 32, 33, and 64 active lanes) completed and returned the expected UAV value of 19.The victory-gpu clamp filter passed all six matched tests. On the 5060 Ti, small, exact-fit, and overflowing title allocations all left slot 999999 reserved and initialized to null. A shader read from that slot was outside the scope of the test. I used temporary logging in a separate worktree to confirm the adapter and readbacks. 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.