Shader: a branch-only mask SCC is the console wave's "any lane" (#3491) #3500

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

@⁠oni-swr on GitHub · 2026-11-27 10:38 UTC · original
oni-swr:fix/3491-branch-only-mask-scc → main · +909 −15 · 9 files · 4 commits · open

Fixes #3491. Claim: #1633

Problem

s_and_b32/b64 sX, vcc, exec followed directly by s_cbranch_scc0/1, with nothing else reading the mask, made each active lane pick its own arm. The scalar AND sets SCC when any bit of the result is set, so every active lane of the console wave must take the same arm.

Change

  • structure.rs: finds these SCC values (Structured::any_sccs). They come from a bitwise mask operation that does not write EXEC, whose result nothing reads, and whose SCC only s_cbranch_scc0/1 read. The branch then tests the uniform SCC instead of the lane's own bit. A mask that is read (for example as EXEC in the arm) keeps the lane's bit, as before.
  • lower.rs: gives such an SCC the wave's vote (WaveActiveAnyTrue of the mask's bit, or the number of a complement tested for zero). It declares the console's wave size, so the host wave is the console's 32 or 64 lanes. Outside compute it refuses cleanly instead of guessing.
  • Tests (mask_branch_tests.rs): GFX10 programs for scc0 and scc1, with a common store and with a store in each arm. They run on Wave32 and Wave64, on whole groups and partial groups (lanes 0-47 of 64 active, selected lane inside and outside). They also check that a control that reads the mask too keeps the old path.
  • The reporter's test commit is cherry-picked with its authorship (steven-seagull27, b803d16). I only made Program/program visible to the new tests and added two program kinds.

Results (aggregate counts, incorrect dwords over nine dispatches)

Program base W32 head W32 base W64 head W64
DXC control 0/288 0/288 0/576 0/576
scc0, common store 92/288 0/288 188/576 0/576
scc0, store in each arm 92/288 0/288 188/576 0/576
scc1, store in each arm 92/288 0/288 188/576 0/576

Inactive lanes: 0 unexpected writes before and after.

WARP flake. In 12 repeated runs of the repro on head, 8 had zero wrong dwords. In 4, one or two cells had 40-80 wrong dwords, always in the "selected lane just outside the running lanes" cases. A plain DXC-compiled HLSL control (if (lane < below) { WaveActiveAnyTrue(lane == selected) }, WaveSize declared) gives the same wrong result on this WARP in 2 of 25 runs, and it is always the same compiled pipeline. The DXIL I emit is the same on every run. The new GPU test therefore rebuilds the pipeline and only fails after three wrong pipelines in a row. On base, every pipeline is wrong.

cargo test -p victory-shader --lib (--test-threads=1, same WARP):

  • base 63bcca4: 296 passed, 6 failed, 3 ignored
  • head: 299 passed, 6 failed, 4 ignored (+3 new tests, +1 ignored repro)
  • The same six tests fail on both. They are WARP-specific (gathers, permutes, edge-flagged triangles, FMA host naming) and are not touched by this change.

Clippy -D warnings with --all-features and cargo test -p xtask (policy) pass.

Adapters

  • App-local x64 WARP 1.0.22 (Microsoft.Direct3D.WARP), 32- and 64-lane waves. VICTORY_WARP=1, VICTORY_D3D12_WARP=1.
  • The system WARP (10.0.26100.9818) has no 32-lane waves, so the console-width tests skip there.
  • No physical GPU was used and no GPU numbers were measured.

Overlap

  • #3401 (mask SCC as scalar data, plus the data-and-branch follow-up): this is the separate branch-only case, as the reporter's outputs show. It touches the same spots in lower.rs (the console_lanes |= line and the sop mask check). A trial merge shows only adjacent textual conflicts; both hunks are meant to stay. Whichever lands second rebases.
  • #233 also conflicts textually in lower.rs. It does the whole-wave branch inside its own halves flow. #2633 merges cleanly.

Left open

  • A 64-lane console wave on a 32-lane host (two physical waves on NVIDIA): the program declares WaveSize(64), so I expect the pipeline to be refused there, not mis-executed. I did not run it. An exact cross-half reduction needs group barriers, which are not valid inside the divergent region where the vote sits. It would come with the halves flow of #233.
  • Pixel and vertex programs with such a branch are now refused, where before they took the lane's own bit.
  • Masks that do not imply EXEC (complements) use the console-number path. It is not covered by a device test.

