Skip to content

NVIDIA: the device is removed when the pipelines in use need more than 512 MB of shader code (0x887a0005) #2403

Backlog

Description

@veyn-sudo

NVIDIA's driver keeps the machine code of the pipelines in use in one heap of at most 512 MB. A submission that needs more removes the device: 0x887a0005, no page fault, nothing in DRED, no event. The retail title's world needs about that much on a GPU with 32-lane waves, so it is likely the silent removal of #1452 and #505. A small test reproduces it without any title.

Measured on one card so far: RTX 2070 SUPER 8 GB, driver 617.14, i7-9700K, 32 GB RAM, Windows 11 26300. Bears on #1833.

Reproduce it

shader_code_limit.rs (at the end) makes compute pipelines of unique code, 1.7 MB each, main 68a284a:

what it does with them result
dispatches each once, keeps them 0x887a0005 at 262 pipelines, 449 MB of driver blobs
dispatches each once, releases them 420 pipelines, 720 MB: fine
keeps them, never uses them 420 pipelines, 720 MB: fine

So code counts from a pipeline's first use until it is released.

What the driver does

Read in the running title with a hook on every kernel graphics call of the process (NtGdiDdDDI*); the heap also in the test:

  • No kernel call fails at the removal (the only failures are harmless ones that happen at every frame and at start), and D3DKMTGetDeviceState reports the device as active until then. The DMA fault (6) found on an RTX 5070 Ti in Recompiler: bound descriptor heap indices from T# and S# words to the heap #1215 is what the driver sets itself: MarkDeviceAsError, from inside ExecuteCommandLists.
  • Its submit function returns E_INVALIDARG (nvwgf2umx.dll+0x173b78 in this driver), where a heap is asked to grow past its maximum:
title, run 1 title, run 2 test
maximum 512 MB 512 MB 512 MB
size 492 MB 511 MB 504 MB
asked for 517 MB 536 MB 529 MB
  • In the title it holds 1-3 MB through the menus, with 86,000 pipelines alive (nearly all stand-ins), and 345 MB about a second after the first world work.
  • At the world load the recordings on one command allocator use 289 MB of compiled programs, those on all allocators together 392 MB (GetCachedBlob sizes, about 1/9 less than the heap).

This fits reports in #1452 and #505: the submission at the removal does not matter, cold caches delay it, and any group of about 30 of the 1.0-1.8 MB programs brings it. Unreal developers describe the same symptoms as "shader heap exhaustion", with NVIDIA raising the limit in one game's profile (1, 2; secondhand, I found no NVIDIA documentation).

What I tried

  • Newest translations: 14 of the title's compute programs (0.3-1.5 MB DXIL) compiled by the driver on 68a284a. Default path: 21.81 MB, against 21.76 MB for the translations the runs above used. XCL_DIRECT_DXIL=1: 18.28 MB (-16 %; 11-35 % a program, none for the one the default path already sends there).
  • Releasing pipelines that are not in use (longest unused first; one in a recorded list is kept until its allocator is reset): not enough by itself. Nearly all of the code is in recordings at the same time. Removed at 132 s and 200 s, against 134-141 s without. A version that released more, and built again at each bind, was not removed in one run of 217 s, at the cost of 3,000 releases. Earlier ones that ran longer skipped 60 % of the dispatches (a blue picture).

