D3D12.X: CreateReservedResource for each streamed title texture costs ~1 ms on AMD and stalls the title's render thread during world loading #1268
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#1268
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?
@zorde23 on GitHub · 2026-11-24 14:03 UTC · original
Summary
On an AMD RX 6750 XT, a retail title's frame rate drops from ~30 fps to 0-3 fps about 80 s after start, when its world
starts loading, and stays there until the title's watchdog ends it. Timing the texture-creation path shows the title's
render thread spending most of every second inside
CreateReservedResource, called once per streamed sampled texturefrom
vram::place_on_pages.Setup
main9aec53d(+ #891, #905, #1007 merged locally; none of them changes this path), release build.XCL_NETWORK=0,XCL_ACTIVITY=1, A pressed at the title screen throughXCL_PRESS_A_AT; 240 s runs.What was measured (a local diagnostic patch adds call counts and time around the calls below; numbers per 2 s window)
CreateReservedResourcecalls for title textures per 2 s,~0.9-1.4 ms each, 1.0-1.5 s in total;
UpdateTileMappings~0.1-0.2 ms each;title_textures::register0.1-0.5 s;waiting for the
PAGESlock ≈ 0. Presents: 0-6 per 2 s (60 before the load). The GPU is mostly idle in thesewindows (3D engine 0-5 %, from Windows performance counters).
per 2 s; when creation resumed they fell to 0-5 again.
they ran on another title thread. From the world load on they run on the render thread.
title releases almost none of these textures meanwhile (0-40 per 2 s).
XCL_VRAM_ARENAS=1: the drop is the same and video memory overflows at ~110 s).XCL_PSO_WAIT_MS=50(#891), BCPack decoding (#905),XCL_PSO_PRELOAD=0,submitting DirectStorage entries without waiting for the title's Submit. None changes the drop.
Prototype (local, not a PR yet)
Since almost every creation repeats an earlier (description, state), I tried a local change: an XCL worker keeps empty
reserved resources ready per (device, description, initial state) and
place_on_pageshands one out instead of callingthe driver; tiles are mapped exactly as today. It does not help, and the way it fails is informative:
CreateReservedResourcetime on the title's thread fell from ~1.7 s to 0.35-0.56 s per 2 s.UpdateTileMappingsof each handed-out resource: ~0.5 ms per call instead of ~0.03 ms,1.26-1.43 s per 2 s.
place_on_pagestotal stays at ~1.8-1.9 s per 2 s.worse than
main.A second run tagged the pooled resources three ways and timed the title's map of each (sums over 50-180 s, A pressed,
240 s,
XCL_PSO_PRELOAD=0):scratch tile (
REUSE_SINGLE_TILE): 0.612 ms. The worker's own premap cost 0.64-0.74 ms. A freshly created resource maps in0.28 ms.
CreateReservedResourcecalls that did not overlap anyworker driver call cost 1.03 ms on average (1.13 ms overall).
So on this driver each reserved resource costs ~1 ms to create and another ~0.3-0.6 ms at its first mapping, whichever thread
does either, and moving that work off the title's thread does not shrink what the title waits for. Only fewer driver
resources per streamed texture would. The title keeps almost all of these textures alive (0-40 releases per 2 s), so a
pool of released ones does not help either. Is there a known way to avoid one PC resource per placement for these textures,
or a cheaper kind of resource for them on AMD? I can test proposals on this machine.
Related: #646 and #560 may be the same stall on other cards; #449 (CPU cost of
xg::Texture::newinCreatePlacedResourceX) and #1048 are the CPU side of the samecall; #288 placed title textures as reserved resources on shared 64 KiB pages (one resource per placement); #640 and
#800 bound the video memory these pages use; #505 is the same title's end-of-run watchdog.
AI use: investigation, diagnostic patch and this text written with Claude (Anthropic) under my review; all numbers
come from runs on my machine.
@Rednaxeh on GitHub · 2026-11-24 14:20 UTC · original
A data point from RDNA3 (RX 7800 XT 16 GB, driver 32.0.32029.2010, Windows 11 26300, release,
main930e8b4, no local changes), from thread dumps rather than timing: in the same stage (world loading, presents at 0 from ~88 s until the watchdog at 114 s), the dumps at 90 s and 110 s show no title thread invram::place_on_pages/CreateReservedResource. What they show is 4 title threads inpso_async::resolve_waitunderset_pipeline_state, waiting for compute pipelines the AMD driver takes 14–23 s to build (details in #232), and 45 title threads in their own waits. So on this card, at least until the pipeline builds are out of the way, the creation cost you measured on the RX 6750 XT is not what holds the render thread; whether it comes after that I cannot see yet. I can time the creations here once a run gets past the builds, if that helps.AI use: Claude Code (Claude Fable 5.1) read the dumps; the run was mine.
@zorde23 on GitHub · 2026-11-24 14:56 UTC · original
Thanks @Rednaxeh, that matches what I see on the RX 6750 XT once I look at the end of the run instead of the start of the drop. Same title,
main930e8b4, release, RX 6750 XT (driver 32.0.21045.29003), 300 s runs with A pressed at 15–35 s; thread dumps withXCL_THREAD_DUMP_AT.Two different things on this card:
mainruns the title stops submitting at 162–174 s (one short burst aside) and its watchdog fires at 190–201 s. Dumps at 176 and 183 s: 3, then 2 title threads inpso_async::resolve_wait(fromset_pipeline_stateandexecute_indirect), other threads inside amdxc64 building. The compute pipelines built in the world stage take 13–37 s each in the driver here (up to 69 s for the first one).resolve_wait: one title thread indev_create_committed_resourceundercreate_placed_resource_x,title_textures::refreshwaiting on an upload fence or on 8 detile threads, and a thread inside a driver kernel call. Four dumps of one run are thin, but on this card they point back at texture creation and refresh on the title's threads, not at the builds; on a cold cache the builds come on top of it.What gets further (one run each, so treat as indicative;
XCL_PSO_PRELOAD=0in both, since two runs with the preload hit ~53 GB of commit before the world):XCL_PSO_WAIT_MS=50: no watchdog at ~200 s; it reaches 247 s. But it skips work from 159 s on (12.5k draws, 2k dispatches by 194 s), aWait64BitValueXtimes out at 190 s, an upload fence stays pending 10 s, and the device is removed (0x887a0006) at 247 s.XCL_PSO_WAIT_MS=50: no 18 s submit stop at 160–180 s (it kept submitting), 275 s, then the same device removal (30k draws and 18k dispatches skipped by then).So the budget trades the watchdog for a GPU hang a minute later, much like #1046 describes on NVIDIA. If timing the creations on your card helps once a run gets past the builds, I'd be glad to compare: here each creation was ~1 ms on the render thread in the earlier measurement.
AI use: Claude Code (Claude Opus 5.5) ran the runs on my PC through a launcher script, read the logs and dumps and wrote this comment; I checked it.
@tugasky on GitHub · 2026-11-24 15:37 UTC · original
A data point from RDNA4, which the thread does not have yet (Rednaxeh is on RDNA3, zorde23 on an RX 6750 XT, RDNA2): AMD Radeon RX 9070 XT 16 GB (gfx1201, wave64 + mesh), driver 32.0.32029.2010, Ryzen 7 9700X, 31 GB, Windows 11 Pro 26300, release,
main930e8b4, no local changes, defaultXCL_PSO_PRELOAD. A pressed every 8 s from 20 s,XCL_ACTIVITY=1. Three runs, one of them on the head of #1300 (main plus one log line, so not a different build in any way that matters here).Presents per 10 s, and DirectStorage next to them (
activity (2 s)summed; only the windows that move are listed):DirectStorage appears only inside those windows: run 1 5 675 req / 493 MB at 100–110 s and 5 712 / 207 MB at 120–130 s (0 otherwise, before and after); runs 2 and 3 4 071 / 411 MB and 6 645 / 260 MB at 60–70 s, again 0 afterwards. Peak within a single 2 s window: 5 091 req / 571 MB, 13 239 / 707 MB, 7 688 / 830 MB.
0 failedin every window of all three runs.What I take from it, on this card:
resolve_waitfirst: something on the streaming/creation side stops the submits, and the builds afterwards have nothing left to hold up.timed outis 0 in all 207 windows of all three runs. No0x887a0006, no device removal,fallback_pipelines0.0xc0000005write at0x0ingame_scarlett_master.exe+0x23cf683every time. If that ~29 s is a fixed wait inside the title (a fence, an upload or a streaming request that never completes, then a write through a null result), it would be worth instrumenting next — it is the only thing that has held across every run here, and it does not depend on when streaming starts.What I cannot answer yet, and a question for Rednaxeh: whether the render thread sits in
vram::place_on_pages/dev_create_committed_resourcehere.XCL_THREAD_DUMP_ATgives memodule+offsetframes (xcl.exe+0x4e8ec4, inside this 6.8 MB image, so plausible offsets), but nothing resolves them:llvm-symbolizerfrom ROCm 6.4, ROCm 6.2 and MSVC 2022 all answer??:0:0for addressesdumpbinconfirms are inxcl.exe, and throughdbghelpI getmainCRTStartup(a public symbol) but no Rust function, with symbol enumeration returning nothing else — thexcl.pdbbeside the release exe looks publics-only to both. How did you symbolize yours — a debug build, or does the dump print names for you already?If you can post the timing patch you used on the 6750 XT (#1268's ~1 ms per creation), I will run it on this card against run 3's shape: the fold here happens on a run with
0 failedDirectStorage and before the long builds, which is the window you said you could not see past.AI use: Claude Code ran the three runs on my PC, extracted the timelines and wrote this; I checked the numbers against the logs. No game data is included.
@tugasky on GitHub · 2026-11-24 16:03 UTC · original
Symbolization works on a release build too, so here are dump results from a card with the same wall — 9070 XT (RDNA4), main
930e8b4.Reading the dumps.
xcl.exe+0x…is an RVA from the preferred base;SymFromAddr(base + 0x140000000, RVA)against thexcl.pdbof the same build resolves it in release too (xcl::hle::d3d12x::present::present_now+0x15df). The PDB must come from the run that made the dump — a rebuild shifts every offset and old dumps all come back?. Read the dumps fromxcl.log, not from aStart-Process -RedirectStandardErrorcapture: that capture breaks long lines mid-token (xcl.exe+0x/x7ee4c), which reads like truncated frames.Run F, defaults. Presents per 2 s window, with the DirectStorage rate of the same window:
The fold is the DirectStorage burst again, and the crash is 28.6 s after the last presented frame (84 s).
In the dumps (101 threads at 55.0 s and 70.1 s, 133 at 85.1/100.1/113.6 s; 601 thread records): no
place_on_pages,create_placed_resource(_x),dev_create_committed_resource,resolve_wait,CreateReservedResource,evictordetileanywhere. Creation is not on a single stack here either.What is there:
present_now→ dxgi flipPresent→ the queue'sExecuteCommandLists→title_textures::refresh→take_written→ a kernel call (theGetWriteWatch).refreshruns at the top of everyExecuteCommandLists(real.rs:5209) underREFRESH, over the watched ranges, so every flip present pays for it.xcl-dxc-*+ 15xcl-pso-*(+3xcl-pso-pre-*), 14 pso + 13 dxc of them inMutex::lock_contendedon the build queue's receiver (idle workers;std::mpschas one consumer, so they contend instead of parking — not the stall), and 1–3 threads entirely inamdxc64.dllframes.So the order is: burst → presents fall while the present path sits in the write-watch → the build storm fills the 28 s until the abort.
Run H,
XCL_PSO_PRELOAD=0, nothing else changed: the same fold at 52 s (6 763 req/754 MB, then 8 540/438 MB), presents 57 → 5, last present 82 s, crash at ~111 s — 29 s later, same address. Turning preload off does not move it here, unlike on @zorde23's card.Run G,
XCL_ASYNC_PSO=0: no fold and no crash in 322 s (7 721 presents, steady 30 fps) — but the title never leaves the loading screen: 0 dispatches, 0 DirectStorage after 64 s, and 26 synchronous builds on its own thread of 0.4–1.4 MB DXIL taking 20–100 s each (largest 1 380 404 B in 99.6 s). That dial "gets further" by not getting anywhere, so it does not separate the build path from the stall.Two questions that would pin the rest down: does
title_textures::refresh/take_writtenappear on your stacks if you dump at 56 and 60 s, i.e. inside the dip before anyxcl-pso-*thread exists? And is the 29 s a wait of the title's own — it now holds at last-present + 28.6 s and +29.5 s on two runs with different fold times and different preload settings, which looks like a fixed timeout rather than a consequence of the builds finishing.AI use: Claude Code No game data is included.
@tugasky on GitHub · 2026-11-24 16:35 UTC · original
The process's commit charge is what runs out, and it is not in anything XCL accounts for (9070 XT, main
930e8b4, defaults)Following the dumps above, here is what the process's memory did in a run on the same card. The numbers are the
memory:line thatXCL_ACTIVITY=1writes every 2 s (host.rs:65,PROCESS_MEMORY_COUNTERS_EX::PrivateUsage, which is commit charge):Up to ~4 GB of new commit every 2 s at ~30 fps: about 65 MB per frame, 270 KB per draw.
It is not in any pool xcl reports. The same lines carry: target pages 3 604 MB (pools 3 648 MB), arenas 311 MB in use / 311 MB made, sparse pools 7 445 MB of which 837 MB mapped -
11 GB in total, and all of them flat from t18 s. Video memory is flat as well (6 403 MB local, 4 707 MB non-local) while the commit climbs. And it is not host memory being paged out: the pagefile in use is 2.6 GB (peak 8 440 MB since boot) and the working set stayed at 9 373 MB against 94 464 MB private.So ~88 GB of that commit is memory no xcl pool reports. WDDM charges a video allocation against the system commit limit even when it lives in VRAM, which fits those three facts (commit up, VRAM counters and pagefile flat).
Why this is the thing to fix next. The commit limit on this machine is 103.1 GB (31.1 GB RAM and a 72 GB pagefile). At the plateau xcl holds 99.5 GB of it, which leaves ~3.6 GB for Windows and every other process:
memory allocation of 25834 bytes failedfrom xcl's own allocator, while the commit was still climbing.That is the same shape as
game_scarlett_master.exe+0x23cf683writing to 0x0 28.6 s after the last present: with the process a few percent under the commit limit, an allocation inside the title fails and the null dereference follows. It does not need the fold to happen; it needs the commit to run out. That may also be why the 29 s is fixed across two runs with different fold times - a watchdog on a failing allocation looks like a fixed timeout.Where the 88 GB may come from, and how to confirm it. The subject of this issue is the path that would explain it: one PC resource per streamed texture placement, with "the title releases almost none of these textures (0-40 per 2 s)". If the resources stay, the commit they carry stays. I have not proved that, so the next probe is log-only and does not touch the submit path: a
VirtualQuerywalk over the address space every 2 s, grouping committed regions by size and protection, next to byte counters per owner (vramreserved resources,sparsetile mappings,title_texturesCPU copies,console_list::pending_blocks). One run names the owner.One warning for anyone reproducing it: this is a machine hazard, not only a title stall. Check
Get-Process xcl | Select PrivateMemorySize64during a run, and verify a kill withGet-Process- aStart-Processobject's.Kill()did not take here once and the run continued for another 180 s at 94 GB.It is not GPU execution time. A local per-list probe (each list of a submission submitted alone, waited on, lists that take time logged with their draws and dispatches) measured every command list at 0 ms in the 30 fps phase of this run, so the dips are not the GPU working through the lists.
Run shape, so this is not mistaken for a fold reproduction. With defaults but without
XCL_PRESS_A_AT, this run never crashed: 60 presents per 2 s to ~60 s, dips of 7 and 9 presents/2 s at 84 and 100 s, then mostly 0-2 presents per 2 s from ~170 s to ~260 s (with bursts of 25-29 at 212 s and 264 s) and 15-30 per 2 s after that. There was no DirectStorage burst after 12 s, so the fold of Run F never came; 3 000 frames were presented and it was still holding 94.5 GB when I stopped it at 318 s. Same card and driver as the dumps above, so the crash needs that state and the commit growth does not.Setup: RX 9070 XT 16 GB (driver 32.0.32029.2010), Ryzen 7 9700X, 31.1 GB RAM, Windows 11 26200, release build,
XCL_NETWORK=0,XCL_ACTIVITY=1, no other knob.AI use: Claude (Anthropic) wrote this text and the diagnostics under my review; every number is from a run on my machine. No game data is included.
@zorde23 on GitHub · 2026-11-24 17:41 UTC · original
@tugasky here is the timing patch from the RX 6750 XT runs, rebased on current
main(included below). It is diagnostic only, not meant for merge.Base:
b7aa9f3(main, 24 Nov).Apply from the repo root:
Run with
XCL_ACTIVITY=1; nothing changes without it. Every 2 s the log gets atiming (2 s)line next to the usualactivity (2 s)line:Reading it: each entry is calls / total ms of that step in the last 2 s, summed over all threads; per-call cost is ms ÷ calls.
reserved:CreateReservedResourcefor each streamed texture (~1 ms per call on the 6750 XT).tile_map:UpdateTileMappingsof those textures;create_heap: new page heaps. Both are insidebind.place_pages/place_gpu: the whole per-texture path; each includespages_lock+reserved+bind. Don't add the columns up.register: XCL's bookkeeping after a texture is created.committed: textures that fell back to committed resources.pages_lock/exec_lock: time waiting for XCL's page lock while creating a texture / before a submit. A highexec_lockmeans submits were blocked behind texture creation.exec_wait: only the CPU cost of queueing the fence wait before a submit, not the GPU wait.The useful windows are the ones where presents in the
activityline drop: comparereservedandtile_mapthere with the windows before the drop.medicao.patch
Written with Claude Code from runs on this machine.
@zorde23 on GitHub · 2026-11-24 17:43 UTC · original
Follow-up on the slow compute pipelines Rednaxeh pointed at. RX 6750 XT, driver 32.0.21045.29003, main
930e8b4+ #1321.Why they take so long on this driver (130 fresh compute builds of 100 KB+ DXIL, 10 runs):
average, 0.7-5.5 s per 10k DXIL instructions). The best single predictor is the number of per-access memory-window
switches: the slow ones have about one 4-case switch per 100 DXIL instructions (a 1 MB one: ~1,400 switches,~9,000 blocks, 68 s).
one-at-a-time slot). With 7+ in flight each takes ~6x longer and the batch finishes no sooner: 10 programs of
320-415 KB started within 11 s of each other and all finished 42-62 s after the first one started.
#680 (heap windows,
XCL_HEAP_WINDOWS=1), preload at the menu, each build alone:68.5 -> 31.5 s, 65.7 -> 41.5 s, 44.0 -> 20.6 s. The main side of 12 of them comes from earlier main runs with
byte-identical DXIL (in the A/B run the driver's own cache served those in 0 ms); the 3 measured in the same
session gave 0.47-0.70x (median 0.56x).
Not run in the world with #680.
Not measured: #1316 on these programs, DXC flags per program, #1398 (it only acts on refused pipelines).
On this AMD card #680 looks like the largest single cut to these waits.
Written with Claude Code from runs on this machine.
@tugasky on GitHub · 2026-11-24 17:43 UTC · original
Where the 88 GB is, measured - and it is not the placed textures
I ran the probe from my earlier comment (log-only,
VirtualQuerywalk on theXCL_ACTIVITYtick plus byte counters per owner). One sample at 44 631 MB of commit,main930e8b4, RX 9070 XT 16 GB driver 32.0.32029.2010, Ryzen 7 9700X, 31.1 GB, Windows 11 26200, release:vram::place,vram::place_pagesand the committed fallback inCreatePlacedResourceX): 934 in a GPU arena (3 697 MB), 529 on the shared pages (461 MB), 418 as resources of their own (402 MB) - 4.5 GB in 1 881 resources.CreateCommittedResourceX: 0 resources.title_textures: 748 live, 43 dormant.private, growth in 1-16 MiB regions of ~5.4 MB; 848 MB of 44.8 GB inside the title's 7 graphics reservations.VirtualAlloc: 19 calls in the whole run;XMemAlloc: 16 calls (95 MB). Physical pages: 7 131 MB allocated, 11 491 MB mapped, 0 freed.So my guess above - one PC resource per streamed texture placement carrying the commit - is wrong: those resources are 4.5 GB against 44 GB, and the title creates no committed resources of its own. What is left is the title's own allocator: its CRT
malloc/HeapAlloc, i.e. ntdll heap segments of ~5 MB, ~1.4 GB/s, never returned (ntdll makes thoseVirtualAlloccalls itself, which is why the title's own import shows 19 calls).This does not change what this issue is about: the ~1 ms per
CreateReservedResourceand the render-thread stall are still the thing to fix here, and the dumps that showdev_create_committed_resourceundercreate_placed_resource_xare consistent with that cost (the 418 committed fallbacks in the run are cheap in bytes, not necessarily in time). The commit growth is a second, independent bug: the title's budget is reported but never enforced - filed as #1566 with these numbers, the cap experiment and the proposal.AI use: the probe, the run and this text were written by Claude (Anthropic) under my review on my machine; all numbers are from runs here and no game data is included.
@tugasky on GitHub · 2026-11-24 17:58 UTC · original
Follow-up on the stall, with the memory ceiling bounded.
In a run with the title's memory budget enforced at 20 480 MB (job object
ProcessMemoryLimiton the host, opt-in, numbers in #1566) the phase where my 318 s run showed 0-2 presents per 2 s had 62-63 presents per 2 s,0 timed out, the same placed-resource counters (934 + 529 + 418, 3 697 + 461 + 402 MB) and the commit settling from 20 280 MB back to 17 432 MB. 8 795 frames in 300 s.So on this machine the late stall did not happen once the commit was bounded, while the resource set was the same. One run, and I cannot prove the title was in the same world state as the uncapped run - the first minute and the counters match, nothing more. But it means the ~1 ms per
CreateReservedResourceand the memory ceiling may not be independent here: if you can run the cap on a machine that does hit the stall, the question becomes whether the per-placement cost is visible above it at all.AI use: written by Claude (Anthropic) under my review; no game data is included.
@tugasky on GitHub · 2026-11-24 19:15 UTC · original
Twenty minutes, not five. With the commit cap on (
XCL_TITLE_COMMIT_CAP_MB=20480), the title ran 1 200 s, 35 344 frames, 60-64 presents in every 2 s window from 61 s to 1 141 s, and the only empty windows were t=2, 4 and 6 during start-up - no stall, no timeout, no exception.The commit curve is the interesting part: the load peak hits 20 478 MB at 294 s, gives back 4.5 GB at 297 s, and then sits at 15 908-15 910 MB for the remaining fifteen minutes while rendering at the same rate. So the late stall I reported here did not happen with the process's commit bounded, and once the title has given the memory back it does not creep again.
Caveats unchanged: one machine, headless, no input, so the title may not be in the same world state as your sessions; and a cap of 20 480 MB is the console's budget plus XCL's own footprint, not the budget itself (13 824 MB kills the title in start-up - see #1566).
Written by Claude (Anthropic) under my review on my machine; no game data is included.
@zorde23 on GitHub · 2026-11-24 23:40 UTC · original
Tested your job-object idea on a 12 GB card, in case it helps narrow #1566.
Setup: RX 6750 XT (12 GB), driver 32.0.21045.29003, 32 GB RAM, Windows 11 (system commit limit ~46.5 GB). Release
builds of
main20cf130(has #1321 and #1747),XCL_PSO_WAIT_MS=50,XCL_PSO_PRELOAD=0, driver shader cache emptiedbefore the batch. 300 s runs, A pressed at 15–35 s.
Base (main): menu at 60 presents / 2 s, world at ~86 s. Almost no skipped work (25 dispatches, 0 draws at 87 s), yet
presents / 2 s fall to 32–41 at 88–96 s and to 0–4 from ~102 s. Over the same window process commit goes 16.8 GB (80 s)
→ 20.2 GB (100 s) → 24.4 GB (134 s), and local video memory reaches 12.25 GB against a budget of 10.67 GB
(
QueryVideoMemoryInfo). No device removal before the run was stopped at 138 s (we stop it ourselves when system commitgets low). Same with #1517 applied on top (stall from ~78 s, 21.0 GB at 100 s).
With a 20,992 MB process memory limit (job object, as in your run): two runs, both end at ~100 s. Presents drop the
same way from ~78 s; at ~98 s commit reaches the limit and XCL's title-texture page allocations fail with
E_OUTOFMEMORY("no video memory for more pages of title textures"); the title then stops itself (0x80000003 withE_OUTOFMEMORYin one run, 0xC0000409 in the other). So on a 12 GB card the limit also catches the video-memory side, andthe title treats the failure as fatal; we did not see the 62–63 presents / 2 s you got.
Earlier the same day (older main, more skipped work): every run that went past the PSO watchdog with
XCL_PSO_WAIT_MSended in a Windows TDR (LiveKernelEvent 141) (5 of 5), three of them within seconds of a Windowslow-virtual-memory warning; with #1323's markers enabled, no dispatch was ever left started-and-not-finished at the stall. On this machine
the stall/TDR follows memory, not skipped work.
What we could not test: a card with 16 GB or more, and a limit between 21 and 35 GB.
Written with Claude Code from runs on this machine.
@zorde23 on GitHub · 2026-11-25 14:15 UTC · original
Follow-up with numbers after #1747, #1985 and #1986, on main
f087b99(RX 6750 XT, Windows 11, release build).In a retail title, the frame drop when the open world streams in is two things:
unmap_supersededruns a few thousand times in 2 s (2 687 calls, 841 ms), each holding thePAGESlock aroundUpdateTileMappings. The submitting thread'sbefore_executewaits 536 ms on that lock inthat window (longest 152 ms), which, together with the texture upload in
refresh, gives one ~1 s frame.streaming: one streaming thread spends 1.0-1.6 s of every 2 s in
place_on_pages, about 90 % of it insideCreateReservedResource, at about 1 ms per texture, while using only 0.15-0.3 s of CPU.Moving the upload off the CPU wait (#455, tested on top of the same main) removes the long frames (longest present
54 ms instead of ~1 s) but not the drop: presents in the 16 s after the stream starts are the same (150 vs 156).
CreateReservedResourcealone, outside the title (an ignored local test, 2 000 creations per case):UpdateTileMappingspending behind a queueWaitSo on this driver the cost is per creation and fixed: it does not depend on pending tile mappings or on how many
reserved resources exist, it is mostly waiting rather than CPU, and a second thread barely helps. Making fewer
reserved resources (reusing them by description, for example) looks like the lever, not the locking.
One more thing seen in the same test:
UpdateTileMappingson a queue that is blocked on aWaitblocks the callingCPU thread after about 100 calls, until the wait is satisfied. If the pages queue ever waits while
unmap_supersededorbindmap tiles underPAGES, the lock would be held for that whole time. I have not seenthis happen in the title.
Not tested: other AMD generations, NVIDIA, Intel; whether reuse of reserved resources is safe for the title's
aliasing.
Written with Claude Code from runs on this machine.