shader: cover mesh amplification forms #1196

Merged
lambirou merged 2 commits from upstream-pr/1203 into main 2026-11-24 11:41:33 +00:00
lambirou commented 2026-11-24 03:32:37 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-24T03:32:37Z.


Change

Add evidence for the mesh and amplification boundary (XCL-18).

  • offscreen_check --mesh-amplified <as.dxil> <ms.dxil> <ps.dxil> <fixture> creates one
    pipeline state with AS, MS and PS subobjects and issues DispatchMesh(1,1,1) for a single
    amplification group.
  • tests/mesh_amplified_check.py source-builds as_6_5, ms_6_5 and ps_6_0. The AS
    passes a depth word in its payload; the MS exports the same 80-byte trace as the mesh-entry
    fixtures, and the 32x32 target compares all 1,024 RGBA pixels.
  • The translator checks the PSV0 stage and DXIL kind before the mesh profile and refuses the
    amplification stage by name:
    Unsupported amplification stage: only the bounded mesh stage is translated.
  • tests/mesh_amplification_refusal_check.py proves the stage 14 refusal while stage 13 mesh
    remains accepted. The accepted form stays one triangle-topology MS with 128 threads, three
    vertices and one primitive in a single group.

Verification

  • cmake --preset dev and cmake --build --preset dev --target offscreen_check: passed with
    MSVC 19.44.
  • ctest --preset dev --no-tests=error -R '^mesh_' -V: 37/37 passed, including every
    _hardware variant.
  • WARP and AMD Radeon RX 9060 XT: mesh_amplified_draw_warp and its hardware counterpart
    passed with a mesh-only control and the AS+MS positive case; 80-byte trace and 1,024 pixels
    with zero mismatches.
  • Negative controls: a stale payload changes trace byte 26 and fails the export check while
    pixels still match; a wrong image keeps the trace intact and reports 1,024 pixel mismatches.
  • tests/docs_links_check.py: Self-test passed., Checked 16 Markdown files and 277 links..
  • git diff --check origin/main...HEAD: clean.
  • Not run: the binary LLVM modes of the mesh tools and the release preset.

Evidence

  • Branch shader/mesh-as-forms, head 209745a3, rebased on origin/main 5a0dbd5c.
  • Windows 10 Pro 26H2 build 26300.10075; WARP 10.0.26100.10068 (Microsoft Basic Render Driver,
    vendor 1414, device 008c); AMD Radeon RX 9060 XT (vendor 1002, device 7590, driver
    32.0.32029.2010); DXC 1.8.2502.11 from 10.0.26100.0; debug layer unavailable.
  • WARP positive run: mesh_pipeline_ms=0.659 for the mesh-only control and 1.092 for
    AS+MS.
  • docs/experiments.md records the exact commands, controls and environment; the capability
    matrix adds the new tests.
  • Boundary: guest amplification code, a translated mesh payload, a multi-group mesh dispatch and
    the meshlet command stream are not translated. The AS+MS fixture is source built and makes no
    console mesh-shader ABI claim. No src/ change and no production export.
  • Provenance: public Microsoft mesh/amplification shader and D3D12 pipeline documentation, the
    Windows SDK headers, and the existing local mesh-entry evidence. No XCL code, table or output.
  • No game files, dumps, shader bytes, title paths or secrets.

