Shaders: test raw VCC on s_cbranch_vccz and s_cbranch_vccnz without EXEC masking #2405

Open
github-bot wants to merge 6 commits from github-bot/gh-2405 into main AGit
Owner

@⁠ashrafsdrop on GitHub · 2026-11-25 13:04 UTC · original
ashrafsdrop:shader/vcc-branch-no-exec-026 → main · +941 −41 · 9 files · 6 commits · open

Resolves VIC-BT-026 from #1249:

Summary

  • On RDNA2, s_cbranch_vccz and s_cbranch_vccnz branch on whether the entire 32/64-bit VCC register is zero (VCC == 0 / VCC != 0), rather than each lane branching on its own VCC bit.
  • Preserves both scalar mask words, materializes vector comparisons before EXEC narrows, bounds the uniform counter case, and refuses joins whose scalar VCC value cannot be recovered.
  • Includes commit f0518e4 (authored by @⁠steven-seagull27, preserved).

Verification

  • Hardware/WARP Wave32 & Wave64 readback tests (vcc_branches_take_one_scalar_path_for_the_wave, vcc_branches_isolate_two_full_guest_waves, vcc_branches_isolate_a_partial_second_guest_wave, vcc_branches_read_all_bits_of_a_scalar_mask_in_a_partial_group) fail on origin/main (940d32f) and pass on f0518e4.
  • cargo test -p victory-shader: 255 passed, 0 failed, 3 ignored.
  • cargo clippy -p victory-shader --all-targets --all-features -- -D warnings: clean.
  • cargo run -p xtask -- policy: 182 files ok.
