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

Merged
tedin7 merged 1 commit from upstream-pr/2276 into main 2026-11-25 09:34:27 +00:00
tedin7 commented 2026-11-25 09:24:27 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T09:24:27Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6601276613 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2276). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T09:24:27Z. --- 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.
upstream-sync closed this pull request 2026-11-25 10:05:28 +00:00
R0Y00 commented 2026-11-25 10:05:33 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T09:31:29Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7158446675 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2276#issuecomment-7158446675). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T09:31:29Z. --- 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.
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
R0Y00/Xbox2Windows!2268
No description provided.