Checklist

  • One reviewable behavior: the mesh and amplification pipeline forms with their refusal
    boundary.
  • Positive trace and pixel comparison plus stale-payload, wrong-image and refusal controls.
  • Documentation and capability matrix updated.
  • No game files, dumps, logs or secrets.
  • Provenance checked; no XCL code used.
  • AI-assisted (Codex).
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6573996318 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1203). Originally posted by [lambirou](https://github.com/lambirou) on 2026-11-24T03:32:37Z. --- ## Change Add evidence for the mesh and amplification boundary (XCL-18). - `offscreen_check --mesh-amplified <as.dxil> <ms.dxil> <ps.dxil> <fixture>` creates one pipeline state with AS, MS and PS subobjects and issues `DispatchMesh(1,1,1)` for a single amplification group. - `tests/mesh_amplified_check.py` source-builds `as_6_5`, `ms_6_5` and `ps_6_0`. The AS passes a depth word in its payload; the MS exports the same 80-byte trace as the mesh-entry fixtures, and the 32x32 target compares all 1,024 RGBA pixels. - The translator checks the PSV0 stage and DXIL kind before the mesh profile and refuses the amplification stage by name: `Unsupported amplification stage: only the bounded mesh stage is translated`. - `tests/mesh_amplification_refusal_check.py` proves the stage 14 refusal while stage 13 mesh remains accepted. The accepted form stays one triangle-topology MS with 128 threads, three vertices and one primitive in a single group. ## Verification - `cmake --preset dev` and `cmake --build --preset dev --target offscreen_check`: passed with MSVC 19.44. - `ctest --preset dev --no-tests=error -R '^mesh_' -V`: 37/37 passed, including every `_hardware` variant. - WARP and AMD Radeon RX 9060 XT: `mesh_amplified_draw_warp` and its hardware counterpart passed with a mesh-only control and the AS+MS positive case; 80-byte trace and 1,024 pixels with zero mismatches. - Negative controls: a stale payload changes trace byte 26 and fails the export check while pixels still match; a wrong image keeps the trace intact and reports 1,024 pixel mismatches. - `tests/docs_links_check.py`: `Self-test passed.`, `Checked 16 Markdown files and 277 links.`. - `git diff --check origin/main...HEAD`: clean. - Not run: the binary LLVM modes of the mesh tools and the release preset. ## Evidence - Branch `shader/mesh-as-forms`, head `209745a3`, rebased on `origin/main` `5a0dbd5c`. - Windows 10 Pro 26H2 build 26300.10075; WARP 10.0.26100.10068 (Microsoft Basic Render Driver, vendor 1414, device 008c); AMD Radeon RX 9060 XT (vendor 1002, device 7590, driver 32.0.32029.2010); DXC 1.8.2502.11 from `10.0.26100.0`; debug layer unavailable. - WARP positive run: `mesh_pipeline_ms=0.659` for the mesh-only control and `1.092` for AS+MS. - `docs/experiments.md` records the exact commands, controls and environment; the capability matrix adds the new tests. - Boundary: guest amplification code, a translated mesh payload, a multi-group mesh dispatch and the meshlet command stream are not translated. The AS+MS fixture is source built and makes no console mesh-shader ABI claim. No `src/` change and no production export. - Provenance: public Microsoft mesh/amplification shader and D3D12 pipeline documentation, the Windows SDK headers, and the existing local mesh-entry evidence. No XCL code, table or output. - No game files, dumps, shader bytes, title paths or secrets. ## Checklist - [x] One reviewable behavior: the mesh and amplification pipeline forms with their refusal boundary. - [x] Positive trace and pixel comparison plus stale-payload, wrong-image and refusal controls. - [x] Documentation and capability matrix updated. - [x] No game files, dumps, logs or secrets. - [x] Provenance checked; no XCL code used. - [x] AI-assisted (Codex).
tedin7 commented 2026-11-24 06:46:53 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T03:41:06Z.

Review: COMMENTED


Technical review on Linux (Windows build/tests were not executed locally).

Checks run (Linux, commit 026f45e9)

  • /root/.local/share/x2w-rev-venv/bin/python -B tests/mesh_amplification_refusal_check.py: passed (mesh stage accepted; amplification and compute stages refused by name).
  • /root/.local/share/x2w-rev-venv/bin/python -B tests/docs_links_check.py: passed (15 Markdown files, 269 links).
  • /root/.local/share/x2w-rev-venv/bin/python -B tests/bidi_controls_check.py: passed (979 files).
  • /root/.local/share/x2w-rev-venv/bin/python -B tests/gpu_report_format_check.py: Ran 10 tests — OK.
  • /root/.local/share/x2w-rev-venv/bin/python -B tests/hardware_reports_check.py: Ran 11 tests — OK.

Findings

No blocking issues found:

  • tools/mesh_entry_aot.py (require_mesh_stage) validates both PSV0[28] and the DXIL program kind before mesh profile checks and rejects stage 14 (amplification) by name.
  • tests/mesh_entry_draw.cpp (MeshAmplifiedPipeline) keeps the AS subobject out of MeshPipeline, tests/offscreen_check.cpp adds --mesh-amplified with CLI self-tests, and tests/mesh_amplified_check.py covers positive (--mesh-entry, --mesh-amplified), stale-payload (trace byte 26 mismatch, 0 pixel mismatches), and wrong-image (1,024 pixel mismatches) controls.
  • docs/experiments.md and docs/xcl-capability-matrix.md match the measured scope and remain title-neutral.
  • Minor non-blocking note: check_mesh_draw in tests/mesh_entry_draw.cpp duplicates the common stream field initialization across the if (amplification) and else branches.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6033311550 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1203#pullrequestreview-6033311550). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T03:41:06Z. **Review:** COMMENTED --- Technical review on Linux (Windows build/tests were **not** executed locally). ### Checks run (Linux, commit `026f45e9`) - `/root/.local/share/x2w-rev-venv/bin/python -B tests/mesh_amplification_refusal_check.py`: passed (`mesh stage accepted; amplification and compute stages refused by name`). - `/root/.local/share/x2w-rev-venv/bin/python -B tests/docs_links_check.py`: passed (`15` Markdown files, `269` links). - `/root/.local/share/x2w-rev-venv/bin/python -B tests/bidi_controls_check.py`: passed (`979` files). - `/root/.local/share/x2w-rev-venv/bin/python -B tests/gpu_report_format_check.py`: `Ran 10 tests — OK`. - `/root/.local/share/x2w-rev-venv/bin/python -B tests/hardware_reports_check.py`: `Ran 11 tests — OK`. ### Findings No blocking issues found: - `tools/mesh_entry_aot.py` (`require_mesh_stage`) validates both `PSV0[28]` and the `DXIL` program kind before mesh profile checks and rejects stage `14` (`amplification`) by name. - `tests/mesh_entry_draw.cpp` (`MeshAmplifiedPipeline`) keeps the `AS` subobject out of `MeshPipeline`, `tests/offscreen_check.cpp` adds `--mesh-amplified` with CLI self-tests, and `tests/mesh_amplified_check.py` covers positive (`--mesh-entry`, `--mesh-amplified`), stale-payload (trace byte 26 mismatch, 0 pixel mismatches), and wrong-image (1,024 pixel mismatches) controls. - `docs/experiments.md` and `docs/xcl-capability-matrix.md` match the measured scope and remain title-neutral. - Minor non-blocking note: `check_mesh_draw` in `tests/mesh_entry_draw.cpp` duplicates the common stream field initialization across the `if (amplification)` and `else` branches.
tedin7 commented 2026-11-24 06:46:53 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T04:37:56Z.

Review: COMMENTED


Linux retest at commit 209745a3 (rebased onto main since 026f45e9; Windows build and D3D12 runtime tests were not executed locally).

Scope & diff audit (209745a3)

  • tools/mesh_entry_aot.py: require_mesh_stage(chunks) checks PSV0[28] and DXIL program kind before profile checks, refusing stage 14 with Unsupported amplification stage: only the bounded mesh stage is translated and other non-13 stages by name.
  • tests/mesh_amplification_refusal_check.py & tests/pixel_aot_check.py: tests require_mesh_stage and translate on stage 14, mismatched (13, 14) / (14, 13) stage headers, and stage 5 (compute), while keeping stage 13 (mesh) accepted.
  • tests/mesh_amplified_check.py, tests/mesh_entry_draw.cpp, tests/offscreen_check.cpp, tests/desktop_gpu.h, CMakeLists.txt: adds --mesh-amplified <as> <ms> <ps> <fixture> with MeshAmplifiedPipeline (AS + MS + PS), CLI self-tests, and mesh_amplified_draw_{hardware,warp} + mesh_amplification_refusal.
  • README.md, docs/experiments.md, docs/xcl-capability-matrix.md: documents the source-built AS+MS+PS fixture, stale-payload control (first_mesh_export_mismatch_byte=26), and explicit refusal of guest amplification translation.

Checks run (Linux, commit 209745a3)

  • LLVM_LIB=/usr/lib/llvm-19/lib/libLLVM-19.so /root/.local/share/x2w-rev-venv/bin/python -B tests/mesh_amplification_refusal_check.py: passed (mesh stage accepted; amplification and compute stages refused by name).
  • LLVM_LIB=/usr/lib/llvm-19/lib/libLLVM-19.so /root/.local/share/x2w-rev-venv/bin/python -B tests/pixel_aot_check.py: passed (exit code 0).
  • LLVM_LIB=/usr/lib/llvm-19/lib/libLLVM-19.so /root/.local/share/x2w-rev-venv/bin/python -B tests/form_coverage_check.py: passed (form coverage checks passed).
  • /root/.local/share/x2w-rev-venv/bin/python -B tests/docs_links_check.py: passed (Self-test passed. Checked 16 Markdown files and 277 links.).
  • /root/.local/share/x2w-rev-venv/bin/python -B tests/bidi_controls_check.py: passed (Self-test passed. Checked 1033 tracked source, script and build/CI files: no bidirectional controls.).
  • /root/.local/share/x2w-rev-venv/bin/python -B tests/hardware_reports_check.py: passed (Ran 12 tests in 0.034s - OK).
  • Windows build and mesh_amplified_draw_* / offscreen_check D3D12 runtime tests: not executed on Linux.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6033719658 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1203#pullrequestreview-6033719658). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T04:37:56Z. **Review:** COMMENTED --- Linux retest at commit `209745a3` (rebased onto `main` since `026f45e9`; Windows build and D3D12 runtime tests were **not** executed locally). ### Scope & diff audit (`209745a3`) - `tools/mesh_entry_aot.py`: `require_mesh_stage(chunks)` checks `PSV0[28]` and `DXIL` program kind before profile checks, refusing stage `14` with `Unsupported amplification stage: only the bounded mesh stage is translated` and other non-`13` stages by name. - `tests/mesh_amplification_refusal_check.py` & `tests/pixel_aot_check.py`: tests `require_mesh_stage` and `translate` on stage `14`, mismatched `(13, 14)` / `(14, 13)` stage headers, and stage `5` (`compute`), while keeping stage `13` (`mesh`) accepted. - `tests/mesh_amplified_check.py`, `tests/mesh_entry_draw.cpp`, `tests/offscreen_check.cpp`, `tests/desktop_gpu.h`, `CMakeLists.txt`: adds `--mesh-amplified <as> <ms> <ps> <fixture>` with `MeshAmplifiedPipeline` (`AS` + `MS` + `PS`), CLI self-tests, and `mesh_amplified_draw_{hardware,warp}` + `mesh_amplification_refusal`. - `README.md`, `docs/experiments.md`, `docs/xcl-capability-matrix.md`: documents the source-built AS+MS+PS fixture, stale-payload control (`first_mesh_export_mismatch_byte=26`), and explicit refusal of guest amplification translation. ### Checks run (Linux, commit `209745a3`) - `LLVM_LIB=/usr/lib/llvm-19/lib/libLLVM-19.so /root/.local/share/x2w-rev-venv/bin/python -B tests/mesh_amplification_refusal_check.py`: passed (`mesh stage accepted; amplification and compute stages refused by name`). - `LLVM_LIB=/usr/lib/llvm-19/lib/libLLVM-19.so /root/.local/share/x2w-rev-venv/bin/python -B tests/pixel_aot_check.py`: passed (exit code 0). - `LLVM_LIB=/usr/lib/llvm-19/lib/libLLVM-19.so /root/.local/share/x2w-rev-venv/bin/python -B tests/form_coverage_check.py`: passed (`form coverage checks passed`). - `/root/.local/share/x2w-rev-venv/bin/python -B tests/docs_links_check.py`: passed (`Self-test passed. Checked 16 Markdown files and 277 links.`). - `/root/.local/share/x2w-rev-venv/bin/python -B tests/bidi_controls_check.py`: passed (`Self-test passed. Checked 1033 tracked source, script and build/CI files: no bidirectional controls.`). - `/root/.local/share/x2w-rev-venv/bin/python -B tests/hardware_reports_check.py`: passed (`Ran 12 tests in 0.034s - OK`). - Windows build and `mesh_amplified_draw_*` / `offscreen_check` D3D12 runtime tests: **not executed** on Linux.
upstream-sync closed this pull request 2026-11-24 12:02:41 +00:00
R0Y00 commented 2026-11-24 12:03:17 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T11:35:17Z.


Resolved the CMake and capability-matrix conflicts at 910809bb. The branch keeps the mesh unary draw, the source-built AS+MS+PS draw and the amplification refusal check. Windows Release passed all nine selected tests on RTX 4060 Laptop and WARP with zero skips: mesh_amplified_draw, mesh_amplification_refusal, mesh_entry_unary_draw, mesh_entry_draw and mesh_pixel_pipeline.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7130289168 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1203#issuecomment-7130289168). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T11:35:17Z. --- Resolved the CMake and capability-matrix conflicts at 910809bb. The branch keeps the mesh unary draw, the source-built AS+MS+PS draw and the amplification refusal check. Windows Release passed all nine selected tests on RTX 4060 Laptop and WARP with zero skips: mesh_amplified_draw, mesh_amplification_refusal, mesh_entry_unary_draw, mesh_entry_draw and mesh_pixel_pipeline.
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!1196
No description provided.