shader: name the failing proof stage in slot 57 execz refusals #3489

Manually merged
github merged 2 commits from github-bot/gh-3487 into gh-pr/3487/base 2026-11-30 08:51:18 +00:00 AGit
Owner

@⁠Leyukaka on GitHub · 2026-11-29 17:25 UTC · original
Leyukaka:shader-mesh57-execz-attribution → main · +134 −35 · 4 files · 2 commits · merged 2026-11-30 08:48 UTC

Refs #3418.

Why

In a long local run of the application, 300+ slot 57 refusals carried the single message slot 57 mesh: s_cbranch_execz skips code with effects outside active lanes, with no offset. They could not be attributed to a proof or an instruction.

What changes

The two messages keep their text as a stable prefix and gain a suffix:

slot 57 mesh: s_cbranch_execz skips code with effects outside active lanes (proof stage <stage>, branch offset 0x.., target offset 0x.., instruction offset 0x..)
slot 57 mesh: v_readfirstlane_b32 outside the group-index read is not covered (proof stage group-index read, instruction offset 0x..)

Stages for the execz message: reaching EXEC or thread-index, region effects, uniform bound, load offset, live scalar incoming value.

No admission change. In mesh_skeleton the single OR condition is split into a sequence with one branch per original term, so the first failing term can be named; target == count_at still raises the exchange-branch refusal. The Stage sites raise under the same conditions as before.

Consumers:

  • tools/startup/refusal_census.py strips the suffix before its other normalisation rules, so the refusal class is the same with and without it.
  • triage_run needs no change: no pattern matches either form, so both classify the same.
  • tests/startup_mesh57_skeleton_check.py compares these refusals by prefix.

Tests

New execz mode of startup_mesh57_skeleton_check.py (ctest startup_mesh57_execz_diagnostics), also run by the no-argument mode. For each stage it checks the exact request result, the published .fail text, the census class against the bare prefix, and the watcher output.

  • startup_mesh57_skeleton_check.py with no arguments: pass, 0 FAIL. execz: pass.
  • ctest startup_mesh57_* excluding _warp/_hardware: 6/6 (skeleton, depth_only, loop_refusal, loop, lane_spill, execz_diagnostics).
  • triage_run, refusal_census, gfx2hlsl_refusals, gfx2hlsl_watch and the dpp/sgpr_spill checks: pass.

Mutations, each restored afterwards:

  • mesh_execz_refusal returns the bare prefix: execz mode fails, 21 FAIL.
  • census normalisation line removed: execz mode fails, 8 FAIL, all on the census class.
  • depth-only loop reverted to the exact comparison: 4 FAIL, the four depth-only execz rows.

Not run

binary mode (no llvm-mc on our host) and the draw modes (draw, depth, killexit, formatted, shift, exchange, i.e. the _warp/_hardware ctest entries): the renderer was not built in that tree.

**@⁠Leyukaka** on GitHub · 2026-11-29 17:25 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3487) `Leyukaka:shader-mesh57-execz-attribution` → `main` · +134 −35 · 4 files · 2 commits · merged 2026-11-30 08:48 UTC Refs #3418. ## Why In a long local run of the application, 300+ slot 57 refusals carried the single message `slot 57 mesh: s_cbranch_execz skips code with effects outside active lanes`, with no offset. They could not be attributed to a proof or an instruction. ## What changes The two messages keep their text as a stable prefix and gain a suffix: ``` slot 57 mesh: s_cbranch_execz skips code with effects outside active lanes (proof stage <stage>, branch offset 0x.., target offset 0x.., instruction offset 0x..) slot 57 mesh: v_readfirstlane_b32 outside the group-index read is not covered (proof stage group-index read, instruction offset 0x..) ``` Stages for the execz message: `reaching EXEC or thread-index`, `region effects`, `uniform bound`, `load offset`, `live scalar incoming value`. No admission change. In `mesh_skeleton` the single OR condition is split into a sequence with one branch per original term, so the first failing term can be named; `target == count_at` still raises the exchange-branch refusal. The `Stage` sites raise under the same conditions as before. Consumers: - `tools/startup/refusal_census.py` strips the suffix before its other normalisation rules, so the refusal class is the same with and without it. - `triage_run` needs no change: no pattern matches either form, so both classify the same. - `tests/startup_mesh57_skeleton_check.py` compares these refusals by prefix. ## Tests New `execz` mode of `startup_mesh57_skeleton_check.py` (ctest `startup_mesh57_execz_diagnostics`), also run by the no-argument mode. For each stage it checks the exact request result, the published `.fail` text, the census class against the bare prefix, and the watcher output. - `startup_mesh57_skeleton_check.py` with no arguments: pass, 0 FAIL. `execz`: pass. - ctest `startup_mesh57_*` excluding `_warp`/`_hardware`: 6/6 (skeleton, depth_only, loop_refusal, loop, lane_spill, execz_diagnostics). - triage_run, refusal_census, gfx2hlsl_refusals, gfx2hlsl_watch and the dpp/sgpr_spill checks: pass. Mutations, each restored afterwards: - `mesh_execz_refusal` returns the bare prefix: `execz` mode fails, 21 FAIL. - census normalisation line removed: `execz` mode fails, 8 FAIL, all on the census class. - depth-only loop reverted to the exact comparison: 4 FAIL, the four depth-only execz rows. ## Not run `binary` mode (no `llvm-mc` on our host) and the draw modes (`draw`, `depth`, `killexit`, `formatted`, `shift`, `exchange`, i.e. the `_warp`/`_hardware` ctest entries): the renderer was not built in that tree.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 17:27:41 +00:00
Author
Owner

