fix(shader): track constant s_mov_b32 identities in whole-wave reductions #155
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/155"
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?
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by brainbudt on 2026-11-26T21:51:14Z.
Whole-wave reduction simulation in
crates/victory-shader/src/emit/wave.rspreviously refused scalar moves that load a compile-time constant identity (such ass_mov_b32 s6, INT_MAXbefore a signed-minimumv_cndmask_b32) with"a whole-wave section step the simulation does not follow: a scalar ALU result".Changes
s_mov_b32writes to an SGPR asSym::Kinwave::simulate(using the existingconstant()helper so non-constant SGPR copies and special registers likevccz/execz/sccremain refused).crates/victory-shader/src/emit/gfx_refusal_tests.rschecking byte-identical DXIL against a direct literal operand (including withEXEC == 0at the scalar move), plus negative cases for a wrong constant identity and a dynamic SGPR copy.docs/native-host.md.Verification
cargo test -p victory-shader(261 passed, 0 failed, 2 ignored)cargo clippy -p victory-shader --all-targets --target x86_64-pc-windows-gnullvm -- -D warningscargo xtask policy(364 files ok)Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-26T22:39:17Z.
Review: APPROVED
Reviewed and tested together with the other open PRs on main (macOS x86_64 workspace tests, the setup shell tests, and Windows clippy). Thanks!