Capture slot 57 indirect mesh translation requests #2245

Merged
R0Y00 merged 1 commit from upstream-pr/2253 into main 2026-11-25 08:18:42 +00:00
R0Y00 commented 2026-11-25 07:56:08 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T07:56:08Z.


Refs #1759 and #1760.

A recognized indirect mesh command on a direct list can publish the fixed slot 57 mesh program, optional pixel program and recorded root signature. The root must be the same one bound to the list and the vertex slot must be empty. Slot 55 derivatives reuse the slot 57 base. The cache uses a separate length-framed key and writes the mesh marker last. The watcher validates roles and reports the first unsupported workgroup-memory instruction where present. The shim leaves these commands unforwarded while mesh code emission and resource binding are pending.

cmake --build --preset release --target startup_indirect_draw_indexed
ctest --preset release --no-tests=error -j 1 -R '^startup_indirect_(mesh_|draw(_indexed)?_(warp|hardware))' -V
.\out\pe-env\Scripts\python.exe -B tests/startup_gfx2hlsl_watch_check.py

Windows 11 build 26200.9974 passed 8/8 Release CTests with no skips. WARP 10.0.26100.9818 and RTX 4060 Laptop GPU 32.0.16.1656 both ran with the D3D12 debug layer enabled. Each published one paired request and one mesh-only request with exact bytes. A mismatched root, populated vertex slot and incomplete pixel span each left the cache empty. All slot 57 controls retained the clear target and argument guards. The Python watcher test passed, including a missing marker, vertex code under either mesh or pixel role, and a tampered key.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6599873018 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2253). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T07:56:08Z. --- Refs #1759 and #1760. A recognized indirect mesh command on a direct list can publish the fixed slot 57 mesh program, optional pixel program and recorded root signature. The root must be the same one bound to the list and the vertex slot must be empty. Slot 55 derivatives reuse the slot 57 base. The cache uses a separate length-framed key and writes the mesh marker last. The watcher validates roles and reports the first unsupported workgroup-memory instruction where present. The shim leaves these commands unforwarded while mesh code emission and resource binding are pending. ```powershell cmake --build --preset release --target startup_indirect_draw_indexed ctest --preset release --no-tests=error -j 1 -R '^startup_indirect_(mesh_|draw(_indexed)?_(warp|hardware))' -V .\out\pe-env\Scripts\python.exe -B tests/startup_gfx2hlsl_watch_check.py ``` Windows 11 build 26200.9974 passed 8/8 Release CTests with no skips. WARP 10.0.26100.9818 and RTX 4060 Laptop GPU 32.0.16.1656 both ran with the D3D12 debug layer enabled. Each published one paired request and one mesh-only request with exact bytes. A mismatched root, populated vertex slot and incomplete pixel span each left the cache empty. All slot 57 controls retained the clear target and argument guards. The Python watcher test passed, including a missing marker, vertex code under either mesh or pixel role, and a tampered key.
tedin7 commented 2026-11-25 07:57:35 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T07:57:35Z.

Review: COMMENTED


Review of head c50fa24258030857797a20559dba0ff56dc27649 (7 files, +223/-5). CI was still pending when I looked, so the Windows jobs are not covered here. I did not run the Windows WARP/hardware tests (startup_indirect_mesh_request_*). They need a Windows run before this is ready.

Commands executed locally (Linux), all rc=0:

  • python3 tests/startup_gfx2hlsl_watch_check.py -> startup_gfx2hlsl_watch_check passed
  • python3 tests/docs_links_check.py -> Checked 18 Markdown files and 419 links.
  • python3 tests/bidi_controls_check.py -> no bidirectional controls
  • git diff --check origin/main...HEAD -> clean

Findings:

P2 (tests, tests/startup_gfx2hlsl_watch_check.py ~L80-110): three mutations of the new reader survived, and the watch check still passed.

  1. In inspect_mesh57_request (tools/startup/gfx2hlsl.py), dropping the 'target_20' not in exports condition. No fixture has a mesh stage with a position export but no primitive export.
  2. In inspect_mesh57_request, replacing if op.startswith('ds_') with if False. No fixture contains a ds_* op, so the workgroup-memory refusal is never exercised.
  3. In pending_keys, removing the m57 exemption from the "already done" skip. No fixture covers an .m57 request that has a stale .txt and .cso.
    Please add a fixture for each. Each is small and uses the existing mesh57_fixture helper.

P2 (ordering, inspect_mesh57_request): the ds_ refusal runs after the pixel-stage check, and the final Unsupported is unconditional. This is consistent today. Still, the ds_ refusal is dead until the previous point is fixed, so the "mesh workgroup memory" message can never surface in practice.

Nit (d3d12_draw.inl, request_slot57_mesh): written is only inserted after all three publishes succeed. A partial failure (for example .ps57 and .root written, .m57 failed) is retried on the next call, which is fine. Because .m57 is written last, the scanner never sees a partial request.

Nit (d3d12_xs_device.cpp, list_execute_indirect): when mesh is true but the list is not DIRECT, or the pipeline is real, neither branch runs. That seems intended, but a one-line comment would help.

