runtime: wire native slot 86 mesh bindings and direct DispatchMesh #3640

Manually merged
github merged 11 commits from gh-pr/3638/head into gh-pr/3638/base 2026-11-30 19:17:16 +00:00
Owner

@⁠R0Y00 on GitHub · 2026-11-30 19:10 UTC · original
R0Y00:codex/mesh86-pipeline → main · +3025 −212 · 22 files · 11 commits · merged 2026-11-30 19:13 UTC

Refs #3543, #3547 and #870.

Changes

  • Extend the native C++ mesh and pixel lowerers used by slot 86. Add Texture1D heap remapping and the runtime material, sampler and root-constant bindings.
  • Forward list slot 129 to desktop DispatchMesh for supported native Mesh86 PSOs. Correlate the PSO and group counts with the list's recording, close and queue submission.
  • Resolve explicit committed-buffer SRVs through their registered resource and validate GPU-backed Mesh86 views against the desktop raw SRV and resource bounds. Log the first failing material descriptor by stage, register, root parameter and table byte offset.
  • Incorporate current main's stage-visibility proof and constants-only requirement for wide legacy heap-cache roots.

Verified and pending

Integrated head 907bade4 targets bee9c64d. Windows 11 build 26300, NVIDIA RTX 4060 Laptop GPU, driver 616.56. The focused Release suite passed 14/14 with no skips, including WARP and physical-adapter readbacks. The cache CLI passes six cases within its CTest entry.

cmake --build $build --target compile_dxil startup_indirect_draw_indexed startup_runtime --parallel 4
ctest --test-dir $build --no-tests=error -j1 -R '^(native_direct_(container|mesh)|runtime_mesh86_cache_cli_check|startup_mesh86_srv_proof|startup_indirect_mesh_cache_(heap(_wide)?_|texture_map_|constants_wide_)?(warp|hardware))

A separate local runtime observation created and selected four desktop Mesh86 PSOs and reached the direct slot 129 handler. Scene Mesh86 commands recorded and submitted were both zero. The first unresolved bindings were:

| Binding | Reached check |
| --- | --- |
| Mesh `t1`, root parameter 3 | No mapped backing for the required 128-byte root SRV |
| Mesh `t0`, root parameter 0, offset `0xAC0` | A 45,613,056-dword raw SRV reached the backing check. The placed desktop buffer did not alias the guest allocation and had no verified producer for that range. |

Visible 3D scene output is unverified. --output-on-failure

$build is the configured Release build directory. A local D3D12 debug-layer probe on the pre-integration build recorded and submitted a direct dispatch with a 24 MiB committed-buffer view and waited for its fence. The preceding size check refused the same probe. The missing-root-constants control was refused as expected. The local scene observations below used the debug layer off.

A separate local runtime observation created and selected four desktop Mesh86 PSOs and reached the direct slot 129 handler. Scene Mesh86 commands recorded and submitted were both zero. The first unresolved bindings were:

Binding Reached check
Mesh t1, root parameter 3 No mapped backing for the required 128-byte root SRV
Mesh t0, root parameter 0, offset 0xAC0 A 45,613,056-dword raw SRV reached the backing check. The placed desktop buffer did not alias the guest allocation and had no verified producer for that range.

Visible 3D scene output is unverified.

P0 follow-up

  • #3639 tracks the 128-byte root SRV backing.
  • #3640 tracks coherent backing and ordering for the large placed SRV.
  • #3641 tracks the first scene-target readback and presentation proof.
