D3D12.X: video memory use is high, title memory and textures are mirrored into VRAM #1773
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#1773
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?
@1bugproof on GitHub · 2026-11-24 20:31 UTC · original
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
4178e88and VIctorymainof 2026-11-24. Nothing here was measured.Where XCL's video memory goes
D3D12_HEAP_TYPE_DEFAULTpool heap (hle/d3d12x/sparse.rs, about line 611). A title that commits 8–10 GB costs about that much VRAM.vram::place_pagespages or as a committed default resource (device_x.rs, about lines 902–926).vram::placepages, and the sparse-window tiles at the same address stay mapped too.retire_free_pools).PARKED_MAX).HANDOFF.md, "Open: arenas for D32S8 targets").What VIctory does
crates/victory-gpu/src/shadow.rs,find). The copy is in system memory, a custom heap withMEMORY_POOL_L0and write-back pages (host.rs,shared_buffer), not VRAM.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
title_textures.rssays are already not seen.HANDOFF.mdalready suggests.XCL_ACTIVITY=1to 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.
github-bot referenced this issue2026-11-26 05:28:47 +00:00
@certified-retart on GitHub · 2026-11-24 21:35 UTC · original
Measured
XCL_ACTIVITY=1breakdown on a heavy retail title on an RTX 5070 (12 GB local VRAM,XCL_HEAP_WINDOWS=1):target pages(pools)arenassparse pools(mapped)target pagesdominates by a wide margin: 10.24 GB of pools (~65% of local VRAM) ? over 4? larger thansparse pools(2.43 GB) and 32? larger thanarenas(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).@rrrarrra9 on GitHub · 2026-11-24 21:56 UTC · original
Windows / GTX 1650 (4 GB) measurements for #1773. Clean main
c4d37bec1bcompleted 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.
@3L1A5-1 on GitHub · 2026-11-24 22:27 UTC · original
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):main930e8b4+ #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 ofb8b1f49, local logging. Next to the run, a read-only script sampled the process every 30 s:VirtualQueryExper allocation,QueryWorkingSetExfor the resident pages, and theGPU Process Memorycounters.One run (
XCL_ACTIVITYand the sampler), Series X; it ended at 518 s on the title'sint3at+0x2474606:MEM_PRIVATEregion 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 notVirtualAllocthem, and both kinds of pool areD3D12_HEAP_TYPE_DEFAULTheaps, 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.0x8007000efrom a command listCloseand the title'sint3at+0x72ac(2 runs; once with free RAM at 0.37 GB) or on the+0x23cf683watchdog (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 same0x8007000e/+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.
@vladbondarenko97 on GitHub · 2026-11-24 22:37 UTC · original
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 inUpdateTileMappings; this one ran to 385 s and ended inD3D12 device removed: 0x887a0007.Same tree + a budget check (fork branch
vladbondarenko97/xclfix/vram-budget741cb5a, +74/−5 invram.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 inQueryVideoMemoryInfo'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.
@3L1A5-1 on GitHub · 2026-11-24 23:21 UTC · original
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_texturesranges (by_va, merged), looks upkernelx::physical_pagesfor each 64 KiB page under them, and checks whether that page's home is a mapped tile insparse(State::mapped). One run, ended at 392 s on the+0x72acstop.vrampages)title_texturesis 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'snote_gpu_writeforCopyMemoryToMemoryX/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.
@rrrarrra9 on GitHub · 2026-11-25 00:14 UTC · original
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
741cb5acommit.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.
@Fran-co-F on GitHub · 2026-11-25 00:20 UTC · original
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
masterec20719. Tree:main689f2db+ 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'smem_info_vram_used/mem_info_gtt_usedevery 2 s, next to the title process's RSS and the scope'smemory.current.HLSL path, cold (24 GB cap; the run stalls on compiles, so this is the world load's start):
Direct path, warm (
XCL_DIRECT_DXIL=all, same tree + #1273 / #1798, 26 GB cap), sampled the same way: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.
@yinx080 on GitHub · 2026-11-25 00:44 UTC · original
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, basec160d86. Every run ends like #345 / #333: a64 MB
CreateHeaprefused, then the title's assert at+0x193e00f, at ~12.9 GB of local + non-local.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.
XCL_LAZY_TILES=1: a commit maps no tile; held-back tiles stay write-watchedand 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.
XCL_COHERENT_MB=3100saved ~1 GB of shared memory with no visible change.~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.
@3L1A5-1 on GitHub · 2026-11-25 00:51 UTC · original
@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.
@brandostrong on GitHub · 2026-11-25 03:41 UTC · original
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:
main): the sparse windows' own video-memory pools reach 7 445 MB on top of the title'spages, 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.
XCL_SPARSE_DIRECT=1(#2090): those pools are 0 MB and the look is 4 461 ms over4 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.
@mgrein on GitHub · 2026-11-25 06:51 UTC · original · edited 2026-11-25 07:34 UTC
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
8ff4b02plus local commits: #640 cherry-picked (ported ontoTilePool), a T# index clamp, and a local counter inreal.rs'screator!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, noXCL_UMA_SHADOW.1. With
XCL_PAGE_BUDGET_MB=4096andXCL_COHERENT_HEAPS=sparse:1024: the menus run at 5–30 fps, world loading starts at ~240 s, and the run ends inE_OUTOFMEMORY:device_x::create_placed_resource_x's fallback: sampled textures thatvram::place_pagesdeclined 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.CreatePlacedResourceXfails with0x8007000eby 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_OUTOFMEMORYand the same int3 at 253 s. What limits the budget here: at the cap, when a round frees fewer tiles than a placement needs,bindgives up andcreate_placed_resource_xmakes the texture a committed resource; for the nextEVICT_IDLEno 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.Waittime-outs start at 331 s, title crash (write to 0,+0x23cf683) at 437 s.2b. Without
XCL_COHERENT_HEAPSas 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.Waittime-outs from 132 s (353 in the run), no frames after 140 s, device removed (0x887a0005) and the int3 at+0x2474606at 575 s. SoXCL_COHERENT_HEAPS=sparse:1024is 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.Waittime-outs from 342 s, title crash (write to 0,+0x23cf683) at 454 s.2d. Same +
XCL_PAGE_BUDGET_MB=4096with 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 (main6020a33+ #2090, #1599, #1405, #1663, #640 ported, #2009'sXCL_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.
@shortside on GitHub · 2026-11-25 09:42 UTC · original
A measurement for point 2 (sampled textures): most of their video memory is for levels the title has not loaded, and backing only loaded levels removes it.
Measured on the newer retail title, Series S profile, on a 24 GB Apple silicon Mac (CrossOver, D3DMetal), where video memory is system memory, so this is the low end. Details and the before/after are in #258.
vram::place_pagestexture too, takes video memory for every level.title_memory_mbdoes not change this: at 5,120 the title still placed 7.7 GB of textures (one run).d3d12x/streamed-texture-level-tiles(one commit on the Mac port branchmac7, native hosts only for now). In the same run about 1 GB of tiles was mapped for the 10 GB the textures stood for, and loading went from about 2 frames per 30 s to 15–30 fps on that machine.Not tested: Windows, a discrete card, the
place_pagespath. It is gated to native hosts because that is where I could test it; whether the same idea fits the shared-pages model on Windows is a question for those who know that code. @yangzj0844 @vitalityscripts, this may be relevant to the 7.1 GB of texture pages in #1337.AI use: Claude Code with Claude Fable 5.2 ran the measurements and wrote the branch and this comment on my machine.
@tiagonleal on GitHub · 2026-11-25 09:44 UTC · original
RAM side of this issue on 32 GB: what is resident when #2057 reaches the world of the newer retail title, page by page. The NVIDIA driver's own shader cache file is the largest single part (4.9 GB). Without it RAM holds longer, and then local video memory ends the run.
Setup
f7e08e6plus two local commits that are not published, both off unless set and both on in every run here:XCL_EXP_WAIT_SUBMITTED=1: the GPU-wait watchdog does not release a wait whoseSignalis already submitted (it never acted in these runs).XCL_EXP_APU_MAP1=1:ApuMapVirtualAddressin its one-argument form.XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_NETWORK=0 XCL_ACTIVITY=1, A pressed at 30 s, noXCL_UMA_SHADOW, compute pipelines precompiled. A guard kills the process when available RAM drops below 1.0 GB.VirtualQueryExandQueryWorkingSetExevery 5 s (resident bytes per mapped file / private allocation; its sum matches the working set), plus the memory-list and GPU-memory counters every second.Working set at the guard cut (default executable name, 2 runs, 86-91 s, world at 66-76 s)
xcl.exe(...c29925ed.nvph, 4 GB + 2 GB files, mapped from device creation)One change per run (GB; 7 runs)
0x887a0005at 140 sXCL_PSO_PRELOAD=0XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512XCL_PSO_PRELOAD=0saves 1.2 GB in the menus only.741cb5a, #1702) is the part left. On 32 GB, a budget that puts pages in system memory would turn this back into a RAM limit.xcl.exeon #2057 (7.6 of 8 GB, RTX 4070 SUPER, 32 GB); what this adds is the rest of the working set and what happens without it.xcl.exe, should do the same as the renamed exe. XCL's own driver blobs still supply the pipelines: 461 driver compile starts with the new cache file, 455 without.Not tested: the tree without the two local switches;
XCL_UMA_SHADOW=1; coherent window sizes between 512 and 4095 MB; any page-budget PR; NVIDIA's cache-size setting itself; who owns the 8-32 MB allocations; runs past 200 s; AMD; other cards.AI use: Claude Code made the sampler and the runs on the machine above, read the logs and wrote this.
Run and written with Claude Code (Claude Fable 5.2 and Claude Opus 5.5).
@joeypercia on GitHub · 2026-11-25 09:30 UTC · original · edited 2026-11-25 09:44 UTC
@dhillonjagdeep650-boop a check on the first suspect for the
CopyTextureRegionpage fault in your B runs: with741cb5a, a reserved texture can get tiles in L0 heaps (CUSTOM,NOT_AVAILABLE, L0) as well as inDEFAULTheaps. 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 withCopyTextureRegionand reads back to a readback buffer. RTX 4070 Ti (Ada) on driver 621.40, Windows 11 26200, one process per case.DEFAULTheapDEFAULT+ 16 L0DEFAULT+ 16 NULLAlso, #2057's
vram.rsnever releases a pool heap, which fits yourrecently freed: []. So the faulting tile maps either to a live heap or to NULL, and neither faults in isolation.What this leaves:
Pagesqueue that a queue other than the onebefore_executewaits on uses before it's done;Update: two runs of the title on the same 4070 Ti (12 GB, DXGI budget 11.0–11.2 GB). Base: #2057
f7e08e6+741cb5a(your tree B), release,XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_DRED=1, warm caches (0 compiles). Inputs were scripted A presses (XCL_PRESS_AT), one run per setting. NoXCL_UMA_SHADOW. The copy page fault did not show up here in either run.XCL_COHERENT_HEAPS=sparse:512(#2009, already in #2057)0x887a0005at 304 s (#2057 alone on this card: ~171 s)0x887a0005at 184.6 s0x0, no allocations, none freedCS 1b5466f261a70cde(160×90 groups) 1,033 ms for one dispatchCS 24de2aef6c31d55e483 ms × 8,CS b78fa10b425b8e54470 msAI use
@tiagonleal on GitHub · 2026-11-25 10:17 UTC · original
Follow-up to my RAM comment above: two video-memory candidates on the same 16 GB / 32 GB setup, a DRED run, and a correction.
Correction first. I wrote that once RAM holds, "local video memory (target pages ~10 GB) ends the run". That was an inference from local use being at the card's size at the removal, not something I had shown. A DRED run now gives:
GetDeviceRemovedReason0x887a0005 (DEVICE_REMOVED, notDEVICE_HUNG), page fault at VA 0x0 with no allocation named, and no command list with unfinished operations. Presents kept coming until about 1 s before. Local use was 16.0-16.1 GB at every removal (16,389 MB in the lastmemory:line of the DRED run, 1.2 s before it), about 1 GB over the 15.1-15.2 GB DXGI budget. That fits video memory over-commit, but DRED does not name the cause, so read it as a hypothesis.Setup (as before)
f7e08e6+ my two local default-off commits, both on in every run (XCL_EXP_WAIT_SUBMITTED=1,XCL_EXP_APU_MAP1=1).XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512, A at 30 s, compute pipelines precompiled. Each exe under its own name, so the driver's large shader cache file is not mapped.XCL_GPU_PROFILE=1in the first five runs.XCL_DRED=1in the #1702 runs and in the DRED control.741cb5a(pool heaps past budget − 1 GB go to system memory), asa5adea6;670a0f9withXCL_TEXTURE_PAGES_SYSTEM_MEMORY=1, as41df377.cargo test --release -p xcl --lib -- d3d12x::sparse d3d12x::list_x gpu::fence d3d12x::vram --test-threads=1: 59 / 0 / 1 (741cb5a) and 60 / 0 / 1 (#1702) passed / failed / ignored. #1702's vram tests with its switch on: 13 / 0 / 1, 0 skipped.Runs
0x887a0005at 117 s0x887a0005at 117 s (DRED as above)741cb5a741cb5a741cb5aworked as written. Its first system-memory heap came at 78-82 s (14.1 of 15.1 GB). By then the target-page pools were almost all made (9.8-9.9 of 10.1 GB). Local use kept growing in other allocations, mostly sparse pools (+0.7-1.2 GB), and ended 0.9-1.3 GB over the budget anyway. With one run on each side, I can't say it delays the removal.Not tested: either candidate on
mainwithout #2057, or without my two local switches;XCL_VRAM_HEADROOM_MBabove 1024; #1702 with the driver's cache file mapped or with the default coherent window; DRED on the741cb5abuild; more than one DRED run;TdrDelay; a lower guard floor; the whole test suite; AMD; other cards.Run and written with Claude Code (Claude Fable 5.2 and Claude Opus 5.5).
@imnicho on GitHub · 2026-11-25 13:06 UTC · original
Measured on Windows, a 16 GB NVIDIA card, Series X profile: when the world is set up about 92 % of the pages under the sampled textures on
vrampages have nothing behind them, and giving a level its pages only with its texels takes the texture pages from 9.2 – 9.5 GB to 4.8 – 4.9 GB in the world. The world then gets through several times the draws, but the device is still lost: local video memory still reaches 19 GB, the rest of it other memory. This is @shortside's finding (#1773) on the shared-pages path that comment left open. A plan for a PR is at the end.Setup
XCL_NETWORK=0, scripted pad, runs of 300 s unless said.4df1e6e+mainat0f13d2a+ #2067, #684, #266, #1515, #495, #1405, #751, #2092, #1803, #1887, #541, #2050, and two local commits: a census and the experiment (both below).XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1, compute pipelines built ahead.1. The census (local diagnostic, every 30 s: the textures
title_textureskeeps in step that are onvrampages and CPU-filled, the 64 KiB pages under them where their bytes are read, and how many of those pages are committed, byVirtualQuery). One run without the experiment (it lost the device at 568 s, at 19.2 GB of local video memory); the world's set-up is at 130 s:vram::place_pagesgives every one of those pages video memory. In the menus there is next to nothing to save: those textures are loaded.2. With a level's pages mapped when an upload first has texels for it (local experiment
XCL_TEXTURE_LEVEL_PAGES=1: a sampled 2D texture of one slice is placed with no tile mapped; a level's tiles – the packed levels as one group – get their pages before the first copy that has texels for them. The pages are the same ones by address as now, so textures at one address still share. GPU-written textures get all their pages.)Two pairs of runs, alternating, the same binary and cache, graphics pipelines warm from earlier runs; texture pages and sparse pools from each run's last
memory:line:target pages)0x887a0006136 s after the set-up0x887a000558 s after it0x887a0006160 s after itXCL_UMA_SHADOW, a 4 095 MB window) and 2.9 GB is the sparse pools; about 6 GB is none of the parts thememory:line names (about 1.3 GB in the menus). I have not taken that apart.Not measured / limits
XCL_DRED=1and the switch ran its 300 s without losing the device).Plan (CONTRIBUTING, "say what you are doing"): one PR for the
place_pagespath, behind the switch and off by default:vram.rskeeps a reserved texture's tiling as groups of tiles per level and maps a group whentitle_textureshas texels for it; a texture the GPU writes gets all its pages. About 230 lines and two tests (the grouping; on the GPU: pages only for the levels with texels, the texels right, zeros where there are none, the largest level's pages when its texels come). It leaves arrays, volumes and the GPU-owned targets as they are and does not touch #1702 / #640. @shortside, it is your idea on the other path: say if you see a reason the two should share code, or if you would rather it went another way.AI use: Claude Code with Claude Fable 5.2 wrote the diagnostic and the experiment, ran the runs on the machine named and wrote this.
@shortside on GitHub · 2026-11-25 14:16 UTC · original
@imnicho thanks for measuring it properly on Windows; the 12 % committed figure matches what I saw here (1.3 of 7.9 GB). Go ahead with the PR as you plan it, I see no reason to hold it for mine.
On sharing code: the two paths only meet in one place, so I would keep the rest apart.
d3d12x/streamed-texture-level-tiles, onmac7) is for the case wherevram::place_pagesgives nothing, which on D3DMetal is every texture: each texture is a reserved resource with tiles of its own from pool heaps. The page bookkeeping has nothing in common.title_textures, and "the GPU writes this texture, map all of it". In my branch that is one call beforetexture::upload_batch(level_tiles::map_for(&queue, &batch)) and one innote_gpu_write(map_all). If yours hooks the same two places, a later change could make them one hook with two backends. I would not build that now; whichever lands second can fold it in.Three things I ran into that may save you time:
UpdateTileMappingson another queue the first copy can run against unmapped tiles.GetResourceTiling.One limit we share: a level the title unloads keeps its memory until the texture goes. On a 24 GB Mac that has not mattered yet in loading, but it will in the world. If you find where the title tells us a level is gone, I would like to use the same signal.
I can run your PR on the Mac once it is up.
place_pagesgives nothing here, so it would only show that the switch does no harm on this host.@crastinator on GitHub · 2026-11-25 16:15 UTC · original
Linux / RDNA2 data for the open VRAM PRs: an RX 6700 XT 12 GB with RADV under Wine, a retail title from a cold start into its world load (it starts at about 50 s). Each PR is merged onto
main06c9f55; release build,XCL_COHERENT_MB=512. My guard stops a run when the card reaches 11.5 GB.mainmain,XCL_VRAM_KEEP_SPARE_POOLS=0XCL_DEFER_PRIVATE_HOME_TILES=1XCL_TEXTURE_LEVEL_PAGES=1Pages::bind: I passed #1182'sphysthrough #2306'sbind_range, andmap_levelspasses&[]. Lazy levels only apply to sampled textures andphysonly to GPU-owned ones, so they don't overlap.title_memory_mbto 8192, or using the Series S profile, keeps RAM at 5.7 GB, but then the title never starts its world load: it sits at 60 fps with no storage reads. I don't know yet what it is waiting for.AI use: Claude Code (Claude Opus 5.5) merged, built and ran these and wrote this; I checked the numbers.
@yinx080 on GitHub · 2026-11-25 16:23 UTC · original
Same idea, Series S profile, 6 GB card: a data point for the PR plan above.
I have this running locally on the shared-pages path: a sampled texture placed by
vram::place_pagesgets no tile at placement. Beforetexture::upload_batch, each subresource with a non-zero byte gets its tiles (GetResourceTiling; the packed levels as one group, per slice).note_gpu_writemaps all of it, and so does a texturetitle_textures::registerrefuses. An evicted texture (#640) comes back with nothing mapped.device_type = "lockhart"), with #1182 / #1248 / #1663 / #640 (XCL_PAGE_BUDGET_MB=1536), runs of 300–600 s:I'm glad to run your PR on this laptop when it's up, as the small-card case.
AI use: Claude Code (Claude Opus 5.5) wrote the change and this comment; the runs are mine.
@kole07139 on GitHub · 2026-11-25 18:21 UTC · original
8 GB data point for #2306 (
XCL_TEXTURE_LEVEL_PAGES=1) onmain, Windows. With it, local video memory peaks at 8.7 GB instead of 13.9 GB, and commit at 23.5–24.0 GB instead of 29.0 GB, so the title stays inside the RTX 3070's own memory for the first time here. The world load still stops at 96–110 s in all three runs, each time at the first mid-listWait64split, so on this card that stop is not video memory.Setup
main55d64c2unchanged; it has #2306, #1405 and #2080.XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_NETWORK=0 XCL_ACTIVITY=1, noXCL_UMA_SHADOW.xcl shaders --precompile --only cs --pipelines, 2 689 made, 0 refused, 63 min in one process.XCL_TEXTURE_LEVEL_PAGESmemory:line)split command list (type 2) around mid-list Wait after Write64 (#1)level pages: 6300 textures standing for 857 MB have pages for 224 MB (2048 levels given pages so far)at 49.7 s;1a0bbe3, before #1405, there were hundreds in the same windows.main, with and without the level pages.Not tested
XCL_UMA_SHADOW=1together with level pages.AI use: Claude Code (Claude Opus 5.5) built
main, ran the precompile and the runs, read the logs and wrote this report. I watched run 2 and checked it before posting.@razormontana on GitHub · 2026-11-25 19:09 UTC · original
I'm taking a small lazy texture follow-up to #2306. When a nonzero mip cannot get pages, I'll keep the texture eligible for a later upload of the same texels. I'll add regression coverage for a mapping failure followed by a retry.
Assisted by Codex (GPT-6.2 and GPT-6.2 Sol).
@voiceovarian1-max on GitHub · 2026-11-25 20:39 UTC · original
12 GB data point, Linux + NVIDIA: XCL's texture copies are the largest part of video memory, the title's heaps the next. With real textures the driver ran out of memory and crashed.
Setup: Proton Experimental's Wine + vkd3d-proton 3.1, RTX 4070 Ti 12 GB (NVIDIA 620.73.04), 31 GB RAM. Retail title, Series S profile,
XCL_HEAP_WINDOWS=1, coherent window 3,072 MB (system RAM). Tree: #2057's head with other PRs merged locally.vkAllocateMemory Exception 0xc0000005 in Unix call, afterNV_ERR_NO_MEMORY(system_mem.c) in the kernel log.Not tested: Windows, AMD, cards with 16 GB or more.
AI use: measured and written with Claude Code (Claude Opus 5.5) from runs it made on this machine.
@razormontana on GitHub · 2026-11-25 22:49 UTC · original
I’ll make lazy title texture uploads share one zero-filled staging span for zero mips. Each mip copy and its resource transitions stay in place. I’ll measure upload staging demand and check both zero and streamed texels with synthetic readback.
@gefydev on GitHub · 2026-11-25 22:57 UTC · original
A data point from a card at the low end: on 4 GB of video memory the title reaches its profile selector and then runs out of video memory.
Setup: NVIDIA GeForce GTX 1650 (3,935 MiB VRAM, driver 32.0.16.2124, 32-lane waves), Ryzen 5 1600, 16 GB RAM, a fixed 24 GB page file (commit limit 39.9 GB, ~34 GB free at start), Windows 11 26300, release build of
maine1d84b7, DXC 1.9.2602.17, retail title,XCL_NETWORK=0 XCL_ACTIVITY=1, no input.Series X profile (default), one 60 s run
D3D12.X: command list … (type 0) Close → 0x8007000e, then the title stops on a breakpoint (0x80000003).memory:line: 14,197 MB committed; video memory 6,147 MB local, 4,594 MB non-local; target pages 3,541 MB (pools 3,584); arenas 401 MB in use; sparse pools 896 MB (837 mapped).Series S profile +
XCL_TEXTURE_LEVEL_PAGES=1, one 90 s runCreateHeap(0x4000000 bytes, type 1, …) refused (0x8007000e), and the run ends the same way.One run of each, so a pointer and not a rate. I looked at the window through screen captures; I did not compare against another card.
AI use: Claude Code (Claude Sonnet 5.5) ran these, read the logs and wrote this comment for @gefydev.
@philip-roy-jones on GitHub · 2026-11-26 00:49 UTC · original
I'm taking one piece of this: the title's display targets are 3840x2160 on any screen. XCL hands the title the PC's IDXGIOutput, so the console output's display-mode list (vtable slot 21) lands on a different PC method and returns DXGI_ERROR_INVALID_CALL; a trace on an RX 580 shows the count query fail just before the 4K targets are made. I'll answer it with the console modes that fit the PC display (1080p and below on a 1080p screen, as a Series X lists on a 1080p TV), with
XCL_DISPLAY_MODE=WxHto force a size, and measure video memory and commit before and after. PR against main, stacked on #2038.AI use: Claude Code (Claude Opus 5.5).
@dhillonjagdeep650-boop on GitHub · 2026-11-25 07:52 UTC · original · edited 2026-11-26 01:25 UTC
RTX 3080 Ti 12 GB: #2057 with the pool-heap budget of
741cb5aon 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 invram.rs, both kept. The last B run also has #2131 and localSetNamecalls for the names below. Not pushed anywhere; say so if a branch would help.XCL_DRED=1)XCL_DRED=1, names)XCL_DRED=1)0x887a0006at 56.9 s0x887a0006at 75.2 s0x887a0006at 82.5 s0x0at 300 sXCL_UMA_SHADOW=1local 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.page fault at GPU VA 0x1046a00000; allocations there: [type 34], list39 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: [], list11 of 38 operations done, around: 8 8 8 >8 8 8. Op 8 is CopyTextureRegion, type 34 a resource, and the name is #2131's for the texturereal.rs'sresource_atmakes for a view by address. No fence time-out or watchdog line comes before it. The title's int3 at+0x2474606follows.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.
741cb5aran 600 s without a removal on amain-based tree, so the difference is somewhere in #2057's side: its partial texture uploads,XCL_UMA_SHADOW, orresource_attextures 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.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.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.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_SHADOWin thread dumps, andXCL_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 ofmainon an RTX 3060 12 GB (#1798), and imnicho on #2057 (#2057). Same exe (0a8a692), no shadow, 300 s,XCL_PRESS_A_AT=16,20,24,28,32,36instead of a person (A logged at 16.0 s, no controller), one run each:XCL_PSO_WAIT_MS=500x0, 0, 00x0, 0, 0GPU queue.Wait ... did not complete withinlinesXCL_THREAD_DUMP_AT=110,150,210: the same in 3 of 3 dumps. One title thread is inpso_async::resolve_waitunderbind::execute_indirect; onexcl-psoworker is intranslated_graphics_pso_once->compile_console_shader->dxc::compile; one dxc worker is indxcompiler.dlland 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.dxc::compile, 5 dxc workers indxcompiler.dlland 7 indxc::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).f7e08e6was removed at 405.8 s (#2057), so 300 s was too short to say it is safe.AI use for this addition: Claude Code with Claude Opus 5.5 ran the scripts unattended, read the logs and dumps and wrote it.
Correction, added 2026-11-26 (@joeypercia, thanks for the probe): my guess above that "copies into tiles in system memory fault" does not hold for later runs. On #2057
4df1e6e+ the same additions, with a diagnostic that names how the faulting texture's tiles are held, 4 of 4 removals are in aresource_attexture that is unmapped (mapped=false, 0 tiles held in video memory, 0 in L0); #2270 is about that unmap. That agrees with your L0 cases not faulting; by your NULL cases an unmapped tile alone does not explain it either. I have not run your probe on the 3080 Ti. I did not repeat the earlier runs with that diagnostic, so what faulted in them is still not shown.AI use for this addition: Claude Code with Claude Opus 5.5 ran the scripts unattended and wrote it.
Added 2026-11-26: RTX 3080 Ti 12 GB on
main2898511+ #2404 + #1182 + #1916 runs the retail title 420 s into the intro at a peak of 7.5-7.7 GB (two runs) of local video memory, presenting to the end. Without #1182 and #1916 it reaches 11.8 GB by 251 s. This confirms crastinator's numbers on an NVIDIA card; one run per row.Setup: RTX 3080 Ti 12 GB (driver 617.42), Ryzen 7 5800X, 48 GB RAM, Windows 11 Pro 26300.9974, release; retail title 1.0.2.1, scripted A presses,
XCL_NETWORK=0.XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_COHERENT_MB=512 XCL_TEXTURE_LEVEL_PAGES=1 XCL_PSO_WAIT_MS=50 XCL_DRED=1. All compute pipelines prebuilt, graphics cold. One run per row; a guard of mine ends a run above 11.8 GB local.main0x0main0x0d165e20) + #1916 (e2aa856,XCL_DEFER_PRIVATE_HOME_TILES=1)0x059f8e7c), #1916's switch on0x0dispatch_chain::Chain::whole(the stall #2404 removes), so their flat 10 GB is not the memory of a world that runs.Not tested: this card without
XCL_TEXTURE_LEVEL_PAGES, a playable world (the 3D scene is not drawn in any run; with #1182 its place is mostly blue, see there).AI use: Claude Code with Claude Opus 5.5 ran the scripts unattended, read the logs and wrote this.
@gefydev on GitHub · 2026-11-26 01:42 UTC · original
4 GB card, 16 GB RAM: with a local mix of open work the retail title gets through its first settings, its loading art and into world loading, with no memory failure for 22 minutes. No world on screen yet.
Machine: NVIDIA GeForce GTX 1650 (3,935 MiB VRAM, driver 32.0.16.2124, 32-lane waves), Ryzen 5 1600, 16 GB RAM, Windows 11 26300, DXC 1.9.2602.17. The title is on a hard disk. A fixed 24 GB page file on the SSD (commit limit 39.9 GB).
The build (local only, nothing of it pushed)
maine1d84b7, release, plus, applied in this order:741cb5a(title texture pages go to system memory once video memory is at its budget). Conflicts invram.rs:Pagesnow usespush_heap, and both tests at the end are kept.e2aa856, no GPU tiles for private physical page storage). README conflict only.d165e20, render targets on one physical page share its video memory). One conflict invram.rs: two test-only functions added at the same place, both kept.I did not run the test suite on this mix, and these three have not been tested together by their authors as far as I know.
Switches:
XCL_TEXTURE_LEVEL_PAGES=1,XCL_COHERENT_MB=2048,XCL_DEFER_PRIVATE_HOME_TILES=1(#1916),XCL_NETWORK=0,XCL_ACTIVITY=1. Series X profile (default). Input by hand.How it went, one run of each
main, noneClose → 0x8007000eat 51–58 smain+741cb5a, level pages, default coherent window (4095 MB)CreateHeapof a system memory heap refused at 134 sXCL_COHERENT_MB=2048Close → 0x8007000eat 392–397 sWhat #1916 and #1182 changed (near the same stage of two runs, so a comparison of two moments and not a controlled one)
The loading art drew correctly in a screen capture. I saw nothing broken up to there, which is little to judge #1182 by.
Where it stands now: compile time, not memory. The last frame was presented at 398 s. After that the screen stayed black with the title's audio running, while compute pipelines were built: 305 by 1,318 s, the big ones 12–33 s each in the driver and one at a time by default (
gated, waits of up to 400 s). The GPU memory figures stayed flat. I closed the run and startedxcl shaders --precompile --only cs --pipelines --used-onlywith the same build; a later run has not been made yet.Other things tried on this card, which did not help
nvidia-devbranch (c044dc6d) +741cb5a: about the same asmain+741cb5a, so it was not needed to get to the settings screens.XCL_TEXTURE_LEVEL_PAGES=1alone: one run stayed up for 150 s, the next failed at 106 s.With less than 17 GB of commit free at start (the usual case on this machine with the default page file), the log warns
UMA: … commit free, under 17408 MBand the coherent window is only 512 MB.Limits: few runs, one machine, no world drawn, no AMD or Intel, and the switches were not all taken out one by one in the last build.
AI use: Claude Code (Claude Sonnet 5.5) applied the commits, built, ran, read the logs and screen captures and wrote this for @gefydev, who played the runs by hand.
@imnicho on GitHub · 2026-11-26 01:49 UTC · original
Point 3, measured: the sparse windows' 64 MB pool heaps keep 1.5 – 2.0 GB of video memory (and commit) after the title has freed it, and most of that free space lies in wholly free 4 MB pieces. I am taking the pool heap size; a PR follows after an A/B.
Setup: RTX 5080 16 GB (driver 610.47), i7-7700K, 16 GB RAM, Windows 10 22H2, release, the retail title of #505 in the Series S profile,
XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_TEXTURE_LEVEL_PAGES=1.What the
memory:line shows (main6d12f58+ #2404, #2097, #684, #751; four runs of 390 – 476 s):The world load unmaps 1.3 – 1.8 GB of tiles and 3 to 6 heaps of 78 go back: a heap is released only when all its 1,024 tiles are free (
retire_free_pools), and the freed tiles are spread over nearly all heaps.How the free tiles lie (a local counter over
freeand the cooling tiles, onnvidia-devc044dc6d+ #684, one run, every 20 s):So with heaps of 64 tiles (4 MiB) 57 – 87 % of that free space would be in heaps that can go back (nine samples from 40 s to 256 s), with 16 MiB heaps 28 – 62 %, and 1 MiB heaps add little over 4 MiB.
What I will measure for the PR:
mainagainstPOOL_TILES = 64, same title and settings: sparse pools against mapped, local video memory and process commit over the world load, the time of the tile-mapping and physical-page calls (more heaps mean moreUpdateTileMappingscalls and moreCreateHeapcalls), and the presents in the menus.Not measured: cards other than this one; whether the driver minds ~1,200 small heaps behind one reserved buffer (the A/B will tell here).
AI use: Claude Code with Claude Fable 5.2 ran the runs and wrote this.
@pickles976 on GitHub · 2026-11-26 04:35 UTC · original
@/tmp/x1773c.md