Shaders: test raw VCC on s_cbranch_vccz and s_cbranch_vccnz without EXEC masking #2405
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2405
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2405"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ashrafsdrop on GitHub · 2026-11-25 13:04 UTC · original
ashrafsdrop:shader/vcc-branch-no-exec-026→main· +941 −41 · 9 files · 6 commits · openResolves
VIC-BT-026from #1249:Summary
s_cbranch_vcczands_cbranch_vccnzbranch on whether the entire 32/64-bitVCCregister is zero (VCC == 0/VCC != 0), rather than each lane branching on its ownVCCbit.EXECnarrows, bounds the uniform counter case, and refuses joins whose scalarVCCvalue cannot be recovered.f0518e4(authored by @steven-seagull27, preserved).Verification
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 onorigin/main(940d32f) and pass onf0518e4.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.34c7ec208etoc16e7c3ea4@oni-swr on GitHub · 2026-11-25 13:34 UTC · original
WARP verification + comparison with #2406
Tested: PR head
b38a4b6a05fd4f40eb9a5052f9c2cf17fc4663f4, onorigin/main940d32f69b22265690a0b5a15d6ded572ba33baf(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 onPATH.cargo test -p victory-shader --lib --lockeddefect_test, all ignored on main too)cargo clippy -p victory-shader --all-targets --locked -- -D warningscargo xtask policyasset policy: 182 files ok, exit 0The new test
structure::tests::vcc_branch_tests_raw_vcc_without_execran 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::branchinstructure.rs):and(vcc, exec)and test raw VCC fors_cbranch_vccz/s_cbranch_vccnz. The resultingBoolis identical. #2406 also moves theexec()read into theexecz/execnzarms and adds a comment. That has no behavioural effect, sinceexec()has no side effects there.v_cmpthenv_cmpx, so VCC is a per-lane value and EXEC differs. It checks both branch forms, and thatwhenis 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 checksBool::TRUE. The two cover different cases. Either PR could take the other's test.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)
@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 parent940d32f.A vector compare sets only bit 0 of VCC. A separate
v_cmpx_eq_u32then 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 VCCZs_cbranch_vccnzs_cbranch_vcczThese 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::execdefaults 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
AI-assisted with Codex. Synthetic shaders only.
@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.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.
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 sawWaveActiveBallot(id == 44).xequal zero. The RTX returned0x1000. 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_6and dispatched one group. Each thread writes its ID and wave metadata followed by the two ballot comparisons and the active-lane count.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.
@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, withcargo test --locked -p victory-shader --lib vcc_branch -- --test-threads=1 --nocapture. 5 passed, 0 failed, noSKIPPED. Thehardwarelines:vcc_branches_read_all_bits_of_a_scalar_mask_in_a_partial_groupandstructure::tests::vcc_branch_tests_raw_vcc_without_execpass too.cargo test --locked -p victory-shaderat724e1aa: 252 passed, 3 failed, 3 ignored. The 3 are #1744's NVIDIA failures thatmainhas too.One run only.
AI-assisted (Claude Code). Synthetic tests only.
@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 incrates/victory-shader/src/emit/lower/vcc.rsand the policy check passes, and the census in this thread onmain63bcca4shows the ~950 unrelated graphics losses are gone (the graphics fallback instructure.rs/range.rsviarange::build_native).What remains: the same census measures 878 compute programs that validate on
mainand are refused with this PR (623a 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 newErrs invcc_word/check_vcc_joins(emit/lower/vcc.rs). Testing the whole guest VCC fors_cbranch_vccz/vccnzis what the RDNA2 ISA says, and the mixed-lane readbacks showmaingets 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 withmain'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 onmain. Otherwise this is the maintainer's call.Minor: the new sentence in
docs/architecture.mdleaves one line unwrapped.CI: passing.
Generated by Claude Code
@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) ontoshader/vcc-branch-no-exec-026.Verification on
f0518e4cargo test -p victory-shader: 255 passed, 0 failed, 3 ignored (including allvcc_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:37 UTC · original
Note: the triage run above evaluated the prior
b38a4b6head;f0518e4(pushed just after) implements the wave-wideVCC != 0branch fix and hardware readback tests requested, and the PR description has been updated to match. Ready for re-triage.@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_subsetis the important correctness carve-out —vcc = exec & uniformin the entry block keeps the old per-lane folding only when every support atom is a plainUniform(and notscc_lane-tainted). The negative tests pin why:exec & vcc(per-lane bits) and~exec(unlaunched bits set) both correctly becomeVccNonzero.immediate_maskonly folds a full-widths_mov_b32/64of a known value — checked against the decoder: scalar encodings carry at most one literal dword (literal()countscontains(&0xFF)), so[Operand::Literal]can't silently match a 64-bit immediate's low half.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" — andcheck_vcc_joins'sseenbound means the walk can't loop on cyclic phis.Minor nits, not blockers:
v.abs | v.neg | v.opsel == 0incompare_boundis correct but would read clearer parenthesized; and theErrstrings are terse — a future debug trip into why a title shader refused will want the lo/hiValues logged.@ashrafsdrop on GitHub · 2026-11-25 17:46 UTC · original
Addressed the triage feedback in
34c7ec2(and parenthesized(v.abs | v.neg | v.opsel) == 0from@kotekompotek's nit):crates/victory-shader/src/emit/lower.rs): inAtom::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-wideVCC != 0ballot check.crates/victory-shader/src/emit/synthetic_tests.rs): addedemit::synthetic_tests::pixel_shader_vcc_branch_uses_per_lane_decisiontestingStageIo::Pswithv_cmp_eq_u32 vcc, 0, v0; s_and_b64 vcc, exec, vcc; s_cbranch_vccz/s_cbranch_vccnz.uniform_counter_comparenote (crates/victory-shader/src/range.rs): documented why the unconditional-entry single-block loop + unguarded constantv_add_nc_u32step + whole-waves_cbranch_vcc*back edge keeps all active lanes uniform.Verification on
34c7ec2cargo test -p victory-shader -- --test-threads=1: 256 passed, 0 failed, 3 ignored (pixel_shader_vcc_branch_uses_per_lane_decisionand allvcc_branch*tests passed)cargo clippy -p victory-shader --all-targets --all-features -- -D warnings: cleancargo run -p xtask -- policy:asset policy: 182 files okgit diff --check: cleanReady for re-triage.
@zed6000 on GitHub · 2026-11-25 21:39 UTC · original
For the maintainers, alongside the triage above: I measured the reviewed head
34c7ec2offline on the title's shaders. Merged onto main13f91ca(a clean merge) and compared program by program (victory translate --validate --list,shaders.rpf1.0.2.1, dxil.dll 1.8.2502, the method in #1247), 1,829 programs that validate on main stop translating. It gains none.What those programs fail with now:
emit: a scalar VCC branch depending on a divergent scalar joinemit: a scalar VCC branch with mask bits outside its producing pathemit: a descriptor's address or format read as dataemit: a lane mask read as dataThe 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.rschanges 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:40 UTC · original
For comparison, measured the same way on the same base: #2406 (
583fc17, the competing raw-VCC change) merged onto13f91cagives 0 gained, 0 lost. So on this title, testing raw VCC fors_cbranch_vccz/vccnzdoesn't by itself cost any programs. The 1,829 losses above come from this PR's additional refusals and itsstructure.rs/range.rschanges, 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: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:13f91ca583fc17(raw VCC, per-lane branch)86fde8a(wave-wide VCC branch, as published)34c7ec2(wave-wide, plus its later per-lane fallback)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.
@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
34c7ec2head. 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
5on 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.13f91ca34c7ec2a descriptor's address or format read as data3980ea0The 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 exact13f91cabase. 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.For the PR author, the cherry-pick on
34c7ec2is3980ea087b085669f326cd3d4198cd5f93433be4fromcodex/pr2405-stage-mask-facts. AI-assisted with Codex.@zed6000 on GitHub · 2026-11-26 02:22 UTC · original
@steven-seagull27 Census of your
a7d7e03(34c7ec2+3980ea0merged onto13f91ca; I checked that its tree is exactly that merge), same method and files as the −1,829 above, compared program by program with13f91ca:13f91ca34c7ec2(PR head)a7d7e03(+3980ea0)a descriptor's address or format read as datasurvive, nor the 202a lane mask read as data, the 35a descriptor read only as data, the 10 constant-buffer ones or the 2a join of mismatched values. Each of the 878 it still loses fails exactly as on34c7ec2, with the same reason.a scalar VCC branch depending on a divergent scalar join, 254a scalar VCC branch with mask bits outside its producing path, and 1structure: lane conditions too large. All 878 are compute programs. It gains none.cargo test -p victory-shader --libona7d7e03, RX 7900 XTX: 280 passed, 0 failed, 3 ignored. That includespixel_vcc_fallback_preserves_a_dead_descriptor_field, allstride_testsand the gather tests that fail on your 5080.So
3980ea0does 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 on13f91ca) that the wave-wide VCC path refuses. #2406 makes the raw-VCC change with 0 lost. Offline counts only; no program names or data.@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, usess_cbranch_execzto skip a scalars_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_hialone. Results are wrong lanes / lanes read.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 read0x1000fromWaveActiveBallot(id == 44).xand true fromWaveActiveAnyTrue(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 measureda7d7e03and 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.AI-assisted. All local fixtures were synthetic.
@zed6000 on GitHub · 2026-11-26 03:23 UTC · original
@steven-seagull27 Census of
ee9cb2b(one commit ona7d7e03, reviewed before building), same method and files as above:a7d7e03: 0 recovered and 0 new failures. Every listed program ends exactly as ona7d7e03, including the refusal text. Against13f91cait's still −878 compute: 623a scalar VCC branch depending on a divergent scalar join, 254... mask bits outside its producing path, 1structure: 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.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 withvcczandvccnz. The built-in WARP (4..4) skips both widths.vcc_branches_isolate_a_partial_second_guest_waveandvcc_branches_read_all_bits_of_a_scalar_mask_in_a_partial_group, 4/4 with the relatedvcc_branchestests.cargo test -p victory-shader --lib --lockedonee9cb2b: 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.
@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
ee9cb2bas 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-813f91cavalidation 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
13f91careference 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,$referenceListis the path to the saved main listing and$censusPathsis 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.AI-assisted. All local test inputs were synthetic.
@steven-seagull27 on GitHub · 2026-11-26 04:13 UTC · original
@ashrafsdrop I checked the rebased head
988074ad. The failed Windows CI job stops atpolicy::tests::repository_passes_policy:emit/lower.rsis 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 witha descriptor's address or format read as data.I put two separate commits directly on
988074ad:lower.rsat 522,240 bytes and the same policy test passes locally.3980ea0change 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.
AI-assisted. All tests on this rebase used synthetic inputs.
@ashrafsdrop on GitHub · 2026-11-26 04:32 UTC · original
Thanks @steven-seagull27. Cherry-picked both commits onto
shader/vcc-branch-no-exec-026and pushed:f4c07f9(e03d817): Moves VCC lowering intocrates/victory-shader/src/emit/lower/vcc.rs. Leaveslower.rsat 522,240 bytes (under the 524,288 limit);xtaskasset-policy test passes.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 failedcargo test -p victory-shader --lib --locked pixel_vcc_fallback_preserves_a_dead_descriptor_field: passedcargo test -p victory-shader --lib --locked vcc: 9 passed, 0 failedcargo clippy --workspace --all-targets --all-features --locked -- -D warnings: clean@zed6000 on GitHub · 2026-11-26 04:38 UTC · original
@ashrafsdrop The PR's new head
7ffdba5(with3980ea0and thevcc.rsmove) on currentmain63bcca4(a clean merge), same method as above: −878, 0 gained. They're all compute programs: 623a scalar VCC branch depending on a divergent scalar join, 254... mask bits outside its producing path, 1structure: 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'sa7d7e03on13f91ca, 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 onmain). Offline counts only; no program names or data.@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.@catminou4 on GitHub · 2026-11-25 13:19 UTC · original · reviewed
Tested locally: merged into main
940d32f69b,cargo test -p victory-shader --lockedon 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).@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:s_cbranch_vccz/s_cbranch_vccnzmatches 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 (includingvcc_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).
@ashrafsdrop on GitHub · 2026-11-26 15:55 UTC · original
Pushed commit
edb55c8:crates/victory-shader/src/emit/lower/vcc.rs,Lower::vcc_nonzeronow falls back to the per-lane decision (self.boolean(mask, at)) whencheck_vcc_joinsorvcc_wordfails to recover a wave-wide scalar word for compute shaders, matching the graphics safety net.docs/architecture.mdto conform to 80-column policy.compute_shader_vcc_branch_translates_cleanlyunderemit::synthetic_tests. Passescargo clippyandcargo run -p xtask -- policy.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.