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

Merged
m0rff merged 2 commits from upstream-pr/297 into main 2026-11-27 10:37:28 +00:00
m0rff commented 2026-11-27 09:17:19 +00:00 (Migrated from github.com)

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by m0rff on 2026-11-27T09:17:19Z.


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.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:issue:5524161940 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/297). Originally posted by [m0rff](https://github.com/m0rff) on 2026-11-27T09:17:19Z. --- 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://github.com/LakshanSivakumar/Native-Victory-macOS/issues/4#issuecomment-7214502118): **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`.
LakshanSivakumar commented 2026-11-27 10:37:40 +00:00 (Migrated from github.com)

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T10:37:40Z.


Thank you. Merged.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7216113262 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/297#issuecomment-7216113262). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T10:37:40Z. --- Thank you. Merged.
AnastasisKon commented 2026-11-27 11:10:03 +00:00 (Migrated from github.com)

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-27T11:10:03Z.


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.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7216758181 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/297#issuecomment-7216758181). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-27T11:10:03Z. --- 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.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
LakshanSivakumar/Native-Victory-macOS!297
No description provided.