Skip to content

D3D12.X: video memory use is high, title memory and textures are mirrored into VRAM #1773

Backlog

Description

@1bugproof

XCL needs far more video memory than VIctory, another project that runs console titles natively. I compared the two by reading the code, at XCL 4178e88 and VIctory main of 2026-11-24. Nothing here was measured.

Where XCL's video memory goes

  1. All of the title's graphics memory is in VRAM, whether the GPU reads it or not. Every 64 KiB page the title commits in the sparse windows (XMem allocations, physical pages, graphics reservations) is mapped onto a 64 KiB tile of a D3D12_HEAP_TYPE_DEFAULT pool heap (hle/d3d12x/sparse.rs, about line 611). A title that commits 8–10 GB costs about that much VRAM.
  2. Textures placed at title addresses are kept twice.
    • Sampled textures: the console-layout bytes stay in the sparse-window tiles, and a detiled PC copy is made as well, on vram::place_pages pages or as a committed default resource (device_x.rs, about lines 902–926).
    • Render targets, depth buffers and UAV textures: they get their own vram::place pages, and the sparse-window tiles at the same address stay mapped too.
  3. Memory is held back in large blocks.
    • Pool heaps are 64 MB each and go only when all 1024 tiles are free, 2 s later (retire_free_pools).
    • Up to 256 MB of decommitted tiles stay mapped (PARKED_MAX).
    • Arenas for D32S8 / MSAA take about 2.8 GB (HANDOFF.md, "Open: arenas for D32S8 targets").
    • WDDM also charges all of it to the process's commit.

What VIctory does

  • A title buffer gets a host copy only when a draw first uses it (crates/victory-gpu/src/shadow.rs, find). The copy is in system memory, a custom heap with MEMORY_POOL_L0 and write-back pages (host.rs, shared_buffer), not VRAM.
  • Title memory outside buffers is copied in 4 MiB windows, only those that are used.
  • Textures are one committed default resource each (resource.rs, about line 846). There is no second copy of the title's bytes in VRAM.

This is not a like-for-like comparison. VIctory's README says its world does not render yet (frames take 0.5–1.8 s). Its buffers in system memory are likely part of why it is that slow. XCL maps everything because translated shaders reach arbitrary addresses through SGPRs, so it cannot know ahead of time what a shader reads. Point 1 is mostly a design choice.

Possible reductions

  • Point 2: a range of tiles covered only by textures that have their own PC copy does not need sparse-window video memory. Open question: GPU copies or writes to those addresses, which title_textures.rs says are already not seen.
  • D32S8 arenas: split them into R32 plus a separate stencil, or use heaps of the exact size, as HANDOFF.md already suggests.
  • Before choosing between these: run a heavy title with XCL_ACTIVITY=1 to find which part dominates (sparse pools, texture pages or arenas), and add the numbers to this issue.

AI use: the analysis and this text were written with Claude Code (Claude Opus 5.5), from reading both codebases. No runs or measurements were made.

