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
    Contributor

    @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
    Contributor

    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. 52 remaining items

  17. 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.

  18. 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.

  19. 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).

  20. brainhay5 commented on Nov 29, 2026

    @brainhay5

    RTX 5070 Ti 16 GB, 610.88: a 2048 MB reserve does not stop it, and no removal is ever logged

    Data alongside @Kalmarv's 5070 Ti result above (1 GiB, not removed in 300 s). Same card model and title,
    driver 610.88, Windows, retail 1.0.2.1.

    configuration last present frames 0x887a0005
    stock 512 MB 63.3 s 1500 never logged
    2048 MB via #2590 (nvprofile status → shader heap 2048 MB, binary runs as xcl.exe) 49.5 s 1200 never logged
    2048 MB + XCL_TEXTURE_LEVEL_PAGES=1 51.0 s 1200 never logged, VRAM 15.3 → 9.7 GB
    PR #851 (4bf6d60) 49.9 s 1200 never logged

    After the stop, presenting never resumes: GPU 0%, VRAM held, XCL keeps compiling at ~77 % of four cores
    for minutes. No TDR is raised on the machine either (Windows Event 4101: none on the day).

    That is the part I would like to understand: on this card the 2 GiB reserve does not remove the stop,
    while 1 GiB did for @Kalmarv
    , and no removal ever surfaces in our logs. Two readings I cannot tell
    apart:

    • our stop (~60 s, ~1500 frames, during the loading phase, 30 fps decaying to ~20 fps first) is a
      different failure that happens earlier than the 86–130 s removal, or
    • the profile is not taking effect for a process started the way ours is (a scheduled task in the
      logged-in session, XCL_NETWORK=0 XCL_PREPARE=0).

    Related observation, which may be downstream and not the cause: every run that gets far enough logs
    bridged Wait64BitValueX ... wait-before-signal (prod=qNone, or prod=qSome(1)/tySome(0) with
    #851) — but always 9–20 s after presenting has already stopped.

    If anyone has the 2048 MB profile confirmed against a 5070 Ti, or sees this early stop without any
    removal in the log, that would settle which reading is right. Full logs for every row above are
    available.

    AI use: an agent ran the builds and runs, read the logs, and wrote this comment.

  21. gefydev commented on Nov 30, 2026

    @gefydev
    Member

    On our GTX 1650 (driver 621.24, 4 GB VRAM, 16 GB RAM), a previous Lockhart run with a 512 MiB shader heap reached device removal (0x887A0005). With the 1,024 MiB xcl.exe NVIDIA profile, a warmed cache, and a local capture diagnostic, we recorded one 3D world frame. XCL then stopped on a GPU queue wait, with no device removal or OOM logged. Cache state and diagnostic capture differed between runs, so this does not isolate the heap size. Full build, flags, and telemetry in the run report.

  22. brainhay5 commented on Nov 30, 2026

    @brainhay5

    Cross-check from an RTX 5070 Ti (16 GB, driver 610.88) — same signature, so this may be one bug, not two:

    • 1500 frames presented at 60.96 s, 1800 at 83.10 s (13.6 fps by then), then zero frames for 1117 s with the process still alive.
    • XCL_DRED=1 with page faults and last operations recorded: no 0x887a0005, no device-suspended, no page fault, no breadcrumb — nothing was removed.
    • Sync state sampled at 60 / 70 / 80 s: pending title ID3D12Fences: none, XCL's own queue waits unmet: none, 0 GPU waits armed.
    • GPU at 0 % and VRAM flat afterwards, while XCL kept building pipelines at 1–2/s for minutes.

    The one thing that does look like a queue wait: two bridged Wait64 cells recorded at the frame where presenting stopped, both reporting executed no, and in one run prod=qNone / wait-before-signal (the #2443 shape). They are logged 9–20 s after the last present, so I had been reading them as downstream of the stop rather than its cause — your "stopped on a GPU queue wait" is the reason I am asking instead of assuming.

    Questions that would tie the two cases together:

    1. Which queue was waiting, and was it a fence or a Wait64 on GPU memory?
    2. If a Wait64: was the producer recorded (prod=qSome(…)) or absent (prod=qNone)?
    3. At the moment of the stop, was anything actually armed — or does your log also say 0 GPU waits armed?
    4. Do you have a thread dump at the stop? An XCL-side dump can be symbolised (xcl.pdb + a PDB resolver), which is how I found the presenting thread parked inside the title-texture refresh rather than in the driver.
    5. Does it reproduce from a cold cache, or only with a warmed one? Ours stops on both, at 63–83 s either way.

    If your queue wait is the same Wait64 with no producer, that is a much better lead than the heap, and it would explain why raising the reserve to 2048 MB changed nothing here.

    AI use: an agent ran the measurements and wrote this comment.

  23. brainhay5 commented on Nov 30, 2026

    @brainhay5

    Correction to my comment above, because I got this wrong and the retraction matters for anyone reading it:

    I reported that with XCL_DRED=1 (page faults and last operations) there was no device removal, no fault and no breadcrumb. On a pristine install — fresh clone of 9dfbe3ea, empty caches, empty build directory, saves restored — the same title on the same card does this:

    presents stop            50.2 s  (1200 frames, 26.5 fps, decaying)
    first 0x887a0005        137.9 s  — 88 seconds AFTER the last present
                            383 lines, e.g.
       D3D12.X: CreatePlacedResourceX at 0x…: … a resource of its own (0x887a0005)
       D3D12.X: view at 0x…: the resource cannot be made (0x887a0005)
    

    So the device is removed at or near the presenting stop. It becomes visible only when the title next creates a placed resource, ~88 s later. My "no removal" reading was an artefact of inspecting the log at the wrong moment — the removal had happened, nothing had queried it yet — and I withdraw that part of the report.

    What stands from the original comment: the presenting thread is inside the title-texture refresh, GPU idle, no pending fences, and raising the shader-code reserve to 2048 MB changed nothing. What changes: the removal is real, so the #2403 / #3277 family is consistent with our case again — but if it is the same removal, it is not the 512 MB reserve alone that decides it, since 2 GB did not help.

    Practical note for anyone measuring this: read the log at the end of the run, not when presenting stops. Otherwise the removal is invisible and the case looks like a hang with a healthy device.

    AI use: an agent ran the install and measurements and wrote this correction.

  24. LeonardoS11 commented on Dec 2, 2026

    @LeonardoS11

    Data from an RTX 3080 Ti 12 GB (32-lane waves) that fits this issue, including two ETW traces of the removal. The raised-heap run is not done yet; I will edit this comment with it.

    Setup. RTX 3080 Ti 12 GB, driver 32.0.16.2140, Ryzen 9 5900X, 64 GB, Windows 11 Pro 26200. main f07e426d and the nvidia-dev batch 65e17cc4, release builds, plus local commits that only add diagnostics and scripted input. The newer retail title, Series S profile (lockhart), XCL_RAYTRACING=off XCL_TEXTURE_LEVEL_PAGES=1 XCL_NETWORK=0, default 4-window layout on main. No NVIDIA profile for xcl.exe (default shader heap). Same save in every run: it loads into the city, then scripted walking.

    What happens.

    • main: the device is removed in every run that reaches the world (more than 20 runs): 0x887a0005, 11-55 s after the world starts, frames 1786-2226. About 3-5 fps in the world until then.
    • 65e17cc4: removed in 2 of 2 runs, frames 1997 and 2190 (121 s and 190 s after the world starts).
    • XCL_DRED=pagefault: device state 0, no page fault. Nothing in the Windows System log (no 4101, no nvlddmkm, no LiveKernelEvent). D3D12 debug layer on: no message at the removal.

    ETW (wpr, Microsoft-Windows-Direct3D12 and DXGI providers), two removals.

    • Inside one ID3D12CommandQueue::ExecuteCommandLists the D3D12 journal logs UMD reported device removed. with HRESULT 0x88760870, then Removing device. with 0x887A0005. That Execute returns 3 ms after it began; the ten before it on the same queue took under 0.1 ms each.
    • In the second trace the queue is XCL's own sparse queue, and the list is an upload of 13 small copies (5-69 KB) into a memory window, like dozens before it. So the submission at the removal does not matter here either.
    • A probe (an empty list and a Signal on that queue, then GetDeviceRemovedReason) found the device alive 34 ms before the removal, with no UpdateTileMappings in between.
    • Microsoft-Windows-DxgKrnl delivered no events in either trace, so I cannot add the kernel side. I did not hook nvwgf2umx.dll, so no E_INVALIDARG reading.

    Ruled out on main, one run each (the removal came the same way): VRAM over budget (8.5-9.0 of 10.4 GB), NVIDIA's DXCache (4.25 GB moved away), XCL_TWO_PASS_MB=2048, XCL_TEXTURE_LEVEL_PAGES off, XCL_PAGE_MAPPINGS=0, XCL_VIEW_KEEP=1, XCL_SKIP_CS of the six compute programs recorded last in every removal (it only came earlier), deferring the parked tile unmaps, the GPU virtual address space (the title uses about 40 GB of 1 TiB), the number of reserved resources (200 thousand with 3.2 million mapped tiles in an isolated test: fine), handles and GDI objects, and making the sparse queue wait for the title's queues before mapping (waiting on the GPU hangs the title; waiting on the CPU changes nothing).

    Not tested yet: the shader heap raised with xcl nvprofile (#2590), and the sum of the driver blobs of the pipelines in use at the removal. Both are next.

    AI use: Claude Code (Claude Fable 5.2) ran the tests, read the traces and wrote this comment.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    goal:world-load

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions