runtime: bind a published heap-buffer window for slot 86 mesh draws (Part of #3545) #3595
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!3595
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@mumba17 on GitHub · 2026-11-30 12:10 UTC · original
mumba17:runtime/mesh86-heap-buffer-srv→main· +579 −19 · 9 files · 1 commits · merged 2026-11-30 12:19 UTCPart of #3547. 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
A slot 86 Mesh root that indexes the resource heap (0x400) was refused at creation. It now draws when its published pair declares the resource-heap slots [first, first + count) its desktop stages may read. mesh86_cache.py --heap-buffer FIRST COUNT --dxc DXC publishes a profile 3 marker only if every createHandleFromHeap reads the resource heap at a constant slot or first + min(x, c) inside the window, is annotated as a typed buffer SRV and is read only by BufferLoad. At slot 61 ExecuteIndirect the runtime reads the window's view tokens from the bound title heap and rebuilds it at the same indices in a private shader-visible heap retained with the recording: a registered typed buffer SRV on a complete GPU-backed range is recreated, every other slot in and below the window is a typed null view. It then sets that heap and the title's desktop root signature. startup_indirect_mesh_cache_heap_{warp,hardware} check two GPU-selected views, swapped views, an empty and a raw slot, and the refusal without a window. Part of #3545. Co-Authored-By: Claude Opus 5.5 <[email protected]>github-bot referenced this pull request2026-11-30 12:46:23 +00:00