AI-assisted: Claude Code (Claude Sonnet 5.5), results checked before posting.

🤖 Generated with Claude Code

**@⁠oni-swr** on GitHub · 2026-11-27 10:38 UTC · [original](https://github.com/Marvisak/VIctory/pull/3500) `oni-swr:fix/3491-branch-only-mask-scc` → `main` · +909 −15 · 9 files · 4 commits · open Fixes #3491. Claim: https://git.gtahub.st/github/Marvisak--VIctory/issues/1633 ## Problem `s_and_b32/b64 sX, vcc, exec` followed directly by `s_cbranch_scc0/1`, with nothing else reading the mask, made each active lane pick its own arm. The scalar AND sets SCC when any bit of the result is set, so every active lane of the console wave must take the same arm. ## Change - `structure.rs`: finds these SCC values (`Structured::any_sccs`). They come from a bitwise mask operation that does not write EXEC, whose result nothing reads, and whose SCC only `s_cbranch_scc0/1` read. The branch then tests the uniform SCC instead of the lane's own bit. A mask that is read (for example as EXEC in the arm) keeps the lane's bit, as before. - `lower.rs`: gives such an SCC the wave's vote (`WaveActiveAnyTrue` of the mask's bit, or the number of a complement tested for zero). It declares the console's wave size, so the host wave is the console's 32 or 64 lanes. Outside compute it refuses cleanly instead of guessing. - Tests (`mask_branch_tests.rs`): GFX10 programs for scc0 and scc1, with a common store and with a store in each arm. They run on Wave32 and Wave64, on whole groups and partial groups (lanes 0-47 of 64 active, selected lane inside and outside). They also check that a control that reads the mask too keeps the old path. - The reporter's test commit is cherry-picked with its authorship (steven-seagull27, b803d16). I only made `Program`/`program` visible to the new tests and added two program kinds. ## Results (aggregate counts, incorrect dwords over nine dispatches) | Program | base W32 | head W32 | base W64 | head W64 | |---|---:|---:|---:|---:| | DXC control | 0/288 | 0/288 | 0/576 | 0/576 | | scc0, common store | 92/288 | 0/288 | 188/576 | 0/576 | | scc0, store in each arm | 92/288 | 0/288 | 188/576 | 0/576 | | scc1, store in each arm | 92/288 | 0/288 | 188/576 | 0/576 | Inactive lanes: 0 unexpected writes before and after. **WARP flake.** In 12 repeated runs of the repro on head, 8 had zero wrong dwords. In 4, one or two cells had 40-80 wrong dwords, always in the "selected lane just outside the running lanes" cases. A plain DXC-compiled HLSL control (`if (lane < below) { WaveActiveAnyTrue(lane == selected) }`, `WaveSize` declared) gives the same wrong result on this WARP in 2 of 25 runs, and it is always the same compiled pipeline. The DXIL I emit is the same on every run. The new GPU test therefore rebuilds the pipeline and only fails after three wrong pipelines in a row. On base, every pipeline is wrong. `cargo test -p victory-shader --lib` (`--test-threads=1`, same WARP): - base 63bcca4: 296 passed, 6 failed, 3 ignored - head: 299 passed, 6 failed, 4 ignored (+3 new tests, +1 ignored repro) - The same six tests fail on both. They are WARP-specific (gathers, permutes, edge-flagged triangles, FMA host naming) and are not touched by this change. Clippy `-D warnings` with `--all-features` and `cargo test -p xtask` (policy) pass. ## Adapters - App-local x64 WARP 1.0.22 (`Microsoft.Direct3D.WARP`), 32- and 64-lane waves. `VICTORY_WARP=1`, `VICTORY_D3D12_WARP=1`. - The system WARP (10.0.26100.9818) has no 32-lane waves, so the console-width tests skip there. - No physical GPU was used and no GPU numbers were measured. ## Overlap - #3401 (mask SCC as scalar data, plus the data-and-branch follow-up): this is the separate branch-only case, as the reporter's outputs show. It touches the same spots in `lower.rs` (the `console_lanes |=` line and the `sop` mask check). A trial merge shows only adjacent textual conflicts; both hunks are meant to stay. Whichever lands second rebases. - #233 also conflicts textually in `lower.rs`. It does the whole-wave branch inside its own halves flow. #2633 merges cleanly. ## Left open - A 64-lane console wave on a 32-lane host (two physical waves on NVIDIA): the program declares `WaveSize(64)`, so I expect the pipeline to be refused there, not mis-executed. I did not run it. An exact cross-half reduction needs group barriers, which are not valid inside the divergent region where the vote sits. It would come with the halves flow of #233. - Pixel and vertex programs with such a branch are now refused, where before they took the lane's own bit. - Masks that do not imply EXEC (complements) use the console-number path. It is not covered by a device test. AI-assisted: Claude Code (Claude Sonnet 5.5), results checked before posting. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
`s_and_b32/b64 sX, vcc, exec` followed directly by `s_cbranch_scc0/1`,
with nothing else reading the mask, made each active lane take its own
arm. The scalar AND sets SCC when any bit of the result is set, so every
active lane of the console wave takes the same arm.

structure finds those SCC values (`Structured::any_sccs`): a bitwise mask
operation that does not write EXEC, whose result nothing reads and whose
SCC only `s_cbranch_scc0/1` read. The branch then tests the uniform SCC
instead of the lane's own bit. A mask that is read (as EXEC in the arm,
say) keeps the lane's bit, as before.

