Translate BVH prefix scans on wave32 GPUs #142
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!142
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-142"
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?
@gomeaw on GitHub · 2026-11-26 07:10 UTC · original
gomeaw:fix/wave32-bvh-first-lane→main· +358 −44 · 3 files · 7 commits · openFixes the three prefix-scan translation failures reported in #37:
39321a95223001ed,77360df21e12ea43, and9fc111d3be79364f. The builder needs all 53 stages to have a host pipeline before it can start.These scans read the first lane of a subtotal inside a loop whose exit can differ across console waves. If every lane within a console wave holds the same value, either 32-lane half can read its own first lane without making the entire workgroup meet at a barrier. The patch backports justrealyme and ryotdev's fix and narrows the uniformity proof for register reads, predicates, and LDS operations. It incorporates findings from adriaespii's earlier review.
Verification
f249fe0. With the patch the same synthetic scan passes the SDK DXIL validator, the lane-dependent variant still refuses, and 290 shader tests pass. The prefix tests also pass atVICTORY_SHADER_OPT=127.A native test can run
cargo test --locked -p victory-shader --lib a_first_lane_read_of_a_wave_alike_sum_under_a_wave_alike_loop -- --nocapture. For the live comparison in #37, compare the three shader hashes and the builder's stage count withVICTORY_BVH_BUILDER=1. Please include where the run reaches and any device failure.The combined test branch pairs this backport with #66 and the existing descriptor and thread-ID fixes on the original
0a43566baseline. Windows accepted both synthetic DXIL programs on that branch and passed 292 shader tests.@avatarmanz on GitHub · 2026-11-26 07:56 UTC · original
Merged into main in the next push (tests pass); thanks.
@avatarmanz on GitHub · 2026-11-26 08:19 UTC · original
The earlier version of this PR is in main (
0ce46d5a). The commits added after it (heade06ac8d7) aren't yet, and need a review first.@Aniseto on GitHub · 2026-11-26 17:16 UTC · original
Ran the requested first-lane prefix-scan test at
e06ac8d7on an NVIDIA Blackwell desktop part:Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, Rust 1.98.1 (pinned by
rust-toolchain.toml), MSVC 14.44.35207, DXC 1.9.2609.5 (shared env), debug build.The test printed
ran on the hardware device: every console wave got the sum of the waves before it, so the 32-lane path was exercised on the real adapter, not only through the DXIL validator. This is the native test the description asks for. I tested the exact heade06ac8d7, which GitHub currently marks as dirty against main; no rebased tree was used. The thread has no prior report from this adapter.Not tested: the live comparison in #37 with
VICTORY_BVH_BUILDER=1, the three shader hashes and the 53-stage builder count, native wave64, AMD and Intel GPUs, Wine, release profile, a retail title, game data.AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was 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.