Clean-room and title: neutral title, no model names, MIT-compatible content. Mergeable, not draft.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6053777330 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2253#pullrequestreview-6053777330). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T07:57:35Z. **Review:** COMMENTED --- Review of head `c50fa24258030857797a20559dba0ff56dc27649` (7 files, +223/-5). CI was still pending when I looked, so the Windows jobs are not covered here. I did not run the Windows WARP/hardware tests (`startup_indirect_mesh_request_*`). They need a Windows run before this is ready. Commands executed locally (Linux), all rc=0: - `python3 tests/startup_gfx2hlsl_watch_check.py` -> `startup_gfx2hlsl_watch_check passed` - `python3 tests/docs_links_check.py` -> `Checked 18 Markdown files and 419 links.` - `python3 tests/bidi_controls_check.py` -> `no bidirectional controls` - `git diff --check origin/main...HEAD` -> clean Findings: P2 (tests, `tests/startup_gfx2hlsl_watch_check.py` ~L80-110): three mutations of the new reader survived, and the watch check still passed. 1. In `inspect_mesh57_request` (`tools/startup/gfx2hlsl.py`), dropping the `'target_20' not in exports` condition. No fixture has a mesh stage with a position export but no primitive export. 2. In `inspect_mesh57_request`, replacing `if op.startswith('ds_')` with `if False`. No fixture contains a `ds_*` op, so the workgroup-memory refusal is never exercised. 3. In `pending_keys`, removing the `m57` exemption from the "already done" skip. No fixture covers an `.m57` request that has a stale `.txt` and `.cso`. Please add a fixture for each. Each is small and uses the existing `mesh57_fixture` helper. P2 (ordering, `inspect_mesh57_request`): the `ds_` refusal runs after the pixel-stage check, and the final `Unsupported` is unconditional. This is consistent today. Still, the `ds_` refusal is dead until the previous point is fixed, so the "mesh workgroup memory" message can never surface in practice. Nit (`d3d12_draw.inl`, `request_slot57_mesh`): `written` is only inserted after all three publishes succeed. A partial failure (for example `.ps57` and `.root` written, `.m57` failed) is retried on the next call, which is fine. Because `.m57` is written last, the scanner never sees a partial request. Nit (`d3d12_xs_device.cpp`, `list_execute_indirect`): when `mesh` is true but the list is not DIRECT, or the pipeline is real, neither branch runs. That seems intended, but a one-line comment would help. Clean-room and title: neutral title, no model names, MIT-compatible content. Mergeable, not draft. AI-assisted; commands listed were executed locally.
upstream-sync closed this pull request 2026-11-25 09:04:02 +00:00
R0Y00 commented 2026-11-25 09:04:12 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T08:18:10Z.


The slot 57 follow-up is available as one commit on an integration branch with this PR and tedin7's #2142 commits. It depends on both PRs and retains main's retired-wave handling from #2241.

The mesh request reader now runs the bounded two-wave LDS evaluator as a diagnostic. The request format stays compatible. Because the request lacks verified mesh entry bindings, the evaluator uses synthetic inputs for the diagnostic and the runtime keeps these requests unforwarded. A local replay reached the LDS store-completion check for all 32 captures (29 distinct requests). An offline control with an explicit store-completion wait reached the distinct-barrier rejection for all 32. These replay inputs and logs stay local.

python -B tests/mesh_scc_any_lane_check.py, python -B tests/mesh_dynamic_geometry_check.py, python -B tests/mesh_dynamic_aot_check.py, and python -B tests/startup_gfx2hlsl_watch_check.py passed. The 19-instruction source-built control decoded identically in the checked-in decoder and the LLVM 15 disassembler. The translated draw control (python -B tests/mesh_scc_any_lane_draw_check.py <dxc> <offscreen_check> <warp|hardware>) matched 1,024/1,024 pixels on WARP 10.0.26100.9818 and RTX 4060 Laptop 32.0.16.1656 under Windows 11 build 26200.9974, with no D3D12 debug errors or warnings.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7156858282 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2253#issuecomment-7156858282). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T08:18:10Z. --- The slot 57 follow-up is available as [one commit](https://github.com/R0Y00/Xbox2Windows/commit/f8da4cf7fa6521db4ad85e991497f1d602bef4a0) on an [integration branch](https://github.com/R0Y00/Xbox2Windows/tree/codex/startup-mesh-lds-integration) with this PR and tedin7's #2142 commits. It depends on both PRs and retains main's retired-wave handling from #2241. The mesh request reader now runs the bounded two-wave LDS evaluator as a diagnostic. The request format stays compatible. Because the request lacks verified mesh entry bindings, the evaluator uses synthetic inputs for the diagnostic and the runtime keeps these requests unforwarded. A local replay reached the LDS store-completion check for all 32 captures (29 distinct requests). An offline control with an explicit store-completion wait reached the distinct-barrier rejection for all 32. These replay inputs and logs stay local. `python -B tests/mesh_scc_any_lane_check.py`, `python -B tests/mesh_dynamic_geometry_check.py`, `python -B tests/mesh_dynamic_aot_check.py`, and `python -B tests/startup_gfx2hlsl_watch_check.py` passed. The 19-instruction source-built control decoded identically in the checked-in decoder and the LLVM 15 disassembler. The translated draw control (`python -B tests/mesh_scc_any_lane_draw_check.py <dxc> <offscreen_check> <warp|hardware>`) matched 1,024/1,024 pixels on WARP 10.0.26100.9818 and RTX 4060 Laptop 32.0.16.1656 under Windows 11 build 26200.9974, with no D3D12 debug errors or warnings.
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!2245
No description provided.