lower gives such an SCC the wave's vote (`WaveActiveAnyTrue` of the mask's
bit, or the number of a complement tested for zero) and declares the
console's wave size, so the host's wave is the console's, 32 or 64
lanes. Outside compute it refuses cleanly.

Tests: GFX10 programs for scc0 and scc1 with a common store and with a
store in each arm, Wave32 and Wave64, whole and partial groups (lanes
0-47 of 64 active), and the control that reads the mask too.

Test program and DXC control by steven-seagull27 (b803d16).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 10:43:13 +00:00
Author
Owner

@⁠Venom2054 on GitHub · 2026-11-27 10:51 UTC · original

Physical NVIDIA readback on Windows, RTX 5070 Ti (32–32 hardware wave lanes), comparing the reporter-only baseline b803d168 with this head 61df32dc.

For guest Wave32, each of the three original translated programs went from 92/288 wrong on base to 0/288 on head. The DXC control was 0/288 on both. All inactive lanes kept their initial value. I also ran the four branch variants in the dedicated head test in 12 fresh processes. All 432 dispatches matched on the first pipeline, covering 13,824 output dwords.

For guest Wave64, the three baseline programs each produced 188/576 wrong on this adapter. On head, creation of the first translated Wave64 compute pipeline returned E_INVALIDARG before dispatch. The separate 64-thread groupshared DXC reference was 0/576 on both revisions. A native Wave64 hardware result on head remains open.

For comparison, a separate local two-Wave32 renderer with the DoubleGhosty SCC work adapted to it passed the same reporter matrix on the same card at both guest widths. That result depends on its split-wave implementation. All results here use synthetic programs. Testing assisted by Codex.

