victory-shader: use console_lane in lane_bit and untracked cndmask under Wave32 halves #78

Manually merged
github merged 1 commit from github-bot/gh-78 into gh-pr/78/base 2026-12-06 00:43:50 +00:00 AGit
Owner

@⁠ending3729 on GitHub · 2026-12-05 21:29 UTC · original
ending3729:fix/wave32-relax-console-lane-bit → main · +69 −3 · 3 files · 1 commits · merged 2026-12-05 22:27 UTC

Summary

  • Fix Wave32-relaxed console Wave64 compute shaders (halves = Some(_), exchange = None) miscompiling lane_bit and console_lane for lanes 32..63:
    • console_lane() and lane_bit() in crates/victory-shader/src/emit/lower/operands.rs previously checked only self.exchange, falling back to waveGetLaneIndex() (0..31) under halves and causing lanes 32..63 to read lo instead of hi.
    • console_lanes in crates/victory-shader/src/emit/lower/mod.rs now includes v_cndmask_b32 reading an untracked scalar mask so standalone selects still set console_lanes (matching cross_lane()) without disabling Wave32 relaxation.
  • Add synthetic Wave64 compute regression test emit::wave64_tests::relaxed_wave32_cndmask_reads_console_lane_bit covering both intra-half DPP + v_cndmask_b32_e64 and standalone v_cndmask_b32_e64 with root-constant 64-bit masks.
Check Outcome
cargo test -p victory-shader --locked -- relaxed_wave32_cndmask_reads_console_lane_bit Passed (DXIL-validated + RX 6600 XT hardware dispatch)
cargo clippy --workspace --all-targets --locked -- -D warnings Passed (0 warnings)
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings Passed (0 warnings)
cargo xtask policy Passed (asset policy: 447 files ok)
Verification notes
  • Retail game dump assets are not available locally; verification uses the synthetic Wave64 compute shader test lowered with set_thread_max_wave(Some(32)), validated with dxil.dll, and dispatched on an AMD Radeon RX 6600 XT.
  • cargo test -p victory-shader --locked: 319 passed, 4 ignored, 1 unrelated pre-existing failure in emit::isa_tests::single_instructions_give_what_rdna2_gives (v_*_f16 sdwa src1:w1 [rdna 15, f16 nearest]).

AI-assisted: yes

**@⁠ending3729** on GitHub · 2026-12-05 21:29 UTC · [original](https://github.com/VGLALALA/ReVictory-RDNA3/pull/78) `ending3729:fix/wave32-relax-console-lane-bit` → `main` · +69 −3 · 3 files · 1 commits · merged 2026-12-05 22:27 UTC ## Summary - Fix Wave32-relaxed console Wave64 compute shaders (`halves = Some(_)`, `exchange = None`) miscompiling `lane_bit` and `console_lane` for lanes `32..63`: - `console_lane()` and `lane_bit()` in `crates/victory-shader/src/emit/lower/operands.rs` previously checked only `self.exchange`, falling back to `waveGetLaneIndex()` (`0..31`) under `halves` and causing lanes `32..63` to read `lo` instead of `hi`. - `console_lanes` in `crates/victory-shader/src/emit/lower/mod.rs` now includes `v_cndmask_b32` reading an untracked scalar mask so standalone selects still set `console_lanes` (matching `cross_lane()`) without disabling Wave32 relaxation. - Add synthetic Wave64 compute regression test `emit::wave64_tests::relaxed_wave32_cndmask_reads_console_lane_bit` covering both intra-half DPP + `v_cndmask_b32_e64` and standalone `v_cndmask_b32_e64` with root-constant 64-bit masks. | Check | Outcome | |---|---| | `cargo test -p victory-shader --locked -- relaxed_wave32_cndmask_reads_console_lane_bit` | Passed (DXIL-validated + RX 6600 XT hardware dispatch) | | `cargo clippy --workspace --all-targets --locked -- -D warnings` | Passed (0 warnings) | | `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings` | Passed (0 warnings) | | `cargo xtask policy` | Passed (`asset policy: 447 files ok`) | <details> <summary>Verification notes</summary> - Retail game dump assets are not available locally; verification uses the synthetic Wave64 compute shader test lowered with `set_thread_max_wave(Some(32))`, validated with `dxil.dll`, and dispatched on an AMD Radeon RX 6600 XT. - `cargo test -p victory-shader --locked`: 319 passed, 4 ignored, 1 unrelated pre-existing failure in `emit::isa_tests::single_instructions_give_what_rdna2_gives` (`v_*_f16 sdwa src1:w1 [rdna 15, f16 nearest]`). </details> AI-assisted: yes
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-05 21:33:19 +00:00
github-bot changed target branch from main to gh-pr/78/base 2026-12-05 22:31:53 +00:00
github manually merged commit fc761e7fef into gh-pr/78/base 2026-12-06 00:43:49 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.