Shaders: wave-uniformity proof: values from loops the lanes leave apart, and writes in part (follow-up to #173) #184

Open
github-bot wants to merge 4 commits from github-bot/gh-184 into main AGit
Owner

@⁠HamudL on GitHub · 2026-11-26 10:43 UTC · original
HamudL:fix/lane-uniform-soundness → main · +476 −29 · 4 files · 4 commits · open

Follow-up to #173 (#101). Independent of it: it merges cleanly with #173 in either order.

What was wrong

lane_uniform decides whether a value is the same in every lane of a console wave. On a host of 32-lane waves, a v_readfirstlane of such a value lets each host wave take its own first lane instead of exchanging halves. With VICTORY_FIRSTLANE_OWN retired in #173, this proof is the only thing that allows that. Even before #173 it decided whether the exchange happens in blocks every lane runs. Two holes made it call values alike that are not:

  1. Temporal divergence. A value made in a loop that the lanes leave at different turns, and read after the loop. Each lane holds there what it had when it left, but the proof only looked at how the value was made.
    Example (new test): lanes 0..31 leave after one turn, lanes 32..63 after two, and v8 is the turn's number. After the loop the console's v_readfirstlane gives lane 0's 1. The upper host wave took its own lane 32 and got 2.
  2. Writes in part. Since 368293e only swaps and mac accumulators read their old destination. But 16-bit results keep the other half of the destination (write_half), v_fma_mixlo/hi do too, and v_dot2c/v_dot4c accumulate into it.

What changes

  • LaneUniform::alike_at(value, block) replaces the plain set. A value made in a loop the lanes may leave at different turns is alike only in blocks inside that loop. A loop counts as left apart when one of its exits branches on a lane condition not shown alike, or lies in the region of such a branch inside the loop. These loops are natural loops, from ir::idoms.
  • v_cmpx joins the VALU rule. On alike operands its EXEC keeps or drops every lane of the console wave together, so a loop the console wave leaves together keeps its values alike after it. This is the case for the builder's prefix scans (wave_prefix_program still lowers for waves of 32).
  • keeps_old(name): accumulators, swaps and 16-bit results read their old destination again. Whole writes still leave it only to the lanes outside EXEC.
  • TRANSLATOR_VERSION goes from 1 to 2: programs with such reads now translate differently (the exact exchange instead of each host wave's own lane). This also covers the change to #142's proof in main, which came without a bump.

Checked

  • cargo test -p victory-shader on Linux: 213 passed (209 before, plus 4 new lowering tests of lane_uniform). Together with #173: 216.
  • cargo clippy -p victory-shader -p victory-gpu --all-targets [--all-features] --target x86_64-pc-windows-msvc -- -D warnings: clean. This was a cross-check from Linux, with CARGO_FEATURE_PURE=1 for blake3.
  • The program of the new GPU test lowers for waves of 32 (checked on Linux with #173's cross-platform helpers). Not run on a GPU here.

Needs a run

  • On a GPU that runs waves of 32 (any RDNA card, any NVIDIA card):
    cargo test -p victory-shader --locked a_first_lane_read_after_a_loop -- --nocapture
    It should pass. On main it should fail, with threads 32..63 storing 2.
  • Translation counts with VICTORY_HOST_WAVE=32 victory translate --list <game folder> before and after. The builder's 53 programs should still get host pipelines with VICTORY_BVH_BUILDER=1 on a wave32 host.
**@⁠HamudL** on GitHub · 2026-11-26 10:43 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/184) `HamudL:fix/lane-uniform-soundness` → `main` · +476 −29 · 4 files · 4 commits · open Follow-up to #173 (#101). Independent of it: it merges cleanly with #173 in either order. ## What was wrong `lane_uniform` decides whether a value is the same in every lane of a console wave. On a host of 32-lane waves, a `v_readfirstlane` of such a value lets each host wave take its own first lane instead of exchanging halves. With `VICTORY_FIRSTLANE_OWN` retired in #173, this proof is the only thing that allows that. Even before #173 it decided whether the exchange happens in blocks every lane runs. Two holes made it call values alike that are not: 1. **Temporal divergence.** A value made in a loop that the lanes leave at different turns, and read after the loop. Each lane holds there what it had when it left, but the proof only looked at how the value was made. Example (new test): lanes 0..31 leave after one turn, lanes 32..63 after two, and v8 is the turn's number. After the loop the console's `v_readfirstlane` gives lane 0's 1. The upper host wave took its own lane 32 and got 2. 2. **Writes in part.** Since 368293e only swaps and `mac` accumulators read their old destination. But 16-bit results keep the other half of the destination (`write_half`), `v_fma_mixlo/hi` do too, and `v_dot2c`/`v_dot4c` accumulate into it. ## What changes - `LaneUniform::alike_at(value, block)` replaces the plain set. A value made in a loop the lanes may leave at different turns is alike only in blocks inside that loop. A loop counts as left apart when one of its exits branches on a lane condition not shown alike, or lies in the region of such a branch inside the loop. These loops are natural loops, from `ir::idoms`. - `v_cmpx` joins the VALU rule. On alike operands its EXEC keeps or drops every lane of the console wave together, so a loop the console wave leaves together keeps its values alike after it. This is the case for the builder's prefix scans (`wave_prefix_program` still lowers for waves of 32). - `keeps_old(name)`: accumulators, swaps and 16-bit results read their old destination again. Whole writes still leave it only to the lanes outside EXEC. - `TRANSLATOR_VERSION` goes from 1 to 2: programs with such reads now translate differently (the exact exchange instead of each host wave's own lane). This also covers the change to #142's proof in `main`, which came without a bump. ## Checked - `cargo test -p victory-shader` on Linux: 213 passed (209 before, plus 4 new lowering tests of `lane_uniform`). Together with #173: 216. - `cargo clippy -p victory-shader -p victory-gpu --all-targets [--all-features] --target x86_64-pc-windows-msvc -- -D warnings`: clean. This was a cross-check from Linux, with `CARGO_FEATURE_PURE=1` for blake3. - The program of the new GPU test lowers for waves of 32 (checked on Linux with #173's cross-platform helpers). Not run on a GPU here. ## Needs a run - On a GPU that runs waves of 32 (any RDNA card, any NVIDIA card): `cargo test -p victory-shader --locked a_first_lane_read_after_a_loop -- --nocapture` It should pass. On `main` it should fail, with threads 32..63 storing 2. - Translation counts with `VICTORY_HOST_WAVE=32 victory translate --list <game folder>` before and after. The builder's 53 programs should still get host pipelines with `VICTORY_BVH_BUILDER=1` on a wave32 host.
Two ways the wave-uniformity proof took a value as alike in a console wave
that is not, so that on a host of 32-lane waves the upper host wave took its
own first lane in a v_readfirstlane where the console's first lane is in the
lower one (with VICTORY_FIRSTLANE_OWN retired, #101, the proof alone decides):

- Temporal divergence: a value made in a loop that the lanes leave at
  different turns, read after it. Each lane holds there what it had when it
  left; the proof looked only at how the value was made. Now a value made in
  such a loop is alike only in blocks inside it (LaneUniform::alike_at). A
  loop is left apart where one of its exits branches on a lane condition not
  alike, or lies in the region of such a branch inside the loop. v_cmpx joins
  the VALU rule, so that a loop the console wave leaves together on alike
  operands (the builder's prefix scans) stays as it was.
- Writes in part: since 368293e only swaps and mac accumulators read their
  old destination. 16-bit results keep the other half of the destination
  (write_half), v_fma_mixlo/hi too, and v_dot2c/v_dot4c accumulate into it:
  their old value is an input again (keeps_old). Whole writes still leave it
  to the lanes outside EXEC.

TRANSLATOR_VERSION 2: the translation of programs with such reads changes
(the exact exchange instead of each host wave's own lane). This also covers
the change of #142's proof in main, which came without a bump.

Tests (lane_uniform, on every platform): a loop lanes 0..31 leave after one
turn and 32..63 after two, the same loop left together, a 16-bit add and a
v_dot4c over a lane-dependent destination beside whole writes, and keeps_old
by name. On a GPU that runs waves of 32 (wave64_tests): that loop's
first-lane read after it, every thread storing lane 0's value; the upper
host wave stored its own before.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 11:22:02 +00:00
The same one-line change as in #173, so that this pull request's Clippy job
passes on its own; the two merge in either order.
Author
Owner

@⁠ArturoWolff on GitHub · 2026-11-26 11:40 UTC · original

Confirmed the requested divergent-loop regression on physical NVIDIA wave32 hardware. The original behavior reproduced exactly, and the correction gives the console-wide lane-0 value in both host waves.

Matched source comparison (November 26, 2026):

  • Before: 9576c45f1d551be0cfde154da027707658ce031e (the tested shader change's direct parent).
  • After: HamudL's 6e4cf83da5c36b16d869ee635b4cd974214f36b8, without #173 or unrelated main changes.
  • I applied the PR's authored regression test to the parent as well. Both arms used identical test-only additions to require DXIL validation, identify the actual adapter/wave limits, require PSO creation and print the complete fenced GPU readback. The expected results and production translator code were not changed by those additions.
  • The subsequently observed PR head 82396e7dd7ba038cbe6d880d3cf5aee0645631a1 differs from the tested candidate only by a type-annotation correction in the loader's descriptor-sites test. I did not rebuild that later head.

Environment: Linux, RTX 4060 (8188 MiB dedicated VRAM; NVIDIA 620.73.04), GE-Proton 11-14 / Wine 11.0 Staging, vkd3d-proton build 71cae091b06571e, D3D12 shader model 6.6, actual wave-lane limits 32..32. Separate locked/offline Cargo targets and fresh test processes, separate copies of the same game-free prefix, initially empty private driver-cache directories, matching runtime/DXC DLLs. Windows-target shader library tests were cross-built with LLVM MinGW (x86_64-pc-windows-gnullvm) and executed under Proton, not native Windows.

Check Direct parent Candidate
a_first_lane_read_after_a_loop_the_lanes_left_at_different_turns 32 words of 1, then 32 words of 2; intended assertion failure (child exit 101) 64 words of 1; pass (child exit 0)
a_first_lane_read_of_a_wave_alike_sum_under_a_wave_alike_loop Pass: 256 words, 64 each of 0, 10, 21, 33 Same exact readback, pass
a_lane_dependent_prefix_cannot_take_its_own_first_lane Pass (rejection control, no hardware dispatch expected) Pass
Native Linux victory-shader --lib suite 209 passed, 0 failed, 2 ignored 213 passed, 0 failed, 2 ignored

Both physical tests in each arm actually validated the emitted DXIL, created the compute PSO, submitted the dispatch, waited for its fence, read the entire result and checked the device afterward. The divergent test's emitted DXIL was 2432 bytes before and 2492 after (translator version 1 -> 2); the existing prefix control was 2588 bytes in both. No hardware/validator skip counted as a pass. The four additional native lowering tests also passed. In total: four physical readbacks, five passing focused invocations including the two rejection controls, and the one intended baseline failure. No new monitored kernel GPU fault or host OOM kill occurred; all guarded test scopes retired. The successful child results are distinct from a local evidence parser that initially rejected interleaved driver diagnostic lines; the original logs and exits were preserved and reconciled without repeating completed hardware tests.

For reproduction, cross-build each isolated tree with cargo test --locked --offline --profile diag -p victory-shader --lib --no-run --target x86_64-pc-windows-gnullvm, then run the resulting shader test executable under the matching Proton/runtime environment with emit::wave64_tests::<test name> --exact --test-threads=1 --nocapture. The driver's physical readback is the discriminator, not merely a successful translation or test count.

This answers the first requested GPU check. The existing accepted prefix behavior is preserved on this device. I have not checked the second requested title-wide translation counts or all 53 builder program pipelines, nor exercised a separate physical writes-in-part regression or the combination with #173. The result supports the shader correction, but it does not yet demonstrate a retail lighting fix, gameplay stability, FPS, or AMD/native Windows behavior. No game data, captures, executable bytes or extracted shaders are included.

AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol High).

**@⁠ArturoWolff** on GitHub · 2026-11-26 11:40 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/184#issuecomment-7191017164) Confirmed the requested divergent-loop regression on physical NVIDIA wave32 hardware. The original behavior reproduced exactly, and the correction gives the console-wide lane-0 value in both host waves. **Matched source comparison** (November 26, 2026): - Before: `9576c45f1d551be0cfde154da027707658ce031e` (the tested shader change's direct parent). - After: HamudL's `6e4cf83da5c36b16d869ee635b4cd974214f36b8`, without #173 or unrelated main changes. - I applied the PR's authored regression test to the parent as well. Both arms used identical test-only additions to require DXIL validation, identify the actual adapter/wave limits, require PSO creation and print the complete fenced GPU readback. The expected results and production translator code were not changed by those additions. - The subsequently observed PR head `82396e7dd7ba038cbe6d880d3cf5aee0645631a1` differs from the tested candidate only by a type-annotation correction in the loader's descriptor-sites test. I did not rebuild that later head. **Environment:** Linux, RTX 4060 (8188 MiB dedicated VRAM; NVIDIA 620.73.04), GE-Proton 11-14 / Wine 11.0 Staging, vkd3d-proton build `71cae091b06571e`, D3D12 shader model 6.6, actual wave-lane limits 32..32. Separate locked/offline Cargo targets and fresh test processes, separate copies of the same game-free prefix, initially empty private driver-cache directories, matching runtime/DXC DLLs. Windows-target shader library tests were cross-built with LLVM MinGW (`x86_64-pc-windows-gnullvm`) and executed under Proton, not native Windows. | Check | Direct parent | Candidate | |---|---|---| | `a_first_lane_read_after_a_loop_the_lanes_left_at_different_turns` | 32 words of 1, then 32 words of 2; intended assertion failure (child exit 101) | 64 words of 1; pass (child exit 0) | | `a_first_lane_read_of_a_wave_alike_sum_under_a_wave_alike_loop` | Pass: 256 words, 64 each of 0, 10, 21, 33 | Same exact readback, pass | | `a_lane_dependent_prefix_cannot_take_its_own_first_lane` | Pass (rejection control, no hardware dispatch expected) | Pass | | Native Linux `victory-shader --lib` suite | 209 passed, 0 failed, 2 ignored | 213 passed, 0 failed, 2 ignored | Both physical tests in each arm actually validated the emitted DXIL, created the compute PSO, submitted the dispatch, waited for its fence, read the entire result and checked the device afterward. The divergent test's emitted DXIL was 2432 bytes before and 2492 after (translator version 1 -> 2); the existing prefix control was 2588 bytes in both. No hardware/validator skip counted as a pass. The four additional native lowering tests also passed. In total: four physical readbacks, five passing focused invocations including the two rejection controls, and the one intended baseline failure. No new monitored kernel GPU fault or host OOM kill occurred; all guarded test scopes retired. The successful child results are distinct from a local evidence parser that initially rejected interleaved driver diagnostic lines; the original logs and exits were preserved and reconciled without repeating completed hardware tests. For reproduction, cross-build each isolated tree with `cargo test --locked --offline --profile diag -p victory-shader --lib --no-run --target x86_64-pc-windows-gnullvm`, then run the resulting shader test executable under the matching Proton/runtime environment with `emit::wave64_tests::<test name> --exact --test-threads=1 --nocapture`. The driver's physical readback is the discriminator, not merely a successful translation or test count. This answers the first requested GPU check. The existing accepted prefix behavior is preserved on this device. I have **not** checked the second requested title-wide translation counts or all 53 builder program pipelines, nor exercised a separate physical writes-in-part regression or the combination with #173. The result supports the shader correction, but it does not yet demonstrate a retail lighting fix, gameplay stability, FPS, or AMD/native Windows behavior. No game data, captures, executable bytes or extracted shaders are included. AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol High).
The second hole of lane_uniform, beside the loop one: v1 holds each lane's
number in its high half, a 16-bit add (1.0 + 2.0) writes its low half and
keeps the high one, and every thread stores the first lane's v1, lane 0's
0x4200. Before, the upper host wave stored its own lane 32's 0x0020_4200.
Checked on Linux: the program lowers for waves of 32, and its DXIL is 2656
bytes with keeps_old against 2596 with the old rule (the exchange).
Author
Owner

@⁠HamudL on GitHub · 2026-11-26 13:25 UTC · original

Thanks for running it on real wave32 hardware. That is exactly the readback the test was written for (32 × 1 then 32 × 2 on main, 64 × 1 with the fix), and the prefix control staying identical is the important no-regression part.

For the second hole (writes in part) there is now a hardware test in this PR as well: a_first_lane_read_of_a_register_a_16_bit_result_wrote_in_part (acb01d0). v1 holds the lane's number in its high half, a v_add_f16 writes only the low half, and every thread stores the first lane's v1. Expected: 64 × 0x4200; on main the upper host wave stores 0x0020_4200. It follows the loop test's pattern (explicit wave32 check, the PSO must be created). If you can run it the same way, that covers the translator side. The translation counts and the 53 builder pipelines still need a game run.

**@⁠HamudL** on GitHub · 2026-11-26 13:25 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/184#issuecomment-7193340486) Thanks for running it on real wave32 hardware. That is exactly the readback the test was written for (32 × 1 then 32 × 2 on main, 64 × 1 with the fix), and the prefix control staying identical is the important no-regression part. For the second hole (writes in part) there is now a hardware test in this PR as well: `a_first_lane_read_of_a_register_a_16_bit_result_wrote_in_part` (acb01d0). v1 holds the lane's number in its high half, a `v_add_f16` writes only the low half, and every thread stores the first lane's v1. Expected: 64 × `0x4200`; on main the upper host wave stores `0x0020_4200`. It follows the loop test's pattern (explicit wave32 check, the PSO must be created). If you can run it the same way, that covers the translator side. The translation counts and the 53 builder pipelines still need a game run.
Author
Owner

@⁠ArturoWolff on GitHub · 2026-11-26 14:02 UTC · original

The new writes-in-part regression also reproduces exactly on the RTX 4060 / Proton setup from the earlier test. Thanks for adding the explicit hardware oracle.

Matched physical wave32 comparison (November 26, 2026)

  • Before: 9576c45f1d551be0cfde154da027707658ce031e, the parent of the translator correction.
  • After: acb01d0eda3d77bf29f0c3d8d1b4fe2b748b55c3, containing the new authored test and the correction in 6e4cf83da5c36b16d869ee635b4cd974214f36b8.
  • Both trees used the same a_first_lane_read_of_a_register_a_16_bit_result_wrote_in_part fixture, with matching test-only instrumentation to require validation, the physical wave32 device, PSO creation, and a completed full-buffer readback. No production translator changes were added locally.
Actual GPU result Parent PR head
Lanes 0–31 32 × 0x0000_4200 32 × 0x0000_4200
Lanes 32–63 32 × 0x0020_4200 32 × 0x0000_4200
DXIL container bytes 2596 (translator 1) 2656 (translator 2)
Focused test Intended assertion failure (child exit 101) 1 passed (child exit 0)

Both Windows-target shader test builds completed successfully. Each arm actually validated the emitted DXIL, created the compute pipeline, waited for the submitted dispatch to finish, read all 64 words, and checked for device removal afterward. The result is not a skipped hardware test. The retained divergent-loop control executable also passed again, with all 64 words equal to 1.

Conditions: Linux, NVIDIA RTX 4060, 8188 MiB VRAM, driver 620.73.04, SM 6.6 and wave-lane limits 32..32; GE-Proton 11-14 / Wine 11.0 Staging, vkd3d-proton 71cae091b06571e. Separate locked/offline Cargo targets, separate fresh copies of the same starting prefix and matching DLLs, initially empty private driver-cache directories. The isolated no-display prerequisite attempt timed out during graphics initialization; a fresh private Xvfb session enabled the known-good control and both new arms. No game, desktop capture, or input was involved. External host-memory guard at 512 MiB; no guard stops, host OOM kills, or monitored kernel GPU faults in the successful qualification arms.

For reproduction, cross-build with cargo test --profile diag -p victory-shader --lib --no-run --locked --offline --target x86_64-pc-windows-gnullvm, then execute the resulting test binary under matching Proton with emit::wave64_tests::a_first_lane_read_of_a_register_a_16_bit_result_wrote_in_part --exact --test-threads=1 --nocapture. Use the same authored fixture on the parent, and require the actual fenced readback on both sides.

This extends the earlier divergent-loop qualification to the second reported translator hole. The title-wide wave32 translation counts and the 53 builder pipelines remain untested here. No claim of retail rendering correctness, FPS, AMD behavior, or native Windows validation follows from this fixture.

AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol Max).

**@⁠ArturoWolff** on GitHub · 2026-11-26 14:02 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/184#issuecomment-7194201919) The new writes-in-part regression also reproduces exactly on the RTX 4060 / Proton setup from the earlier test. Thanks for adding the explicit hardware oracle. **Matched physical wave32 comparison (November 26, 2026)** - Before: `9576c45f1d551be0cfde154da027707658ce031e`, the parent of the translator correction. - After: `acb01d0eda3d77bf29f0c3d8d1b4fe2b748b55c3`, containing the new authored test and the correction in `6e4cf83da5c36b16d869ee635b4cd974214f36b8`. - Both trees used the same `a_first_lane_read_of_a_register_a_16_bit_result_wrote_in_part` fixture, with matching test-only instrumentation to require validation, the physical wave32 device, PSO creation, and a completed full-buffer readback. No production translator changes were added locally. | Actual GPU result | Parent | PR head | |---|---|---| | Lanes 0–31 | 32 × `0x0000_4200` | 32 × `0x0000_4200` | | Lanes 32–63 | 32 × `0x0020_4200` | 32 × `0x0000_4200` | | DXIL container bytes | 2596 (translator 1) | 2656 (translator 2) | | Focused test | Intended assertion failure (child exit 101) | 1 passed (child exit 0) | Both Windows-target shader test builds completed successfully. Each arm actually validated the emitted DXIL, created the compute pipeline, waited for the submitted dispatch to finish, read all 64 words, and checked for device removal afterward. The result is not a skipped hardware test. The retained divergent-loop control executable also passed again, with all 64 words equal to 1. **Conditions:** Linux, NVIDIA RTX 4060, 8188 MiB VRAM, driver 620.73.04, SM 6.6 and wave-lane limits 32..32; GE-Proton 11-14 / Wine 11.0 Staging, vkd3d-proton `71cae091b06571e`. Separate locked/offline Cargo targets, separate fresh copies of the same starting prefix and matching DLLs, initially empty private driver-cache directories. The isolated no-display prerequisite attempt timed out during graphics initialization; a fresh private Xvfb session enabled the known-good control and both new arms. No game, desktop capture, or input was involved. External host-memory guard at 512 MiB; no guard stops, host OOM kills, or monitored kernel GPU faults in the successful qualification arms. For reproduction, cross-build with `cargo test --profile diag -p victory-shader --lib --no-run --locked --offline --target x86_64-pc-windows-gnullvm`, then execute the resulting test binary under matching Proton with `emit::wave64_tests::a_first_lane_read_of_a_register_a_16_bit_result_wrote_in_part --exact --test-threads=1 --nocapture`. Use the same authored fixture on the parent, and require the actual fenced readback on both sides. This extends the earlier divergent-loop qualification to the second reported translator hole. The title-wide wave32 translation counts and the 53 builder pipelines remain untested here. No claim of retail rendering correctness, FPS, AMD behavior, or native Windows validation follows from this fixture. AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol Max).
Author
Owner

@⁠HamudL on GitHub · 2026-11-26 16:35 UTC · original

Hardware check on AMD under native Windows, the item left open above.

Setup: AMD Radeon RX 7800 XT (Navi 32, VEN_1002&DEV_747E, the only GPU in the system), Adrenalin 26.8.1 (driver 32.0.31041.1004), Windows 11 Pro 26H2 (build 26300.10075), D3D12 wave lanes 32..64. rustc 1.98.1, MSVC 14.44, Windows SDK 10.0.26100.0 with dxil.dll 1.9.2602.17, so every shader also passed the official validator before its dispatch.

Trees: acb01d0 (this PR), and the same tree with lower.rs from 9576c45 (the translator before this PR, tests unchanged). The lower.rs blob was checked before every run.

Test before the fix with the fix
a_first_lane_read_after_a_loop_the_lanes_left_at_different_turns fails: threads 0–31 store 1, threads 32–63 store 2 passes on the GPU
a_first_lane_read_of_a_register_a_16_bit_result_wrote_in_part fails: threads 0–31 store 0x4200, threads 32–63 store 0x204200 passes on the GPU
a_first_lane_read_of_a_wave_alike_sum_under_a_wave_alike_loop passes on the GPU passes on the GPU

These are the same readbacks as on the RTX 4060 under Proton.

The whole victory-shader suite on acb01d0: 307 passed, 0 failed, 4 ignored. With --nocapture, 11 tests report a hardware run, and none reports "not run", "no SM 6.6" or "does not support wave32". The only skips are the four diff_tests that need the console's dxc and two WARP sub-passes.

#173 (b3b6f2b) on the same PC: the 15 first_lane tests pass, the prefix-scan test on the GPU.

Not covered: a game run (the wave32 translation counts and the 53 builder pipelines).

**@⁠HamudL** on GitHub · 2026-11-26 16:35 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/184#issuecomment-7197854865) Hardware check on AMD under native Windows, the item left open above. **Setup:** AMD Radeon RX 7800 XT (Navi 32, `VEN_1002&DEV_747E`, the only GPU in the system), Adrenalin 26.8.1 (driver 32.0.31041.1004), Windows 11 Pro 26H2 (build 26300.10075), D3D12 wave lanes 32..64. rustc 1.98.1, MSVC 14.44, Windows SDK 10.0.26100.0 with `dxil.dll` 1.9.2602.17, so every shader also passed the official validator before its dispatch. **Trees:** `acb01d0` (this PR), and the same tree with `lower.rs` from `9576c45` (the translator before this PR, tests unchanged). The `lower.rs` blob was checked before every run. | Test | before the fix | with the fix | |---|---|---| | `a_first_lane_read_after_a_loop_the_lanes_left_at_different_turns` | fails: threads 0–31 store 1, threads 32–63 store 2 | passes on the GPU | | `a_first_lane_read_of_a_register_a_16_bit_result_wrote_in_part` | fails: threads 0–31 store `0x4200`, threads 32–63 store `0x204200` | passes on the GPU | | `a_first_lane_read_of_a_wave_alike_sum_under_a_wave_alike_loop` | passes on the GPU | passes on the GPU | These are the same readbacks as on the RTX 4060 under Proton. The whole `victory-shader` suite on `acb01d0`: 307 passed, 0 failed, 4 ignored. With `--nocapture`, 11 tests report a hardware run, and none reports "not run", "no SM 6.6" or "does not support wave32". The only skips are the four `diff_tests` that need the console's dxc and two WARP sub-passes. #173 (`b3b6f2b`) on the same PC: the 15 `first_lane` tests pass, the prefix-scan test on the GPU. Not covered: a game run (the wave32 translation counts and the 53 builder pipelines).
#169 keeps the (F, F) annotation and breaks the line; the same text here
leaves nothing to resolve whichever of the two lands first, and once #169 is
in main this pull request no longer touches the file.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/184/head:github-bot/gh-184'
git switch 'github-bot/gh-184'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-184'
git switch 'github-bot/gh-184'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-184'
git switch 'github-bot/gh-184'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-184'
git switch 'main'
git merge --squash 'github-bot/gh-184'
git switch 'main'
git merge --ff-only 'github-bot/gh-184'
git switch 'main'
git merge 'github-bot/gh-184'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.