runtime: bind a published heap-buffer window for slot 86 mesh draws (Part of #3545) #3593
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3593"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by mumba17 on 2026-11-30T12:10:27Z.
Part of #3545. Target
main.Change
A slot 86 Mesh root with
CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED(0x400) was refused at creation withroot heap indexing (0x400) has no verified binding. It can now draw when its published pair declares a heap-buffer window, the resource-heap slots[first, first + count)the desktop stages may read.Publisher.
tools/startup/mesh86_cache.py --heap-buffer FIRST COUNT --dxc <dxc>dumps both stages with DXC and publishes only if everycreateHandleFromHeap:first + min(x, c), whose whole range lies inside the window;BufferLoad.The window holds at most 64 slots below slot 65536. The marker records it as
x2w-mesh86 3 <key> <ms> <ps> heap-buffer <first> <count>.Runtime (
mesh86_cache.inl,d3d12_xs_device.cpp):ExecuteIndirect, the runtime reads the window from the title's bound shader-visible heap, the same 32-byte view tokens the slot 57 path reads.Fixture
startup_indirect_mesh_cache_heap_{warp,hardware}. The pixel stage reads slot 4 and slot4 + min(gates.y - 28, 1)= 5 and writes(slot4.x, slot5.y, slot4.z, 1). One GPU buffer holds(1,0,0,0)and(0,1,1,0), and the two views select them byFirstElement. On the left half of three targets:0xff00ffff0xffff0000Publishing a window that leaves out slot 5 is refused.
startup_mesh86_cache_cli_check.pyadds seven publisher cases: clamped, constant, outside the window, unbounded, sampler heap, UAV, and over the limit.Results
Windows 11 build 26300, MSVC 19.44, Release, debug layer enabled:
startup_indirect_mesh_cache_heap_hardwarepassed.startup_indirect_mesh_cache_heap_warppassed.startup_(indirect|list|mesh|native_mesh|translated|compute_dispatch|resource_retire)passed 226 of 226. Three native-compute WARP tests reported capability skips (startup_compute_dispatch_texture_native_warp,startup_compute_dispatch_native_warp,startup_compute_dispatch_sampler_heap_warp).Captured-scene pass (third acceptance item)
Not reached yet, and this PR does not claim it. The four slot 86 requests in a local title shader cache all use one root layout:
With this change, the 0x400 roots get past the heap-flag refusal. They then stop on
root bindings outside supported profile, because the cached path still refuses descriptor tables and the root SRV next to heap indexing. The 0xc00 roots keep the sampler-heap refusal.There is also still no translator that publishes desktop pairs for title
.m86requests, so a scene draw needs a hand-published pair. A follow-up can accept root parameters the published pair provably never references, which the DXIL proof can show from the resource bindings. Taken alone, that would make the 0x400 roots reachable.🤖 Generated with Claude Code