shader: restore mesh barrier iteration after descriptor joins #2269

Closed
R0Y00 wants to merge 1 commit from upstream-pr/2277 into main
R0Y00 commented 2026-11-25 09:25:17 +00:00 (Migrated from github.com)

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


Refs #1998. After #2142 and #2151 landed together, exec_range became a generator because it yields at group barriers. The top-level steps wrapper treated it as a Boolean and returned without executing it. The descriptor join also called each arm without consuming its generator. This reproduced TypeError: 'NoneType' object is not an iterator on main and in both Linux jobs for #2266, #2271, and #2273.

Forward the barrier yields and termination value at the top level. Execute each descriptor arm to completion under the existing scalar-only restriction, and explicitly refuse an unexpected yield in an arm. Keep both originally accepted profiles and their existing controls.

On Windows, the previously failing host checks passed with python -B tests/mesh_heap_sampler_check.py, mesh_dynamic_geometry_check.py, mesh_dynamic_aot_check.py, mesh_lane_spill_check.py, mesh_join_descriptor_check.py and pso_readiness_check.py. The existing mesh_scc_any_lane_check.py also passed. The protected LLVM and Windows jobs remain required.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6601292062 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2277). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T09:25:17Z. --- Refs #1998. After #2142 and #2151 landed together, `exec_range` became a generator because it yields at group barriers. The top-level `steps` wrapper treated it as a Boolean and returned without executing it. The descriptor join also called each arm without consuming its generator. This reproduced `TypeError: 'NoneType' object is not an iterator` on main and in both Linux jobs for #2266, #2271, and #2273. Forward the barrier yields and termination value at the top level. Execute each descriptor arm to completion under the existing scalar-only restriction, and explicitly refuse an unexpected yield in an arm. Keep both originally accepted profiles and their existing controls. On Windows, the previously failing host checks passed with `python -B tests/mesh_heap_sampler_check.py`, `mesh_dynamic_geometry_check.py`, `mesh_dynamic_aot_check.py`, `mesh_lane_spill_check.py`, `mesh_join_descriptor_check.py` and `pso_readiness_check.py`. The existing `mesh_scc_any_lane_check.py` also passed. The protected LLVM and Windows jobs remain required.
upstream-sync closed this pull request 2026-11-25 10:05:29 +00:00
tedin7 commented 2026-11-25 10:05:29 +00:00 (Migrated from github.com)

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

Review: COMMENTED


Review of head bc5ab15df2862ac7e4e0fd72efa36b9206dcf72e (comment only).

Summary: The fix is correct. steps now uses yield from so group barriers reach the caller and the s_endpgm result is kept. Descriptor-join arms now run to completion, and a barrier inside an arm is refused. I found no P1 or P2 issues.

Checks

  • Diff is one file, tools/mesh_entry_aot.py (+6/-5). Title is neutral and the change is clean-room.
  • PR is MERGEABLE. The Linux job passes. The LLVM and Windows jobs were still pending when I looked.

Commands run locally (Linux, on the PR head)

  • python3 -B tests/{mesh_heap_sampler,mesh_dynamic_geometry,mesh_dynamic_aot,mesh_lane_spill,mesh_join_descriptor,pso_readiness,mesh_scc_any_lane}_check.py: all exit 0 and print their ok lines.
  • python3 tests/docs_links_check.py: 18 files, 435 links, ok.
  • python3 tests/bidi_controls_check.py: ok.
  • git diff --check origin/main...HEAD: clean.

Mutations

  • Replacing yield from self.exec_range(...) at the top level with a non-generator use (list(...)) makes mesh_dynamic_geometry_check crash with TypeError: 'NoneType' object is not an iterator. The suite kills this mutant.
  • Replacing the raise ValueError("Unexpected barrier inside a descriptor join arm") with pass leaves mesh_join_descriptor_check green. The new refusal is therefore not covered by any test (nit).

Findings

  • P1: none.
  • P2: none.
  • nit (tools/mesh_entry_aot.py:304-305): add a refusal case to mesh_join_descriptor_check.py with a barrier inside a join arm, so the new ValueError is guarded. Not blocking, since the path is defensive.
  • Windows WARP proof was not run. The change is host-side Python only, with no shader or C++ change.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6054943797 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2277#pullrequestreview-6054943797). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T09:27:49Z. **Review:** COMMENTED --- Review of head `bc5ab15df2862ac7e4e0fd72efa36b9206dcf72e` (comment only). **Summary:** The fix is correct. `steps` now uses `yield from` so group barriers reach the caller and the `s_endpgm` result is kept. Descriptor-join arms now run to completion, and a barrier inside an arm is refused. I found no P1 or P2 issues. **Checks** - Diff is one file, `tools/mesh_entry_aot.py` (+6/-5). Title is neutral and the change is clean-room. - PR is MERGEABLE. The Linux job passes. The LLVM and Windows jobs were still pending when I looked. **Commands run locally (Linux, on the PR head)** - `python3 -B tests/{mesh_heap_sampler,mesh_dynamic_geometry,mesh_dynamic_aot,mesh_lane_spill,mesh_join_descriptor,pso_readiness,mesh_scc_any_lane}_check.py`: all exit 0 and print their ok lines. - `python3 tests/docs_links_check.py`: 18 files, 435 links, ok. - `python3 tests/bidi_controls_check.py`: ok. - `git diff --check origin/main...HEAD`: clean. **Mutations** - Replacing `yield from self.exec_range(...)` at the top level with a non-generator use (`list(...)`) makes `mesh_dynamic_geometry_check` crash with `TypeError: 'NoneType' object is not an iterator`. The suite kills this mutant. - Replacing the `raise ValueError("Unexpected barrier inside a descriptor join arm")` with `pass` leaves `mesh_join_descriptor_check` green. The new refusal is therefore not covered by any test (nit). **Findings** - P1: none. - P2: none. - nit (`tools/mesh_entry_aot.py:304-305`): add a refusal case to `mesh_join_descriptor_check.py` with a barrier inside a join arm, so the new `ValueError` is guarded. Not blocking, since the path is defensive. - Windows WARP proof was not run. The change is host-side Python only, with no shader or C++ change. AI-assisted; commands listed were executed locally.
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:27:33Z.


Closing this parallel repair in favor of #2276, which landed the same generator fix on its branch first. The existing host checks and the independent WARP/RTX descriptor-join and any-lane controls passed on the equivalent repair. Please keep protected CI on #2276.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7158357546 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2277#issuecomment-7158357546). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T09:27:33Z. --- Closing this parallel repair in favor of #2276, which landed the same generator fix on its branch first. The existing host checks and the independent WARP/RTX descriptor-join and any-lane controls passed on the equivalent repair. Please keep protected CI on #2276.

Pull request closed

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!2269
No description provided.