D3D12.X: hosted view heap exhaustion aliases 2*k into GLOBAL (and MEM_HEAP_BASE) instead of slot 0 #2370
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 ivall/xcl. Originally posted by ahmetbagci8 on 2026-11-25T17:32:16Z.
Summary
In
crates/xcl/src/hle/d3d12x/console_heap.rs,slot()guards hosted sampler heaps againstGLOBAL_SAMPLERexhaustion by mapping overflowed slots to reserved slot0(lines 447-450):However, the CBV/SRV/UAV view-heap branch immediately below (lines 454-461) still falls back to local index
2 * keven when the heap is hosted inGLOBAL(!h.pages.is_empty()):When
GLOBALis exhausted (page_of(h, k)returnsNone),index = 2 * kindexes directly intoGLOBAL— aliasingMEM_HEAP_BASE..MEM_HEAP_BASE + MAX_HEAP_WINDOWS(window raw-buffer UAVs) or another heap's live descriptors instead of reserved null-view slot0.Suggested fix
Mirror
sampler_unmapped_indexfor view heaps:Not tested
082944135cd2b96288470a595861fa608eee08dcwithout a new runtime test.AI use
console_heap.rsand drafted this report; the author reviewed it before posting.Imported from ivall/xcl. Originally posted by Creaa on 2026-11-25T17:42:21Z.
Taking this: a hosted view heap whose shared range is exhausted maps the slot to the null SRV / UAV pair at descriptors 0 / 1 of the shared heap (as
sampler_unmapped_indexdoes for samplers), not to2 * k, which can land on another heap's views or on the memory windows' raw views atMEM_HEAP_BASE(a texture read of those hangs the GPU). Unhosted heaps keep2 * k. With a unit test next to the sampler one, the full suite and the smoke pair.AI use: Claude Code (Claude Opus 5.5) drafted this.