shader: say where a lane mask read as data comes from when it is refused #118

Manually merged
github merged 1 commit from github-bot/gh-118 into main 2026-11-26 18:09:26 +00:00 AGit
Owner

@⁠Olima34 on GitHub · 2026-11-26 17:18 UTC · original
Olima34:fix/shader-lane-mask-refusal-causes → main · +52 −15 · 3 files · 1 commits · merged 2026-11-26 18:09 UTC

For the "lane mask read as data" shape of #4. This is a diagnostic, not a lowering: it splits the refusal so the next run says which form the title uses.

Why. "a lane mask holding lanes elsewhere read as data" was the message for every way out of Lower::mask_number. The #110 log shows three compute programs refused with it, but not which form they take, so there is nothing safe to lower yet. Reading the shaders to find out would mean sending game bytes to a model.

What. Each exit now names its cause after the same prefix, so the existing tallies still group them:

  • in a mesh program;
  • a program input;
  • not written by a scalar ALU instruction;
  • written by a scalar instruction of the other width (for example s_and_saveexec_b32 in a wave64 program);
  • the EXEC a saveexec keeps, or a mask written with EXEC;
  • shifted on the host's lanes;
  • an operand no SGPR or constant gives;
  • a scalar operation not modelled.

An unknown operation is now named before its second source is read; nothing else changes. Of the forms tried by hand in a wave64 compute program (s_and_saveexec_b64, s_orn1_saveexec_b64, s_brev_b64, s_wqm_b64, s_cselect_b32, s_mov_b32 and s_not_b32 of vcc_lo), only s_and_saveexec_b32 reaches this refusal; the others already lower.

Test. mask_tests checks the "other width" message for s_and_saveexec_b32 in wave64.

victory-shader tests, Windows clippy and cargo xtask policy pass. Once a refusal report on current main is posted, I'll lower whichever form shows up.

**@⁠Olima34** on GitHub · 2026-11-26 17:18 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/118) `Olima34:fix/shader-lane-mask-refusal-causes` → `main` · +52 −15 · 3 files · 1 commits · merged 2026-11-26 18:09 UTC For the "lane mask read as data" shape of #4. This is a diagnostic, not a lowering: it splits the refusal so the next run says which form the title uses. **Why.** "a lane mask holding lanes elsewhere read as data" was the message for every way out of `Lower::mask_number`. The #110 log shows three compute programs refused with it, but not which form they take, so there is nothing safe to lower yet. Reading the shaders to find out would mean sending game bytes to a model. **What.** Each exit now names its cause after the same prefix, so the existing tallies still group them: - `in a mesh program`; - `a program input`; - `not written by a scalar ALU instruction`; - `written by a scalar instruction of the other width` (for example `s_and_saveexec_b32` in a wave64 program); - `the EXEC a saveexec keeps, or a mask written with EXEC`; - `shifted on the host's lanes`; - `an operand no SGPR or constant gives`; - `a scalar operation not modelled`. An unknown operation is now named before its second source is read; nothing else changes. Of the forms tried by hand in a wave64 compute program (`s_and_saveexec_b64`, `s_orn1_saveexec_b64`, `s_brev_b64`, `s_wqm_b64`, `s_cselect_b32`, `s_mov_b32` and `s_not_b32` of `vcc_lo`), only `s_and_saveexec_b32` reaches this refusal; the others already lower. **Test.** `mask_tests` checks the "other width" message for `s_and_saveexec_b32` in wave64. victory-shader tests, Windows clippy and `cargo xtask policy` pass. Once a refusal report on current main is posted, I'll lower whichever form shows up.
"a lane mask holding lanes elsewhere read as data" ended every way out of mask_number. Each now names its cause (a mesh program, a program input, not a scalar ALU write, a scalar instruction of the other width, a saveexec's EXEC, a shift on host lanes, an operand, an operation not modelled), so the next tester log tells which form the three compute programs of issue #110 use. An unknown operation is now named before its second source is read.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 17:21:17 +00:00
github manually merged commit ab38a70ac2 into main 2026-11-26 18:09:26 +00:00
Author
Owner

@⁠LakshanSivakumar on GitHub · 2026-11-26 18:09 UTC · original

Merged, thanks. I renamed the first cause to "in a mesh, hull or geometry program" (f8a7a0b), since that case covers every stage but compute, pixel and vertex.

**@⁠LakshanSivakumar** on GitHub · 2026-11-26 18:09 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/118#issuecomment-7200126157) Merged, thanks. I renamed the first cause to "in a mesh, hull or geometry program" (f8a7a0b), since that case covers every stage but compute, pixel and vertex.
This discussion has been locked. Commenting is limited to contributors.
No description provided.