mesh: keep Wave.steps a generator after the exec_range split #2276

Manually merged
github merged 1 commit from gh-pr/2276/head into gh-pr/2276/base 2026-11-27 00:11:49 +00:00
Owner

@⁠tedin7 on GitHub · 2026-11-25 09:24 UTC · original
tedin7:x2w-fix-mesh-steps-generator → main · +3 −2 · 1 files · 1 commits · merged 2026-11-25 09:34 UTC

Part of #2142

What this unblocks: restores run_group on main so every mesh entry lowering runs again, with both barrier lockstep (#2142) and dynamic predicate joins (#2151) intact.

Root cause: #2151 (54830b1d) moved the instruction loop into Wave.exec_range, which contains the yield at s_barrier. Wave.steps then called it as a plain function, so steps stopped being a generator and run_group hit next(None) (TypeError: 'NoneType' object is not an iterator). Join arms also called exec_range without iterating it, so the arm bodies never ran.

Fix:

  • Wave.steps delegates with yield from self.exec_range(...).
  • join_arms drains the arm generator; a barrier inside an arm is refused (it already was).

Verification (Linux only, LLVM 19 locally; CI uses 15):

  • python3 -B tests/mesh_join_descriptor_check.py: pass (failed with the TypeError before the fix)
  • python3 -B tests/mesh_{entry,descriptor_swap,attribute,indexed,lit}_check.py binary llvm-mc-19 llvm-objcopy-19 libLLVM-19.so: all pass
  • tests/mesh_dynamic_aot_check.py, mesh_heap_sampler_check.py, mesh_lane_spill_check.py, mesh_dynamic_geometry_check.py, pso_readiness_check.py, docs_links_check.py: pass
  • startup_*_check.py run without arguments: every check from the CI Python list passes; the rest need Windows, a renderer or extra arguments and were not run.
  • Win2025 not run (Stage-2).

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-25 09:24 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2276) `tedin7:x2w-fix-mesh-steps-generator` → `main` · +3 −2 · 1 files · 1 commits · merged 2026-11-25 09:34 UTC Part of #2142 What this unblocks: restores `run_group` on main so every mesh entry lowering runs again, with both barrier lockstep (#2142) and dynamic predicate joins (#2151) intact. Root cause: #2151 (`54830b1d`) moved the instruction loop into `Wave.exec_range`, which contains the `yield` at `s_barrier`. `Wave.steps` then called it as a plain function, so `steps` stopped being a generator and `run_group` hit `next(None)` (`TypeError: 'NoneType' object is not an iterator`). Join arms also called `exec_range` without iterating it, so the arm bodies never ran. Fix: - `Wave.steps` delegates with `yield from self.exec_range(...)`. - `join_arms` drains the arm generator; a barrier inside an arm is refused (it already was). Verification (Linux only, LLVM 19 locally; CI uses 15): - `python3 -B tests/mesh_join_descriptor_check.py`: pass (failed with the TypeError before the fix) - `python3 -B tests/mesh_{entry,descriptor_swap,attribute,indexed,lit}_check.py binary llvm-mc-19 llvm-objcopy-19 libLLVM-19.so`: all pass - `tests/mesh_dynamic_aot_check.py`, `mesh_heap_sampler_check.py`, `mesh_lane_spill_check.py`, `mesh_dynamic_geometry_check.py`, `pso_readiness_check.py`, `docs_links_check.py`: pass - `startup_*_check.py` run without arguments: every check from the CI Python list passes; the rest need Windows, a renderer or extra arguments and were not run. - Win2025 not run (Stage-2). AI-assisted; commands listed were executed locally.
exec_range yields at s_barrier, so Wave.steps must delegate with yield from and join arms must drain it. Fixes run_group TypeError on main after #2151 landed on #2142.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 00:11:47 +00:00
github manually merged commit f7404e95fb into gh-pr/2276/base 2026-11-27 00:11:49 +00:00
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-25 09:31 UTC · original

I independently reproduced the main-branch failure and verified this exact head against the descriptor join, any-lane SCC, dynamic geometry and PSO readiness host checks. On the equivalent patch, all nine previously failing LLVM tests passed under Ubuntu LLVM 15. The fresh GitHub checks on this head are also green. Please mark it ready when your local stage is complete so we can clear the shared failure in #2266, #2270, #2271, #2273 and the launcher-fix queue. I closed the parallel patch #2277 in favor of this PR.

**@⁠R0Y00** on GitHub · 2026-11-25 09:31 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2276#issuecomment-7158446675) I independently reproduced the main-branch failure and verified this exact head against the descriptor join, any-lane SCC, dynamic geometry and PSO readiness host checks. On the equivalent patch, all nine previously failing LLVM tests passed under Ubuntu LLVM 15. The fresh GitHub checks on this head are also green. Please mark it ready when your local stage is complete so we can clear the shared failure in #2266, #2270, #2271, #2273 and the launcher-fix queue. I closed the parallel patch #2277 in favor of this PR.
This discussion has been locked. Commenting is limited to contributors.
No description provided.