D3D12.X: hosted view heap exhaustion aliases 2*k into GLOBAL (and MEM_HEAP_BASE) instead of slot 0 #2380
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl#2380
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?
@ahmetbagci8 on GitHub · 2026-11-25 17:32 UTC · original
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.github-bot referenced this issue2026-11-26 05:29:56 +00:00
@Creaa on GitHub · 2026-11-25 17:42 UTC · original
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.