DXGI-aware retention for empty D3D12.X texture heaps #798
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 yaandrei2000 on 2026-11-24T05:41:24Z.
Proposal
XCL retains empty 64 MiB texture heaps after streaming bursts, even when all their tiles become reusable.
I investigated an adaptive reclamation policy that retains a small warm reserve of empty heaps and releases the remaining heaps based on DXGI memory headroom and idle time.
Measurements
Hardware: Ryzen 5 5500, GTX 1660 Ti 6 GB, NVIDIA driver 617.42, 16 GB RAM, Windows 11 build 26300, debug build.
Synthetic workload: 16 RGBA8 textures, 256 MiB total, tested on
d208e14.After an 8.25 s idle period and a maintenance call, adaptive trimming returned all four heaps, reducing LOCAL usage to 13.95 MiB.
Peak VRAM usage remained unchanged.
Safety considerations
The experiments identified several prerequisites for safe reclamation:
CopyTileMappingsaliases.The prototype targets empty heaps only and does not evict live textures.
Related work: #490, #594, #640, #782.
The prototype is experimental and is not ready for production. Safe reclamation requires resolving the resource lifetime and synchronization issues described above.
Proposed direction
Consider a bounded warm reserve driven by DXGI headroom, hysteresis and idle time.
An experimental implementation and synthetic regression tests are available locally. All 17 matrix runs, 7 safety and policy checks, and 22 related tests completed successfully.
Would this direction be acceptable before preparing a focused PR?
Not tested
Retail games, AMD GPUs, release builds and actual system-wide VRAM pressure. Budget-pressure scenarios used synthetic budget inputs.
AI use
ChatGPT (GPT-6.2) assisted with the research plan. OpenAI Codex (GPT-6 family) investigated the runtime, implemented the experimental prototype and ran the synthetic tests on the hardware listed above.