gpu: bind both XMem inputs for a cached indirect mesh draw #2377

Manually merged
github merged 2 commits from gh-pr/2377/head into gh-pr/2377/base 2026-11-27 00:46:37 +00:00
Owner

@⁠R0Y00 on GitHub · 2026-11-25 14:20 UTC · original
R0Y00:codex/mesh-dual-handoff → main · +477 −139 · 10 files · 2 commits · merged 2026-11-25 14:37 UTC

Refs #870, #1759 and #1914. Extends #2303 and #2332.

A cached slot 86 mesh pipeline can consume a four-byte root SRV and a single 12-byte indirect record from distinct XMem page windows in the same DIRECT command. Each range needs a submitted slot 15 writer. Recording and submission check both ranges, the queue waits on their writers and the consumer fence retains both leases. The two production switches remain opt-in. The shader profile accepts a mesh group ID for geometry generation and still requires exactly one constant-offset DWORD load.

Windows 11 26200.9974, MSVC x64 Release at 9bd985c0. RTX 4060 Laptop (32.0.16.1656) and WARP (10.0.26100.9818), D3D12 debug layer enabled. 17 selected tests passed, zero skips. A source-built compute initializer writes {0,1,1,0}. A second dispatch increments X twice after a UAV barrier. Slot 15 copies the first 12 bytes. Both writers produced eight red pixels. Omitting only the increments produced zero pixels with both waits enabled and both guards intact. Omitting only the SRV wait produced eight green pixels. Omitting only the argument wait produced four red and four clear pixels. Remapping only the argument page after recording left the target clear. Restoring its mapping restored all eight pixels.

. ./tools/dev.ps1
cmake --preset release -DCMAKE_TRY_COMPILE_CONFIGURATION=Release
cmake --build --preset release --target startup_indirect_draw_indexed xmem_shim
ctest --preset release --no-tests=error -j 1 -R '^(startup_mesh86_srv_proof|startup_indirect_mesh_(xmem_arguments.*|lease_.*))$'

The tests exercise the bounded source-built producer paths. A production UAV writer for a scene's argument buffer and a broader root SRV span still require separate evidence.

**@⁠R0Y00** on GitHub · 2026-11-25 14:20 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2377) `R0Y00:codex/mesh-dual-handoff` → `main` · +477 −139 · 10 files · 2 commits · merged 2026-11-25 14:37 UTC Refs #870, #1759 and #1914. Extends #2303 and #2332. A cached slot 86 mesh pipeline can consume a four-byte root SRV and a single 12-byte indirect record from distinct XMem page windows in the same DIRECT command. Each range needs a submitted slot 15 writer. Recording and submission check both ranges, the queue waits on their writers and the consumer fence retains both leases. The two production switches remain opt-in. The shader profile accepts a mesh group ID for geometry generation and still requires exactly one constant-offset DWORD load. Windows 11 26200.9974, MSVC x64 Release at 9bd985c0. RTX 4060 Laptop (32.0.16.1656) and WARP (10.0.26100.9818), D3D12 debug layer enabled. 17 selected tests passed, zero skips. A source-built compute initializer writes {0,1,1,0}. A second dispatch increments X twice after a UAV barrier. Slot 15 copies the first 12 bytes. Both writers produced eight red pixels. Omitting only the increments produced zero pixels with both waits enabled and both guards intact. Omitting only the SRV wait produced eight green pixels. Omitting only the argument wait produced four red and four clear pixels. Remapping only the argument page after recording left the target clear. Restoring its mapping restored all eight pixels. ```powershell . ./tools/dev.ps1 cmake --preset release -DCMAKE_TRY_COMPILE_CONFIGURATION=Release cmake --build --preset release --target startup_indirect_draw_indexed xmem_shim ctest --preset release --no-tests=error -j 1 -R '^(startup_mesh86_srv_proof|startup_indirect_mesh_(xmem_arguments.*|lease_.*))$' ``` The tests exercise the bounded source-built producer paths. A production UAV writer for a scene's argument buffer and a broader root SRV span still require separate evidence.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 00:46:34 +00:00
github manually merged commit 9bd985c0d3 into gh-pr/2377/base 2026-11-27 00:46:37 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.