**@⁠ashrafsdrop** on GitHub · 2026-11-25 13:04 UTC · [original](https://github.com/Marvisak/VIctory/pull/2405) `ashrafsdrop:shader/vcc-branch-no-exec-026` → `main` · +941 −41 · 9 files · 6 commits · open Resolves `VIC-BT-026` from #1249: ### Summary - On RDNA2, `s_cbranch_vccz` and `s_cbranch_vccnz` branch on whether the entire 32/64-bit `VCC` register is zero (`VCC == 0` / `VCC != 0`), rather than each lane branching on its own `VCC` bit. - Preserves both scalar mask words, materializes vector comparisons before `EXEC` narrows, bounds the uniform counter case, and refuses joins whose scalar `VCC` value cannot be recovered. - Includes commit `f0518e4` (authored by @⁠steven-seagull27, preserved). ### Verification - Hardware/WARP Wave32 & Wave64 readback tests (`vcc_branches_take_one_scalar_path_for_the_wave`, `vcc_branches_isolate_two_full_guest_waves`, `vcc_branches_isolate_a_partial_second_guest_wave`, `vcc_branches_read_all_bits_of_a_scalar_mask_in_a_partial_group`) fail on `origin/main` (`940d32f`) and pass on `f0518e4`. - `cargo test -p victory-shader`: 255 passed, 0 failed, 3 ignored. - `cargo clippy -p victory-shader --all-targets --all-features -- -D warnings`: clean. - `cargo run -p xtask -- policy`: 182 files ok.
Resolves VIC-BT-026 from #1249:

- On RDNA2, s_cbranch_vccz and s_cbranch_vccnz test the raw VCC register rather than VCC & EXEC.
- Remove the extra b.and(vcc, exec) in Lanes::branch() so branch conditions preserve raw VCC bits even when EXEC is narrowed independently.
- Add vcc_branch_tests_raw_vcc_without_exec covering both s_cbranch_vccnz and s_cbranch_vccz.
Preserve both scalar mask words and materialize vector comparisons before EXEC narrows. Bound the uniform counter case and refuse joins whose scalar value cannot be recovered. Exercise mixed lanes, scalar masks, independent waves and partial groups.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:04:52 +00:00
github-bot force-pushed github-bot/gh-2405 from 34c7ec208e to c16e7c3ea4 2026-11-26 06:31:34 +00:00 Compare
Author
Owner

@⁠oni-swr on GitHub · 2026-11-25 13:34 UTC · original

WARP verification + comparison with #2406

Tested: PR head b38a4b6a05fd4f40eb9a5052f9c2cf17fc4663f4, on origin/main 940d32f69b22265690a0b5a15d6ded572ba33baf (the PR is one commit on that base, so the merge was a no-op).
Environment: VICTORY_D3D12_WARP=1 (software WARP), Windows 11 Pro 10.0.26200, rustc 1.98.1, DXC 1.9.0.5512 (dxcompiler), dxil.dll 1.8.2502.11 on PATH.

Command Result
cargo test -p victory-shader --lib --locked ok: 248 passed, 0 failed, 3 ignored (two benchmarks and one defect_ test, all ignored on main too)
cargo clippy -p victory-shader --all-targets --locked -- -D warnings exit 0
cargo xtask policy asset policy: 182 files ok, exit 0

The new test structure::tests::vcc_branch_tests_raw_vcc_without_exec ran and passed (not skipped). I did not run it against unpatched main, so I have not shown that it fails without the fix.

Diff comparison with #2406 (same file, same lines in Lanes::branch in structure.rs):

  • Code: both drop and(vcc, exec) and test raw VCC for s_cbranch_vccz / s_cbranch_vccnz. The resulting Bool is identical. #2406 also moves the exec() read into the execz / execnz arms and adds a comment. That has no behavioural effect, since exec() has no side effects there.
  • Tests: this PR runs v_cmp then v_cmpx, so VCC is a per-lane value and EXEC differs. It checks both branch forms, and that when is the compare's lane atom with the right polarity. #2406 uses constant VCC (s_mov_b32 vcc_lo, -1 / 0) under a narrowed EXEC and checks Bool::TRUE. The two cover different cases. Either PR could take the other's test.
  • Neither PR changes how wave64 reads the high half of VCC. I did not test wave64.

Limits: WARP only, no physical hardware GPU, no game files or dumps. Diff reviewed in full: the only changes are in structure.rs, with no process, network or filesystem actions.

AI use: Claude Code (Claude Sonnet 5.5)

**@⁠oni-swr** on GitHub · 2026-11-25 13:34 UTC · [original](https://github.com/Marvisak/VIctory/pull/2405#issuecomment-7163972994) **WARP verification + comparison with #2406** Tested: PR head `b38a4b6a05fd4f40eb9a5052f9c2cf17fc4663f4`, on `origin/main` `940d32f69b22265690a0b5a15d6ded572ba33baf` (the PR is one commit on that base, so the merge was a no-op). Environment: `VICTORY_D3D12_WARP=1` (software WARP), Windows 11 Pro 10.0.26200, rustc 1.98.1, DXC 1.9.0.5512 (dxcompiler), dxil.dll 1.8.2502.11 on `PATH`. | Command | Result | |---|---| | `cargo test -p victory-shader --lib --locked` | ok: 248 passed, 0 failed, 3 ignored (two benchmarks and one `defect_` test, all ignored on main too) | | `cargo clippy -p victory-shader --all-targets --locked -- -D warnings` | exit 0 | | `cargo xtask policy` | `asset policy: 182 files ok`, exit 0 | The new test `structure::tests::vcc_branch_tests_raw_vcc_without_exec` ran and passed (not skipped). I did not run it against unpatched main, so I have not shown that it fails without the fix. **Diff comparison with #2406** (same file, same lines in `Lanes::branch` in `structure.rs`): - Code: both drop `and(vcc, exec)` and test raw VCC for `s_cbranch_vccz` / `s_cbranch_vccnz`. The resulting `Bool` is identical. #2406 also moves the `exec()` read into the `execz` / `execnz` arms and adds a comment. That has no behavioural effect, since `exec()` has no side effects there. - Tests: this PR runs `v_cmp` then `v_cmpx`, so VCC is a per-lane value and EXEC differs. It checks both branch forms, and that `when` is the compare's lane atom with the right polarity. #2406 uses constant VCC (`s_mov_b32 vcc_lo, -1` / `0`) under a narrowed EXEC and checks `Bool::TRUE`. The two cover different cases. Either PR could take the other's test. - Neither PR changes how wave64 reads the high half of VCC. I did not test wave64. Limits: WARP only, no physical hardware GPU, no game files or dumps. Diff reviewed in full: the only changes are in `structure.rs`, with no process, network or filesystem actions. AI use: Claude Code (Claude Sonnet 5.5)
Author
Owner

@⁠steven-seagull27 on GitHub · 2026-11-25 13:35 UTC · original

There’s a Wave32 case where lanes disagree on a scalar branch, on both this head (b38a4b6) and #2406 (583fc17). I also reproduced it on the common parent 940d32f.

A vector compare sets only bit 0 of VCC. A separate v_cmpx_eq_u32 then enables only lane 1 in EXEC. The scalar branch chooses between 11 and 23 in an SGPR. The shader restores EXEC before every lane writes that SGPR to its own output word. The RDNA2 branch tests whether the entire VCC register is zero, so every lane should observe the same scalar value. AMD RDNA2 ISA, scalar branches and VCCZ

Guest condition Expected in all 32 words Readback on this head
VCC bit 0 set, s_cbranch_vccnz 11 Lane 0 = 11, lanes 1–31 = 23
VCC bit 0 set, s_cbranch_vccz 23 Lane 0 = 23, lanes 1–31 = 11
VCC zero, either branch 23 for NZ, 11 for Z All 32 matched for each opcode

These are 62 mismatches in 128 output words on each revision, independently on an RTX 5080 (621.40), built-in WARP (10.0.26100.10068), and app-local WARP 1.0.22. The guest shader uses one 32-thread group. Built-in WARP advertises 4-wide host waves; the RTX and the separate WARP run provide the 32-capable comparison.

Both PRs’ new structural tests also pass when transplanted onto the parent. There’s a reason in the IR: these two SOPP opcodes declare a VCC read, and Lanes::exec defaults to true for an instruction without an EXEC read. Removing the AND therefore leaves the parent result intact in these cases. The mixed-lane readback is a way to test the remaining wave-wide decision.

Test-only commit on the common parent

git fetch https://github.com/steven-seagull27/VIctory.git refs/heads/codex/pr2405-2406-vcc-wave-readback
git cherry-pick e0b10c17b1de49abe7d469f120803eec42429044
cargo test -p victory-shader --lib --locked vcc_branches_take_one_scalar_path_for_the_wave -- --nocapture --test-threads=1

AI-assisted with Codex. Synthetic shaders only.

**@⁠steven-seagull27** on GitHub · 2026-11-25 13:35 UTC · [original](https://github.com/Marvisak/VIctory/pull/2405#issuecomment-7163994324) There’s a Wave32 case where lanes disagree on a scalar branch, on both this head (`b38a4b6`) and #2406 (`583fc17`). I also reproduced it on the common parent `940d32f`. A vector compare sets only bit 0 of VCC. A separate `v_cmpx_eq_u32` then enables only lane 1 in EXEC. The scalar branch chooses between 11 and 23 in an SGPR. The shader restores EXEC before every lane writes that SGPR to its own output word. The RDNA2 branch tests whether the entire VCC register is zero, so every lane should observe the same scalar value. [AMD RDNA2 ISA, scalar branches and VCCZ](https://docs.amd.com/api/khub/documents/Et~wpu9g~Ffl7d9q0QZ~Og/content) | Guest condition | Expected in all 32 words | Readback on this head | |---|---:|---| | VCC bit 0 set, `s_cbranch_vccnz` | 11 | Lane 0 = 11, lanes 1–31 = 23 | | VCC bit 0 set, `s_cbranch_vccz` | 23 | Lane 0 = 23, lanes 1–31 = 11 | | VCC zero, either branch | 23 for NZ, 11 for Z | All 32 matched for each opcode | These are **62 mismatches in 128 output words** on each revision, independently on an RTX 5080 (621.40), built-in WARP (10.0.26100.10068), and app-local WARP 1.0.22. The guest shader uses one 32-thread group. Built-in WARP advertises 4-wide host waves; the RTX and the separate WARP run provide the 32-capable comparison. Both PRs’ new structural tests also pass when transplanted onto the parent. There’s a reason in the IR: these two SOPP opcodes declare a VCC read, and `Lanes::exec` defaults to true for an instruction without an EXEC read. Removing the AND therefore leaves the parent result intact in these cases. The mixed-lane readback is a way to test the remaining wave-wide decision. [Test-only commit on the common parent](https://github.com/steven-seagull27/VIctory/commit/e0b10c17b1de49abe7d469f120803eec42429044) ```sh git fetch https://github.com/steven-seagull27/VIctory.git refs/heads/codex/pr2405-2406-vcc-wave-readback git cherry-pick e0b10c17b1de49abe7d469f120803eec42429044 cargo test -p victory-shader --lib --locked vcc_branches_take_one_scalar_path_for_the_wave -- --nocapture --test-threads=1 ``` AI-assisted with Codex. Synthetic shaders only.
Author
Owner

@⁠steven-seagull27 on GitHub · 2026-11-25 14:26 UTC · original

I pushed a single cherry-pick for this PR on top of b38a4b6. It evaluates both scalar branches from the whole guest VCC register. Scalar writes retain every bit, even when EXEC is empty. For a vector comparison, the compiler captures the mask where the comparison executes, before a later EXEC change can hide the lane that set it.

git fetch https://github.com/steven-seagull27/VIctory.git refs/heads/codex/pr2405-vcc-wave-integration
git cherry-pick 724e1aa1ce4189678e92bea07e8a1ab7006c6f6e
cargo test --locked -p victory-shader --lib vcc_branch -- --test-threads=1 --nocapture

In the original Wave32 case, lane 0 sets the only VCC bit and a subsequent comparison leaves only lane 1 in EXEC. The PR head got 62/128 output words wrong on both the RTX 5080 (driver 621.40) and WARP 1.0.22. The cherry-pick got 0/128 wrong on each. When scalar code wrote VCC in a one-thread group, all 24 outputs also matched on the RTX, built-in WARP and WARP 1.0.22, including when only bit 4 or 31 was set.

Independent guest waves, wrong output words RTX 5080 WARP 1.0.22
Wave32, two full waves 0/512 0/512
Wave32, 13 live lanes in the second wave 0/360 26/360
Wave64, two full waves Width unavailable 0/1,024
Wave64, 21 live lanes in the second wave Width unavailable 0–45/680 across six processes

Built-in WARP on this PC advertises only four lanes and skipped the fixed-width tests. The 26 incorrect Wave32 words on WARP 1.0.22 are the same 13 lanes for both branch instructions. A standalone DXC shader reproduced it without VIctory. With [WaveSize(32)] and 45 threads, all 13 live tail threads saw WaveActiveBallot(id == 44).x equal zero. The RTX returned 0x1000. For Wave64 on this commit, six fresh WARP 1.0.22 processes returned 18, 38, 0, 0, 8 and 45 incorrect words out of 680 in the 85-thread group. A separate optimized native HLSL shader that stores just the branch decision also returned 28 incorrect words out of 1,700 across five processes. The exact cause is still open. The partial-group regression retains its assertion.

Native Wave32 control

I compiled this control with DXC for cs_6_6 and dispatched one group. Each thread writes its ID and wave metadata followed by the two ballot comparisons and the active-lane count.

[WaveSize(32)]
[numthreads(45, 1, 1)]
void main(uint id : SV_GroupIndex) {
    RWByteAddressBuffer result = ResourceDescriptorHeap[2];
    uint first = WaveReadLaneFirst(id);
    uint lane = WaveGetLaneIndex();
    uint mapped = ((first & ~31u) + lane) % 45;
    result.Store4(id * 48, uint4(id, lane, first, mapped));
    result.Store4(id * 48 + 16, uint4(
        WaveActiveAnyTrue(id == 44), WaveActiveBallot(id == 44).x,
        WaveActiveAnyTrue(mapped == 44), WaveActiveBallot(mapped == 44).x));
    result.Store4(id * 48 + 32, uint4(WaveGetLaneCount(), WaveActiveCountBits(true), WaveActiveBallot(true).x, 0x1234));
}

The compiler explicitly reports unsupported when a scalar VCC write merges through lane-divergent control flow, or when a vector mask needs a guest width the shader stage cannot establish. The ordinary loop-counter and dead-path tests pass. The complete shader library suite on the default RTX/system-WARP setup had 252 passed, 3 failed and 3 ignored. The same two buffer-stride tests and one texture-gather test failed on the unpatched PR head. Strict shader Clippy passed.

AI-assisted with Codex.

**@⁠steven-seagull27** on GitHub · 2026-11-25 14:26 UTC · [original](https://github.com/Marvisak/VIctory/pull/2405#issuecomment-7165284257) I pushed a [single cherry-pick for this PR](https://github.com/steven-seagull27/VIctory/commit/724e1aa1ce4189678e92bea07e8a1ab7006c6f6e) on top of `b38a4b6`. It evaluates both scalar branches from the whole guest VCC register. Scalar writes retain every bit, even when EXEC is empty. For a vector comparison, the compiler captures the mask where the comparison executes, before a later EXEC change can hide the lane that set it. ```sh git fetch https://github.com/steven-seagull27/VIctory.git refs/heads/codex/pr2405-vcc-wave-integration git cherry-pick 724e1aa1ce4189678e92bea07e8a1ab7006c6f6e cargo test --locked -p victory-shader --lib vcc_branch -- --test-threads=1 --nocapture ``` In the original Wave32 case, lane 0 sets the only VCC bit and a subsequent comparison leaves only lane 1 in EXEC. The PR head got 62/128 output words wrong on both the RTX 5080 (driver 621.40) and WARP 1.0.22. The cherry-pick got **0/128 wrong on each**. When scalar code wrote VCC in a one-thread group, all 24 outputs also matched on the RTX, built-in WARP and WARP 1.0.22, including when only bit 4 or 31 was set. | Independent guest waves, wrong output words | RTX 5080 | WARP 1.0.22 | |---|---:|---:| | Wave32, two full waves | 0/512 | 0/512 | | Wave32, 13 live lanes in the second wave | 0/360 | 26/360 | | Wave64, two full waves | Width unavailable | 0/1,024 | | Wave64, 21 live lanes in the second wave | Width unavailable | 0–45/680 across six processes | Built-in WARP on this PC advertises only four lanes and skipped the fixed-width tests. The 26 incorrect Wave32 words on WARP 1.0.22 are the same 13 lanes for both branch instructions. A standalone DXC shader reproduced it without VIctory. With `[WaveSize(32)]` and 45 threads, all 13 live tail threads saw `WaveActiveBallot(id == 44).x` equal zero. The RTX returned `0x1000`. For Wave64 on this commit, six fresh WARP 1.0.22 processes returned 18, 38, 0, 0, 8 and 45 incorrect words out of 680 in the 85-thread group. A separate optimized native HLSL shader that stores just the branch decision also returned 28 incorrect words out of 1,700 across five processes. The exact cause is still open. The partial-group regression retains its assertion. <details> <summary>Native Wave32 control</summary> I compiled this control with DXC for `cs_6_6` and dispatched one group. Each thread writes its ID and wave metadata followed by the two ballot comparisons and the active-lane count. ```hlsl [WaveSize(32)] [numthreads(45, 1, 1)] void main(uint id : SV_GroupIndex) { RWByteAddressBuffer result = ResourceDescriptorHeap[2]; uint first = WaveReadLaneFirst(id); uint lane = WaveGetLaneIndex(); uint mapped = ((first & ~31u) + lane) % 45; result.Store4(id * 48, uint4(id, lane, first, mapped)); result.Store4(id * 48 + 16, uint4( WaveActiveAnyTrue(id == 44), WaveActiveBallot(id == 44).x, WaveActiveAnyTrue(mapped == 44), WaveActiveBallot(mapped == 44).x)); result.Store4(id * 48 + 32, uint4(WaveGetLaneCount(), WaveActiveCountBits(true), WaveActiveBallot(true).x, 0x1234)); } ``` </details> The compiler explicitly reports unsupported when a scalar VCC write merges through lane-divergent control flow, or when a vector mask needs a guest width the shader stage cannot establish. The ordinary loop-counter and dead-path tests pass. The complete shader library suite on the default RTX/system-WARP setup had 252 passed, 3 failed and 3 ignored. The same two buffer-stride tests and one texture-gather test failed on the unpatched PR head. Strict shader Clippy passed. AI-assisted with Codex.
Author
Owner

@⁠upipibi on GitHub · 2026-11-25 14:51 UTC · original

@⁠steven-seagull27 RTX 3070 run of 724e1aa, as you asked: driver 616.56, Windows 11, debug, from a clean checkout, with cargo test --locked -p victory-shader --lib vcc_branch -- --test-threads=1 --nocapture. 5 passed, 0 failed, no SKIPPED. The hardware lines:

vcc_branches_take_one_scalar_path_for_the_wave (mixed lanes, Wave32):
  MIXED hardware vccz  any=true  want=23 mismatches=0/32
  MIXED hardware vccz  any=false want=11 mismatches=0/32
  MIXED hardware vccnz any=true  want=11 mismatches=0/32
  MIXED hardware vccnz any=false want=23 mismatches=0/32
vcc_branches_isolate_two_full_guest_waves:
  hardware Wave32 group=64 vccz: all four readbacks matched
  hardware Wave32 group=64 vccnz: all four readbacks matched
vcc_branches_isolate_a_partial_second_guest_wave:
  hardware Wave32 group=45 vccz: all four readbacks matched
  hardware Wave32 group=45 vccnz: all four readbacks matched
  • Wave64 isn't available on this card (lane range 32..=32), so those tests' Wave64 dispatches were skipped by the tests themselves.
  • WARP here reports a lane range of 4..=4 and skipped the Wave32 dispatch ("Wave32 unavailable … no dispatch"), so this run has no WARP result for these cases.
  • vcc_branches_read_all_bits_of_a_scalar_mask_in_a_partial_group and structure::tests::vcc_branch_tests_raw_vcc_without_exec pass too.
  • Full cargo test --locked -p victory-shader at 724e1aa: 252 passed, 3 failed, 3 ignored. The 3 are #1744's NVIDIA failures that main has too.

One run only.

AI-assisted (Claude Code). Synthetic tests only.

**@⁠upipibi** on GitHub · 2026-11-25 14:51 UTC · [original](https://github.com/Marvisak/VIctory/pull/2405#issuecomment-7165919279) @⁠steven-seagull27 RTX 3070 run of `724e1aa`, as you asked: driver 616.56, Windows 11, debug, from a clean checkout, with `cargo test --locked -p victory-shader --lib vcc_branch -- --test-threads=1 --nocapture`. **5 passed, 0 failed, no `SKIPPED`.** The `hardware` lines: ``` vcc_branches_take_one_scalar_path_for_the_wave (mixed lanes, Wave32): MIXED hardware vccz any=true want=23 mismatches=0/32 MIXED hardware vccz any=false want=11 mismatches=0/32 MIXED hardware vccnz any=true want=11 mismatches=0/32 MIXED hardware vccnz any=false want=23 mismatches=0/32 vcc_branches_isolate_two_full_guest_waves: hardware Wave32 group=64 vccz: all four readbacks matched hardware Wave32 group=64 vccnz: all four readbacks matched vcc_branches_isolate_a_partial_second_guest_wave: hardware Wave32 group=45 vccz: all four readbacks matched hardware Wave32 group=45 vccnz: all four readbacks matched ``` - Wave64 isn't available on this card (lane range 32..=32), so those tests' Wave64 dispatches were skipped by the tests themselves. - WARP here reports a lane range of 4..=4 and skipped the Wave32 dispatch ("Wave32 unavailable … no dispatch"), so this run has no WARP result for these cases. - `vcc_branches_read_all_bits_of_a_scalar_mask_in_a_partial_group` and `structure::tests::vcc_branch_tests_raw_vcc_without_exec` pass too. - Full `cargo test --locked -p victory-shader` at `724e1aa`: 252 passed, 3 failed, 3 ignored. The 3 are #1744's NVIDIA failures that `main` has too. One run only. AI-assisted (Claude Code). Synthetic tests only.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 15:31 UTC · original · edited 2026-11-26 05:21 UTC

Automated triage for the maintainers.

Needs work, and needs the maintainer's decision on the trade-off. Re-reviewed head 7ffdba5, which answers both points of the last note: the VCC lowering now lives in crates/victory-shader/src/emit/lower/vcc.rs and the policy check passes, and the census in this thread on main 63bcca4 shows the ~950 unrelated graphics losses are gone (the graphics fallback in structure.rs/range.rs via range::build_native).

What remains: the same census measures 878 compute programs that validate on main and are refused with this PR (623 a scalar VCC branch depending on a divergent scalar join, 254 ... with mask bits outside its producing path, 1 structure limit), with none gained. These are the new Errs in vcc_word / check_vcc_joins (emit/lower/vcc.rs). Testing the whole guest VCC for s_cbranch_vccz/vccnz is what the RDNA2 ISA says, and the mixed-lane readbacks show main gets that case wrong, so the semantics are sound; the question is whether dropping 3.5% of the title's compute programs is better than translating them with main's per-lane decision. Options that would change the verdict: keep the per-lane decision as a fallback for compute where the word can't be recovered (as you now do for graphics), possibly behind a diagnostic, or show that a sample of the 878 are actually miscompiled on main. Otherwise this is the maintainer's call.

Minor: the new sentence in docs/architecture.md leaves one line unwrapped.

CI: passing.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 15:31 UTC · [original](https://github.com/Marvisak/VIctory/pull/2405#issuecomment-7166975996) · edited 2026-11-26 05:21 UTC <!-- victory-triage v1 head=7ffdba57455ef52562c0ff5c6c58235097b9e221 verdict=needs-work at=2026-11-26T05:21:30Z --> Automated triage for the maintainers. **Needs work, and needs the maintainer's decision on the trade-off.** Re-reviewed head `7ffdba5`, which answers both points of the last note: the VCC lowering now lives in `crates/victory-shader/src/emit/lower/vcc.rs` and the policy check passes, and the census in this thread on `main` `63bcca4` shows the ~950 unrelated graphics losses are gone (the graphics fallback in `structure.rs`/`range.rs` via `range::build_native`). What remains: the same census measures **878 compute programs that validate on `main` and are refused with this PR** (623 `a scalar VCC branch depending on a divergent scalar join`, 254 `... with mask bits outside its producing path`, 1 structure limit), with none gained. These are the new `Err`s in `vcc_word` / `check_vcc_joins` (`emit/lower/vcc.rs`). Testing the whole guest VCC for `s_cbranch_vccz`/`vccnz` is what the RDNA2 ISA says, and the mixed-lane readbacks show `main` gets that case wrong, so the semantics are sound; the question is whether dropping 3.5% of the title's compute programs is better than translating them with `main`'s per-lane decision. Options that would change the verdict: keep the per-lane decision as a fallback for compute where the word can't be recovered (as you now do for graphics), possibly behind a diagnostic, or show that a sample of the 878 are actually miscompiled on `main`. Otherwise this is the maintainer's call. Minor: the new sentence in `docs/architecture.md` leaves one line unwrapped. CI: passing. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠ashrafsdrop on GitHub · 2026-11-25 15:34 UTC · original

Cherry-picked @⁠steven-seagull27's wave-wide VCC branch fix (724e1aa -> f0518e4, Git author preserved) onto shader/vcc-branch-no-exec-026.

Verification on f0518e4

  • cargo test -p victory-shader: 255 passed, 0 failed, 3 ignored (including all vcc_branch* hardware/WARP readback tests).
  • cargo clippy -p victory-shader --all-targets --all-features -- -D warnings: clean.
  • cargo run -p xtask -- policy: 182 files ok.
**@⁠ashrafsdrop** on GitHub · 2026-11-25 15:34 UTC · [original](https://github.com/Marvisak/VIctory/pull/2405#issuecomment-7167047182) Cherry-picked @⁠steven-seagull27's wave-wide VCC branch fix (`724e1aa` -> `f0518e4`, Git author preserved) onto `shader/vcc-branch-no-exec-026`. ### Verification on `f0518e4` - `cargo test -p victory-shader`: 255 passed, 0 failed, 3 ignored (including all `vcc_branch*` hardware/WARP readback tests). - `cargo clippy -p victory-shader --all-targets --all-features -- -D warnings`: clean. - `cargo run -p xtask -- policy`: 182 files ok.
Author
Owner

@⁠ashrafsdrop on GitHub · 2026-11-25 15:37 UTC · original

Note: the triage run above evaluated the prior b38a4b6 head; f0518e4 (pushed just after) implements the wave-wide VCC != 0 branch fix and hardware readback tests requested, and the PR description has been updated to match. Ready for re-triage.

**@⁠ashrafsdrop** on GitHub · 2026-11-25 15:37 UTC · [original](https://github.com/Marvisak/VIctory/pull/2405#issuecomment-7167132939) Note: the triage run above evaluated the prior `b38a4b6` head; `f0518e4` (pushed just after) implements the wave-wide `VCC != 0` branch fix and hardware readback tests requested, and the PR description has been updated to match. Ready for re-triage.
Author
Owner

@⁠kotekompotek on GitHub · 2026-11-25 16:58 UTC · original

Read through the whole path; this is the right shape for VCC semantics:

  • uniform_entry_subset is the important correctness carve-out — vcc = exec & uniform in the entry block keeps the old per-lane folding only when every support atom is a plain Uniform (and not scc_lane-tainted). The negative tests pin why: exec & vcc (per-lane bits) and ~exec (unlaunched bits set) both correctly become VccNonzero.
  • immediate_mask only folds a full-width s_mov_b32/64 of a known value — checked against the decoder: scalar encodings carry at most one literal dword (literal() counts contains(&0xFF)), so [Operand::Literal] can't silently match a 64-bit immediate's low half.
  • Refusing (Err) when the scalar VCC word can't be recovered — divergent scalar join, mask bits outside the producing path, missing guest wave width — is the right failure mode: unsupported beats miscompiled.
  • vcc_word's ballot-at-definition gate (meet([(mask,true),(reach,false)])) is a clean way to ask "could this mask have bits outside the producing path" — and check_vcc_joins's seen bound means the walk can't loop on cyclic phis.

Minor nits, not blockers: v.abs | v.neg | v.opsel == 0 in compare_bound is correct but would read clearer parenthesized; and the Err strings are terse — a future debug trip into why a title shader refused will want the lo/hi Values logged.

**@⁠kotekompotek** on GitHub · 2026-11-25 16:58 UTC · [original](https://github.com/Marvisak/VIctory/pull/2405#issuecomment-7168804070) Read through the whole path; this is the right shape for VCC semantics: - `uniform_entry_subset` is the important correctness carve-out — `vcc = exec & uniform` in the entry block keeps the old per-lane folding only when every support atom is a plain `Uniform` (and not `scc_lane`-tainted). The negative tests pin why: `exec & vcc` (per-lane bits) and `~exec` (unlaunched bits set) both correctly become `VccNonzero`. - `immediate_mask` only folds a full-width `s_mov_b32/64` of a known value — checked against the decoder: scalar encodings carry at most one literal dword (`literal()` counts `contains(&0xFF)`), so `[Operand::Literal]` can't silently match a 64-bit immediate's low half. - Refusing (`Err`) when the scalar VCC word can't be recovered — divergent scalar join, mask bits outside the producing path, missing guest wave width — is the right failure mode: unsupported beats miscompiled. - `vcc_word`'s ballot-at-definition gate (`meet([(mask,true),(reach,false)])`) is a clean way to ask "could this mask have bits outside the producing path" — and `check_vcc_joins`'s `seen` bound means the walk can't loop on cyclic phis. Minor nits, not blockers: `v.abs | v.neg | v.opsel == 0` in `compare_bound` is correct but would read clearer parenthesized; and the `Err` strings are terse — a future debug trip into why a title shader refused will want the lo/hi `Value`s logged.
Author
Owner

@⁠ashrafsdrop on GitHub · 2026-11-25 17:46 UTC · original

Addressed the triage feedback in 34c7ec2 (and parenthesized (v.abs | v.neg | v.opsel) == 0 from @kotekompotek's nit):

  • Per-lane fallback for non-compute stages (crates/victory-shader/src/emit/lower.rs): in Atom::VccNonzero(lo, hi), when the guest wave width cannot be established (mask_data != MaskData::Console || (!singleton && wave_size.is_none())), lane-mask VCC values (st.mask_bits(lo, (lo != hi).then_some(hi))) fall back to the per-lane decision (self.boolean(mask, at)) instead of erroring on "a scalar VCC branch requiring the guest wave width". Compute shaders keep the full wave-wide VCC != 0 ballot check.
  • Pixel-shader regression test (crates/victory-shader/src/emit/synthetic_tests.rs): added emit::synthetic_tests::pixel_shader_vcc_branch_uses_per_lane_decision testing StageIo::Ps with v_cmp_eq_u32 vcc, 0, v0; s_and_b64 vcc, exec, vcc; s_cbranch_vccz / s_cbranch_vccnz.
  • uniform_counter_compare note (crates/victory-shader/src/range.rs): documented why the unconditional-entry single-block loop + unguarded constant v_add_nc_u32 step + whole-wave s_cbranch_vcc* back edge keeps all active lanes uniform.

Verification on 34c7ec2

  • cargo test -p victory-shader -- --test-threads=1: 256 passed, 0 failed, 3 ignored (pixel_shader_vcc_branch_uses_per_lane_decision and all vcc_branch* tests passed)
  • cargo clippy -p victory-shader --all-targets --all-features -- -D warnings: clean
  • cargo run -p xtask -- policy: asset policy: 182 files ok
  • git diff --check: clean

Ready for re-triage.

**@⁠ashrafsdrop** on GitHub · 2026-11-25 17:46 UTC · [original](https://github.com/Marvisak/VIctory/pull/2405#issuecomment-7169985259) Addressed the triage feedback in [`34c7ec2`](https://github.com/ashrafsdrop/VIctory/commit/34c7ec2) (and parenthesized `(v.abs | v.neg | v.opsel) == 0` from `@kotekompotek`'s nit): - **Per-lane fallback for non-compute stages** (`crates/victory-shader/src/emit/lower.rs`): in `Atom::VccNonzero(lo, hi)`, when the guest wave width cannot be established (`mask_data != MaskData::Console || (!singleton && wave_size.is_none())`), lane-mask VCC values (`st.mask_bits(lo, (lo != hi).then_some(hi))`) fall back to the per-lane decision (`self.boolean(mask, at)`) instead of erroring on `"a scalar VCC branch requiring the guest wave width"`. Compute shaders keep the full wave-wide `VCC != 0` ballot check. - **Pixel-shader regression test** (`crates/victory-shader/src/emit/synthetic_tests.rs`): added `emit::synthetic_tests::pixel_shader_vcc_branch_uses_per_lane_decision` testing `StageIo::Ps` with `v_cmp_eq_u32 vcc, 0, v0; s_and_b64 vcc, exec, vcc; s_cbranch_vccz` / `s_cbranch_vccnz`. - **`uniform_counter_compare` note** (`crates/victory-shader/src/range.rs`): documented why the unconditional-entry single-block loop + unguarded constant `v_add_nc_u32` step + whole-wave `s_cbranch_vcc*` back edge keeps all active lanes uniform. ### Verification on `34c7ec2` - `cargo test -p victory-shader -- --test-threads=1`: 256 passed, 0 failed, 3 ignored (`pixel_shader_vcc_branch_uses_per_lane_decision` and all `vcc_branch*` tests passed) - `cargo clippy -p victory-shader --all-targets --all-features -- -D warnings`: clean - `cargo run -p xtask -- policy`: `asset policy: 182 files ok` - `git diff --check`: clean Ready for re-triage.
Author
Owner

@⁠zed6000 on GitHub · 2026-11-25 21:39 UTC · original

For the maintainers, alongside the triage above: I measured the reviewed head 34c7ec2 offline on the title's shaders. Merged onto main 13f91ca (a clean merge) and compared program by program (victory translate --validate --list, shaders.rpf 1.0.2.1, dxil.dll 1.8.2502, the method in #1247), 1,829 programs that validate on main stop translating. It gains none.

Stage Lost
compute 878
pixel 682
mesh 258
vertex 11

What those programs fail with now:

Programs New refusal
623 emit: a scalar VCC branch depending on a divergent scalar join
254 emit: a scalar VCC branch with mask bits outside its producing path
702 emit: a descriptor's address or format read as data
202 emit: a lane mask read as data
48 descriptor reads as data (35), constant buffer descriptor (10), others

The first two (877 programs) are the PR's own new refusals for VCC branches it can't prove wave-uniform. Some of those may be correct refusals where main's per-lane reading was wrong; the counts can't tell. The other ~950 fail on reasons unrelated to VCC, which suggests the structure.rs / range.rs changes stop earlier passes from recognising values they handled before. Either way, merging this as it stands would drop about 7% of the title's validated programs, and their draws, until that is narrowed. Offline counts only; no program names or data.

**@⁠zed6000** on GitHub · 2026-11-25 21:39 UTC · [original](https://github.com/Marvisak/VIctory/pull/2405#issuecomment-7175362519) For the maintainers, alongside the triage above: I measured the reviewed head **`34c7ec2`** offline on the title's shaders. Merged onto main `13f91ca` (a clean merge) and compared program by program (`victory translate --validate --list`, `shaders.rpf` 1.0.2.1, dxil.dll 1.8.2502, the method in #1247), **1,829 programs that validate on main stop translating**. It gains none. | Stage | Lost | |---|---| | compute | 878 | | pixel | 682 | | mesh | 258 | | vertex | 11 | What those programs fail with now: | Programs | New refusal | |---|---| | 623 | `emit: a scalar VCC branch depending on a divergent scalar join` | | 254 | `emit: a scalar VCC branch with mask bits outside its producing path` | | 702 | `emit: a descriptor's address or format read as data` | | 202 | `emit: a lane mask read as data` | | 48 | descriptor reads as data (35), constant buffer descriptor (10), others | The first two (877 programs) are the PR's own new refusals for VCC branches it can't prove wave-uniform. Some of those may be correct refusals where main's per-lane reading was wrong; the counts can't tell. The other ~950 fail on reasons unrelated to VCC, which suggests the `structure.rs` / `range.rs` changes stop earlier passes from recognising values they handled before. Either way, merging this as it stands would drop about 7% of the title's validated programs, and their draws, until that is narrowed. Offline counts only; no program names or data.
Author
Owner

@⁠zed6000 on GitHub · 2026-11-25 21:40 UTC · original

For comparison, measured the same way on the same base: #2406 (583fc17, the competing raw-VCC change) merged onto 13f91ca gives 0 gained, 0 lost. So on this title, testing raw VCC for s_cbranch_vccz/vccnz doesn't by itself cost any programs. The 1,829 losses above come from this PR's additional refusals and its structure.rs/range.rs changes, not from the VCC semantics as such. The counts can't say which approach is right in the divergent-join cases, where #2405 refuses and #2406 translates. Offline counts only; no program names or data.

**@⁠zed6000** on GitHub · 2026-11-25 21:40 UTC · [original](https://github.com/Marvisak/VIctory/pull/2405#issuecomment-7175385828) For comparison, measured the same way on the same base: **#2406** (`583fc17`, the competing raw-VCC change) merged onto `13f91ca` gives **0 gained, 0 lost**. So on this title, testing raw VCC for `s_cbranch_vccz`/`vccnz` doesn't by itself cost any programs. The 1,829 losses above come from this PR's additional refusals and its `structure.rs`/`range.rs` changes, not from the VCC semantics as such. The counts can't say which approach is right in the divergent-join cases, where #2405 refuses and #2406 translates. Offline counts only; no program names or data.
Author
Owner

@⁠zed6000 on GitHub · 2026-11-25 21:47 UTC · original

One more data point to place the 1,829, measured the same way on 13f91ca. I took steven-seagull27's wave-wide branch fix as published for #2406 (86fde8a, on top of #2406's head) and merged it onto main:

Build on 13f91ca Gained Lost
#2406 583fc17 (raw VCC, per-lane branch) 0 0
#2406 + 86fde8a (wave-wide VCC branch, as published) 0 18,170
#2405 34c7ec2 (wave-wide, plus its later per-lane fallback) 0 1,829

The 18,170 fail with "a scalar VCC branch requiring the guest wave width" (14,095), "... depending on a divergent scalar join" (3,820) and "... with mask bits outside its producing path" (254). All 1,829 of this PR's losses are among them. So the hardware-exact wave-wide branch, as first written, would refuse about 70% of the title's validated programs. This PR's later commits win most of that back, but not all. The remaining 1,829 are where the trade-off between exactness and coverage still has to be settled; it isn't an incidental regression. Offline counts only; no program names or data.

**@⁠zed6000** on GitHub · 2026-11-25 21:47 UTC · [original](https://github.com/Marvisak/VIctory/pull/2405#issuecomment-7175549681) One more data point to place the 1,829, measured the same way on `13f91ca`. I took steven-seagull27's wave-wide branch fix as published for #2406 ([`86fde8a`](https://github.com/steven-seagull27/VIctory/commit/86fde8a4873167908ab14c8d682078ef2e62fa70), on top of #2406's head) and merged it onto main: | Build on `13f91ca` | Gained | Lost | |---|---|---| | #2406 `583fc17` (raw VCC, per-lane branch) | 0 | 0 | | #2406 + `86fde8a` (wave-wide VCC branch, as published) | 0 | **18,170** | | #2405 `34c7ec2` (wave-wide, plus its later per-lane fallback) | 0 | **1,829** | The 18,170 fail with "a scalar VCC branch requiring the guest wave width" (14,095), "... depending on a divergent scalar join" (3,820) and "... with mask bits outside its producing path" (254). All 1,829 of this PR's losses are among them. So the hardware-exact wave-wide branch, as first written, would refuse about 70% of the title's validated programs. This PR's later commits win most of that back, but not all. The remaining 1,829 are where the trade-off between exactness and coverage still has to be settled; it isn't an incidental regression. Offline counts only; no program names or data.
Author
Owner

@⁠steven-seagull27 on GitHub · 2026-11-26 01:29 UTC · original

@⁠ashrafsdrop @⁠zed6000 I reproduced one of the reported refusal classes with a synthetic pixel shader and have a one-commit fix on your 34c7ec2 head. The existing graphics fallback decides a vector-written VCC branch per lane when emitting DXIL, but earlier compiler passes still see an unrelated wave-wide condition. They can consequently keep a descriptor dword live along an edge where the eventual branch never reads it.

The regression uses an image descriptor, then overwrites its first dword with 5 on the same path that sets a vector flag. A VCC branch on the flag guards the scalar read. Changing one instruction sets the flag on both paths and really does expose the unsupported descriptor dword.

Synthetic pixel result Guarded, safe read Control with a live descriptor read
Census base 13f91ca Validates Refuses
PR head 34c7ec2 Refuses at byte 68 with a descriptor's address or format read as data —
PR head + 3980ea0 Validates Refuses with the descriptor diagnostic

The fix uses the PR’s existing graphics lane-mask condition during structurisation, range analysis and descriptor tracking. Compute VCC keeps the wave-wide path, including its conservative refusals. The mixed-lane compute regression on the exact census merge had 0/128 wrong on both my RTX 5080 and WARP 1.0.22. The ordered-pixel test also passed. On the fixed PR branch the shader suite had 254 passed, 3 failed (the two NVIDIA stride tests and texture gather), 3 ignored. Strict all-target/all-feature Clippy passed for the shader crate and the CLI.

Could you rerun your program-by-program census on a7d7e03? This is an already-built, clean merge of the candidate onto your exact 13f91ca base. I’d especially like to know how many of the 702 descriptor-field and 202 lane-mask refusals survive, whether any new failures appear, and the breakdown by stage. I only have the synthetic fixture here, so the retail delta is still unknown.

git fetch https://github.com/steven-seagull27/VIctory.git refs/heads/codex/pr2405-census-13f91ca
git switch --detach a7d7e03ead7956bd2d8770caa1f968b9c081cd90
cargo test -p victory-shader --lib --locked pixel_vcc_fallback_preserves_a_dead_descriptor_field

For the PR author, the cherry-pick on 34c7ec2 is 3980ea087b085669f326cd3d4198cd5f93433be4 from codex/pr2405-stage-mask-facts. AI-assisted with Codex.

**@⁠steven-seagull27** on GitHub · 2026-11-26 01:29 UTC · [original](https://github.com/Marvisak/VIctory/pull/2405#issuecomment-7179826548) @⁠ashrafsdrop @⁠zed6000 I reproduced one of the reported refusal classes with a synthetic pixel shader and have a [one-commit fix on your `34c7ec2` head](https://github.com/steven-seagull27/VIctory/commit/3980ea087b085669f326cd3d4198cd5f93433be4). The existing graphics fallback decides a vector-written VCC branch per lane when emitting DXIL, but earlier compiler passes still see an unrelated wave-wide condition. They can consequently keep a descriptor dword live along an edge where the eventual branch never reads it. The regression uses an image descriptor, then overwrites its first dword with `5` on the same path that sets a vector flag. A VCC branch on the flag guards the scalar read. Changing one instruction sets the flag on both paths and really does expose the unsupported descriptor dword. | Synthetic pixel result | Guarded, safe read | Control with a live descriptor read | |---|---|---| | Census base `13f91ca` | Validates | Refuses | | PR head `34c7ec2` | Refuses at byte 68 with `a descriptor's address or format read as data` | — | | PR head + `3980ea0` | Validates | Refuses with the descriptor diagnostic | The fix uses the PR’s existing graphics lane-mask condition during structurisation, range analysis and descriptor tracking. Compute VCC keeps the wave-wide path, including its conservative refusals. The mixed-lane compute regression on the exact census merge had **0/128 wrong** on both my RTX 5080 and WARP 1.0.22. The ordered-pixel test also passed. On the fixed PR branch the shader suite had 254 passed, 3 failed (the two NVIDIA stride tests and texture gather), 3 ignored. Strict all-target/all-feature Clippy passed for the shader crate and the CLI. **Could you rerun your program-by-program census on [`a7d7e03`](https://github.com/steven-seagull27/VIctory/commit/a7d7e03ead7956bd2d8770caa1f968b9c081cd90)?** This is an already-built, clean merge of the candidate onto your exact `13f91ca` base. I’d especially like to know how many of the 702 descriptor-field and 202 lane-mask refusals survive, whether any new failures appear, and the breakdown by stage. I only have the synthetic fixture here, so the retail delta is still unknown. ```sh git fetch https://github.com/steven-seagull27/VIctory.git refs/heads/codex/pr2405-census-13f91ca git switch --detach a7d7e03ead7956bd2d8770caa1f968b9c081cd90 cargo test -p victory-shader --lib --locked pixel_vcc_fallback_preserves_a_dead_descriptor_field ``` For the PR author, the cherry-pick on `34c7ec2` is `3980ea087b085669f326cd3d4198cd5f93433be4` from `codex/pr2405-stage-mask-facts`. AI-assisted with Codex.
Author
Owner

@⁠zed6000 on GitHub · 2026-11-26 02:22 UTC · original

@⁠steven-seagull27 Census of your a7d7e03 (34c7ec2 + 3980ea0 merged onto 13f91ca; I checked that its tree is exactly that merge), same method and files as the −1,829 above, compared program by program with 13f91ca:

Lost vs 13f91ca compute pixel mesh vertex
34c7ec2 (PR head) 1,829 878 682 258 11
a7d7e03 (+ 3980ea0) 878 878 0 0 0
  • All 951 knock-on losses come back, with 0 new failures. None of the 702 a descriptor's address or format read as data survive, nor the 202 a lane mask read as data, the 35 a descriptor read only as data, the 10 constant-buffer ones or the 2 a join of mismatched values. Each of the 878 it still loses fails exactly as on 34c7ec2, with the same reason.
  • What's left is exactly the PR's own compute VCC refusals: 623 a scalar VCC branch depending on a divergent scalar join, 254 a scalar VCC branch with mask bits outside its producing path, and 1 structure: lane conditions too large. All 878 are compute programs. It gains none.
  • cargo test -p victory-shader --lib on a7d7e03, RX 7900 XTX: 280 passed, 0 failed, 3 ignored. That includes pixel_vcc_fallback_preserves_a_dead_descriptor_field, all stride_tests and the gather tests that fail on your 5080.

So 3980ea0 does what it says for graphics. The PR's remaining cost on this title is the 878 compute programs (3.5% of the 24,846 that validate on 13f91ca) that the wave-wide VCC path refuses. #2406 makes the raw-VCC change with 0 lost. Offline counts only; no program names or data.

**@⁠zed6000** on GitHub · 2026-11-26 02:22 UTC · [original](https://github.com/Marvisak/VIctory/pull/2405#issuecomment-7180751558) @⁠steven-seagull27 Census of your [`a7d7e03`](https://github.com/steven-seagull27/VIctory/commit/a7d7e03ead7956bd2d8770caa1f968b9c081cd90) (`34c7ec2` + `3980ea0` merged onto `13f91ca`; I checked that its tree is exactly that merge), same method and files as the −1,829 above, compared program by program with `13f91ca`: | | Lost vs `13f91ca` | compute | pixel | mesh | vertex | |---|---:|---:|---:|---:|---:| | `34c7ec2` (PR head) | 1,829 | 878 | 682 | 258 | 11 | | **`a7d7e03` (+ `3980ea0`)** | **878** | 878 | **0** | **0** | **0** | - **All 951 knock-on losses come back, with 0 new failures.** None of the 702 `a descriptor's address or format read as data` survive, nor the 202 `a lane mask read as data`, the 35 `a descriptor read only as data`, the 10 constant-buffer ones or the 2 `a join of mismatched values`. Each of the 878 it still loses fails exactly as on `34c7ec2`, with the same reason. - **What's left is exactly the PR's own compute VCC refusals:** 623 `a scalar VCC branch depending on a divergent scalar join`, 254 `a scalar VCC branch with mask bits outside its producing path`, and 1 `structure: lane conditions too large`. All 878 are compute programs. It gains none. - `cargo test -p victory-shader --lib` on `a7d7e03`, RX 7900 XTX: **280 passed, 0 failed**, 3 ignored. That includes `pixel_vcc_fallback_preserves_a_dead_descriptor_field`, all `stride_tests` and the gather tests that fail on your 5080. So `3980ea0` does what it says for graphics. The PR's remaining cost on this title is the 878 compute programs (3.5% of the 24,846 that validate on `13f91ca`) that the wave-wide VCC path refuses. #2406 makes the raw-VCC change with 0 lost. Offline counts only; no program names or data.
Author
Owner

@⁠steven-seagull27 on GitHub · 2026-11-26 02:38 UTC · original

@⁠zed6000 Thanks for running the census and the RX 7900 XTX suite. That pins down the scope of 3980ea0: all 951 graphics losses recovered, and the 878 compute refusals remained. I have a separate candidate for one reproducible case in the 623 divergent-scalar-join bucket. I don't yet have a title count for it.

On 3980ea0, a synthetic compute shader sets EXEC from a runtime-selected invocation, uses s_cbranch_execz to skip a scalar s_mov_b32 vcc_lo, 1, then branches on VCC. Translation refuses the joined word. The new compute patch uses the whole EXEC register for that guard when the whole wave reaches it in acyclic code, the arm only assigns a constant VCC word, and the join branches on that word. The fixture that also executes vector code in the arm still refuses. This is separate from the 254 producing-path cases.

I ran both EXEC branch polarities and both VCC branch polarities with first, last and absent target lanes. Wave64 also exercises a write to vcc_hi alone. Results are wrong lanes / lanes read.

Adapter Two full guest waves Partial second wave
RTX 5080, Wave32 0 / 1,024 0 / 720
WARP 1.0.22, Wave32 0 / 1,024 52 / 720 in each of two processes
WARP 1.0.22, Wave64 0 / 4,096 43 / 2,720 and 14 / 2,720

Built-in WARP reports 4..4 and skips both widths. The RTX supports Wave32. The PR's pre-existing partial-group VCC fixture also fails on portable WARP. As an independent control, I compiled ordinary HLSL using DXC: with [WaveSize(32)] [numthreads(45,1,1)], the last invocation sets the sole bit. All 13 lanes in the second wave should read 0x1000 from WaveActiveBallot(id == 44).x and true from WaveActiveAnyTrue(id == 44). WARP returned zero/false for all 13, while the RTX got all 13 right. Both adapters passed the 64-thread Wave32 control.

Could you rerun your census on ee9cb2b? It is one commit directly on your measured a7d7e03 and the CLI builds. A count of recovered programs, new failures, and the RX result for the new regression would tell us whether this particular case is worth including alongside the graphics fix.

git fetch https://github.com/steven-seagull27/VIctory.git refs/heads/codex/pr2405-census-guarded-word
git switch --detach ee9cb2b6d07d7b08fd3ab6b4bfa669e03053c272
cargo test -p victory-shader --lib --locked vcc_scalar_write_guarded_by_exec_is_wave_uniform -- --nocapture

AI-assisted. All local fixtures were synthetic.

**@⁠steven-seagull27** on GitHub · 2026-11-26 02:38 UTC · [original](https://github.com/Marvisak/VIctory/pull/2405#issuecomment-7180994582) @⁠zed6000 Thanks for running the census and the RX 7900 XTX suite. That pins down the scope of `3980ea0`: all 951 graphics losses recovered, and the 878 compute refusals remained. I have a separate candidate for one reproducible case in the 623 divergent-scalar-join bucket. I don't yet have a title count for it. On `3980ea0`, a synthetic compute shader sets EXEC from a runtime-selected invocation, uses `s_cbranch_execz` to skip a scalar `s_mov_b32 vcc_lo, 1`, then branches on VCC. Translation refuses the joined word. The new [compute patch](https://github.com/steven-seagull27/VIctory/commit/5476fe34829833577d1471c437e2cf57f7376f31) uses the whole EXEC register for that guard when the whole wave reaches it in acyclic code, the arm only assigns a constant VCC word, and the join branches on that word. The fixture that also executes vector code in the arm still refuses. This is separate from the 254 producing-path cases. I ran both EXEC branch polarities and both VCC branch polarities with first, last and absent target lanes. Wave64 also exercises a write to `vcc_hi` alone. Results are wrong lanes / lanes read. | Adapter | Two full guest waves | Partial second wave | | --- | ---: | ---: | | RTX 5080, Wave32 | 0 / 1,024 | 0 / 720 | | WARP 1.0.22, Wave32 | 0 / 1,024 | 52 / 720 in each of two processes | | WARP 1.0.22, Wave64 | 0 / 4,096 | 43 / 2,720 and 14 / 2,720 | Built-in WARP reports 4..4 and skips both widths. The RTX supports Wave32. The PR's pre-existing partial-group VCC fixture also fails on portable WARP. As an independent control, I compiled ordinary HLSL using DXC: with `[WaveSize(32)] [numthreads(45,1,1)]`, the last invocation sets the sole bit. All 13 lanes in the second wave should read `0x1000` from `WaveActiveBallot(id == 44).x` and true from `WaveActiveAnyTrue(id == 44)`. WARP returned zero/false for all 13, while the RTX got all 13 right. Both adapters passed the 64-thread Wave32 control. **Could you rerun your census on [`ee9cb2b`](https://github.com/steven-seagull27/VIctory/commit/ee9cb2b6d07d7b08fd3ab6b4bfa669e03053c272)?** It is one commit directly on your measured `a7d7e03` and the CLI builds. A count of recovered programs, new failures, and the RX result for the new regression would tell us whether this particular case is worth including alongside the graphics fix. ```sh git fetch https://github.com/steven-seagull27/VIctory.git refs/heads/codex/pr2405-census-guarded-word git switch --detach ee9cb2b6d07d7b08fd3ab6b4bfa669e03053c272 cargo test -p victory-shader --lib --locked vcc_scalar_write_guarded_by_exec_is_wave_uniform -- --nocapture ``` AI-assisted. All local fixtures were synthetic.
Author
Owner

@⁠zed6000 on GitHub · 2026-11-26 03:23 UTC · original

@⁠steven-seagull27 Census of ee9cb2b (one commit on a7d7e03, reviewed before building), same method and files as above:

  • No program's outcome changes against a7d7e03: 0 recovered and 0 new failures. Every listed program ends exactly as on a7d7e03, including the refusal text. Against 13f91ca it's still −878 compute: 623 a scalar VCC branch depending on a divergent scalar join, 254 ... mask bits outside its producing path, 1 structure: lane conditions too large. So the guarded-constant-VCC shape your fixture models doesn't account for any of the title's 623, or they also fail on something else in the same section.
  • Your new test on the RX 7900 XTX (vcc_scalar_write_guarded_by_exec_is_wave_uniform, two processes): every case reports "all four readbacks matched". That's Wave32 at group 64 (two full guest waves) and group 45 (partial second wave), and Wave64 at 128 and 85, each with vccz and vccnz. The built-in WARP (4..4) skips both widths.
  • The pre-existing partial-group VCC fixtures that fail on portable WARP pass here: vcc_branches_isolate_a_partial_second_guest_wave and vcc_branches_read_all_bits_of_a_scalar_mask_in_a_partial_group, 4/4 with the related vcc_branches tests.
  • Full cargo test -p victory-shader --lib --locked on ee9cb2b: 281 passed, 0 failed, 3 ignored.

With your RTX 5080 Wave32 zeros, that's two hardware vendors at 0 wrong for the new fixture, in both wave sizes on AMD. WARP 1.0.22's partial-wave misses match your DXC-only ballot control, so they look like WARP's. For the title, though, this commit is neutral. Offline counts and unit tests only; no program names or data.

**@⁠zed6000** on GitHub · 2026-11-26 03:23 UTC · [original](https://github.com/Marvisak/VIctory/pull/2405#issuecomment-7181680724) @⁠steven-seagull27 Census of [`ee9cb2b`](https://github.com/steven-seagull27/VIctory/commit/ee9cb2b6d07d7b08fd3ab6b4bfa669e03053c272) (one commit on `a7d7e03`, reviewed before building), same method and files as above: - **No program's outcome changes against `a7d7e03`:** 0 recovered and 0 new failures. Every listed program ends exactly as on `a7d7e03`, including the refusal text. Against `13f91ca` it's still −878 compute: 623 `a scalar VCC branch depending on a divergent scalar join`, 254 `... mask bits outside its producing path`, 1 `structure: lane conditions too large`. So the guarded-constant-VCC shape your fixture models doesn't account for any of the title's 623, or they also fail on something else in the same section. - **Your new test on the RX 7900 XTX** (`vcc_scalar_write_guarded_by_exec_is_wave_uniform`, two processes): every case reports "all four readbacks matched". That's Wave32 at group 64 (two full guest waves) and group 45 (partial second wave), and Wave64 at 128 and 85, each with `vccz` and `vccnz`. The built-in WARP (4..4) skips both widths. - The pre-existing partial-group VCC fixtures that fail on portable WARP pass here: `vcc_branches_isolate_a_partial_second_guest_wave` and `vcc_branches_read_all_bits_of_a_scalar_mask_in_a_partial_group`, 4/4 with the related `vcc_branches` tests. - Full `cargo test -p victory-shader --lib --locked` on `ee9cb2b`: 281 passed, 0 failed, 3 ignored. With your RTX 5080 Wave32 zeros, that's two hardware vendors at 0 wrong for the new fixture, in both wave sizes on AMD. WARP 1.0.22's partial-wave misses match your DXC-only ballot control, so they look like WARP's. For the title, though, this commit is neutral. Offline counts and unit tests only; no program names or data.
Author
Owner

@⁠steven-seagull27 on GitHub · 2026-11-26 03:51 UTC · original

@⁠zed6000 Thanks for the program-by-program comparison and the RX 7900 XTX runs. I’m treating ee9cb2b as neutral for this title: 0 additional programs recovered and 0 new failures. The guarded constant write has a passing hardware regression on NVIDIA and AMD, including both wave widths on AMD. The title result we can attribute to the earlier graphics fix remains 951 restored, with 623 divergent scalar joins, 254 producing-path refusals and one structure-limit failure still outstanding. Your existing results settle that comparison.

For a future investigation, I put an optional diagnostic on the fork, one commit on your measured ee9cb2b. It uses the saved UTF-8 13f91ca validation listing to count previously passing compute programs. It distinguishes a join in VCC itself from one in a scalar input, groups the join by its incoming values, and groups a producing-path refusal by the mask-defining instruction. A container holding multiple compute programs under the same listing label is reported separately as ambiguous.

I checked the CLI against a real 13f91ca reference run on synthetic containers. It counted the one newly refused compare, excluded both joins that already failed on the reference, and produced the same counts with one and four workers. A second selection verified both join categories and a duplicate container at a different offset. The fixtures retained the original error reasons, instruction offsets and successful DXIL bytes.

If revisiting this later, build the linked commit with cargo build --release --locked -p victory. In PowerShell, $referenceList is the path to the saved main listing and $censusPaths is the same input-path array used for that listing, with the same spelling and working directory. These output rows contain only category names and counts.

$env:VICTORY_VCC_CENSUS = $referenceList
.\target\release\victory.exe translate @censusPaths --validate 2>$null | Select-String '^VCC_CENSUS '
Remove-Item Env:VICTORY_VCC_CENSUS

AI-assisted. All local test inputs were synthetic.

**@⁠steven-seagull27** on GitHub · 2026-11-26 03:51 UTC · [original](https://github.com/Marvisak/VIctory/pull/2405#issuecomment-7182083051) @⁠zed6000 Thanks for the program-by-program comparison and the RX 7900 XTX runs. I’m treating `ee9cb2b` as neutral for this title: **0 additional programs recovered and 0 new failures**. The guarded constant write has a passing hardware regression on NVIDIA and AMD, including both wave widths on AMD. The title result we can attribute to the earlier graphics fix remains **951 restored**, with 623 divergent scalar joins, 254 producing-path refusals and one structure-limit failure still outstanding. Your existing results settle that comparison. For a future investigation, I put an [optional diagnostic on the fork](https://github.com/steven-seagull27/VIctory/commit/33b22578755826da3ea2da52bbfd1510467e8aa0), one commit on your measured `ee9cb2b`. It uses the saved UTF-8 `13f91ca` validation listing to count previously passing compute programs. It distinguishes a join in VCC itself from one in a scalar input, groups the join by its incoming values, and groups a producing-path refusal by the mask-defining instruction. A container holding multiple compute programs under the same listing label is reported separately as ambiguous. I checked the CLI against a real `13f91ca` reference run on synthetic containers. It counted the one newly refused compare, excluded both joins that already failed on the reference, and produced the same counts with one and four workers. A second selection verified both join categories and a duplicate container at a different offset. The fixtures retained the original error reasons, instruction offsets and successful DXIL bytes. If revisiting this later, build the linked commit with `cargo build --release --locked -p victory`. In PowerShell, `$referenceList` is the path to the saved main listing and `$censusPaths` is the same input-path array used for that listing, with the same spelling and working directory. These output rows contain only category names and counts. ```powershell $env:VICTORY_VCC_CENSUS = $referenceList .\target\release\victory.exe translate @censusPaths --validate 2>$null | Select-String '^VCC_CENSUS ' Remove-Item Env:VICTORY_VCC_CENSUS ``` AI-assisted. All local test inputs were synthetic.
Author
Owner

@⁠steven-seagull27 on GitHub · 2026-11-26 04:13 UTC · original

@⁠ashrafsdrop I checked the rebased head 988074ad. The failed Windows CI job stops at policy::tests::repository_passes_policy: emit/lower.rs is 526,824 bytes and the limit is 524,288. The synthetic pixel shader from the earlier graphics fix also still fails on this head, at byte offset 68 with a descriptor's address or format read as data.

I put two separate commits directly on 988074ad:

  1. Move the existing VCC lowering into its own module. This leaves lower.rs at 522,240 bytes and the same policy test passes locally.
  2. Rebase the graphics fix and its regression test. The shader where the live arm overwrites the descriptor now validates. Changing one instruction so the field is genuinely read still produces the expected refusal. This is the 3980ea0 change that previously recovered 951 graphics programs; that count was on the earlier base.

On the combined tip the two-full-wave VCC tests passed on RTX 5080 (Wave32) and WARP 1.0.22 (Wave32 and Wave64). Built-in and portable WARP also returned the expected four pixels for the newer POPS wait-loop regression. Strict Clippy passed for the shader crate and CLI.

git fetch https://github.com/steven-seagull27/VIctory.git refs/heads/codex/pr2405-rebased-graphics
git cherry-pick e03d817e42ebf7141017c32f114e448a65fefa05 b8ffb2cea88d9403a6de68778404ecf7a70bdadf
cargo test -p xtask --locked repository_passes_policy
cargo test -p victory-shader --lib --locked pixel_vcc_fallback_preserves_a_dead_descriptor_field

AI-assisted. All tests on this rebase used synthetic inputs.

**@⁠steven-seagull27** on GitHub · 2026-11-26 04:13 UTC · [original](https://github.com/Marvisak/VIctory/pull/2405#issuecomment-7182411806) @⁠ashrafsdrop I checked the rebased head `988074ad`. The [failed Windows CI job](https://github.com/Marvisak/VIctory/actions/runs/45751944942/job/139681551239) stops at `policy::tests::repository_passes_policy`: `emit/lower.rs` is 526,824 bytes and the limit is 524,288. The synthetic pixel shader from the earlier graphics fix also still fails on this head, at byte offset 68 with `a descriptor's address or format read as data`. I put two separate commits directly on `988074ad`: 1. [Move the existing VCC lowering into its own module](https://github.com/steven-seagull27/VIctory/commit/e03d817e42ebf7141017c32f114e448a65fefa05). This leaves `lower.rs` at 522,240 bytes and the same policy test passes locally. 2. [Rebase the graphics fix and its regression test](https://github.com/steven-seagull27/VIctory/commit/b8ffb2cea88d9403a6de68778404ecf7a70bdadf). The shader where the live arm overwrites the descriptor now validates. Changing one instruction so the field is genuinely read still produces the expected refusal. This is the `3980ea0` change that previously recovered [951 graphics programs](https://git.gtahub.st/github/Marvisak--VIctory/pulls/2405); that count was on the earlier base. On the combined tip the two-full-wave VCC tests passed on RTX 5080 (Wave32) and WARP 1.0.22 (Wave32 and Wave64). Built-in and portable WARP also returned the expected four pixels for the newer POPS wait-loop regression. Strict Clippy passed for the shader crate and CLI. ```sh git fetch https://github.com/steven-seagull27/VIctory.git refs/heads/codex/pr2405-rebased-graphics git cherry-pick e03d817e42ebf7141017c32f114e448a65fefa05 b8ffb2cea88d9403a6de68778404ecf7a70bdadf cargo test -p xtask --locked repository_passes_policy cargo test -p victory-shader --lib --locked pixel_vcc_fallback_preserves_a_dead_descriptor_field ``` AI-assisted. All tests on this rebase used synthetic inputs.
Author
Owner

@⁠ashrafsdrop on GitHub · 2026-11-26 04:32 UTC · original

Thanks @⁠steven-seagull27. Cherry-picked both commits onto shader/vcc-branch-no-exec-026 and pushed:

  1. f4c07f9 (e03d817): Moves VCC lowering into crates/victory-shader/src/emit/lower/vcc.rs. Leaves lower.rs at 522,240 bytes (under the 524,288 limit); xtask asset-policy test passes.
  2. 7ffdba5 (b8ffb2c): Preserves graphics VCC fallback facts across structurisation and range analysis, unblocking pixel shaders with dead descriptor overwrites.

Verification

  • cargo test -p xtask --locked: 6 passed, 0 failed
  • cargo test -p victory-shader --lib --locked pixel_vcc_fallback_preserves_a_dead_descriptor_field: passed
  • cargo test -p victory-shader --lib --locked vcc: 9 passed, 0 failed
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: clean
**@⁠ashrafsdrop** on GitHub · 2026-11-26 04:32 UTC · [original](https://github.com/Marvisak/VIctory/pull/2405#issuecomment-7182687071) Thanks @⁠steven-seagull27. Cherry-picked both commits onto `shader/vcc-branch-no-exec-026` and pushed: 1. `f4c07f9` (`e03d817`): Moves VCC lowering into `crates/victory-shader/src/emit/lower/vcc.rs`. Leaves `lower.rs` at 522,240 bytes (under the 524,288 limit); `xtask` asset-policy test passes. 2. `7ffdba5` (`b8ffb2c`): Preserves graphics VCC fallback facts across structurisation and range analysis, unblocking pixel shaders with dead descriptor overwrites. ### Verification - `cargo test -p xtask --locked`: 6 passed, 0 failed - `cargo test -p victory-shader --lib --locked pixel_vcc_fallback_preserves_a_dead_descriptor_field`: passed - `cargo test -p victory-shader --lib --locked vcc`: 9 passed, 0 failed - `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings`: clean
Author
Owner

@⁠zed6000 on GitHub · 2026-11-26 04:38 UTC · original

@⁠ashrafsdrop The PR's new head 7ffdba5 (with 3980ea0 and the vcc.rs move) on current main 63bcca4 (a clean merge), same method as above: −878, 0 gained. They're all compute programs: 623 a scalar VCC branch depending on a divergent scalar join, 254 ... mask bits outside its producing path, 1 structure: lane conditions too large. No pixel, mesh or vertex program is lost any more (the head before lost 951 of those). That matches the census of steven-seagull27's a7d7e03 on 13f91ca, so the cherry-pick carried over intact. The remaining cost of this PR on the title is those 878 compute programs (3.5% of the 24,850 that validate on main). Offline counts only; no program names or data.

**@⁠zed6000** on GitHub · 2026-11-26 04:38 UTC · [original](https://github.com/Marvisak/VIctory/pull/2405#issuecomment-7182766598) @⁠ashrafsdrop The PR's new head **`7ffdba5`** (with `3980ea0` and the `vcc.rs` move) on current `main` `63bcca4` (a clean merge), same method as above: **−878, 0 gained**. They're all compute programs: 623 `a scalar VCC branch depending on a divergent scalar join`, 254 `... mask bits outside its producing path`, 1 `structure: lane conditions too large`. **No pixel, mesh or vertex program is lost any more** (the head before lost 951 of those). That matches the census of steven-seagull27's `a7d7e03` on `13f91ca`, so the cherry-pick carried over intact. The remaining cost of this PR on the title is those 878 compute programs (3.5% of the 24,850 that validate on `main`). Offline counts only; no program names or data.
Author
Owner

@⁠ashrafsdrop on GitHub · 2026-11-26 04:43 UTC · original

@⁠zed6000 Thanks for running the census on 7ffdba5. Great to see all 951 pixel/mesh/vertex losses completely recovered and zero graphics regressions remaining on current main.

**@⁠ashrafsdrop** on GitHub · 2026-11-26 04:43 UTC · [original](https://github.com/Marvisak/VIctory/pull/2405#issuecomment-7182839647) @⁠zed6000 Thanks for running the census on `7ffdba5`. Great to see all 951 pixel/mesh/vertex losses completely recovered and zero graphics regressions remaining on current main.
Author
Owner

@⁠catminou4 on GitHub · 2026-11-25 13:19 UTC · original · reviewed

Tested locally: merged into main 940d32f69b, cargo test -p victory-shader --locked on macOS arm64 — 145 passed, 0 failed, 2 ignored (Windows-gated hardware execution tests not run here). Green locally — but note this duplicates #2406 (same raw-VCC-on-s_cbranch_vccz/nz fix); both pass because they are the same change. Whichever merges second conflicts. #2406 is the more complete of the two (55 vs 35 lines, covers both mnemonics explicitly).

**@⁠catminou4** on GitHub · 2026-11-25 13:19 UTC · [original](https://github.com/Marvisak/VIctory/pull/2405#pullrequestreview-6058343539) · **reviewed** Tested locally: merged into main 940d32f69b, `cargo test -p victory-shader --locked` on macOS arm64 — 145 passed, 0 failed, 2 ignored (Windows-gated hardware execution tests not run here). Green locally — but note this duplicates #2406 (same raw-VCC-on-s_cbranch_vccz/nz fix); both pass because they are the same change. Whichever merges second conflicts. #2406 is the more complete of the two (55 vs 35 lines, covers both mnemonics explicitly).
Author
Owner

@⁠DenRakEiw on GitHub · 2026-11-25 14:18 UTC · original · approved these changes

Verified against origin/main (940d32f) on Windows 11 + NVIDIA GeForce RTX 5090 and WARP:

  • Testing raw VCC without EXEC masking on s_cbranch_vccz / s_cbranch_vccnz matches hardware semantics and passes all structure tests.
  • cargo test -p victory-shader structure::tests: 12/12 passed on RTX 5090, 12/12 passed on WARP (including vcc_branch_tests_raw_vcc_without_exec).
  • cargo clippy -p victory-shader --all-targets -- -D warnings: 0 warnings.
  • cargo xtask policy: 183 files ok.

AI-assisted (Gemini 4 Neon).

**@⁠DenRakEiw** on GitHub · 2026-11-25 14:18 UTC · [original](https://github.com/Marvisak/VIctory/pull/2405#pullrequestreview-6059311294) · **approved these changes** Verified against `origin/main` (`940d32f`) on Windows 11 + NVIDIA GeForce RTX 5090 and WARP: - Testing raw VCC without EXEC masking on `s_cbranch_vccz` / `s_cbranch_vccnz` matches hardware semantics and passes all structure tests. - `cargo test -p victory-shader structure::tests`: 12/12 passed on RTX 5090, 12/12 passed on WARP (including `vcc_branch_tests_raw_vcc_without_exec`). - `cargo clippy -p victory-shader --all-targets -- -D warnings`: 0 warnings. - `cargo xtask policy`: 183 files ok. AI-assisted (Gemini 4 Neon).
Author
Owner

@⁠ashrafsdrop on GitHub · 2026-11-26 15:55 UTC · original

Pushed commit edb55c8:

  1. Compute VCC Fallback: In crates/victory-shader/src/emit/lower/vcc.rs, Lower::vcc_nonzero now falls back to the per-lane decision (self.boolean(mask, at)) when check_vcc_joins or vcc_word fails to recover a wave-wide scalar word for compute shaders, matching the graphics safety net.
  2. Docs: Wrapped the long line in docs/architecture.md to conform to 80-column policy.
  3. Tests: Added compute_shader_vcc_branch_translates_cleanly under emit::synthetic_tests. Passes cargo clippy and cargo run -p xtask -- policy.
**@⁠ashrafsdrop** on GitHub · 2026-11-26 15:55 UTC · [original](https://github.com/Marvisak/VIctory/pull/2405#issuecomment-7196944007) Pushed commit `edb55c8`: 1. **Compute VCC Fallback**: In `crates/victory-shader/src/emit/lower/vcc.rs`, `Lower::vcc_nonzero` now falls back to the per-lane decision (`self.boolean(mask, at)`) when `check_vcc_joins` or `vcc_word` fails to recover a wave-wide scalar word for compute shaders, matching the graphics safety net. 2. **Docs**: Wrapped the long line in `docs/architecture.md` to conform to 80-column policy. 3. **Tests**: Added `compute_shader_vcc_branch_translates_cleanly` under `emit::synthetic_tests`. Passes `cargo clippy` and `cargo run -p xtask -- policy`.
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/2405/head:github-bot/gh-2405'
git switch 'github-bot/gh-2405'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2405'
git switch 'github-bot/gh-2405'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2405'
git switch 'github-bot/gh-2405'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2405'
git switch 'main'
git merge --squash 'github-bot/gh-2405'
git switch 'main'
git merge --ff-only 'github-bot/gh-2405'
git switch 'main'
git merge 'github-bot/gh-2405'
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!2405
No description provided.