@⁠lukaslw-lab on GitHub · 2026-11-30 06:33 UTC · original · reviewed

Reviewed fb67c068 by reading the diff; not built or run.

Verdict: approve. The refusal texts gain a proof-stage suffix with no admission change, and the census class stays the same. No MUST.

  • No admission change. The split in mesh_skeleton (tools/startup/gfx2hlsl.py:2126-2146) tests the same terms as the old OR, and failed is not None exactly when the old condition was true: the merged targets/edges scan equals the two anys, and mask_writers has the same keys as the old masks set. target == count_at still raises the exchange-branch refusal first.
  • Offsets are consistent. load_compares now keeps (thread, source, target) as ins indices, and region_walk reads ins[...][0] from them. wave_load_targets is built from the same branches list that holds every s_cbranch*, so each wave_loads key has an entry.
  • Census class unchanged. The new NORMALIZE rule is anchored on the .fail first line and also matches the v_readfirstlane_b32 form. No consumer under src/, tools/ or tests/ matches the old full text; the docs/experiments/ tables quote it only as historical counts.
  • Real-title scale. In our local shader cache from this title, 460 slot 57 .fail files carry the execz text and 98 the group-index text, so the suffix will split a large bucket. We did not replay them on this head.
  • NIT for live scalar incoming value (gfx2hlsl.py:4356), the branch and instruction offsets are the same, and the failing item is the register dst. Naming it, e.g. register s43, would point straight at the cause.
**@⁠lukaslw-lab** on GitHub · 2026-11-30 06:33 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3487#pullrequestreview-6107805005) · **reviewed** Reviewed `fb67c068` by reading the diff; not built or run. **Verdict: approve.** The refusal texts gain a proof-stage suffix with no admission change, and the census class stays the same. No MUST. - **No admission change.** The split in `mesh_skeleton` (`tools/startup/gfx2hlsl.py:2126-2146`) tests the same terms as the old OR, and `failed is not None` exactly when the old condition was true: the merged `targets`/`edges` scan equals the two `any`s, and `mask_writers` has the same keys as the old `masks` set. `target == count_at` still raises the exchange-branch refusal first. - **Offsets are consistent.** `load_compares` now keeps `(thread, source, target)` as `ins` indices, and `region_walk` reads `ins[...][0]` from them. `wave_load_targets` is built from the same `branches` list that holds every `s_cbranch*`, so each `wave_loads` key has an entry. - **Census class unchanged.** The new `NORMALIZE` rule is anchored on the `.fail` first line and also matches the `v_readfirstlane_b32` form. No consumer under `src/`, `tools/` or `tests/` matches the old full text; the `docs/experiments/` tables quote it only as historical counts. - **Real-title scale.** In our local shader cache from this title, 460 slot 57 `.fail` files carry the execz text and 98 the group-index text, so the suffix will split a large bucket. We did not replay them on this head. - **NIT** for `live scalar incoming value` (`gfx2hlsl.py:4356`), the branch and instruction offsets are the same, and the failing item is the register `dst`. Naming it, e.g. `register s43`, would point straight at the cause.
github-bot changed target branch from main to gh-pr/3487/base 2026-11-30 08:51:17 +00:00
github manually merged commit fb67c0680c into gh-pr/3487/base 2026-11-30 08:51:18 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.