Skip to content

gpu: measure the Windows commit each driver charges for host textures #74

Backlog

Description

@PrivacyOnion

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:

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

  1. Add the probe as an ignored test in crates/xtp-gpu, so it never runs in CI, for example texture_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.

  2. 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.

  3. 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.rs creates the host textures. resource/pool.rs holds the pooled heaps, which are off by default, and resource/residency.rs makes 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 set XTP_TEST_ADAPTER to 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

  1. PrivacyOnion commented on Nov 25, 2026

    @PrivacyOnion
    ContributorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions