shader: pin the lockstep rewrites with unit tests #478
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 AnastasisKon on 2026-11-27T21:58:20Z.
What
crates/victory-shader/src/emit/lockstep.rsrewrites a wave's instructions before DXIL is emitted, so the two host waves of a console wave arrive together: a mask branch becomes a 64-bit compare with zero plus an SCC branch of the same distance, and a group barrier goes around each LDS write (never around a read). A change there is invisible until a shader is refused or lowered wrongly, and nothing pins the rewrites.What this pins
branches:s_cbranch_execzbecomings_cmp_eq_u64over the EXEC pair pluss_cbranch_scc1, the compare writing SCC, the branch reading it, and the original branch distance and opcode kept;s_cbranch_execnz,s_cbranch_vcczands_cbranch_vccnzpicking the matching compare over EXEC or VCC;lds_barriers: a barrier around each LDS write and none around a read;Test-only: hand-assembled GFX10 words (
gfx_refusal_tests.rs's approach, built throughir::build), no game data, no behaviour change, no new dependencies.How it was tested
cargo test -p victory-shader(new unit tests)cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warningscargo xtask policyImported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-27T21:58:29Z.
/claim
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-27T21:58:45Z.
Claimed by @AnastasisKon. Open a draft pull request with
Refs #478in its description within 24 hours, or the claim expires.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T12:44:44Z.
/release - done without a PR: on branch
vibe/lockstep-rewrite-tests-4f9c68, in my fork'smain. The lockstep rewrites are pinned bya_branch_on_scc_or_a_non_mask_branch_is_untouched,an_execz_branch_becomes_a_compare_with_zero_and_an_scc_branchandexecnz_vccz_and_vccnz_use_the_matching_compare.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-28T12:44:53Z.
Released. This issue is free to claim.