What would fix it

  1. Less compiled code in use at once on 32-lane GPUs: the sum over what one list binds, next to the compile time of the biggest program ([OFFICIAL] Looking for PRs with shaders optimization #1269).
  2. Then releasing unused pipelines, for the rest of a session. I have a first version of that and can make it a PR.

Helpful now: the test on other cards and drivers (AMD and Intel too): at how many MB, if at all? And whether nvwgf2umx.dll returns E_INVALIDARG in your removal.

Not tested

Other cards, drivers and titles; that the removals others report are this one; the title with XCL_DIRECT_DXIL=1.

The test

10-20 minutes the first time; it ends with a removed device. MODE=drop and MODE=unused are the other two rows.

cargo test --release -p xcl --test shader_code_limit -- --ignored --nocapture
crates/xcl/tests/shader_code_limit.rs
//! How much shader code of pipelines in use the driver takes before it removes the device.
//!
//! cargo test --release -p xcl --test shader_code_limit -- --ignored --nocapture
//!
//! `MODE`: `keep` (default; each pipeline dispatched once and kept), `drop` (dispatched once and
//! released), `unused` (made and kept, never used). `COUNT` pipelines (600), `STMTS` statements a
//! program (3000: about 1.7 MB of compiled code on an RTX 2070 SUPER), `THREADS` (5).
//! Every program is compiled by the driver: 10 - 20 minutes the first time.

use windows::core::Interface;
use windows::Win32::Graphics::Direct3D::D3D_FEATURE_LEVEL_12_0;
use windows::Win32::Graphics::Direct3D12::*;
use windows::Win32::Graphics::Dxgi::Common::DXGI_SAMPLE_DESC;

struct Shared<T>(T);
unsafe impl<T> Send for Shared<T> {}
unsafe impl<T> Sync for Shared<T> {}

fn var(k: &str, d: usize) -> usize {
    std::env::var(k).ok().and_then(|v| v.parse().ok()).unwrap_or(d)
}

/// A program no other one shares code with.
fn program(k: usize, stmts: usize) -> String {
    let mut h = String::from("RWByteAddressBuffer u : register(u0);\n[numthreads(1, 1, 1)] void main() { uint x = u.Load(0);\n");
    for i in 0..stmts {
        let c = ((k * stmts + i) as u32).wrapping_mul(0x9E37_79B1) | 1;
        h += &format!("{{ uint y = u.Load((x & 1023u) * 4u); x = (x * {c}u) / (y | 1u) + (y >> {}) % (x | 1u); }}\n", 1 + i % 13);
    }
    h + "u.Store(4, x); }"
}

#[test]
#[ignore = "takes minutes and ends with a removed device on some drivers"]
fn how_much_shader_code_the_driver_takes() {
    let (stmts, count, threads) = (var("STMTS", 3000), var("COUNT", 600), var("THREADS", 5));
    let mode = std::env::var("MODE").unwrap_or("keep".into());
    unsafe {
        let mut dev: Option<ID3D12Device> = None;
        D3D12CreateDevice(None, D3D_FEATURE_LEVEL_12_0, &mut dev).unwrap();
        let dev = dev.unwrap();
        let queue: ID3D12CommandQueue = dev.CreateCommandQueue(&D3D12_COMMAND_QUEUE_DESC::default()).unwrap();
        let fence: ID3D12Fence = dev.CreateFence(0, D3D12_FENCE_FLAG_NONE).unwrap();
        let alloc: ID3D12CommandAllocator = dev.CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT).unwrap();
        let list: ID3D12GraphicsCommandList = dev.CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_DIRECT, &alloc, None).unwrap();
        list.Close().unwrap();
        let desc = D3D12_RESOURCE_DESC {
            Dimension: D3D12_RESOURCE_DIMENSION_BUFFER,
            Width: 65536,
            Height: 1,
            DepthOrArraySize: 1,
            MipLevels: 1,
            SampleDesc: DXGI_SAMPLE_DESC { Count: 1, Quality: 0 },
            Layout: D3D12_TEXTURE_LAYOUT_ROW_MAJOR,
            Flags: D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS,
            ..Default::default()
        };
        let heap = D3D12_HEAP_PROPERTIES { Type: D3D12_HEAP_TYPE_DEFAULT, ..Default::default() };
        let buffer = || {
            let mut r: Option<ID3D12Resource> = None;
            dev.CreateCommittedResource(&heap, D3D12_HEAP_FLAG_NONE, &desc, D3D12_RESOURCE_STATE_COMMON, None, &mut r).unwrap();
            r.unwrap()
        };
        let (a, b) = (buffer(), buffer());
        let param = [D3D12_ROOT_PARAMETER {
            ParameterType: D3D12_ROOT_PARAMETER_TYPE_UAV,
            ShaderVisibility: D3D12_SHADER_VISIBILITY_ALL,
            Anonymous: D3D12_ROOT_PARAMETER_0 { Descriptor: D3D12_ROOT_DESCRIPTOR { ShaderRegister: 0, RegisterSpace: 0 } },
        }];
        let mut sig = None;
        D3D12SerializeRootSignature(&D3D12_ROOT_SIGNATURE_DESC { NumParameters: 1, pParameters: param.as_ptr(), ..Default::default() }, D3D_ROOT_SIGNATURE_VERSION_1, &mut sig, None).unwrap();
        let sig = sig.unwrap();
        let rs: ID3D12RootSignature = dev.CreateRootSignature(0, std::slice::from_raw_parts(sig.GetBufferPointer() as *const u8, sig.GetBufferSize())).unwrap();
        let shared = Shared((dev.clone(), rs.clone()));
        let next = std::sync::atomic::AtomicUsize::new(0);
        let (tx, rx) = std::sync::mpsc::sync_channel::<Shared<(ID3D12PipelineState, usize)>>(8);
        std::thread::scope(|scope| {
            for _ in 0..threads {
                let (tx, next, shared) = (tx.clone(), &next, &shared);
                scope.spawn(move || loop {
                    let k = next.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
                    if k >= count {
                        return;
                    }
                    let code = xcl::gpu::recomp::dxc::compile(&program(k, stmts), "main", "cs_6_0", &[]).expect("DXC");
                    let shared = &shared.0;
                    let desc = D3D12_COMPUTE_PIPELINE_STATE_DESC {
                        pRootSignature: std::mem::transmute_copy(&shared.1),
                        CS: D3D12_SHADER_BYTECODE { pShaderBytecode: code.as_ptr() as _, BytecodeLength: code.len() },
                        ..Default::default()
                    };
                    let Ok(p) = shared.0.CreateComputePipelineState::<ID3D12PipelineState>(&desc) else { return };
                    let size = p.GetCachedBlob().map_or(0, |b| b.GetBufferSize());
                    if tx.send(Shared((p, size))).is_err() {
                        return;
                    }
                });
            }
            drop(tx);
            let (mut kept, mut total, mut n) = (Vec::new(), 0usize, 0u64);
            for Shared((p, size)) in rx.iter() {
                n += 1;
                total += size;
                alloc.Reset().unwrap();
                list.Reset(&alloc, None).unwrap();
                if mode == "unused" {
                    list.CopyBufferRegion(&b, 0, &a, 0, 64);
                } else {
                    list.SetComputeRootSignature(&rs);
                    list.SetPipelineState(&p);
                    list.SetComputeRootUnorderedAccessView(0, a.GetGPUVirtualAddress());
                    list.Dispatch(1, 1, 1);
                }
                list.Close().unwrap();
                queue.ExecuteCommandLists(&[Some(list.cast().unwrap())]);
                let _ = queue.Signal(&fence, n);
                let start = std::time::Instant::now();
                while fence.GetCompletedValue() < n && start.elapsed().as_secs() < 10 {
                    std::thread::yield_now();
                }
                if mode != "drop" {
                    kept.push(p);
                }
                let state = dev.GetDeviceRemovedReason();
                if n % 32 == 0 || state.is_err() {
                    println!("{mode}: {n} pipelines, {} MB of driver blobs, device {}", total >> 20, state.as_ref().err().map_or("ok".into(), |e| format!("removed ({:#x})", e.code().0)));
                }
                if state.is_err() {
                    std::process::exit(3);
                }
            }
            println!("{mode}: all {n} pipelines, {} MB of driver blobs, device ok", total >> 20);
            std::mem::forget(kept);
        });
    }
}

AI use: Claude Code (Claude Opus 5.5) did the diagnostics, wrote the test, ran everything on my PC and wrote this.

Activity

  1. VolenNakov commented on Nov 25, 2026

    @VolenNakov

    The test on a second card and driver: the same limit. MODE=keep (default COUNT, STMTS, THREADS), one run: device removed (0x887a0005) at 261 pipelines, 446 MB of driver blobs, the line before at 256 pipelines / 438 MB with the device fine.

    • NVIDIA GeForce RTX 4060 Ti 16 GB (Ada, 32-lane waves), driver 610.88; Intel Core i7-8700; 32 GB RAM; Windows 11 build 26200; release; DXC 1.8.2502.11.
    • main 68a284a with only crates/xcl/tests/shader_code_limit.rs from this issue added. About 8 minutes for the test itself.
    • So 262 / 449 MB on the 2070 SUPER (617.14) and 261 / 446 MB here: the same heap, across Turing and Ada and two driver branches. 16 GB of video memory doesn't raise it.

    Fits what I saw in the title on this card: the #2057-based trees (giant compute programs whole) lost the device at the world load in every run, and plain main with the compute splitting (06c9f55, #2329 on top for one) has not, in 3 runs of up to 600 s after the first #101 (the title then waits on cold whole-form compute builds, the #2372 case). Not run: MODE=drop / MODE=unused; whether nvwgf2umx.dll returns E_INVALIDARG here.

    AI use: Claude Code (Claude Opus 5.5) ran the test on my PC and wrote this comment.

  2. STmihan commented on Nov 25, 2026

    @STmihan

    RTX 3070 Ti 8 GB (Ampere), driver 621.14: removed at 262 pipelines, 448 MB, the same limit as on the 2070 SUPER and the 4060 Ti 16 GB.

    Ryzen 7 5800X, 64 GB RAM, Windows 11 26100. shader_code_limit.rs from this issue, unchanged, on a local tree based on main plus open PRs (the test only uses d3d12 and DXC, nothing of the tree's translator), release, MODE=keep, default STMTS=3000, THREADS=14:

    keep: 224 pipelines, 383 MB of driver blobs, device ok
    keep: 256 pipelines, 438 MB of driver blobs, device ok
    keep: 262 pipelines, 448 MB of driver blobs, device removed (0x887a0005)
    

    Ran keep only, once; not drop or unused, and no hook on nvwgf2umx.dll.

    AI use: Claude Code ran the test and wrote this.

  3. Ariorh1337 commented on Nov 25, 2026

    @Ariorh1337

    @veyn-sudo the test and the title on an RTX 5090 (driver 32.0.16.1692): the same limit, and the title's removal after the first #101 meets it.

    Setup: RTX 5090 32 GB, Ryzen 7 9800X3D, 64 GB RAM, Windows 11 26300, release, DXC 1.9.2609.

    Your test (shader_code_limit.rs as posted, on main 06c9f55, defaults: MODE=keep, 3000 statements, 5 threads):

    keep: 224 pipelines, 391 MB of driver blobs, device ok
    keep: 251 pipelines, 439 MB of driver blobs, device removed (0x887a0005)
    

    That's about 1.75 MB per pipeline, close to your 2070 SUPER (262 pipelines, 449 MB).

    The title (retail 1.0.2.1, warm caches, through the menus): I added a local count of the GetCachedBlob bytes of every translated pipeline when it is first bound. Releases aren't subtracted, so it is an upper bound for the translated part only. Per 2 s:

    pipelines bound driver code
    menus 36 1 MB
    first 2 s of the world (8431 dispatches, first #101) 920 336 MB
    +2 s 1097 397 MB
    +4 s 1103 398 MB
    +6 s, then 0x887a0005 1169 436 MB

    So the title is removed at 436 MB of translated code, and your test at 439 MB on the same card. DRED here reports the removal as a "page fault at GPU VA 0x0" with no allocation. That fits a removal the driver sets itself rather than a real fault.

    This also explains what I listed in #505 as not being the cause. Refusing the BVH builder, ActivateRays / ActivateProbes or ScreenProbes_Inject left the rest above the limit. Serialized submissions only delayed it. Cold caches got further because pipelines still building don't count.

    AI use: Claude Code (Claude Opus 5.5) added the local count, ran the test and the title on the machine above (I pressed through the menus) and drafted this.

  4. Berserker64 commented on Nov 25, 2026

    @Berserker64

    RTX 3080 10 GB (Ampere), driver 621.24: removed at 262 pipelines, 448 MB (0x887a0005), the same limit as the other cards.

    Ryzen 9 5950X, 32 GB RAM, Windows 10 Pro 19045. shader_code_limit.rs from this issue, unchanged, on a local tree based on main c4d37be plus open PRs (the test only uses d3d12 and DXC), release, MODE=keep, defaults:

    keep: 224 pipelines, 383 MB of driver blobs, device ok
    keep: 256 pipelines, 438 MB of driver blobs, device ok
    keep: 262 pipelines, 448 MB of driver blobs, device removed (0x887a0005)
    

    No Display 4101 or nvlddmkm event in the System log at the removal. Ran keep once; not drop or unused, and no hook on nvwgf2umx.dll.

    The retail title's removals on this card (0x887a0007, 56–94 s into about half its runs) are not this limit: in a run removed at 66 s, the title's pipelines in use came to under 1 MB of GetCachedBlob code (20 pipelines); runs that went on to 100 s reached 62–81 MB.

    AI use: Claude Code (Claude Opus 5.5) ran the test and wrote this.

  5. added
    goal:world-load
    on Nov 25, 2026
  6. humsterbumster commented on Nov 25, 2026

    @humsterbumster

    A second platform for the same wall, with the title rather than the test: Linux, RTX 5090 32 GB, driver 620.73.04, Wine 11 / Proton 11, vkd3d-proton 3.2.0 (ec20719). Every tree and cache state I have ends the same way, at 268 – 349 s of world load, and the compile history is what moves the time.

    tree vkd3d pipeline cache driver compiles blob hits end
    main 3f4495a cold 40 0 0x887a0005 at 328 s
    main 3f4495a warm, 238 KB promoted 16 2 no removal; host fault in msvcrt.dll at 267 s
    3ceb550 + #541 + #1803 + mimalloc warm 13 65 no removal; msvcrt.dll+0xa4fb at 268 s
    3ceb550 + #541 + #1803 + mimalloc warm 7 then 41 58–123 0x887a0005 at 309–337 s
    #2057 head 4df1e6e + XCL_HEAP_WINDOWS=1 XCL_UMA_WINDOWS=1 warm 38 1 0x887a0005 at 309 s, then 0x80000003 game+0x2474606

    Two things match the issue:

    • The removal lands on a compile, not on a draw. In the cold leg the last lines before it are a 2,420,640 B DXIL compute PSO starting at 323.7 s, the title's activity falling to 0 draws, and the device gone at 328.5 s. The fence the title waited on never advanced in 10 s (1 writes after the GPU ... after 10000 ms), the DMA-fault picture jessenic showed in Newer retail title (TitleID 7952987A): reaches world loading, then the title's GPU watchdog ("GPU Loc Sig") after ListX #101 stub #505.
    • Cutting compiles postpones it and nothing more. A warm cache turns 40 compiles into 7–16 and no removal at 267/550 s, but the run then dies elsewhere (msvcrt fault on a host-side copy, or the title idle in its own gated waits). The heap fills with the code the world needs whether it was compiled in this run or loaded from a blob.

    On this box the two ways past it that do not need new code also fail: XCL_PSO_WAIT_MS=1 XCL_PSO_IMAGE_SKIP=1 keeps the device alive to 365 s but skips 57,415 of 66,125 dispatches (87 %), so the loading cards and the intro's credit overlays draw and no geometry does; XCL_DIRECT_DXIL=1 (the −16 % you measured) is already in every leg above.

    So a Linux/NVIDIA data point for "releasing pipelines is the rest of the session": I would take your first version of it. If it helps testing, my legs are reproducible in ~6 minutes each from a saved profile; the failures are 100 % — 8 of 8 runs since the tree moved past aa9ab8a.

    AI-assisted (omp / DeepSeek V4.1 Flash 1017), nv-linux class. No game data attached.

  7. razormontana commented on Nov 25, 2026

    @razormontana
    Contributor

    I'm taking the split scratch allocation fallback. When a list's existing scratch can hold one workgroup, failed growth can use that buffer in smaller slabs. This avoids requesting a whole compute PSO on that path, which bears on the driver's live shader-code pressure. I'll add a regression for failed allocation.

    Assisted by Codex (GPT-6.2 and GPT-6.2 Astra).

  8. NWProgramming00 commented on Nov 25, 2026

    @NWProgramming00
    Contributor

    The test on a Blackwell card and on an AMD iGPU. The RTX 5070 Ti has the same total limit, and in front of it a limit on one program: a compute pipeline whose code is over about 1 MB is refused with E_OUTOFMEMORY at creation, so the test's default 1.7 MB programs never get made there. The AMD iGPU kept all 600 default programs.

    Setup

    • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves), driver 32.0.16.2124; AMD Radeon RDNA2 iGPU (gfx1036), driver 32.0.21042.62.
    • AMD Ryzen 7 9700X, Windows 11 26300, release.
    • main 68a284a with only crates/xcl/tests/shader_code_limit.rs from this issue added, plus three local changes:
      • the error of a refused CreateComputePipelineState is printed (the test returns silently there);
      • the adapter's name is printed;
      • XCL_ADAPTER=radeon picks the first AMD adapter.

    RTX 5070 Ti

    STMTS COUNT / THREADS result
    3000 (default) 600 / 5 every pipeline refused: 0x8007000E (E_OUTOFMEMORY) at CreateComputePipelineState, so all 0 pipelines and no removal
    2250, 2000 2–3 / 1 refused the same way
    1750 3 / 1 made: 3 MB of driver blobs for 3 (about 1 MB each)
    1500 12 / 1 and 1200 / 4 the process ends with 0xc0000005, after thread '<unknown>' has overflowed its stack from threads the test does not name (the driver's); RUST_MIN_STACK=64 MiB did not change it
    1000 1300 / 4 0x887a0005 at 768 pipelines / 448 MB of driver blobs; the line before: 736 / 429 MB, device fine
    • So on Blackwell the heap is the same as on Turing and Ada (446-449 MB above): somewhere between 429 and 448 MB here.
    • The ~1 MB-per-program refusal shows up as E_OUTOFMEMORY with no device removal. A title program that compiles to more than that would get no pipeline on this card at all.
    • With 1000-statement programs the same driver threads print stack overflows too (4 lines), but the run goes on.

    AMD Radeon RDNA2 iGPU

    • MODE=keep with the defaults (600 programs, 3000 statements): all 600 pipelines made, dispatched and kept, device fine (1,454 s).
    • GetCachedBlob returns an empty blob on this driver, so the test prints 0 MB. How much code that is, I could not read.

    Not tested

    • MODE=drop and MODE=unused on the RTX 5070 Ti with 1000-statement programs.
    • Where exactly between 1750 and 2000 statements the per-program refusal starts, and its size in bytes of code.
    • RDNA3 / RDNA4 and Intel.

    AI use

    • Claude Code (Claude Opus 5.5) ran the test runs on this machine, made the three local changes and wrote this.
  9. Diskuss commented on Nov 25, 2026

    @Diskuss

    RX 9070 XT (RDNA4): no device removal. AMD has a cap of about 4 GB of shader code, not 512 MB. At the cap, CreateComputePipelineState returns E_OUTOFMEMORY and the device stays fine. Releasing pipelines lets new ones be created again.

    AMD Radeon RX 9070 XT 16 GB, driver 32.0.32015.7029; Ryzen 7 5700X3D, 32 GB RAM; Windows 11 26300; DXC 1.9.2602.17; release build. main 06055a7 with only the test files added.

    The test as given: cargo test --release -p xcl --test shader_code_limit -- --ignored --nocapture, MODE=keep, THREADS=14, other settings at their defaults. All 600 pipelines were made, dispatched and kept, and the device stayed fine (1286 s). GetCachedBlob is empty on this driver, so the test prints 0 MB throughout.

    Measured instead: I used a copy of the test with IDXGIAdapter3::QueryVideoMemoryInfo (local and non-local CurrentUsage) printed against the start, plus a refill step (shader_code_mem.rs, otherwise the same programs and loop). Non-local usage stayed at +0 MB in every run.

    run result
    keep, 600 × 3000 statements local +1276 MB (about 2.1 MB a pipeline, DXIL ~170 KB each), device fine. Same as the test above.
    keep, 1800 +3708 MB, device fine
    keep, COUNT=2400 pipelines 0–2045 made, +4092 MB; every later one (354) refused 0x8007000E, device fine
    drop, 200 (each released after its dispatch) stays at +4 MB: freed space is reused
    at the cap (2046 kept, 54 refused), release 1023, then create 40 new 40 of 40 made and dispatched, device fine
    STMTS=12000 / 24000, 14 each 5.1 / 10.2 MB a pipeline, none refused, back to +0 MB after release
    • The cap is about 4 GiB (2046 × 2 MB slots = 4092 MB). Through the test's programs, that is about 8 times NVIDIA's 512 MB.
    • Programs of this size each take one 2 MB slot in 128 MB blocks. A released slot is reused, but QueryVideoMemoryInfo does not go down after a release (the blocks stay allocated). Bigger programs (5–10 MB) get their own allocation, which is freed at release.
    • The local usage grows at CreateComputePipelineState, not at the first dispatch. MODE=unused was not run. On NVIDIA the code counts from first use.
    • No per-program refusal up to 10.2 MB of code a pipeline (DXIL 1.5 MB). NWProgramming00 found the RTX 5070 Ti refuses programs over about 1 MB.

    For XCL: on AMD the limit shows up as E_OUTOFMEMORY at creation, so a fallback that releases unused pipelines and retries the creation would work there. I did not test whether the retail title's code comes near 4 GB.

    Not run: MODE=unused; the retail title; RDNA3.

    Time: about 2 h 27 min of measurement runs on the GPU (8835 s over 9 runs); about 2 h 35 min from the claim to this edit.

    AI use: Claude Code (Claude Opus 5.5), report from a real run on this machine.

  10. milesah3ad commented on Nov 25, 2026

    @milesah3ad
    Contributor

    Which changes shrink the compiled code that fills the 512 MB heap: #1901 cuts it 3.5–6× on synthetic programs, heap windows halve it, and the direct DXIL backend doesn't shrink it here (larger for cross-lane code). The same programs in eight forms, measured by GetCachedBlob size, the proxy this issue uses. No title.

    Setup: RTX 5080 16 GB (Blackwell, 32-lane waves → split wave64), driver 621.24; Ryzen 7 9800X3D; Windows 11 Pro 26300; DXC 1.9.2609.5; release. Trees: main 2898511, #1901 head 5064119, #2368 head c685e12. 20 synthetic compute programs per form, from the nv680 generator (base, atomic, loop, wave = a v_readlane per round, loopx = a loop with a lane read and a ballot every trip). Each at 250 and 1000 rounds (about 3k–15k console instructions), 2 seeds, 4 memory windows. One CreateComputePipelineState each with the ABI root signature, then GetCachedBlob.

    form DXIL, 20 programs compiled blob blob vs main default largest blob programs over 1 MB driver build, sum
    main, HLSL, switch windows (default) 10.95 MB 22.90 MB 1.00× 2.70 MB 10 / 20 1,028 s
    main, HLSL, XCL_HEAP_WINDOWS=1 6.14 MB 11.55 MB 0.50× 1.99 MB 2 / 20 101 s
    #1901, HLSL, switch windows 2.98 MB 6.62 MB 0.29× 0.68 MB 0 / 20 81 s
    #1901, HLSL, heap windows 4.03 MB 3.79 MB 0.17× 0.35 MB 0 / 20 39 s
    main, XCL_DIRECT_DXIL=1, switch 8.32 MB 24.37 MB 1.06× 4.95 MB 10 / 20 390 s
    main, direct, heap windows 5.90 MB 20.18 MB 0.88× 5.00 MB 4 / 20 130 s
    #2368, direct, switch 8.26 MB 22.28 MB 0.97× 4.70 MB 4 / 20 284 s
    #2368, direct, heap windows 5.98 MB 20.18 MB 0.88× 5.00 MB 4 / 20 136 s

    Compiled blob per shape (MB, the 4 programs of each shape summed):

    form base atomic loop wave loopx
    main HLSL switch 3.27 5.15 3.47 6.75 4.26
    main HLSL heap 1.32 1.54 1.39 4.99 2.31
    #1901 HLSL switch 1.09 1.69 1.20 1.29 1.35
    #1901 HLSL heap 0.65 0.77 0.70 0.88 0.80
    main direct switch 2.52 4.29 2.68 11.71 3.17
    main direct heap 1.92 1.93 1.94 12.73 1.66

    Reading

    • Recompiler: large compute programs call shared helpers instead of inlining them #1901 shrinks the compiled code the most: 0.29× in the default window form, 0.17× with heap windows, and no program over the ~1 MB single-pipeline limit @NWProgramming00 found on Blackwell. That bears on this issue as much as on compile time: sharing the window accessors, exchange and format helpers as calls also means fewer copies of them in machine code.
    • Heap windows alone halve it (opt-in since Recompiler: memory windows from the descriptor heap (no per-access switch) #680).
    • Direct DXIL is not smaller on these programs: 1.06× / 0.88×, and about twice the HLSL size on the wave shape (lane reads). That differs from the −16 % in the description on 14 retail programs, so it may depend on how much cross-lane code a program has. Worth checking on the title's world-load set before counting on the direct route for this limit.
    • Recompiler: flatten direct DXIL root-UAV loads for compute #2368 brings the direct switch form down to 0.97× (0.92× of direct main). Its heap form gives byte-identical blob sizes to direct main despite slightly different DXIL.
    • Blob size is deterministic: seed 1 and seed 2 of each program gave identical blob sizes in every form, and every build compiled cold (seconds, not a cache hit).

    Not tested: retail programs (the shares here say nothing about the title's mix), whether blob size before the first dispatch equals what the heap charges after it, AMD / Intel, #1901's run-time cost on Ada / Ampere (see @brandostrong on #1901).

    AI use: Claude Code (Claude Opus 5.5) wrote the probe, ran it on the machine above and wrote this report. I checked the numbers against the logs.

  11. wayback94 commented on Nov 25, 2026

    @wayback94

    The test on Linux under Wine + vkd3d-proton, and on Windows on the same card. Linux: all 600 default pipelines with the device fine, in 5 runs (keep cold and warm, drop, unused, and keep on Proton's own vkd3d-proton). Windows, same RTX 3080: removed at 262 pipelines / 448 MB (0x887a0005), the same as @Berserker64's 3080 and @STmihan's 3070 Ti.

    So the test does not reach this limit through vkd3d-proton on this card, although @humsterbumster's title runs on Linux + NVIDIA end with 0x887a0005. vkd3d-proton's GetCachedBlob returns nothing here (0 MB throughout, like the AMD iGPU above), so only the pipeline count compares: 600 against 262. This doesn't tell apart a Vulkan driver without that heap, a higher limit, or smaller code made from these programs through DXIL → SPIR-V. It also doesn't say the title's removal on Linux is something else: its programs, and how many it keeps in recordings at once, differ from the test's.

    Linux

    • main 3ceb550 + only crates/xcl/tests/shader_code_limit.rs from this issue, cross-built x86_64-pc-windows-gnu, release; defaults MODE=keep COUNT=600 STMTS=3000 THREADS=5.
    • Proton Experimental's Wine; NVIDIA 620.73.04; CachyOS, kernel 7.3; DXC 1.9.2609.5.
    vkd3d-proton mode vkd3d-proton cache result
    v3.1 + #257's patch keep cold all 600, device fine, 893 s
    v3.1 + #257's patch keep warm (after the run above) all 600, device fine, 76 s
    v3.1 + #257's patch drop warm all 600, device fine, 75 s
    v3.1 + #257's patch unused warm all 600, device fine, 75 s
    Proton Experimental's own (2576c0b4) keep cold, its own all 600, device fine, 726 s

    Every run printed 0 MB of driver blobs, so the MB column of the other reports has nothing to compare with here.

    The title on Linux (2 runs): it stops before the world's code could reach the limit, on something else, at the same place both times. Tree 3ceb550 + #684 (a local merge, so copy_from doesn't end it first), defaults (no XCL_DIRECT_DXIL), XCL_ACTIVITY=1, 480 s each, A pressed on a controller through the menus into story loading. vkd3d-proton v3.1 with #257's patch and its own dxil-spirv (none of the #1805 patches).

    run 1 (cold vkd3d-proton cache) run 2 (right after)
    compile of a 376 KB compute program, its thread overflows its stack (xcl-pso-pre-2); the title goes on 14 s 6 s
    first ID3D12GraphicsCommandList10::#101 stub call (#505's marker) 291 s 108 s
    compile of a 484 KB compute program starts, its thread overflows its stack 302 s 109 s (xcl-pso-pre-3)
    last 2 s with any work 294 s 110 s
    end 480 s, GPU fences still pending after 10 s, exit 0 the same
    • Both are the same two programs (same records), and neither one's driver blob was there in run 2, so they had never finished. After the second overflow: 0 presents, 0 submits, 0 dispatches every 2 s, a black screen, until XCL_RUN_SECONDS ends it.
    • No 0x887a0005, no crash in either run. Local video memory about 9.0 GB of 10 GB at the end.

    So on this setup the stack overflows of #1805 come first; whether the heap limit follows on Linux needs a dxil-spirv with those patches, as @humsterbumster's vkd3d-proton 3.2.0 runs had.

    Windows (same commit and test file, Windows 11 Home build 26300.9974, driver 621.14, DXC 1.9.2602.17)

    mode result
    keep, cold removed at 262 / 448 MB; the line before 256 / 438 MB, device fine
    keep, warm (right after) the same, 262 / 448 MB
    drop all 600, 1027 MB, device fine
    unused all 600, 1027 MB, device fine

    Hardware: NVIDIA GeForce RTX 3080 10 GB (Ampere, 32-lane waves), Intel i7-13700K, 32 GB RAM; dual boot, the same machine for both.

    Not tested

    AI use: Claude Code (Claude Opus 5.5) set up and ran the Linux test and the title run (I pressed the buttons) and read the logs, a second Claude Code session (Claude Opus 5.5) ran the Windows one; Claude Code (Claude Opus 5.5) wrote this comment from the logs.

  12. S1m0ne1997 commented on Nov 25, 2026

    @S1m0ne1997

    @veyn-sudo Data from an RTX 4090 24 GB (driver 621.40), and a change that cuts the compiled code of the biggest programs, your point 1.

    The removal on this card: in the title (direct DXIL, heap windows), GetCachedBlob bytes of the pipelines bound so far, counted at first bind:

    tree world load to removal bound at the removal
    without the change, 2 runs 8–9 s 336–349 MB, 1145–1172 pipelines, 86–92 of ≥ 1 MB
    with the change, warm caches 72 s 354 MB, 1295 pipelines, 28 of ≥ 1 MB

    All removals: 0x887a0005, DRED page fault at VA 0 with no allocation, as you describe.

    The change: the window of a memory access is its base's.

    • The direct DXIL translator adds every offset to the 64-bit address with a carry into the high dword, then picks the heap window from the high dword (lower_window.rs, window_at). So every access gets its own window index, compare and heap handle, and accesses off the same base share none of them.
    • gpu::uma already guarantees that allocations never straddle a 4 GiB window. So an access inside its allocation never carries or borrows, and its window is its base's window, with the low dword taken mod 2³².
    • Driver code (GetCachedBlob), 12 programs per family:
    family before after change
    CS_RaytracingResolve 8129 KB 6692 KB −17.7 %
    CS_IrradianceCache_Shade 2747 KB 2411 KB −12.2 %
    CS_ShadowRenderTiled 7854 KB 7393 KB −5.9 %

    Coordination: this attacks "less compiled code in use", your release of unused pipelines attacks the rest of the session, and the two seem to add up. Is anyone working on code size on your side, so we don't overlap? I can run your shader_code_limit test on the 4090 if a second NVIDIA generation helps.

    AI use: Claude Code (Claude Opus 5.5) wrote the change, the measurement tool and the counter, ran the title on the machine above (I pressed through the menus) and drafted this.

  13. gefydev commented on Nov 25, 2026

    @gefydev
    Member

    A measurement that bears on the size of the code in use, from a 32-lane card. It does not run the title.

    Setup: GTX 1650 (driver 32.0.16.2124, 32-lane waves), Ryzen 5 1600, 16 GB RAM, Windows 11 26300, DXC 1.9.2602.17, release build of a branch based on main 3f4495a (not the newest main). The same 143 compute programs of a retail shader pack each time (xcl shaders <pack> --precompile --only cs --limit 22300 --pipelines, split wave64, 4 memory windows), a new empty XCL_DXIL_CACHE for every run. The size is the sum of the 143 .pso files the pass saves, which are the GetCachedBlob bytes of each pipeline made by the driver.

    switches driver code, 143 pipelines against default whole pass
    default 41.92 MB 624 s
    XCL_DIRECT_DXIL=1 36.11 MB -13.9 % 436 s
    XCL_HEAP_WINDOWS=1 33.80 MB -19.4 % 337 s
    both 27.84 MB -33.6 % 272 s

    All 143 compile in every run, 0 errors, 0 refused by the driver.

    • The two reductions mostly add up: about a third less code with both. That is about 14 MB less on this sample; how much of it is in use at the same time in the title is not measured here.
    • @bstillbstill's run above used both switches on an RTX 3090 Ti and the removal came later but still came, so this alone is not enough; it is a smaller input for the limit, next to releasing pipelines that are not in use.
    • One sample and one card; the seconds of the last column come from runs one after another on a machine that was not idle for the first one, so only the sizes are firm. No retail title was run for this.

    Next I will look at what the split wave64 form adds on 32-lane cards, since it is the other part of what these programs are made of.

    AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.

  14. humsterbumster commented on Nov 25, 2026

    @humsterbumster

    A second Linux box agrees with @wayback94's run: the 512 MB heap does not show through vkd3d-proton here either, and our own accounting of the code the title asks for is far below it.

    RTX 5090, NVIDIA 620.73.04, Proton 11's Wine, vkd3d-proton 3.2.0 (ec20719, dxil-spirv 7c04863, -Db_ndebug=true), DXC 1.9.2609.5, XCL_DIRECT_DXIL=1, warm vkd3d-proton.cache, A pressed on the loading cards.

    Sum of the DXIL of every translated console compute program a run builds (compute PSO with the translated console CS (N B DXIL)), per run:

    tree total DXIL end
    main 3f4495a 24.1 MB 0x887a0005 at 349 s
    main 3f4495a + #541 + #1803 + mimalloc 22.8 MB 0x887a0005 at 344 s
    3ceb550 + #541 + #1803 + #684 + mimalloc 15.0 MB 0x887a0005 at 337 s
    the same, warm-cache legs 21.6 / 11.9 MB faults in msvcrt.dll, or a stall

    Even if the driver's machine code were an order of magnitude larger than the DXIL it comes from, that is nowhere near 512 MB, and GetCachedBlob returns nothing here (0 MB), as @wayback94 saw. So on this setup the removal is not the heap being full of code.

    What is in front of it every time is a fence the GPU never reaches:

    D3D12.X: 1 writes after the GPU so far done although their queue had not got there after 10000 ms (fence at 4741, wanted 4742)
    D3D12 device removed: 0x887a0005
    unhandled exception 0x80000003 in game_scarlett_master.exe+0x2474606
    

    Latest instance: 332.9 s on 3ceb550 + #541 + #1803 + #684 + mimalloc. It lands seconds after a large driver compile (up to 2.4 MB DXIL) on the trees that reach it, which is why it reads like a heap effect on Windows, but nothing on this side shows the code volume.

    Two more things from the same runs, for whoever picks the Linux side up:

    • On main 6d12f58 the title dies earlier, in dxil-spirv's structurizer (CFGNode::find_common_post_dominator reading a null post-dominator on an xcl-pso worker, 182–196 s, 3/3). Reverting c685e12 (Recompiler: flatten direct DXIL root-UAV loads for compute #2368) makes it go away in 2/2 runs; reported with the details on Recompiler: flatten direct DXIL root-UAV loads for compute #2368.
    • A XCL-side eviction of unused pipelines is not possible as described: XCL keeps no reference to the title's pipeline objects (only address sets), so forget_pso runs only when the title releases, and the code is freed only when the last reference goes. The only lever XCL has is not creating a real pipeline at all (the stand-in path), which is already there.

    Logs stay local (they contain title data).

    AI use: omp (DeepSeek V4.1 Flash 1017) ran the builds and the legs, summed the DXIL from the logs, and wrote this comment.

  15. Eterst commented on Nov 25, 2026

    @Eterst
    Contributor

    Same limit on another card and driver: RTX 4070 SUPER 12 GB, driver 616.92, Windows 10 19045 (i7, 32 GB, release build of a tree based on main 06055a7).

    shader_code_limit (default MODE=keep):

    keep: 256 pipelines, 438 MB of driver blobs, device ok
    keep: 261 pipelines, 446 MB of driver blobs, device removed (0x887a0005)
    

    The retail title's late removal here looks like the same one. It comes at the same point of the title in every run (the last frame before it is 2,300–2,480, at 261–303 s depending on the settings), with XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1:

    • XCL_DRED=1: page fault VA 0x0, no allocations; no list left unfinished in the breadcrumbs.
    • No TDR (no Display 4101 / nvlddmkm 153 in the System log at that time).
    • An ETW trace (Microsoft-Windows-DxgKrnl): the GetDeviceState events (id 182, field DeviceState) for the title's device read 1 until 169 ms before the runtime's last event and 6 from 68 ms before it, so the DMA fault state as in Recompiler: bound descriptor heap indices from T# and S# words to the heap #1215, set without a TDR. The last GPU work of the process completed 170 ms before; the trace has no events at all in between, so the moment itself is not in it.
    • It does not move with video memory: it came at 9.6 GB local as well as at 12.3 GB, and skipping the copies that were in flight did not stop it.

    Code size, as a data point for "less compiled code in use at once": the driver blobs of a full precompile on this card (xcl shaders --precompile --only cs --pipelines, then xcl pipelines from the journal; split wave64, XCL_DIRECT_SPLIT_INSTRUCTIONS=0):

    blobs total median 90th pct largest
    compute (rebuilt by the run) 2,227 905 MB 215 KB 1.03 MB 2.58 MB
    graphics 1,104 330 MB

    308 compute programs are over 1 MB (343 MB together). A GPL-3 layer for the same title, fxceless/victory-fork, reports 3,385 pipelines in a 366 MB pipeline library on an RTX 4070 and no device loss through the part where it is removed here (from its README; not measured by me). If that holds, its code is about a third of ours a pipeline.

    Not tested: MODE=drop / MODE=unused; whether nvwgf2umx.dll returns E_INVALIDARG at the removal; the sum of code in use in the title.

    AI use: Claude Code (Claude Opus 5.5) ran the test, the title runs and the trace, and wrote this; posted with my OK.

  16. 42 remaining items

  17. veyn-sudo commented on Nov 26, 2026

    @veyn-sudo
    Author

    @Kalmarv right, XCL_HEAP_FLAT was not set, so #2427's form was off in those runs. Here is the split, the same way as before: the 926 used compute records, GetCachedBlob summed per record, RTX 2070 SUPER, driver 617.14, the same merged tree.

    switches what is active DXIL driver code
    none #2576 247.6 → 220.8 MB (−10.8 %) 328.3 → 308.1 MB (−6.2 %)
    XCL_DXIL_OUTLINE=1 #2576 + #2567 247.6 → 179.4 MB (−27.5 %) 328.3 → 256.6 MB (−21.8 %)
    XCL_DXIL_OUTLINE=1 XCL_HEAP_FLAT=1 all three 247.6 → 178.0 MB (−28.1 %) 328.3 → 253.6 MB (−22.7 %)

    AI use: Claude Code (Claude Opus 5.5) ran the builds and wrote this.

  18. Kalmarv commented on Nov 26, 2026

    @Kalmarv
    Contributor

    @veyn-sudo thank you for the split, that is exactly what was missing. Each of the three PR descriptions will cite its own step as cumulative and offline, in your order.

    AI use: Claude Code, Claude Opus 5.5 wrote this reply.

  19. afpruivo commented on Nov 26, 2026

    @afpruivo

    RTX 3090 24 GB (driver 621.40): a repeat of @Anon64's 1024 / 2048 MB result on nvidia-dev af2cecc4 (#2590 (comment)), with #2551 instead of the branch's preparation. With a 1 GiB heap the device was removed in 2 of 2 runs (341 s, 199.6 s); with 2 GiB, in 0 of 2 (480 s each). It fits @PetrSeifert's reading above (#2403 (comment)) that the title fills a 1 GiB heap on this tree. Two pairs on one card, so read it as a direction, not a rate.

    Setup

    heap run world start (#101) end frames after world start peak commit
    1 GiB 1 104.2 s 0x887a0005 at 341 s 260 41.3 GB
    2 GiB 1 114.9 s no removal, 480 s 207 44.8 GB
    1 GiB 2 113.9 s 0x887a0005 at 199.6 s 263 41.4 GB
    2 GiB 2 96.3 s no removal, 480 s (no submissions after 438.6 s) 262 45.9 GB
    • Both removals were silent: no DRED breadcrumbs, and no Windows 4101 (TDR) event that day.
    • Video memory stayed under budget: 17.4–20.4 GB local against a DXGI budget of 22.3–23.6 GB.
    • 2 GiB keeps the device, but the title is not playable: about 210–260 frames in the 6 minutes after the world start. In each run, 22–83 large compute programs were still built with no driver blob after 90 s.
    • 2 GiB costs memory: up to 45.9 GB committed. That fits on this 32 GB machine only because the page file is raised.

    Not tested: more than two runs per heap; 1.5 GiB; a count of the shader code in use; other cards; main + #2551.

    AI use: Claude Code (Claude Opus 5.5) ran the builds and runs on my machine (the elevated profile writes were mine), read the logs and drafted this. Checked by me before posting.

  20. joeypercia commented on Nov 26, 2026

    @joeypercia
    Contributor

    RTX 4070 Ti 12 GB (621.40): 1 GiB moves the wall, 2 GiB removes it for these runs. The newer retail title on nvidia-dev af2cecc4, with split programs' whole forms built in preparation (#2794) and warm caches. The same tree and settings throughout; only the profile's size changed (xcl nvprofile install --mb N, #2590).

    shader heap runs outcome
    512 MB (default) 10 (on c044dc6d) removed at 122–207 s, DRED VA 0x0
    1 GiB 4 through the world load, then removed at 282, 322, 353 and 404 s. DRED had no breadcrumbs. In one of them, ~900 KB compute pipelines were made from the driver cache ~0.1 s before the removal (322.5 s against 322.6 s); in another, at the same moment as it
    2 GiB 2 no removal; both ran to the 420 s cap (465 s and 440 s into the run)
    • Video memory was at 15.9–16.0 GB against a 10.5 GB budget in the 2 GiB runs, as high or higher than in the 1 GiB ones. So the late removals at 1 GiB were the code heap again, not the overcommit.
    • The title presents about 0.2 fps in the world in both arms (58–59 frames in the last ~250 s). That's the video memory past the budget ([OFFICIAL] Swarm: RAM and VRAM use down, towards stable 30 FPS on AMD and NVIDIA #2688), not this.

    Two runs is little, but it fits the 1 GiB runs' compile timing. Not tested: 1.5 GiB, other cards, and whether #2576/#2567-style smaller code gets 1 GiB there too. (Claude Code, Claude Opus 5.5)

  21. einfachama commented on Nov 26, 2026

    @einfachama
    Contributor

    RTX 4060 8 GB (Ada), driver 621.24: the test is removed at 262 pipelines / 448 MB, like the other cards. In my retail title the device goes with 359–388 MB of translated code bound, about 90 MB of it graphics.

    Ryzen 7 5800X, 32 GB RAM, Windows 11 Pro 26300.9974, DXC 1.9.2602.17, release.

    The test (main 06c9f55 plus this issue's test file, unchanged, defaults): keep removed at 262 / 448 MB, the line before 256 / 438 MB; drop and unused kept all 600 / 1027 MB. So 8 GB of video memory changes nothing here: the same 262 pipelines / 448 MB as the 10 GB 3080 on the same driver, and within one pipeline of the 16 GB 4060 Ti (261 / 446 MB).

    The title: 139 runs of 240 s, same scripted presses, two builds alternating:

    Cache: HLSL path, XCL_HEAP_WINDOWS=1, compute precompiled on 06c9f55, six warm-up runs, and that cache state restored before every run. 368 of each run's 370 large pipelines came with a cached driver blob.

    end M MD2 MD2 counter at the end
    0x887a0005 23 38 359–388 MB (median 373.5), 1023–1105 pipelines; compute 269–298, graphics 90
    title's watchdog (#846) 19 48 343–387 MB (median 362)
    0x887a0006 3 6 five before the world's first split, 0.3–1.2 MB
    240 s in the menus (no world load) 2 0 –
    • In the menus 0.3 MB is bound while 403 MB of pipelines are alive. Bound passes 300 MB 0.7–3.3 s after the world's first mid-list Wait split, and every 0x887a0005 came 2.5–10.2 s after it (median 4.9).
    • Bound but never dispatched or drawn: 0 at every removal.
    • Under 365 MB: 4 removed / 29 watchdog; 365–375: 19 / 15; 375 and over: 15 / 4. More code bound, more removals, but the figure alone does not separate them.
    • D3D12.X: XCL_GPU_CULPRIT names the dispatches a stalled queue has not done #1323 reports only at a GPU-wait timeout, which 29 of the 38 removals came before; the dispatch it names as unfinished, 777348c43857fdd2 (48 runs), is 40 watchdog runs, 7 removals and one 0x887a0006.

    Not shown: the driver's own heap figure; the cause of any single run; current main; the 1 GiB heap profile, which I have not tested.

    AI use: Claude Code (Claude Opus 5.5) ran the test and the title series, wrote the local counter and drafted this comment; Claude Fable 5.2 (in the Claude app) planned the series and checked the numbers. I read and checked this before posting.

  22. b3IKK commented on Nov 26, 2026

    @b3IKK
    Contributor

    RTX 5080 16 GB (driver 32.0.16.1088): the 2 GiB profile moves the wall from ~100 s to 520 s. Retail 1.0.2.1, XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1, heap-window cache precompiled (--precompile --only cs --pipelines --used-only, 2,898 pipelines in 322.8 s), stack #2404 5b9d4ff + #2519's scratch + #2590's xcl nvprofile.

    shader heap presentation end
    512 MB (3 runs) 98–555 s removed, 101–555 s
    2 GiB 502.2 s removed at 520.1 s

    The 2 GiB run's last split line at 519 s: 3,242 of 36,864 recordings held, under 75 PC allocators; 2,352 put aside with a list on it, 241 in use and free. Local video memory was 21,272 MB against 15,977 MiB (9,010 MB non-local), target pages 10,251 MB; the process committed 44.5 GB. The title presented at ~0.2 fps in the world, as in your 4070 Ti runs, then the device was removed while an xcl-pso-chain-whole thread was in nvgpucomp64.

    So 2 GiB confirms the code-heap lever here, but on this card the run now ends in the same memory overcommit your runs attribute to #2688 (the recording backlog is the new number to watch). I am testing the free_aside release patch from #2404 on this stack next.

    One 2 GiB run also hit an early 0xc0000005 in VCRUNTIME140.dll (16-byte read at 0xc4903a000) at 50 s during texture upload; the next run did not repeat it.

    AI use: OpenCode, Claude Fable 5.2 ran the precompile and the profile runs, read the logs and wrote this.

  23. b3IKK commented on Nov 26, 2026

    @b3IKK
    Contributor

    No device removal in 600 s on the RTX 5080. Stack: #2404 5b9d4ff + #2519's scratch + #2590's xcl nvprofile install --mb 2048 + KDenKC's free_aside patch (#2404) + the precompiled heap-window compute cache.

    • 600 s run, 0 removals, 1,954 frames, exit 0x0. The world is reached and presents at ~0.1 fps.
    • At the end: 281 programs split, 2,372 pieces, 15,095 chained dispatches in 160,926 slabs, 0 whole (9 of 33,253 ExecuteIndirect chains ran the whole form), 0 slabs lost.
    • The last 180 s are not the device: they are cold pipeline compiles on title threads (compute 892 KB DXIL in 18.8 s, graphics 438 KB in 3.2 s, driver blob absent). used-only precompiled 1,305 programs; the later areas need pipelines it passed over.
    • VRAM is still over the card: 21,229 MB local against 15,977 MiB, target pages 10.4 GB, 48,348 chain recordings (3,555 held; 2,126 put aside with a list). That is the [OFFICIAL] Swarm: RAM and VRAM use down, towards stable 30 FPS on AMD and NVIDIA #2688 overcommit, now the reason the world runs at ~0.1 fps.
    • Two 2 GiB runs without the free_aside patch presented to 502 s and were removed at 520 s with 36,864 recordings; with the patch the same point passes. The patch's aside_sweep_keeps_recordings_made_after_backing_reuse test passes here.

    So the 512 MB code heap was the 100–520 s removal; at 2 GiB it is gone on this machine. The remaining world-load walls are the unprecompiled later pipelines and the VRAM overcommit.

    AI use: OpenCode, Claude Fable 5.2 ran the precompile, the profile runs and the patched 600 s run, read the logs and wrote this.

  24. b3IKK commented on Nov 26, 2026

    @b3IKK
    Contributor

    Full compute precompile on the 5080 (2 GiB profile, heap windows, free_aside patch): 2,689 programs, 8,684 pipelines, 0 refused, 0 errors, 9.7 min (3,238 blobs reused from the earlier used-only pass). The 600 s run then presented to 542.1 s with 0 device removals (2,034 frames), but ended in a host 0xc0000005 in VCRUNTIME140.dll+0x1aad6, a 16-byte read at 0x859810000, at 543.0 s. Local video memory 21,602 MB; target pages 10,640 MB.

    That is the same crash shape as the one-off 50 s crash in the first 2 GiB run (0xc4903a000); the 600 s used-only run on the same 2 GiB profile had neither. It looks like a latent XCL window/texture-copy bug exposed by the larger driver reserve, not the code heap. I am switching to the 1 GiB profile to see whether the AV disappears and where the code wall lands with the full precompile.

    AI use: OpenCode, Claude Fable 5.2 ran the precompile and the 600 s run, read the logs and wrote this.

  25. b3IKK commented on Nov 26, 2026

    @b3IKK
    Contributor

    1 GiB is the stable profile on the 5080: 600 s, 0 removals, 0 crashes. With the full compute precompile (2,689 programs / 8,684 pipelines), the free_aside patch and heap windows:

    • 2,014 frames, exit 0x0; the 2 GiB 0xc0000005 (VCRUNTIME, high-VA 16-byte read) does not occur at 1 GiB.
    • World presents at ~0.2 fps through ~420 s; the last 180 s compile graphics PSOs (287–316 KB, driver blob absent) and a few compute PSOs, so no presents there.
    • 76,155 chain recordings at 600 s, 4,334 held (3,078 put aside with a list, 909 busy, 347 free); 20,952 MB local video memory, target pages 10,558 MB.

    So the 1 GiB heap + full compute precompile + the patch carries the title through 600 s without the device removal on this card; the next cold wall is the graphics pipelines that --only cs --pipelines does not build. I am running a second 1 GiB run on the now-warmer graphics blobs to see whether presentation continues past 420 s.

    AI use: OpenCode, Claude Fable 5.2 ran the profile comparison and the 600 s runs, read the logs and wrote this.

  26. b3IKK commented on Nov 26, 2026

    @b3IKK
    Contributor

    Stable world for 600 s: 0 device removals, 0 crashes, frames to 599.2 s on the RTX 5080 (retail 1.0.2.1, Windows 11 26300). The run ended only at XCL's 600 s timer, exit 0x0.

    Stack:

    At 600 s: 2,138 frames; 0 whole forms (328 programs split, 2,809 pieces, 32,993 dispatch-chain dispatches in 474,538 slabs; 85,635 ExecuteIndirect chains, 30 of them whole, 0 slabs lost); 118,628 chain recordings, 5,065 held (3,819 put aside with a list); 21,980 MB local video memory, target pages 11,365 MB.

    The world presents at ~0.3 fps (32–34 frames per 2 min) — the #2688 VRAM overcommit — but it no longer crashes or stops presenting. This is the first full-window stable world on this machine. The individual pieces are all open PRs/patches; the 2 GiB profile is the only machine-level setting.

    AI use: OpenCode, Claude Fable 5.2 installed the profile, ran the 600 s stack, read the log and wrote this.

  27. b3IKK commented on Nov 26, 2026

    @b3IKK
    Contributor

    Reproduction: a second 600 s run of the same stack just finished exit 0x0 with 0 device removals, 0 crashes, 1,752 frames and the last present at 599.2 s (world at 33–46 frames per 2 min, ~0.3 fps). Same 2 GiB heap, #2404 + #2519 + #684 + #2877 (#2841) + free_aside + heap windows/full precompile. So the stable world is 2 of 2 runs here, not a one-off.

    AI use: OpenCode, Claude Fable 5.2 ran the second window and wrote this.

  28. throny commented on Nov 27, 2026

    @throny
    Collaborator

    Data for this issue from an RTX 4080 16 GB (driver 621.40): with the 1 GiB profile of #2590 the device was removed (0x887a0005; DRED: state 0, no page fault, no list in flight) in nine runs, each time when 278-360 MB of DXIL of large pipelines had been built, whether that took 145 s or 588 s. With the profile at 2 GiB the same build and switches ran 900 s twice without a removal. Table and details: #2688 (latest comments). AI use: Claude Code (Claude Fable 5.2).

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