shader: expect the mesh broadcast after a wave-index branch join #3909

Manually merged
github merged 1 commit from github-bot/gh-3907 into gh-pr/3907/base 2026-12-03 01:43:55 +00:00 AGit
Owner

@⁠lukaslw-lab on GitHub · 2026-12-03 01:06 UTC · original
lukaslw-lab:shader/mesh-entry-wave-branch-test → main · +4 −2 · 1 files · 1 commits · merged 2026-12-03 01:36 UTC

Change

native_mesh_entry_registers_ir fails on main since #3840 and #3896 both merged. This updates the one case that disagrees. Fixes #3908.

#3840's wave-varying-branch expected v_readfirstlane_b32 after an SCC branch on the wave-index field to be refused. #3896 removed that group_flow condition: at a converged join under full EXEC, the read is lowered as the per-wave shared-memory broadcast. The case now expects that broadcast (meshReadFirstLane), the same as root-uniform-branch right below it. The point of the case stays: the wave field does not make the value uniform, so the read must not become a plain copy. Test-only; no source change.

The refusal under a narrowed EXEC is already covered by #3896's v_cmpx case in native_direct_mesh_check.py.

Verification

Commit 6e43982a0 on main f3ab02fee, Windows 10 22H2 (build 19045), MSVC 19.52.37029, CMake 4.3.1, Python 3.13.7, DXC 1.9.2609.5, NVIDIA GeForce RTX 3080 Ti (driver 32.0.16.1047), WARP 1.0.22.0, Agility SDK 1.620.2.

ctest --test-dir out\build\dev-agility --no-tests=error -R '^(native_mesh_entry_registers_|native_direct_mesh$|native_mesh_readfirstlane_)'
native_direct_mesh, native_mesh_entry_registers_ir, native_mesh_readfirstlane_warp, native_mesh_readfirstlane_hardware: Passed
100% tests passed, 0 tests failed out of 4
(same in out\build\release-agility: 4 of 4)

Before the change, native_mesh_entry_registers_ir failed with AssertionError: ('wave-varying-branch', '') locally and on CI (run 47005435060).

Evidence and follow-up

  • If group-wide control after a wave-index branch is still meant to be required, the gate belongs in lower_mesh instead, and this PR should be closed in favour of that.

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for every check I ran.
  • I considered a negative control or failure case for a new fixture.
  • I updated README/docs when a capability or build requirement changed. (No capability changed.)
  • I did not include game files, dumps, distribution links or secrets.

AI-assisted: prepared with Claude Code; the commands and results above were run on the author's PC.

🤖 Generated with Claude Code

**@⁠lukaslw-lab** on GitHub · 2026-12-03 01:06 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3907) `lukaslw-lab:shader/mesh-entry-wave-branch-test` → `main` · +4 −2 · 1 files · 1 commits · merged 2026-12-03 01:36 UTC ## Change `native_mesh_entry_registers_ir` fails on `main` since #3840 and #3896 both merged. This updates the one case that disagrees. Fixes #3908. #3840's `wave-varying-branch` expected `v_readfirstlane_b32` after an SCC branch on the wave-index field to be refused. #3896 removed that `group_flow` condition: at a converged join under full EXEC, the read is lowered as the per-wave shared-memory broadcast. The case now expects that broadcast (`meshReadFirstLane`), the same as `root-uniform-branch` right below it. The point of the case stays: the wave field does not make the value uniform, so the read must not become a plain copy. Test-only; no source change. The refusal under a narrowed EXEC is already covered by #3896's `v_cmpx` case in `native_direct_mesh_check.py`. ## Verification Commit `6e43982a0` on main `f3ab02fee`, Windows 10 22H2 (build 19045), MSVC 19.52.37029, CMake 4.3.1, Python 3.13.7, DXC 1.9.2609.5, NVIDIA GeForce RTX 3080 Ti (driver 32.0.16.1047), WARP 1.0.22.0, Agility SDK 1.620.2. ctest --test-dir out\build\dev-agility --no-tests=error -R '^(native_mesh_entry_registers_|native_direct_mesh$|native_mesh_readfirstlane_)' native_direct_mesh, native_mesh_entry_registers_ir, native_mesh_readfirstlane_warp, native_mesh_readfirstlane_hardware: Passed 100% tests passed, 0 tests failed out of 4 (same in out\build\release-agility: 4 of 4) Before the change, `native_mesh_entry_registers_ir` failed with `AssertionError: ('wave-varying-branch', '')` locally and on CI (run `47005435060`). ## Evidence and follow-up - If group-wide control after a wave-index branch is still meant to be required, the gate belongs in `lower_mesh` instead, and this PR should be closed in favour of that. ## Checklist - [x] This pull request covers one reviewable behavior. - [x] I included the exact command and result for every check I ran. - [x] I considered a negative control or failure case for a new fixture. - [ ] I updated README/docs when a capability or build requirement changed. (No capability changed.) - [x] I did not include game files, dumps, distribution links or secrets. _AI-assisted: prepared with Claude Code; the commands and results above were run on the author's PC._ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
#3838 added a case expecting v_readfirstlane_b32 after an SCC branch on the
wave-index field to be refused. #3894 accepts such a read at a converged
full-EXEC join and lowers it as the per-wave shared-memory broadcast, so the
case failed on main. Expect the broadcast instead: the wave field still does
not make the value uniform, so the read must not become a plain copy.

Fixes #3906.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 01:08:47 +00:00
github-bot changed target branch from main to gh-pr/3907/base 2026-12-03 01:43:45 +00:00
github manually merged commit 6e43982a0d into gh-pr/3907/base 2026-12-03 01:43:55 +00:00
Author
Owner

@⁠R0Y00 on GitHub · 2026-12-03 01:35 UTC · original · approved these changes

Independently verified 6e43982a. The one-file change pins the per-wave meshReadFirstLane broadcast at the full-EXEC join. ctest --preset dev --no-tests=error -j 1 -R "^(native_mesh_entry_registers_ir|native_direct_mesh|native_mesh_readfirstlane_(warp|hardware))$" passed 4/4 on Windows 11 build 26300, MSVC Debug, WARP and RTX 4060 Laptop (616.56), with no skip. Swapping only the old test from f3ab02fe back in on the same compiler failed at wave-varying-branch; restoring the new assertion passed again. This matches the shared Windows test failure on #3905, #3906, #3907, #3812, #3659 and #3630.

**@⁠R0Y00** on GitHub · 2026-12-03 01:35 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3907#pullrequestreview-6162194093) · **approved these changes** Independently verified 6e43982a. The one-file change pins the per-wave meshReadFirstLane broadcast at the full-EXEC join. ctest --preset dev --no-tests=error -j 1 -R "^(native_mesh_entry_registers_ir|native_direct_mesh|native_mesh_readfirstlane_(warp|hardware))$" passed 4/4 on Windows 11 build 26300, MSVC Debug, WARP and RTX 4060 Laptop (616.56), with no skip. Swapping only the old test from f3ab02fe back in on the same compiler failed at wave-varying-branch; restoring the new assertion passed again. This matches the shared Windows test failure on #3905, #3906, #3907, #3812, #3659 and #3630.
This discussion has been locked. Commenting is limited to contributors.
No description provided.