victory-shader: fix Wave64 wave size, scc_some widening, and raw VCC branches #356
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: launcher
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
run report
security: hold
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs gpu test
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/Androtim--MiniVI!356
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-356"
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?
@Androtim on GitHub · 2026-12-02 15:45 UTC · original
Androtim:fix/rdna4-wave64-culling→main· +681 −12 · 4 files · 2 commits · merged 2026-12-02 22:03 UTCFixes P0 RDNA4 / Wave64 shader lowering findings #6, #7, and #8 from #282 (related: #276).
Summary
crates/victory-shader/src/emit/lower.rs):v_readfirstlane_b32(in groups with> 1thread) inconsole_lanes, ensuring[WaveSize(64)]is emitted on Wave64 hosts while leaving waterfall descriptor reads untouched.x.native.wave64 && s.lds_dwords > 0) inlds_waveso Wave64 hosts emit[WaveSize(64)]and Wave32-only hosts entersplit_lds.crates/victory-shader/src/emit/lower.rs):Err(MASK_ELSEWHERE)+need(made)) whenscc_somereads an SCC value with bits outsideEXECbuilt in a non-all_lane_blocks_nativeblock on native waves, triggering branch/loop widening instead of reading bogus inactive bits.crates/victory-shader/src/structure.rs,emit/lower.rs,emit/mod.rs):s_cbranch_vccz/s_cbranch_vccnzagainst rawvccinstead ofvcc & exec.vcc_outside_execacross single-predecessorEXECstate inLanes, reject un-widened native branches/exits whoseVCCcan hold bits outsideEXECor inactive lanes (Err(MASK_ELSEWHERE)), and teachwiden()to widen conditional VCC branch blocks viawave_any.Verification
cargo clippy -p victory-shader --all-targets --locked -- -D warnings(passed)cargo run -p xtask --locked -- policy(325 files ok)cargo test -p victory-shader --lib -- --test-threads=1suites including new regression tests (structure::tests,emit::lower::tests,emit::wave64_tests,emit::size_tests,emit::waterfall_tests,emit::lds_sub_tests,emit::threading::tests,ir::tests,resource::tests,spill::tests,bvh::tests,dxbc::tests,dxil::tests,emit::bitcode::tests,emit::own_bits::tests,emit::container::tests,emit::cost::tests,emit::atomic_tests)github-bot referenced this pull request2026-12-02 16:06:14 +00:00
@Androtim on GitHub · 2026-12-02 16:07 UTC · original · edited 2026-12-02 18:02 UTC
Automated triage for the maintainers (not an approval).
Verdict:
needs-rebase· CI (check):noneThis PR no longer merges cleanly into
main.To change the verdict: Rebase onto current
mainand resolve conflicts; CI and triage will run again automatically.Generated with Antigravity CLI (
agy).@Androtim on GitHub · 2026-12-02 17:04 UTC · original
Holding merge (
triage: needs work) per Deep Static Audit Pass #2 (#282comment7352688269, P1 finding #22):lds_wavemulti-wavex.native.wave64expansion breaks 32 KiB TGSM shaders on NVIDIA — restrict multi-wave expansion tohost_max_wave() >= 64and re-run CI before merge.@Androtim on GitHub · 2026-12-02 17:33 UTC · original
Finding #22 fix (
host_max_wave() >= 64guard on multi-wavelds_wave) looks clean! However,b56e2809now conflicts with merged#358(likelylower_tests.rs) and has no CI run yet (checks=[]). Please rebase ontomainto resolve the conflict and trigger CI -> ready to merge once CI is green!b56e2809f5toc31bbebcc1@Androtim on GitHub · 2026-12-02 22:03 UTC · original
Rebased cleanly onto
main(c31bbebc), Deep Static Audit Pass #3 (#282comment7355749301) verified Finding#22resolved (host_max_wave() >= 64guard, zero NVIDIA Wave32 regressions), and CI46979442126is GREEN. Merging RDNA 4 Wave64 +scc_some+ raw VCC branch fixes tomain.