Repository navigation
Description
Goal
Measure, on each GPU driver, how much Windows commit D3D12 charges for DEFAULT textures in each way XTP can create them. Report it in a table. No game files are needed: the probe creates its own textures.
What we know
On one PC, with 16 GB of RAM, an NVIDIA RTX 5070 and driver 32.0.16.1664, a probe created 32 RGBA8 textures of 4096 × 4096 (64 MiB each according to GetResourceAllocationInfo, 2 GiB in total) for each case and submitted no GPU work. Each value is a change in MiB against that case's baseline:
| Case | Process PrivateUsage |
System CommitTotal |
DXGI local |
|---|---|---|---|
| Committed, resident at creation | +2,052 | +2,047 | +2,048 |
Committed, D3D12_HEAP_FLAG_CREATE_NOT_RESIDENT |
+2,052 | +2,053 | 0 |
The same after MakeResident |
+2,052 | +2,047 | +2,048 |
The same after Evict |
+2,052 | +2,065 | 0 |
| One 2 GiB DEFAULT heap, before placing textures | +2,052 | +2,069 | +2,048 |
| The same heap with 32 placed textures | +2,052 | +2,081 | +2,048 |
| 32 reserved (tiled) textures, no tiles mapped | 0 | −7 | 0 |
On this driver, every committed texture and every heap costs its full size in process commit, whether it is resident or evicted. Only reserved textures with nothing mapped cost nothing. Video memory follows residency, but commit does not.
In world sessions this is what decides whether a PC can run the title:
- With
main448bb93 plus the low-VA fix that became hle: reserve low VA for known 32-bit startup placeholders #61, private commit rose from 11.6 to 20.5 GB in 40 s on that PC. The session had to be stopped with 1.3 GB of system commit left. - On
mainc3da2f9 with hle: reserve low VA for known 32-bit startup placeholders #61 and gpu, docs: keep placed texture views in step with title memory #62, it gained 7 GB in the 15 s after entering the world, reaching 19.4 GB private. At that point XTP's counters showed 3.75 GiB of placed views, 2.1 GiB of address textures and 4.1 GiB of buffer heaps.
The README asks for "several GiB of available Windows commit". How much depends on the driver, and how the host texture pool should create and release textures depends on the same answer. That's why we need the other drivers.
Task
-
Add the probe as an ignored test in
crates/xtp-gpu, so it never runs in CI, for exampletexture_commit_probe. Before and after each case, it reads:PROCESS_MEMORY_COUNTERS_EX::PrivateUsage(GetProcessMemoryInfo);PERFORMANCE_INFORMATION::CommitTotal(GetPerformanceInfo);- local and non-local usage from
IDXGIAdapter3::QueryVideoMemoryInfo.
It releases everything between cases.
-
Cover the cases of the table, plus reserved textures whose tiles are all mapped to one heap (
UpdateTileMappings). That is the case a pooled design would use. -
Run it on your GPU or GPUs and on WARP. The more drivers the better: AMD, Intel, older NVIDIA drivers, laptops with shared memory.
How to start
crates/xtp-gpu/src/resource.rscreates the host textures.resource/pool.rsholds the pooled heaps, which are off by default, andresource/residency.rsmakes resources resident and evicts them. Your cases should match what these files do.- docs/analysis/vram.md describes the pool (section 2.2), residency (2.3), the counters (2.5) and the measurements so far (3). The table belongs in section 3.
- Run it with
cargo test -p xtp-gpu --lib texture_commit_probe -- --ignored --nocapture, and setXTP_TEST_ADAPTERto pick a GPU.
What to deliver
A pull request with the probe and a table in docs/analysis/vram.md: GPU, driver version, Windows build, and the change per case for each counter. Results from more GPUs can come as comments here.
Rules
- Follow CONTRIBUTING.md. The probe needs nothing from the title.
- English everywhere. Never name the title, its publisher or its setting: say "the title".
- AI assistance is welcome; say so in the pull request (
AI assistance:). You answer for every line.
Comment here before starting so work isn't duplicated.
Activity
PrivacyOnion commentedon Nov 25, 2026
I'm turning the probe behind the table above into the ignored test, with the RTX 5070 and WARP results in vram.md. Results from other drivers are still very welcome: the probe will be in the pull request.