**@⁠Venom2054** on GitHub · 2026-11-27 10:51 UTC · [original](https://github.com/Marvisak/VIctory/pull/3500#issuecomment-7216392501) Physical NVIDIA readback on Windows, RTX 5070 Ti (32–32 hardware wave lanes), comparing the reporter-only baseline `b803d168` with this head `61df32dc`. For guest Wave32, each of the three original translated programs went from **92/288 wrong on base to 0/288 on head**. The DXC control was 0/288 on both. All inactive lanes kept their initial value. I also ran the four branch variants in the dedicated head test in 12 fresh processes. All 432 dispatches matched on the first pipeline, covering 13,824 output dwords. For guest Wave64, the three baseline programs each produced 188/576 wrong on this adapter. On head, creation of the first translated Wave64 compute pipeline returned `E_INVALIDARG` before dispatch. The separate 64-thread groupshared DXC reference was 0/576 on both revisions. A native Wave64 hardware result on head remains open. For comparison, a separate local two-Wave32 renderer with the [DoubleGhosty SCC work](https://github.com/DoubleGhosty/cool_fox/commit/bd8b4f524a1c63546ba0211c4d2c56c93605bcaf) adapted to it passed the same reporter matrix on the same card at both guest widths. That result depends on its split-wave implementation. All results here use synthetic programs. Testing assisted by Codex.
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-27 10:58 UTC · original

Venom2054's RTX 5070 Ti run confirms the remaining Wave64 pipeline problem on a 32-lane adapter. On exact 61df32d, I also reproduced two WARP failures in the GPU test where the selected lane was outside EXEC. Physical adapter report

I built a group-vote follow-up directly on 61df32d. For acyclic compute groups of one console wave, it checks every reachable branch before using group synchronization. The scalar branch uses the shared vote, and stores keep their EXEC guards. The native wave path covers the other shapes. 18ececb

On app-local WARP, the GPU test passed all 80 dispatches on the first pipeline for each variant. The original #3491 matrix matched all 2,592 translated dwords and 864 DXC control dwords with no inactive-lane writes. Test-only builds that requested host WaveSize(32) and WaveSize(4) also passed that matrix. The CLI check, strict shader Clippy, asset policy and the focused structure, range, lowerer and VALU tests passed.

This is ready to try on the RTX 5070 Ti with the same Wave64 fixture. Please retain Git authorship if taking the commit. If folding it into another commit, please add Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.

AI-assisted with Codex. Synthetic shaders only.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-27 10:58 UTC · [original](https://github.com/Marvisak/VIctory/pull/3500#issuecomment-7216525277) Venom2054's RTX 5070 Ti run confirms the remaining Wave64 pipeline problem on a 32-lane adapter. On exact `61df32d`, I also reproduced two WARP failures in the GPU test where the selected lane was outside EXEC. [Physical adapter report](https://git.gtahub.st/github/Marvisak--VIctory/pulls/3500) I built a group-vote follow-up directly on `61df32d`. For acyclic compute groups of one console wave, it checks every reachable branch before using group synchronization. The scalar branch uses the shared vote, and stores keep their EXEC guards. The native wave path covers the other shapes. [18ececb](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/18ececbad26be9cde60415a134560dcb4ceabaf0) On app-local WARP, the GPU test passed all 80 dispatches on the first pipeline for each variant. The original #3491 matrix matched all 2,592 translated dwords and 864 DXC control dwords with no inactive-lane writes. Test-only builds that requested host `WaveSize(32)` and `WaveSize(4)` also passed that matrix. The CLI check, strict shader Clippy, asset policy and the focused structure, range, lowerer and VALU tests passed. This is ready to try on the RTX 5070 Ti with the same Wave64 fixture. Please retain Git authorship if taking the commit. If folding it into another commit, please add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>`. AI-assisted with Codex. Synthetic shaders only.
A 32-lane host cannot create a pipeline that requires WaveSize(64), so the
Wave64 programs of the group vote must not declare one. Check the PSV0 wave
size of the emitted container for both widths, and that a group of several
console waves, which keeps the native wave path, still declares its own.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Author
Owner

@⁠oni-swr on GitHub · 2026-11-27 11:19 UTC · original

Thank you both. @⁠Venom2054, the Wave64 report found a real regression. @⁠andrewpozdnakov7-jpg, thanks for the follow-up.

Cause. At 61df32d a branch-only mask SCC set the shader's required wave size to the console width. A Wave64 program therefore required WaveSize(64), which a 32-lane host cannot create, and that matches the E_INVALIDARG on the RTX 5070 Ti. I could reproduce the same pipeline-creation failure on WARP at 61df32d: the ignored DXC-reference matrix test (every_active_lane_observes_the_scc_of_a_mask_operation) stops with "The parameter is incorrect" at its first translated pipeline.

Fix. I cherry-picked andrewpozdnakov7-jpg's 18ececb as 39438c9, with their authorship kept. For acyclic compute groups of at most one console wave, every reachable branch must be a plain EXEC or s_and vcc, exec SCC branch. The decision is then one group-wide vote through a shared dword. Stores keep their EXEC guards, and no host wave size is declared. Other shapes (loops, indirect branches, scalar memory writes, groups over one console wave) keep the native wave path, so a Wave64 program of that kind still requires WaveSize(64) and will not create on a 32-lane host. That is a clean refusal instead of wrong results, but a regression compared with base for those shapes.

I read the diff before taking it. The barriers sit only in control flow that the pre-check has made uniform for the whole group. The vote slot is reset, written and read between barriers, and is not reused until after a third one. LDS is capped so the extra dword fits.

I added a5ecc4b on top: a test that reads the emitted container's PSV0 and checks that the group-vote programs require no wave size, for Wave32 and Wave64. It also checks that a group of several console waves still declares its own width.

Results. All of this ran on WARP only: adapter d3d10warp.dll 10.0.26100.9818, Windows 11 build 26200, dxil.dll from the Windows SDK, VICTORY_WARP=1 and VICTORY_D3D12_WARP=1. Each commit was built in its own target directory.

  • The DXC-reference matrix test at head a5ecc4b shows 0/288 wrong at Wave32 and 0/576 at Wave64, for the DXC control and all three translated programs, with no inactive-lane writes. At 61df32d it stops at "The parameter is incorrect", as above.
  • The dedicated #3491 GPU test (80 dispatches) passed in 50 of 50 fresh processes at a5ecc4b.
  • victory-shader --lib (features host,diagnostics): base 63bcca4 has 298 passed, 4 failed, 3 ignored. Head has 303 passed, 4 failed, 4 ignored. The 4 failures are the same on both: synthetic_tests::{a_mask_joined_with_data_at_a_uniform_loop_is_its_number, gathers_at_a_level_match_the_hardware, permutes_mask_high_address_bits_and_divergent_branches, permutes_read_the_lane_named_and_zero_from_lanes_left_out}. They look like WARP's 4-lane waves, not this change. Head adds the new passing tests.
  • victory-gpu --lib: 231 passed, 0 failed, 1 ignored, on base and head.
  • Strict Clippy (-D warnings, all targets) is clean on victory-shader, with and without the host features, and on victory.

Outside-EXEC failures. Our earlier report called the remaining failures a WARP flake, and I had not checked that. I re-ran the dedicated test on 61df32d in 50 fresh processes and it passed all 50, so I could not reproduce the two failures where the selected lane was outside EXEC. That does not show they were not real. The WARP version and settings may differ, and the group vote removes that dependence on host wave layout anyway.

Limits. This WARP test cannot confirm 32-lane hardware behaviour. WARP's waves are narrower, and its handling of a required wave size is not an NVIDIA driver's.

@⁠Venom2054, could you re-run the Wave64 fixture, and the Wave32 one if convenient, on the RTX 5070 Ti at a5ecc4b? The first translated Wave64 pipeline should now create. I'd also like to know whether any outputs differ from the DXC reference.

AI use: this change, the review and this reply were done with Claude Code (Claude Sonnet 5.5). The shaders involved are synthetic.

Co-authored-by: andrewpozdnakov7-jpg [email protected]

**@⁠oni-swr** on GitHub · 2026-11-27 11:19 UTC · [original](https://github.com/Marvisak/VIctory/pull/3500#issuecomment-7216940275) Thank you both. @⁠Venom2054, the Wave64 report found a real regression. @⁠andrewpozdnakov7-jpg, thanks for the follow-up. **Cause.** At `61df32d` a branch-only mask SCC set the shader's required wave size to the console width. A Wave64 program therefore required `WaveSize(64)`, which a 32-lane host cannot create, and that matches the `E_INVALIDARG` on the RTX 5070 Ti. I could reproduce the same pipeline-creation failure on WARP at `61df32d`: the ignored DXC-reference matrix test (`every_active_lane_observes_the_scc_of_a_mask_operation`) stops with "The parameter is incorrect" at its first translated pipeline. **Fix.** I cherry-picked andrewpozdnakov7-jpg's 18ececb as `39438c9`, with their authorship kept. For acyclic compute groups of at most one console wave, every reachable branch must be a plain EXEC or `s_and vcc, exec` SCC branch. The decision is then one group-wide vote through a shared dword. Stores keep their EXEC guards, and no host wave size is declared. Other shapes (loops, indirect branches, scalar memory writes, groups over one console wave) keep the native wave path, so a Wave64 program of that kind still requires `WaveSize(64)` and will not create on a 32-lane host. That is a clean refusal instead of wrong results, but a regression compared with base for those shapes. I read the diff before taking it. The barriers sit only in control flow that the pre-check has made uniform for the whole group. The vote slot is reset, written and read between barriers, and is not reused until after a third one. LDS is capped so the extra dword fits. I added `a5ecc4b` on top: a test that reads the emitted container's PSV0 and checks that the group-vote programs require no wave size, for Wave32 and Wave64. It also checks that a group of several console waves still declares its own width. **Results.** All of this ran on WARP only: adapter `d3d10warp.dll` 10.0.26100.9818, Windows 11 build 26200, `dxil.dll` from the Windows SDK, `VICTORY_WARP=1` and `VICTORY_D3D12_WARP=1`. Each commit was built in its own target directory. - The DXC-reference matrix test at head `a5ecc4b` shows 0/288 wrong at Wave32 and 0/576 at Wave64, for the DXC control and all three translated programs, with no inactive-lane writes. At `61df32d` it stops at "The parameter is incorrect", as above. - The dedicated #3491 GPU test (80 dispatches) passed in 50 of 50 fresh processes at `a5ecc4b`. - `victory-shader --lib` (features `host,diagnostics`): base `63bcca4` has 298 passed, 4 failed, 3 ignored. Head has 303 passed, 4 failed, 4 ignored. The 4 failures are the same on both: `synthetic_tests::{a_mask_joined_with_data_at_a_uniform_loop_is_its_number, gathers_at_a_level_match_the_hardware, permutes_mask_high_address_bits_and_divergent_branches, permutes_read_the_lane_named_and_zero_from_lanes_left_out}`. They look like WARP's 4-lane waves, not this change. Head adds the new passing tests. - `victory-gpu --lib`: 231 passed, 0 failed, 1 ignored, on base and head. - Strict Clippy (`-D warnings`, all targets) is clean on `victory-shader`, with and without the host features, and on `victory`. **Outside-EXEC failures.** Our earlier report called the remaining failures a WARP flake, and I had not checked that. I re-ran the dedicated test on `61df32d` in 50 fresh processes and it passed all 50, so I could not reproduce the two failures where the selected lane was outside EXEC. That does not show they were not real. The WARP version and settings may differ, and the group vote removes that dependence on host wave layout anyway. **Limits.** This WARP test cannot confirm 32-lane hardware behaviour. WARP's waves are narrower, and its handling of a required wave size is not an NVIDIA driver's. @⁠Venom2054, could you re-run the Wave64 fixture, and the Wave32 one if convenient, on the RTX 5070 Ti at `a5ecc4b`? The first translated Wave64 pipeline should now create. I'd also like to know whether any outputs differ from the DXC reference. AI use: this change, the review and this reply were done with Claude Code (Claude Sonnet 5.5). The shaders involved are synthetic. Co-authored-by: andrewpozdnakov7-jpg <[email protected]>
Author
Owner

@⁠pickles976 on GitHub · 2026-11-27 11:42 UTC · original

Verified exact production head a5ecc4bbb5227766472f990e1e67b86f4cae3bcc on physical RTX4060 Laptop8GiB / Linux / Wine11 / NVIDIA590.48.1, 16GiB system RAM. This uses our disclosed diagnostic relaxed-vkd3d2576c0b4adfae4a+ stack, not stock/native-Windows certification.

cargo test -p victory-shader --lib mask_branch_tests -- --nocapture --test-threads=1: 4passed,0failed,0ignored,1.72s; fresh compilation from VIctory-pr3500,5.98s. Test-only strengthening requires a host, checks its actual DXGI LUID maps to NVIDIA vendor0x10de, and makes the DXIL validator mandatory. No production edits.

The GPU fixture executed all 80 dispatches / 3,968 output words, covering both32- and64-lane console groups and all four SCC0/SCC1 common/separate-store forms, including empty/partial active masks and selected lanes immediately outside them. Full readbacks matched on the first run; no retry loop, no WARP and no skipped adapter. Eight translated modules passed the required validator. The separate multiple-console-wave test checks required wave-size metadata; it does not dispatch a multiwave Wave64 program on this GPU.

This validates the current head's single-logical-wave group-vote path on a32-lane physical GPU, beyond the earlier PR-body WARP evidence. Scope/guards unchanged; GPUpeak234MiB, minimum availableRAM10502.6MiB, disk15.580GiB. Evidence .compat-runtime/logs/verify-pr3500-nvidia-mask-branch-20261127T114109Z/.

No matched-parent GPU run or title/frame-rate claim. In particular group_control_is_safe excludes backedges, and for_compute limits this path to one logical wave: this is not a fix for our independent-loop/multiwave BVH or post-loop scalar-state gates. It is a useful positive correctness result without promoting the currently failing #2633 integration.

**@⁠pickles976** on GitHub · 2026-11-27 11:42 UTC · [original](https://github.com/Marvisak/VIctory/pull/3500#issuecomment-7217381663) Verified exact production head `a5ecc4bbb5227766472f990e1e67b86f4cae3bcc` on **physical RTX4060 Laptop8GiB / Linux / Wine11 / NVIDIA590.48.1**, 16GiB system RAM. This uses our disclosed diagnostic relaxed-vkd3d2576c0b4adfae4a+ stack, not stock/native-Windows certification. `cargo test -p victory-shader --lib mask_branch_tests -- --nocapture --test-threads=1`: **4passed,0failed,0ignored**,1.72s; fresh compilation from `VIctory-pr3500`,5.98s. Test-only strengthening requires a host, checks its actual DXGI LUID maps to NVIDIA vendor0x10de, and makes the DXIL validator mandatory. No production edits. The GPU fixture executed all **80 dispatches / 3,968 output words**, covering both32- and64-lane console groups and all four SCC0/SCC1 common/separate-store forms, including empty/partial active masks and selected lanes immediately outside them. Full readbacks matched on the first run; no retry loop, no WARP and no skipped adapter. Eight translated modules passed the required validator. The separate multiple-console-wave test checks required wave-size metadata; it does **not** dispatch a multiwave Wave64 program on this GPU. This validates the current head's **single-logical-wave group-vote path on a32-lane physical GPU**, beyond the earlier PR-body WARP evidence. Scope/guards unchanged; GPUpeak234MiB, minimum availableRAM10502.6MiB, disk15.580GiB. Evidence `.compat-runtime/logs/verify-pr3500-nvidia-mask-branch-20261127T114109Z/`. No matched-parent GPU run or title/frame-rate claim. In particular `group_control_is_safe` excludes backedges, and `for_compute` limits this path to one logical wave: this is not a fix for our independent-loop/multiwave BVH or post-loop scalar-state gates. It is a useful positive correctness result without promoting the currently failing #2633 integration.
Author
Owner

@⁠ColorMeBoom on GitHub · 2026-11-27 13:15 UTC · original

AMD run: RX 5700 XT (RDNA1; the driver reports 32–64 lanes, so it may pick either; no mesh shaders), driver 32.0.21045.29003, Windows 11 26200, Rust 1.98.1. The PR head was merged onto main 63bcca4, tests ran on the native adapter (VICTORY_WARP unset), no game files. Head a5ecc4b. The NVIDIA reports here are from 32-lane-only cards; this card also runs 64-lane waves.

  • mask_branch tests: 5 passed, 0 failed, 1 ignored. every_active_lane_takes_the_arm_of_the_waves_vote_on_gpu ran its 80 dispatches.

  • The ignored every_active_lane_observes_the_scc_of_a_mask_operation (--ignored, with the Windows SDK's PC DXC):

    DxcReference Branch StoreOnScc0 StoreOnScc1
    Wave32 0/288 0/288 0/288 0/288
    Wave64 0/576 0/576 0/576 0/576

    (incorrect / total, 0 inactive in every row.)

  • Full victory-shader suite (--features host): 307 passed, 0 failed, 4 ignored.

AI use: Claude Code (Claude Opus 5.5).

**@⁠ColorMeBoom** on GitHub · 2026-11-27 13:15 UTC · [original](https://github.com/Marvisak/VIctory/pull/3500#issuecomment-7219253799) **AMD run: RX 5700 XT** (RDNA1; the driver reports 32–64 lanes, so it may pick either; no mesh shaders), driver 32.0.21045.29003, Windows 11 26200, Rust 1.98.1. The PR head was merged onto `main` `63bcca4`, tests ran on the native adapter (`VICTORY_WARP` unset), no game files. Head `a5ecc4b`. The NVIDIA reports here are from 32-lane-only cards; this card also runs 64-lane waves. - `mask_branch` tests: **5 passed, 0 failed, 1 ignored**. `every_active_lane_takes_the_arm_of_the_waves_vote_on_gpu` ran its 80 dispatches. - The ignored `every_active_lane_observes_the_scc_of_a_mask_operation` (`--ignored`, with the Windows SDK's PC DXC): | | DxcReference | Branch | StoreOnScc0 | StoreOnScc1 | | --- | --- | --- | --- | --- | | Wave32 | 0/288 | 0/288 | 0/288 | 0/288 | | Wave64 | 0/576 | 0/576 | 0/576 | 0/576 | (incorrect / total, 0 inactive in every row.) - Full `victory-shader` suite (`--features host`): **307 passed, 0 failed, 4 ignored**. AI use: Claude Code (Claude Opus 5.5).
Author
Owner

@⁠kilolimaVI on GitHub · 2026-11-27 13:58 UTC · original

Ran the ignored hardware test on AMD: head a5ecc4b, Windows 11, AMD Radeon 780M (RDNA3, reports WaveLaneCountMin/Max 32/64), PC dxc.exe from the Windows SDK, toolchain 1.98.1.

  • every_active_lane_observes_the_scc_of_a_mask_operation (--ignored --nocapture): ok. DXC reference Wave32 0/288 and Wave64 0/576 incorrect; the test's total_wrong == 0 assert covers the translated Branch / StoreOnScc0 / StoreOnScc1 programs too, for both widths.
  • mask_branch tests: 5 passed (group_vote_branches_keep_vector_store_guards, a_group_of_several_console_waves_keeps_the_native_wave_size, every_active_lane_takes_the_arm_of_the_waves_vote_on_gpu, only_a_branch_reads_the_scc_of_a_mask_it_is_found, the_branches_on_the_waves_vote_validate).
  • Whole victory-shader lib: 307 passed, 0 failed, 4 ignored.

This card can run both wave sizes, so it doesn't exercise the 32-lane-only PSO creation from #3491, but it shows the change keeps the results right on a (32,64) AMD host.

AI-assisted (Claude).

**@⁠kilolimaVI** on GitHub · 2026-11-27 13:58 UTC · [original](https://github.com/Marvisak/VIctory/pull/3500#issuecomment-7220164809) Ran the ignored hardware test on AMD: head a5ecc4b, Windows 11, AMD Radeon 780M (RDNA3, reports WaveLaneCountMin/Max 32/64), PC `dxc.exe` from the Windows SDK, toolchain 1.98.1. - `every_active_lane_observes_the_scc_of_a_mask_operation` (`--ignored --nocapture`): ok. DXC reference Wave32 0/288 and Wave64 0/576 incorrect; the test's `total_wrong == 0` assert covers the translated Branch / StoreOnScc0 / StoreOnScc1 programs too, for both widths. - `mask_branch` tests: 5 passed (`group_vote_branches_keep_vector_store_guards`, `a_group_of_several_console_waves_keeps_the_native_wave_size`, `every_active_lane_takes_the_arm_of_the_waves_vote_on_gpu`, `only_a_branch_reads_the_scc_of_a_mask_it_is_found`, `the_branches_on_the_waves_vote_validate`). - Whole `victory-shader` lib: 307 passed, 0 failed, 4 ignored. This card can run both wave sizes, so it doesn't exercise the 32-lane-only PSO creation from #3491, but it shows the change keeps the results right on a (32,64) AMD host. AI-assisted (Claude).
This pull request can be merged automatically.
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/3500/head:github-bot/gh-3500'
git switch 'github-bot/gh-3500'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3500'
git switch 'github-bot/gh-3500'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3500'
git switch 'github-bot/gh-3500'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3500'
git switch 'main'
git merge --squash 'github-bot/gh-3500'
git switch 'main'
git merge --ff-only 'github-bot/gh-3500'
git switch 'main'
git merge 'github-bot/gh-3500'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!3500
No description provided.