**@⁠R0Y00** on GitHub · 2026-11-30 19:10 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3638) `R0Y00:codex/mesh86-pipeline` → `main` · +3025 −212 · 22 files · 11 commits · merged 2026-11-30 19:13 UTC Refs #3543, #3547 and #870. ## Changes - Extend the native C++ mesh and pixel lowerers used by slot 86. Add Texture1D heap remapping and the runtime material, sampler and root-constant bindings. - Forward list slot 129 to desktop `DispatchMesh` for supported native Mesh86 PSOs. Correlate the PSO and group counts with the list's recording, close and queue submission. - Resolve explicit committed-buffer SRVs through their registered resource and validate GPU-backed Mesh86 views against the desktop raw SRV and resource bounds. Log the first failing material descriptor by stage, register, root parameter and table byte offset. - Incorporate current main's stage-visibility proof and `constants-only` requirement for wide legacy heap-cache roots. ## Verified and pending Integrated head `907bade4` targets `bee9c64d`. Windows 11 build 26300, NVIDIA RTX 4060 Laptop GPU, driver 616.56. The focused Release suite passed **14/14** with no skips, including WARP and physical-adapter readbacks. The cache CLI passes six cases within its CTest entry. ```powershell cmake --build $build --target compile_dxil startup_indirect_draw_indexed startup_runtime --parallel 4 ctest --test-dir $build --no-tests=error -j1 -R '^(native_direct_(container|mesh)|runtime_mesh86_cache_cli_check|startup_mesh86_srv_proof|startup_indirect_mesh_cache_(heap(_wide)?_|texture_map_|constants_wide_)?(warp|hardware)) A separate local runtime observation created and selected four desktop Mesh86 PSOs and reached the direct slot 129 handler. Scene Mesh86 commands recorded and submitted were both zero. The first unresolved bindings were: | Binding | Reached check | | --- | --- | | Mesh `t1`, root parameter 3 | No mapped backing for the required 128-byte root SRV | | Mesh `t0`, root parameter 0, offset `0xAC0` | A 45,613,056-dword raw SRV reached the backing check. The placed desktop buffer did not alias the guest allocation and had no verified producer for that range. | Visible 3D scene output is unverified. --output-on-failure ``` `$build` is the configured Release build directory. A local D3D12 debug-layer probe on the pre-integration build recorded and submitted a direct dispatch with a 24 MiB committed-buffer view and waited for its fence. The preceding size check refused the same probe. The missing-root-constants control was refused as expected. The local scene observations below used the debug layer off. A separate local runtime observation created and selected four desktop Mesh86 PSOs and reached the direct slot 129 handler. Scene Mesh86 commands recorded and submitted were both zero. The first unresolved bindings were: | Binding | Reached check | | --- | --- | | Mesh `t1`, root parameter 3 | No mapped backing for the required 128-byte root SRV | | Mesh `t0`, root parameter 0, offset `0xAC0` | A 45,613,056-dword raw SRV reached the backing check. The placed desktop buffer did not alias the guest allocation and had no verified producer for that range. | Visible 3D scene output is unverified. ## P0 follow-up - #3639 tracks the 128-byte root SRV backing. - #3640 tracks coherent backing and ordering for the large placed SRV. - #3641 tracks the first scene-target readback and presentation proof.
A heap-buffer window bound any typed buffer format, so a shader reading
Buffer<float4> could be given a UINT view. The publisher now takes each heap
read's component type from its annotation, requires one 32-bit read type
(f32, u32 or i32) across the window and records it in the profile 3 marker
(heap-buffer <first> <count> <type>). At ExecuteIndirect a slot whose view
format reads as another type is bound as a typed null, and every null view
uses the window's type. A window marker without a type is refused.

The heap fixture adds an R32G32B32A32_UINT view over the same bytes in an f32
window (red, slot 5 null) and the untyped marker; the publisher tests add u32,
F16 and mixed-type windows. Part of #3545.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The title's slot 86 roots hold descriptor tables, a root SRV and root
constants, and half of them also allow sampler-heap indexing (0xc00). With a
published heap-buffer window they still stopped at "root bindings outside
supported profile".

The publisher now decodes the request's RTS0 root and accepts a heap-buffer
pair only if each stage's DXIL resource bindings hold nothing but cbuffers at
the root's 32-bit-constants registers. For such a window the runtime accepts
descriptor tables and root CBV/SRV/UAV parameters, accepts 0x800 next to
0x400 (the stages provably never read the sampler heap), leaves those
parameters unset, and binds and checks only the constants.

startup_indirect_mesh_cache_heap_wide_{warp,hardware} repeat the heap window
cases with that root shape, and refuse a pixel stage that reads the table.
Part of #3545.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts:
#	CMakeLists.txt
#	docs/experiments.md
#	src/startup_stubs/d3d12_draw.inl
#	src/startup_stubs/d3d12_xs_device.cpp
#	src/startup_stubs/mesh86_cache.inl
#	tests/startup_indirect_draw_indexed.cpp
#	tests/startup_indirect_mesh_cache_check.py
#	tests/startup_mesh86_cache_cli_check.py
#	tools/startup/mesh86_cache.py
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 19:17:10 +00:00
github manually merged commit 907bade497 into gh-pr/3638/base 2026-11-30 19:17:16 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.