Activity

  1. added
    goal:world-load
    on Nov 24, 2026
  2. certified-retart commented on Nov 24, 2026

    @certified-retart
    Contributor

    Measured XCL_ACTIVITY=1 breakdown on a heavy retail title on an RTX 5070 (12 GB local VRAM, XCL_HEAP_WINDOWS=1):

    Phase Process commit Local VRAM Non-local target pages (pools) arenas sparse pools (mapped)
    Menus (steady) 14,869 MB 6,488 MB 4,508 MB 3,531 MB (3,584 MB) 318 MB 960 MB
    Early 3D world load 30,255 MB 14,837 MB 4,565 MB 9,556 MB (10,176 MB) 318 MB 2,176 MB
    Active 3D frames 31,852 MB 15,287 MB 4,629 MB 9,883 MB (10,240 MB) 318 MB 2,432 MB (2,414 MB)

    target pages dominates by a wide margin: 10.24 GB of pools (~65% of local VRAM) ? over 4? larger than sparse pools (2.43 GB) and 32? larger than arenas (318 MB). On a 12 GB card this pushes local VRAM ~3.3 GB over budget during world streaming, causing heavy paging slowdown and eventually device removal (0x887a0006).

  3. rrrarrra9 commented on Nov 24, 2026

    @rrrarrra9

    Windows / GTX 1650 (4 GB) measurements for #1773. Clean main c4d37be completed a 150 s offline startup smoke run with 1,391 PresentX calls and no device removal. At 144.708 s, XCL reported 6,653 MiB DXGI local usage and 1,370 MiB non-local. The tracked allocations were 3,648 MiB texture pools, 960 MiB sparse pools (954 mapped), and 397 MiB arenas.

    On clean #1702 head d19ae2e, two fresh 150 s starts of the same title let me isolate the L0 flag. Near 59 s both had 3,584 MiB in texture pools, 896 MiB in sparse pools and 461 MiB in arenas. Local usage went from 6,580 to 2,995 MiB with L0, while non-local went from 1,365 to 4,947 MiB. Process commit was 15,526 vs 15,497 MiB. Both completed without device loss.

    A separate synthetic GTX 1650 copy probe verified all bytes and measured a median of 5.12 ms with DEFAULT and 40.19 ms with L0 for 16 copies of a 16 MiB tiled texture into a local texture. This gives a cost for the copy path. Story mode and frame-rate changes remain unverified. #1854 adds an elapsed-time comparison tool for the activity counters.

    AI use: OpenAI Codex with gpt-6.2-sol ran the tests and summarized the results.

  4. 3L1A5-1 commented on Nov 24, 2026

    @3L1A5-1

    Measured on an 8 GB card with 16 GB RAM, with what is resident next to what is committed: the card is full from ~160 s, local video memory past it is demoted to system memory (1.5 GB by the end), and the 64 MB private regions next to every pool heap are commit, not RAM. The Series S profile does not lower any of it.

    Setup: RTX 2060 SUPER 8 GB (driver 617.14), i5-9400F, 16 GB RAM, fixed 32 GB page file (commit limit 49 GB), Windows 11 26300, release. Retail 1.0.2.1, Series X profile unless noted, XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PSO_WAIT_MS=50 XCL_PAGE_BUDGET_MB=3072 (#640), scripted A presses, 600 s runs. Local tree (not for upstream): main 930e8b4 + #1182, #759, #1273, #1278, #1055, #1102, a local change that gives GPU-view page textures video memory only where a page is mapped (A/B on #1102), #562, #1288, #1515, #640, #929, #1405, revert of b8b1f49, local logging. Next to the run, a read-only script sampled the process every 30 s: VirtualQueryEx per allocation, QueryWorkingSetEx for the resident pages, and the GPU Process Memory counters.

    One run (XCL_ACTIVITY and the sampler), Series X; it ended at 518 s on the title's int3 at +0x2474606:

    s process commit working set GPU dedicated GPU shared XCL local / non-local local − dedicated sparse pools target pages (pools)
    64 16.4 GB 10.6 GB 5.5 GB 4.9 GB 5.4 / 4.9 GB 0 1.0 GB 2.7 (2.8) GB
    162 26.2 GB 5.4 GB 7.5 GB 5.3 GB 7.6 / 4.9 GB 0.1 GB 2.3 GB 3.1 (3.1) GB
    328 29.3 GB 4.6 GB 7.5 GB 6.2 GB 8.2 / 5.4 GB 0.7 GB 2.8 GB 3.1 (3.1) GB
    494 30.1 GB 5.6 GB 7.5 GB 7.1 GB 9.0 / 5.4 GB 1.5 GB 3.5 GB 2.9 (3.1) GB
    • GPU dedicated stays at ~7.5 GB from ~160 s, which is the DXGI budget (7.2 GB in Activity: the local video memory budget, and a warning within XCL_VRAM_HEADROOM_MB of it #1515's line). From then on "shared" = XCL's non-local + (local − dedicated) to within ~150 MB at every sample, so what does not fit on the card is demoted into system memory: 0 up to 130 s, 1.5 GB at 494 s.
    • With D3D12.X: an optional page budget evicts CPU-filled title textures LRU #640's 3 GB budget the target pages stay flat; what keeps growing is the sparse pools (1.0 → 3.5 GB, 95–99 % of their tiles mapped), i.e. the title's own GPU memory (point 1 above).
    • The 64 MB private regions: the process has one 64 MB MEM_PRIVATE region per 64 MB pool heap. At every sample their count is texture page pools / 64 + sparse pools / 64 + 1 (43 at 32 s … 106 at 527 s, 6.8 GB). XCL does not VirtualAlloc them, and both kinds of pool are D3D12_HEAP_TYPE_DEFAULT heaps, so they come from the runtime or driver. They are commit only: 0.05–0.8 GB of the 6.8 GB was resident in any sample. Of the 30 GB process commit, 6.8 GB is these regions, and only 4.6–5.6 GB of the whole process was resident after 160 s; the 49 GB commit limit was never reached, while free RAM sat at 0.5–2 GB for most of the run.
    • This tree's runs end at 393–503 s (3 runs), on 0x8007000e from a command list Close and the title's int3 at +0x72ac (2 runs; once with free RAM at 0.37 GB) or on the +0x23cf683 watchdog (1 run).

    Series S profile (device_type = "lockhart", the same tree + #605 + #495, 1 run): it does not help here. The sparse pools are 4.6 GB from 60 s on and stay flat (the title commits its smaller GPU memory at the start), local video memory is 9.0 GB at 400 s (Series X: 8.7–9.2 GB), the target pages are capped at 3 GB in both, and the run ended at 456 s on the same 0x8007000e / +0x72ac.

    So on this machine the pressure is the title's own sparse-window memory once the texture pages are capped, not XCL bookkeeping. Point 2 of the issue (textures with a PC copy keeping their sparse tiles) would act on the right part; I have not measured how much of the 3.5 GB that is.

    Not tested: AMD; without #640's budget (then target pages dominate, as on the 5070 above); which allocations the sparse tiles under textures with their own PC copy account for.

    AI use: Claude Code (Claude Opus 5.5) wrote the sampler, ran the runs, compared the logs and wrote this.

  5. vladbondarenko97 commented on Nov 24, 2026

    @vladbondarenko97
    Contributor

    Same picture on an RTX 3080 Ti 12 GB (driver 610.88, DXGI local budget 11316 MB), GTA VI 1.0.2.1, and a data point for a budget-based fix.

    Without a budget (main c4d37be + #433 + #1697 + #1580, 600 s): local video memory reaches 15.1–15.2 GB (target pages ~9990 MB in pools of 10176 MB, sparse pools 2816 MB, arenas 465 MB). Earlier runs at 14.1–14.4 GB had a thread blocked ~28 s in UpdateTileMappings; this one ran to 385 s and ended in D3D12 device removed: 0x887a0007.

    Same tree + a budget check (fork branch vladbondarenko97/xcl fix/vram-budget 741cb5a, +74/−5 in vram.rs + README): a new 64 MiB pool heap for title texture pages stays DEFAULT while local usage + the heap + XCL_VRAM_HEADROOM_MB (default 1024, the same meaning as #1515) fits in QueryVideoMemoryInfo's budget, and is made CUSTOM / NOT_AVAILABLE / L0 otherwise (no flag, unlike #1702; heaps already placed stay). Result over 600 s: the first system-memory pool at 90.5 s (local video memory 9954 of 10970 MB budget), local then flat at 11.53–11.56 GB with 9.2 GB non-local, exit 0x0, 0 crashes, 0 device removals for the whole run (2563 frames, nearly all before the world load). Frames in the world are still ~0–1 per 10 s, so this removes the over-commit failure, not the slowness.

    I'll open it as a PR once the regression pair (main vs the branch alone) is done; if the #1702 author prefers it folded into #1702 instead, that works too.

    AI use: Claude Code (Claude Opus 5.5) traced the memory use, wrote the change and its test, ran the box and wrote this.

  6. 3L1A5-1 commented on Nov 24, 2026

    @3L1A5-1

    Follow-up to my measurements above, on point 2 (textures with a PC copy keeping their sparse-window video memory): on this title it applies to physical pages, not to the textures' own addresses, and it reaches ~0.8 GB in the world load.

    Same machine, tree and settings as above, plus a local diagnostic (not for a PR) that every 30 s takes the active title_textures ranges (by_va, merged), looks up kernelx::physical_pages for each 64 KiB page under them, and checks whether that page's home is a mapped tile in sparse (State::mapped). One run, ended at 392 s on the +0x72ac stop.

    s active textures (on vram pages) texture pages on a physical page / on plain title memory homes of those physical pages on mapped sparse tiles of those, the page lies inside one texture
    92 18.3k (17.1k) 11.2k / 56.0k 0 0
    153 25.1k (21.5k) 32.8k / 71.5k 0 0
    243 25.5k (21.3k) 39.5k / 67.5k 759 MB 668 MB
    334 26.0k (21.8k) 40.0k / 71.7k 933 MB 821 MB
    364 24.7k (20.0k) 33.9k / 79.4k 806 MB 701 MB
    • No texture's own address range overlapped a mapped sparse tile in any sample (up to 6.6 GB of texture ranges, 3.5 GB of sparse tiles). The title places textures over physical pages it maps there, or in plain title memory, which has no sparse tiles.
    • From ~180 s on, the homes of those physical pages are mapped sparse tiles: up to 933 MB, about a quarter of the 3.46 GB of sparse pools at that point. 700–820 MB of it are pages that lie entirely inside one texture kept in step, so as far as title_textures is concerned the GPU reads those bytes from the texture's PC copy. On this 8 GB card that is about half of what is demoted to system memory by the end (1.5 GB).

    What I would try, if it is a direction you would take: unmap a home tile while every page on it lies inside textures kept in step (the tile stays committed for the CPU view and is mapped again before the title's next submit once anything other than such a texture claims it), behind an opt-in switch first, to see whether anything reads the zeros.

    The open question, which decides whether it is safe: XCL cannot see a translated shader reading those bytes as a buffer through an SGPR address, and an unmapped tile reads zeros. GPU copies into title memory are seen (list_x's note_gpu_write for CopyMemoryToMemoryX / CopyBufferRegion) and DirectStorage writes through the CPU view, but shader reads are not seen. Is there a reason to expect the title to read its texture memory as buffer data (streaming, decompression, GPU copies into or out of it) that rules this out? If so, I'll leave it at the measurement.

    AI use: Claude Code (Claude Opus 5.5) wrote the diagnostic, ran the run and wrote this.

  7. rrrarrra9 commented on Nov 25, 2026

    @rrrarrra9

    Hi @vladbondarenko97, thanks for investigating this and sharing the RTX 3080 Ti results. I’m the author of #1702, and I’d be happy to collaborate on the budget-aware policy in your 741cb5a commit.

    I think the two changes fit together: keep the manual L0 override for controlled tests, and let an automatic mode choose the memory pool for each new title-texture heap based on the DXGI local budget and a configurable reserve. Keeping existing heaps in place also keeps the scope clear for review.

    There’s independent evidence for the L0 path on an RTX 3090 (texture readback) and for lower local memory use on an RTX 4060 Ti and RTX 5060. The RTX 5060 runs still hit a device removal or a watchdog during world load, so I’d measure those separately from memory usage. I can help test on my GTX 1650 (4 GB), comparing default, forced L0, and automatic placement on the same base and settings.

    Once your branch-only regression comparison is ready, would you prefer to build on #1702 in a separate follow-up or integrate the changes into #1702? I’m happy to go with whichever makes review easier, and your commits and authorship should be preserved either way.

    AI use: OpenAI Codex assisted with reviewing the discussion and drafting this comment.

  8. Fran-co-F commented on Nov 25, 2026

    @Fran-co-F

    Linux / RADV (16 GB card, 32 GB RAM): the overflow goes to GTT, which is RAM, so the system runs out of memory during world load. A data point next to the Windows ones above. Counts only.

    Setup: RX 9070 XT 16 GB (RDNA4), Mesa 26.3.1 RADV, Ryzen 7 9800X3D, 32 GB RAM (zram swap only), CachyOS, Wine 11.17 + vkd3d-proton master ec20719. Tree: main 689f2db + the Wine fixes #871 and #684, release, retail 1.0.2.1, XCL_NETWORK=0 XCL_ACTIVITY=1. The title runs in a systemd scope with a memory cap. The card's use is read from amdgpu's mem_info_vram_used / mem_info_gtt_used every 2 s, next to the title process's RSS and the scope's memory.current.

    HLSL path, cold (24 GB cap; the run stalls on compiles, so this is the world load's start):

    s process RSS scope VRAM used GTT used
    10 (menus) 4.6 GB 6.7 GB 10.0 GB 0.6 GB
    60 (world load starts) 9.3 GB 14.0 GB 15.9 GB (full) 3.1 GB
    120 12.2 GB 17.6 GB 15.9 GB 3.7 GB
    240 15.1 GB 16.5 GB 15.8 GB 3.7 GB

    Direct path, warm (XCL_DIRECT_DXIL=all, same tree + #1273 / #1798, 26 GB cap), sampled the same way:

    s process RSS scope VRAM used GTT used
    30 6.6 GB 8.1 GB 12.4 GB 0.7 GB
    60 10.2 GB 13.9 GB 15.9 GB (full) 3.0 GB
    90 18.2 GB 18.4 GB 15.9 GB 3.7 GB
    95 – 23.4 GB 15.9 GB 3.7 GB

    OOM-killed at about 97 s, after 526 compute pipelines and 1 200 frames. XCL's own line at the end: video memory 18 180 MB local, target pages 9 745 MB, sparse pools 6 080 MB. With 16 GB of zram allowed on top, the run reached 1 800 frames and then a global OOM (scope peak 25.5 GB RAM + 16 GB swap). VRAM and GTT are the same on both paths. The direct path's process RSS is 6.6 GB higher at 90 s: it builds its pipelines much faster (driver compile memory in the same process) and gets further. I have not split the two.

    What differs from Windows: past the card, the driver places the rest in GTT, which is system RAM, charged to the process's memory. Windows can back demoted video memory and commit with a page file on disk. Here, with only zram, there is nowhere else for it to go. So on a 32 GB Linux machine, what is a slow commit charge on Windows becomes an out-of-memory kill during world load. Anything that keeps the mirror out of local video memory, or under a budget (the copy-on-first-use / system-memory approach described above, or vladbondarenko97's budget), would apply here directly.

    Not tested: Windows on this card, XCL_HEAP_WINDOWS=1, #640's page budget.

    AI use: Claude Code (Claude Opus 5.5) ran the runs and the sampler on my machine and wrote this.

  9. yinx080 commented on Nov 25, 2026

    @yinx080

    Measurements on a small GPU, and a question before a PR series.

    Setup: Windows 11 Pro 26200, RTX 3060 Laptop 6 GB (NVIDIA 610.91), 15.3 GB RAM (so ~13.6 GB the GPU can
    address), retail title in Series S mode, XCL_ACTIVITY=1, base c160d86. Every run ends like #345 / #333: a
    64 MB CreateHeap refused, then the title's assert at +0x193e00f, at ~12.9 GB of local + non-local.

    • Sparse tiles mostly unused. At the account prompt 4.6 GB of sparse tiles are mapped. The tiles ever written
      by the CPU (write-watch), under placed buffers, or given to the GPU by address (root arguments, buffer views,
      index/vertex buffers) come to 1.0 GB there and ~1.4 GB during loading.
    • Lazy tiles prototype. Behind XCL_LAZY_TILES=1: a commit maps no tile; held-back tiles stay write-watched
      and are mapped (zeroed) before the submit that needs them, for any of the reasons above. This kept sparse tiles
      at ~1.7 GB instead of ~3.6 GB at the same point of loading, with correct frames through the loading screen.
      Scanning CPU-written pages for pointers into the windows mapped ~2 GB more (the title's own data points all
      over them), so that is off.
    • Coherent window. It is committed at 4,095 MB but the title's allocations in it reach ~3.0 GB;
      XCL_COHERENT_MB=3100 saved ~1 GB of shared memory with no visible change.
    • What still runs it out. Target pages grow from 3.1 to 5.5 GB within seconds when the world streams in, and
      ~0.9-1.0 GB of them are tiles past the console's size.

    #1916 defers tiles for DirectStorage-filled private homes. Would a broader version be welcome as a stacked series
    (1: per-tile "needed" diagnostics in the activity line; 2: tracking addresses given to the GPU, no behaviour
    change; 3: lazy tiles behind a switch), or should it build on #1916?

    AI use: Claude Code (Claude Opus 5.5) wrote the prototype and these measurements.

  10. 3L1A5-1 commented on Nov 25, 2026

    @3L1A5-1

    @yinx080 The ~0.8 GB I measured above (home tiles of physical pages that lie entirely under textures with their own PC copy) should be a subset of what your lazy tiles leave unmapped: nothing gives those tiles to the GPU by address, the CPU writes reach them through the texture's own upload, and DirectStorage fills them. So I'm dropping the separate unmap idea from my comment above rather than build a second mechanism next to yours and #1916.

    AI use: Claude Code (Claude Opus 5.5) wrote this.

  11. brandostrong commented on Nov 25, 2026

    @brandostrong
    Contributor

    PR #2090 removes the buffer half of this for a title that commits most of its unified memory.

    Measured on the same title, 180 s runs, RTX 4090, warm caches:

    • tiled (main): the sparse windows' own video-memory pools reach 7 445 MB on top of the title's
      pages, and the write-watch look over the mapped tiles costs 24 667 ms cumulative for 1 254 ms of
      upload at 3 578 820 dirty pages.
    • with XCL_SPARSE_DIRECT=1 (D3D12.X: read the title's sparse windows directly instead of copying them #2090): those pools are 0 MB and the look is 4 461 ms over
      4 096 looks
      (~1 ms each) — the windows are imported heaps, a buffer the title places in one is
      that memory at its own address, so there is nothing to scan, upload or read back.

    What still mirrors after that: textures the title places in sparse windows (a detiled PC copy — that
    is why the windows stay write-watched), and anything XCL copies into its own video memory.

    Claude Code, Claude Opus 5.5 — the numbers are from runs made here.

  12. mgrein commented on Nov 25, 2026

    @mgrein

    Measured on a 12 GB card: where video memory goes when the newer retail title (TitleID 7952987A, Series X profile) loads its world. Real runs, not code reading; one run per setting.

    Setup: RTX 4070 12 GB, Ryzen 5 5600X, 32 GB RAM, Windows 11 26200, release builds. All 2,689 compute pipelines pre-built, A pressed through the menus. Tree: #2057 at 8ff4b02 plus local commits: #640 cherry-picked (ported onto TilePool), a T# index clamp, and a local counter in real.rs's creator! that adds up the bytes of every heap / committed / placed resource made through the device (releases not subtracted). XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1, no XCL_UMA_SHADOW.

    1. With XCL_PAGE_BUDGET_MB=4096 and XCL_COHERENT_HEAPS=sparse:1024: the menus run at 5–30 fps, world loading starts at ~240 s, and the run ends in E_OUTOFMEMORY:

    time local video memory title-texture pages sparse pools committed default-heap resources made
    202 s 9.8 GB 3.6 GB 4.5 GB 1.2 GB
    226 s 10.3 GB 4.1 GB (at the budget) 4.5 GB 10.8 GB
    256 s 20.6 GB 4.1 GB 5.2 GB –
    • The committed resources come from device_x::create_placed_resource_x's fallback: sampled textures that vram::place_pages declined at the budget become committed default resources. The budget evicted almost nothing: at world load every texture is younger than its minimum age, so it moves textures off the pages instead of capping them.
    • At ~22.4 GB local + 4.9 GB non-local – about everything Windows lets the GPU use on this machine – CreatePlacedResourceX fails with 0x8007000e by the hundred and the title stops on its int3 (+0x193e00f, rax = 0x8007000e; with a 2 GB budget +0xf7d415).

    1b. With #782 ported on top as well (XCL_PAGE_BUDGET_MB=3072; #782's use signal from the T#s in the view heaps, adapted to the newer #640 – its test passes): no better. 48 textures evicted in the whole run, committed default-heap resources 2.2 GB at 204 s → 8.2 GB at 244 s, E_OUTOFMEMORY and the same int3 at 253 s. What limits the budget here: at the cap, when a round frees fewer tiles than a placement needs, bind gives up and create_placed_resource_x makes the texture a committed resource; for the next EVICT_IDLE no round runs, so every placement in that second does the same. Those resources are off the pages, so the budget can never evict them later – at world load it moves textures out of its reach instead of capping them. The textures that stay on the pages are uploaded and transitioned all through the load, so they always look recent.

    2. Without a budget (same otherwise): title-texture pages 10.0 GB, sparse pools 6.1 GB, local 18.9 GB by 304 s; frames fall to 0–2 per 2 s from 250 s, GPU queue.Wait time-outs start at 331 s, title crash (write to 0, +0x23cf683) at 437 s.

    2b. Without XCL_COHERENT_HEAPS as well (the title's two big GPU heaps, 1.2 + 2.2 GB, stay in the coherent window): local video memory stays lower (15.9 GB), but world loading at ~100 s stalls at once – GPU queue.Wait time-outs from 132 s (353 in the run), no frames after 140 s, device removed (0x887a0005) and the int3 at +0x2474606 at 575 s. So XCL_COHERENT_HEAPS=sparse:1024 is what avoids that stall here, and it is also what costs the video memory that then runs out.

    2c. #1916 (XCL_DEFER_PRIVATE_HOME_TILES=1) cherry-picked on top, no budget: sparse pools held at 3.7 GB through the world load instead of 6.1 GB, peak local video memory 16.7 GB instead of 18.9 GB. Not enough on its own: title-texture pages still reach 10.1 GB, GPU queue.Wait time-outs from 342 s, title crash (write to 0, +0x23cf683) at 454 s.

    2d. Same + XCL_PAGE_BUDGET_MB=4096 with the fallback turned off (a local switch: past the cap the pool heaps still grow when a round could not free enough, so the texture stays on the pages instead of becoming a committed resource): committed default-heap resources stay at 1.4 GB, and eviction now works – 7,203 textures evicted, 966 mapped again. But the title-texture pages stay at 9.7 GB: evicted tiles go back to the pool for reuse, and the 64 MB pool heaps behind them are never released (scattered tiles rarely leave a heap empty). So a budget that holds here needs both: no committed fallback, and pool heaps given back (#800's direction). End as in 2c (time-outs from 305 s, the same crash at 516 s).

    3. #2090 (XCL_SPARSE_DIRECT=1), on a different local tree (main 6020a33 + #2090, #1599, #1405, #1663, #640 ported, #2009's XCL_COHERENT_HEAPS), same caches pre-built for it: UMA import check: ok, local video memory stays at 3.8–5.5 GB – the mirror is gone – but nothing is presented for 150 s, then ~6 fps with ~25 DirectStorage requests a second, and a title crash (write to 0) at 342 s. On this machine the title's memory read over PCIe is too slow for the world load.

    4. Series S profile (lockhart, tree of 1, budget 4096): the title stops on an int3 (+0xb18de7) at 138 s, still in the menus, with black frames.

    So on 12 GB, the Series X world load as XCL lays it out now – the title's memory mirrored (sparse pools 5–6 GB) plus a PC copy of every texture (~10 GB) – needs more GPU memory than the machine has, and neither the page budget (nothing evictable yet) nor direct windows (too slow here) gets it through.

    Not tested: AMD; more than one run per setting; main + one PR at a time (all trees above carry several open PRs).

    AI use: Claude Code (Claude Opus 5.5) made the builds and runs on the hardware above, read the logs and wrote this report. The numbers come from those runs.

  13. dhillonjagdeep650-boop commented on Nov 25, 2026

    @dhillonjagdeep650-boop

    RTX 3080 Ti 12 GB: #2057 with the pool-heap budget of 741cb5a on top stays inside the DXGI budget at world load, and then the device is removed in a run of texture copies (3 of 3 runs). #2057 alone is not removed but takes 18.3 GB of local video memory and stops presenting. A combination I did not find reported here; @vladbondarenko97 @theaustinayers, since it is your two changes meeting.

    Setup: RTX 3080 Ti 12 GB (driver 617.42), Ryzen 7 5800X, 48 GB RAM, Windows 11 Pro 26300.9974, DXC 1.8.2502.11, release builds. Retail 1.0.2.1, Series X profile, XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_NETWORK=0 XCL_ACTIVITY=1, all 2,689 compute pipelines pre-built for this tree (0 refused), fresh copy of the title data per run, a person plays from the menus into the world (first press at 16-26 s). scripts/smoke.ps1 -Seconds 300.

    Trees: A = #2057 at f7e08e6. B = A + 741cb5a (fix/vram-budget) cherry-picked; one conflict, two tests added at the same place in vram.rs, both kept. The last B run also has #2131 and local SetName calls for the names below. Not pushed anywhere; say so if a branch would help.

    B, run 1 B, run 2 (XCL_DRED=1) B, run 3 (XCL_DRED=1, names) A (XCL_DRED=1)
    exit 0x887a0006 at 56.9 s 0x887a0006 at 75.2 s 0x887a0006 at 82.5 s 0x0 at 300 s
    local video memory at the end 10.1 GB 10.7 GB 10.9 GB 18.3 GB (from 102 s)
    non-local 2.7 GB 6.9 GB 7.8 GB 0.85 GB
    title-texture pages (pools) 4.6 (4.9) GB 8.6 (9.0) GB 9.5 (9.9) GB 9.7 (10.0) GB
    sparse pools 1.4 GB 1.9 GB 2.0 GB 2.0 GB
    peak commit 24.3 GB 30.5 GB 32.8 GB 34.1 GB
    presents per 2 s before the end 60, 56, 25 23, 41, 20 60, 32, 13 0 from ~96 s on
    draws with translated pipelines 8 701 12 977 12 324 18 956
    • The budget does what it says on this tree. DXGI gives 10.0-10.5 GB here (less than the 11.3 GB reported above for the same card). With XCL_UMA_SHADOW=1 local use is already 9.5 GB in the menus (4.1 GB before any texture), so the first pool heap goes to system memory at 12.6-13.1 s, still in the menus; by the removal 32 to 64 heaps have. Local stays at 10.1-10.9 GB and the growth shows as non-local instead.
    • Then the device is removed, in texture copies. DRED, run 2: page fault at GPU VA 0x1046a00000; allocations there: [type 34], list 39 of 174 operations done, around: 8 8 8 >8 8 8. Run 3, with names: page fault at GPU VA 0x114ca1a000; allocations there: [type 34 xcl resource_at va=0xe8e094000 ...]; recently freed: [], list 11 of 38 operations done, around: 8 8 8 >8 8 8. Op 8 is CopyTextureRegion, type 34 a resource, and the name is D3D12.X: read DRED PageFault1 ObjectNameW and name internal resources #2131's for the texture real.rs's resource_at makes for a view by address. No fence time-out or watchdog line comes before it. The title's int3 at +0x2474606 follows.
    • A alone: no removal in 300 s, but 18.3 GB local against that 10.5 GB budget and no present after ~96 s, as in the 12 GB report above.

    What this does not show: whether the faulting texture's tiles were on an L0 pool heap (the name does not say; #2131's name replaced my local one that had it), so "copies into tiles in system memory fault" is a guess. 741cb5a ran 600 s without a removal on a main-based tree, so the difference is somewhere in #2057's side: its partial texture uploads, XCL_UMA_SHADOW, or resource_at textures outliving what they were made over.

    Not tested: B without XCL_UMA_SHADOW; XCL_COHERENT_HEAPS; more than one run of A; AMD; the same input in every run (a person played, so timings differ).

    AI use: Claude Code with Claude Fable 5.2 built the trees, ran the scripts, read the logs and wrote this; a person played the runs.

    Added 2026-11-25 08:06 UTC: B without XCL_UMA_SHADOW. Same tree as run 3 plus a second local diagnostic commit, same settings otherwise (XCL_DRED=1), one 300 s run, played:

    • exit 0x0, 0 device removals, 0 crashes, 1 641 frames, 14 155 draws, peak commit 30.0 GB. No removal in 300 s, against 3 of 3 with the shadow on.
    • The coherent window is back in non-local memory (4.1 GB at the start) and the menus use 6.2 GB local. The budget first acts at 54 s (8724 of 9805 MB budget), when the world streams in; 64 pool heaps are in system memory by 78 s. From 82 s to the end: 10.0 GB local, 9.2 GB non-local, title-texture pages 9.6 (10.0) GB, sparse pools 2.0 GB.
    • No present and no submit after 82 s (the last 218 s). In that time the log has only 13 huge graphics pipelines, each built when the title asks for it (wanted at once (no slot), driver blob absent): 2.6-5.9 s each, 47 s in all, 8 to 36 s apart. What the title waits on between them I do not know.
    • One run only. It fits "the removal needs XCL_UMA_SHADOW" but cannot rule out that it is only rarer without it.

    Added 2026-11-25 (second addition): the stall of B without XCL_UMA_SHADOW in thread dumps, and XCL_PSO_WAIT_MS=50. For "What the title waits on between them I do not know" above; nothing new in kind: Anon64 showed the same wait in thread dumps of main on an RTX 3060 12 GB (#1798 (comment)), and imnicho on #2057 (#2057 (comment)). Same exe (0a8a692), no shadow, 300 s, XCL_PRESS_A_AT=16,20,24,28,32,36 instead of a person (A logged at 16.0 s, no controller), one run each:

    control + XCL_PSO_WAIT_MS=50
    exit, removals, crashes 0x0, 0, 0 0x0, 0, 0
    last submit 78 s 297 s (the run's end)
    frames shown, of them after 84 s 1574, 0 1589, 20
    draws with translated pipelines (skipped) 13 387 (0) at the last count, 75 s 21 579 (5 302) at the last count, 207 s
    dispatches (skipped) 8 192 (0) 82 990 (8 326)
    huge graphics driver compiles after 84 s 21 76
    GPU queue.Wait ... did not complete within lines 0 422, from 97 s
    local / non-local at the end 10.2 / 9.1 GB 11.4 / 9.7 GB
    peak commit 29.9 GB 35.0 GB
    • Control, XCL_THREAD_DUMP_AT=110,150,210: the same in 3 of 3 dumps. One title thread is in pso_async::resolve_wait under bind::execute_indirect; one xcl-pso worker is in translated_graphics_pso_once -> compile_console_shader -> dxc::compile; one dxc worker is in dxcompiler.dll and the other pso and dxc workers are idle. The 21 huge graphics driver compiles after 84 s never overlap and take 56 s, 26 % of that window; the log does not time the DXC part, so that it fills the rest is inferred from the three dumps. The prebuild I ran covers compute only.
    • With the wait limit the title does not stop, at about one frame per 10 s, with draws and dispatches skipped meanwhile. The one dump (150 s) has 13 pso workers waiting in dxc::compile, 5 dxc workers in dxcompiler.dll and 7 in dxc::wait_for_memory, whose gate asks for 6 GB of free commit plus 1 GB per running compile (this PC's commit limit is 61.4 GB).
    • My first addition says the no-shadow run was not removed in 300 s. frenziedcoder's no-shadow run of f7e08e6 was removed at 405.8 s (D3D12.X: integration branch that reaches the in-world HUD on NVIDIA (reference, not for merge) #2057 (comment)), so 300 s was too short to say it is safe.
    • Not shown: whether the frames look right (nobody looked), how much of the frame time is the GPU (local memory is at the budget and 9.7 GB are read over the bus; GPU load was not sampled), and whether the first run's filled cache helped the second one. The order was control first, so the second run had 35 more driver blobs than the first began with.

    AI use for this addition: Claude Code with Claude Opus 5.5 ran the scripts unattended, read the logs and dumps and wrote it.

  14. joeypercia commented on Nov 25, 2026

    @joeypercia

    @dhillonjagdeep650-boop a check on the first suspect for the CopyTextureRegion page fault in your B runs: with 741cb5a, a reserved texture can get tiles in L0 heaps (CUSTOM, NOT_AVAILABLE, L0) as well as in DEFAULT heaps. On its own, that doesn't make copies fault on NVIDIA here.

    I used a synthetic probe outside the title: a 1024×512 RGBA8 reserved texture (64KB_UNDEFINED_SWIZZLE, 32 tiles), mapped as below and checked word by word. Each case writes from an upload buffer with CopyTextureRegion and reads back to a readback buffer. RTX 4070 Ti (Ada) on driver 621.40, Windows 11 26200, one process per case.

    tiles copy queue direct queue
    all in a DEFAULT heap right, no removal –
    all in an L0 heap right, no removal right, no removal
    16 DEFAULT + 16 L0 right, no removal right, no removal
    16 DEFAULT + 16 NULL mapped half right, NULL half reads 0, no removal same
    16 L0 + 16 NULL same –
    all NULL, read only reads 0, no removal reads 0, no removal

    Also, #2057's vram.rs never releases a pool heap, which fits your recently freed: []. So the faulting tile maps either to a live heap or to NULL, and neither faults in isolation.

    What this leaves:

    • What's under the faulting address at the moment it faults:
      • a mapping made on the Pages queue that a queue other than the one before_execute waits on uses before it's done;
      • a GPU VA past the resource's own tiles (a footprint or subresource the copy computes differently from the console);
      • or residency of the L0 heaps when commit is at 30+ GB.
    • Your card: this was Ada, and yours is Ampere, so the same probe on the 3080 Ti would rule that difference out. The probe is one test file. I can push it to a branch if it helps.

    AI use

    • Claude Code (Claude Opus 5.5) wrote and ran the probe and wrote this comment.
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

    goal:world-load

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions