Skip to content

Video memory jumps 5–7 GB in two seconds when a retail title starts its world – not XCL's resources; it coincides with the first wave of world compute pipelines #560

Backlog

Description

@gw1337x

What happens

The retail title (retail, Series build), AMD Radeon RX 7800 XT 16 GB (driver 32.0.32015.7029), 31.6 GB RAM, Windows 11. Menus walked with XCL_PRESS_A_AT=14,17,21, XCL_ACTIVITY=1. Build: main 2997c9a + #455 + #435 + a local detile speed-up (gpu/tiling.rs only). With this build the title gets through its loading screen into the world (the opening cutscene's audio plays), and then, within two seconds, local video memory grows by 5–7 GB:

run when local video memory
1 92 → 94 s 13.9 → 18.8 GB (+4.9)
2 88 → 90 s 13.7 → 20.2 GB (+6.5)
3 86 → 88 s 13.8 → 20.5 GB (+6.7)
4 90 → 92 s 13.8 → 20.5 GB (+6.7)

An earlier run on main 9ab7d76 + #244 showed the same kind of step, +3.3 GB in 2 s, at the same point of the title (126 s in there, because its loading was slower).

What follows in those runs: no presents for up to 27 s, then the title crashes (write at address 0x0 in +0x23cf683, or a read at 0x7ffff0000 in +0x5425a9e). On a 16 GB card the jump puts video memory past the card.

It is not XCL's heaps or resources

Run 4 logged every heap and committed resource of 8 MiB or more that goes through the device (CreateHeap* / CreateCommittedResource*, XCL's own pools included – a local counter in real.rs's creator!). Over the whole run they add up steadily (190 × 64 MiB vram page pools, ~80 × 10 MiB upload buffers, a few others). In the 2 s of the jump (90 → 92 s) they add ~130 MB. The activity line's target pages, arenas and sparse pools are flat over the same 2 s.

What coincides with it

The title's world starts dispatching compute work: 181 console compute pipelines are created between 90 and 93 s (compute PSO with the translated console CS; 12 MB of DXIL, the largest 788 KB), against 10 in the 90 s before. A thread dump at 100 s in another run shows one thread inside amdxc64.dll and an xcl-pso worker in build_compute → dxc::compile_cached.

Hypothesis (not checked)

Memory the driver allocates for these pipelines rather than anything XCL creates – most likely per-thread scratch: a compute program with spilled registers or indexed private arrays gets scratch for every thread that can be in flight, which can reach gigabytes. A precompile of 23 000 of the title's 26 503 programs (DXIL cache) did not change the jump, so it is not the cost of compiling them.

I do not have a way to read the translated programs' scratch sizes here. If someone can, the 181 pipelines created right after the title's world starts would be the place to look. I can rerun with any logging that helps.

Not tested: NVIDIA or other AMD cards; whether the crashes that follow are caused by the jump; any change to the translator.

AI-assisted (Claude Code, Claude Opus 5.5).

Activity

  1. requiemsnkrp commented on Nov 24, 2026

    @requiemsnkrp

    NVIDIA data point for the hypothesis: no jump here, and also no wave of compute pipelines. That is consistent with pipeline-owned memory.

    Setup: RTX 3060 12 GB, driver 621.24; Ryzen 5 5600X; 16 GB RAM; Windows 11 Pro 26200; release build of unmodified main 508a0c7. XCL_NETWORK=0, XCL_ACTIVITY=1, menus walked with XCL_PRESS_AT (A at 14/17/21 s, then every 6 s from 125 to 197 s). Same run as in #505: it reaches world loading and stops at the watchdog (+0x23cf683) at 326.9 s.

    From the memory: lines. "Other" is local video memory minus target pages minus sparse pools:

    t local target pages sparse pools other
    100 s 6 273 MB 3 596 960 1 717
    140 s 7 426 4 537 1 152 1 737
    180 s 10 977 7 387 1 792 1 798
    240 s 12 376 8 589 1 856 1 931
    300 s 13 814 9 802 2 048 1 964

    So on NVIDIA the step does not happen, but neither do the pipelines it coincides with on AMD. This does not separate "the driver's scratch for those pipelines" from "something else the title does once they exist". It does fit the first, and it means a fix for the NVIDIA build backlog would likely bring the jump to NVIDIA cards too. 12 GB cards would hit it sooner.

    AI use: Claude Code (Claude Opus 5.5) read the run's log on my machine and wrote this comment.

  2. ofc0urse commented on Nov 24, 2026

    @ofc0urse
    Contributor

    NVIDIA data point for the "memory the driver allocates for these pipelines" hypothesis. Here it shows up as process commit, not local video memory, and it comes from a few of the largest programs, one build at a time.

    Setup: RTX 4060 Ti 8 GB, driver 621.24; i5-14400F (MONITORX/CLZERO emulated); 32 GB RAM, 64 GB page file; Windows 11. Local release build: main c8e3ca0 + #235, #244, #252, #254, #255, #267, #283, #292, #306, #314, #322, #348, #486, plus local changes that are in no PR (a BCPack decoder, the title's watchdog thread parked instead of its null write, and a translated compute PSO built again reusing the driver's cached blob). XCL_NETWORK=0, XCL_ACTIVITY=1, Windows TdrDelay raised to 60 s.

    With the watchdog parked the title stays on its loading screen and keeps creating world compute pipelines for half an hour. From ~800 s on they are the largest programs, 0.9–1.3 MB of DXIL, 56–97 s each in the driver, one at a time on the title's thread. From the memory: lines:

    t (s) compute PSO finished (DXIL, driver time) process commit local video memory
    780 – 32.7 GB 14.1 GB
    804 – 1113 928 KB 58 s, 1293 KB 97 s, 911 KB 80 s, 980 KB 66 s 32.9 → 34.9 GB 14.1 GB
    1193 1000 KB, 63 s 34.9 → 47.7 GB 14.1 GB
    1274 – 1535 975, 1039, 982, 911 KB, 61–73 s each ~51 GB, flat 14.1 GB
    1643 1267 KB, 86 s 50.6 → 57.5 GB 14.1 GB
    1731 1113 KB, 69 s flat 14.1 GB
    1801 923 KB, 56 s 59.1 → 63.3 GB 14.1 GB
    1886 989 KB, 67 s 65.4 → 84.1 GB 14.1 GB

    At ~1930 s Windows ran out of commit (32 GB RAM + 64 GB page file) and the process ended without a log line.

    • The growth happens while one of these programs is in the driver's compiler (+8.8 GB between 1141 and 1171 s, before that build finished at 1193 s) and is not given back afterwards.
    • Not every program of that size does it: 4 of these 13 builds did, the other 9 left commit within ~1.5 GB of where it was.
    • Local video memory and the target pages stayed flat the whole time, so on this NVIDIA card it is host memory, not the card's.

    Update: programs of 768 KB of DXIL or more skipped. Same build plus a local switch (XCL_SKIP_CS_KB=768): such a program gets the fallback CS (it does nothing) instead of the driver's compile.

    • Commit stays flat: 31.0–32.0 GB of process commit from 600 s to 1730 s (system 47 of 74 GB), where the run above reached 84 GB. At least 64 programs of 787–910 KB were skipped, the first at 384 s.
    • The smaller world compute pipelines (20–730 KB) still take 0.1–41 s each in the driver, one at a time on the title's thread.
    • The title still gets no further than its loading screen. From 399 s five Wait64BitValueX time out (op 7, want 0x1269, memory holds 0), the last submit is at 408 s and the watchdog is parked at 411 s. After that the title records dispatches until ~1508 s and submits nothing. No present after 384 s.

    So on this card the commit growth comes from those ≥768 KB programs, and skipping them removes it. The stop after loading is a different problem: a GPU wait whose value is never written. An earlier run without the switch timed out the same way (memory still 0) at ~342 s. I cannot rule out that one of the skipped programs is what should write that value in this run.

    AI use: Claude Code with Claude Opus 5.5 read the run's log and wrote this comment from my run.

  3. chazi123 commented on Nov 24, 2026

    @chazi123

    A 12 GB NVIDIA data point, same title (1.0.2.1, retail): no 5–7 GB video-memory jump here either, and also no wave of big compute pipelines — the run built only 15 compute PSO with the translated console CS in total, largest 105,272 B, while the background queue stayed at 58,732 queued. What did grow was process commit, 9.8 GB at 14 s to 36.7 GB at 224 s, with local video memory reaching 12.9 GB (past the card) and target pages 9.1 GB; free physical memory fell to 1 GB and the run ended in 0xc0000005 in VCRUNTIME140.dll (memcpy) during world loading. Setting title_memory_mb = 4096 did not cap target pages (they reached 9,521 MB), and a XCL_COMPUTE_FALLBACK_KB=768 switch never fired for lack of big programs. So on this card the commit growth is not from the large compute compiles you describe — but neither does the world get through. Full log on request.

    RTX 3060 Laptop 12 GB, Xeon W-1250, 32 GB RAM + 34 GB page file, main a6f5f7a + #486 + #516 + #451, Windows 10 19045.

    AI assistance: Doubao collected the numbers and wrote this comment from my runs; I reviewed it.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions