shader: pin pixel-stage cross-lane behaviour (graphics shape of #4, tests only) #297

Manually merged
github merged 2 commits from github-bot/gh-297 into main 2026-11-27 10:48:29 +00:00 AGit
Owner

@⁠m0rff on GitHub · 2026-11-27 09:17 UTC · original
m0rff:m0rff/cross-lane-outside-compute → main · +42 −1 · 2 files · 2 commits · merged 2026-11-27 10:37 UTC

Refs #4 (only the graphics shape, "a cross-lane operation outside compute").

This PR adds tests only. It lowers nothing, because there is nothing left in this shape to lower on current main. Olima34 counted on #4: 0 pixel "a cross-lane operation outside compute" refusals in a cold run and in a warm run to frame 2560 (c1b9587 plus #253, #267 and #264, none of which touch graphics cross-lane lowering). The only cross-lane refusals left were 10 "between host waves in divergent code", all compute. The 127 in the #147 log came from 57b7ebd, and 269e7d5's spill_slot most likely took them.

  • a_pixel_program_reads_back_an_sgpr_spilled_on_two_paths: a constant-lane v_readlane_b32 of an SGPR spilled on two paths into a join translates in a pixel program. With the spill_slot rule turned off, the test fails with the 57b7ebd refusal, "a cross-lane operation outside compute: v_readlane_b32 of a constant lane in a pixel program".
  • a_pixel_program_with_dpp8_is_refused_by_name: DPP8 in a pixel program is still refused under its own name. Nothing open lowers it, so a log will name it if it shows up.
  • docs/native-host.md: records the tally next to the 127.

Checked locally: cargo test -p victory-hle -p victory -p xtask (x86_64), cargo test -p victory-gpu (native arm64), cargo test -p victory-shader, clippy for x86_64-pc-windows-gnullvm with -D warnings, and cargo xtask policy.

**@⁠m0rff** on GitHub · 2026-11-27 09:17 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/297) `m0rff:m0rff/cross-lane-outside-compute` → `main` · +42 −1 · 2 files · 2 commits · merged 2026-11-27 10:37 UTC Refs #4 (only the graphics shape, "a cross-lane operation outside compute"). This PR adds tests only. It lowers nothing, because there is nothing left in this shape to lower on current main. Olima34 [counted on #4](https://git.gtahub.st/github/LakshanSivakumar--Native-Victory-macOS/issues/4): **0** pixel "a cross-lane operation outside compute" refusals in a cold run and in a warm run to frame 2560 (c1b9587 plus #253, #267 and #264, none of which touch graphics cross-lane lowering). The only cross-lane refusals left were 10 "between host waves in divergent code", all compute. The 127 in the #147 log came from 57b7ebd, and 269e7d5's `spill_slot` most likely took them. - `a_pixel_program_reads_back_an_sgpr_spilled_on_two_paths`: a constant-lane `v_readlane_b32` of an SGPR spilled on two paths into a join translates in a pixel program. With the `spill_slot` rule turned off, the test fails with the 57b7ebd refusal, "a cross-lane operation outside compute: v_readlane_b32 of a constant lane in a pixel program". - `a_pixel_program_with_dpp8_is_refused_by_name`: DPP8 in a pixel program is still refused under its own name. Nothing open lowers it, so a log will name it if it shows up. - `docs/native-host.md`: records the tally next to the 127. Checked locally: `cargo test -p victory-hle -p victory -p xtask` (x86_64), `cargo test -p victory-gpu` (native arm64), `cargo test -p victory-shader`, clippy for `x86_64-pc-windows-gnullvm` with `-D warnings`, and `cargo xtask policy`.
A constant-lane v_readlane of an SGPR spilled on two paths into a join
translates in a pixel program (Lower::spill_slot); at 57b7ebd it counted
as "a cross-lane operation outside compute". DPP8 in a pixel program
stays refused under its own name. Lowering waits for the op tally on #4.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 10:37:26 +00:00
Author
Owner

@⁠LakshanSivakumar on GitHub · 2026-11-27 10:37 UTC · original

Thank you. Merged.

**@⁠LakshanSivakumar** on GitHub · 2026-11-27 10:37 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/297#issuecomment-7216113262) Thank you. Merged.
github manually merged commit 2e5d432a30 into main 2026-11-27 10:48:29 +00:00
Author
Owner

@⁠AnastasisKon on GitHub · 2026-11-27 11:10 UTC · original

Verified by running the branch: both new tests pass and the whole emit::gfx_refusal_tests module is green (57/57, x86_64-unknown-linux-gnu, rustc 1.98.1). The spill test asserts the translated output has no wave_read_lane_calls, and it documents that it fails with the old refusal when the spill rule is off — a real regression pin rather than a tautology. The DPP8 test pins the named refusal. The docs paragraph correctly separates the 57b7ebd log's 127 from the new 0-count tally and names the runs it came from. Clear, correctly scoped (pins only, no lowering to review), and the honest "nothing left to lower on current main" framing is the right call. LGTM from my side.

**@⁠AnastasisKon** on GitHub · 2026-11-27 11:10 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/297#issuecomment-7216758181) Verified by running the branch: both new tests pass and the whole emit::gfx_refusal_tests module is green (57/57, x86_64-unknown-linux-gnu, rustc 1.98.1). The spill test asserts the translated output has no wave_read_lane_calls, and it documents that it fails with the old refusal when the spill rule is off — a real regression pin rather than a tautology. The DPP8 test pins the named refusal. The docs paragraph correctly separates the 57b7ebd log's 127 from the new 0-count tally and names the runs it came from. Clear, correctly scoped (pins only, no lowering to review), and the honest "nothing left to lower on current main" framing is the right call. LGTM from my side.
This discussion has been locked. Commenting is limited to contributors.
No description provided.