Newer retail title (TitleID 7952987A): reaches world loading, then the title's GPU watchdog ("GPU Loc Sig") after ListX #101 stub #505

Open
opened 2026-11-26 04:23:46 +00:00 by github-bot · 287 comments
Owner

@⁠tadymila on GitHub · 2026-11-24 01:04 UTC · original

Setup

i7-9700F (Intel; insn.rs emulation works), RTX 5070 Ti (wave32; no hangs), Windows 11, DXC 1.9.2609, xcl main as of 2026-11-23.

What happens

  • Boots, menus, goes into the world: the title's own crash context shows Game State: Game Running, peds/vehicles spawned, camera in the world. Screen stays on the grey loading screen with the spinner.
  • After 7–14 min: 0xC0000005 write at 0x0 at game_scarlett_master.exe+0x23cf683, same address every run. Stack: +0x4e4ba89, +0x2215c35, +0x71b9a20, +0x2215eca.
  • That site is a deliberate abort: it decodes a 12-byte string to "GPU Loc Sig", calls +0x2215950, then mov dword [0], 0x4D8BD421. Looks like the title's GPU-progress watchdog firing.
  • Shortly before it, in every run: [STUB] d3d12_xs.dll!ID3D12GraphicsCommandList10::#101 (not on PC) first called from game_scarlett_master.exe+0x50a6657 → returning 0x0. My guess: #101 writes a GPU progress label/signal the CPU waits on.
  • At that point: coherent 3998/4095 MB (it was 116/512 MB earlier in loading).

BCPack

Without a BCPack decoder, hundreds of BC1/BC5/BC7 requests were refused and streaming stalled (Streaming Requests: 3811). As a local test I plugged in a BCPack decoder: 2048+ requests decoded, 0 failed. The crash stays the same, so BCPack is not the cause of it, but the title needs BCPack to stream the world.

Also

Breakpad's http_upload reached submit.backtrace.io (HTTP 200, a 32 MB minidump). Maybe block it like the Xbox Live calls?

**@⁠tadymila** on GitHub · 2026-11-24 01:04 UTC · [original](https://github.com/xcl-dev/xcl/issues/505) ### Setup i7-9700F (Intel; insn.rs emulation works), RTX 5070 Ti (wave32; no hangs), Windows 11, DXC 1.9.2609, xcl main as of 2026-11-23. ### What happens - Boots, menus, goes into the world: the title's own crash context shows `Game State: Game Running`, peds/vehicles spawned, camera in the world. Screen stays on the grey loading screen with the spinner. - After 7–14 min: `0xC0000005 write at 0x0` at `game_scarlett_master.exe+0x23cf683`, same address every run. Stack: `+0x4e4ba89, +0x2215c35, +0x71b9a20, +0x2215eca`. - That site is a deliberate abort: it decodes a 12-byte string to **"GPU Loc Sig"**, calls `+0x2215950`, then `mov dword [0], 0x4D8BD421`. Looks like the title's GPU-progress watchdog firing. - Shortly before it, in every run: `[STUB] d3d12_xs.dll!ID3D12GraphicsCommandList10::#101 (not on PC) first called from game_scarlett_master.exe+0x50a6657 → returning 0x0`. My guess: #101 writes a GPU progress label/signal the CPU waits on. - At that point: `coherent 3998/4095 MB` (it was 116/512 MB earlier in loading). ### BCPack Without a BCPack decoder, hundreds of BC1/BC5/BC7 requests were refused and streaming stalled (`Streaming Requests: 3811`). As a local test I plugged in a BCPack decoder: 2048+ requests decoded, 0 failed. The crash stays the same, so BCPack is not the cause of it, but the title needs BCPack to stream the world. ### Also Breakpad's `http_upload` reached `submit.backtrace.io` (HTTP 200, a 32 MB minidump). Maybe block it like the Xbox Live calls?
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:23:46 +00:00
Author
Owner

@⁠Cattn on GitHub · 2026-11-24 01:18 UTC · original

Same stop here (RTX 4070, Ryzen 7 7800X3D, main + #455), so a data point on #101:

At +0x50a6651 and +0x50a666a the title calls slot 101 (call qword ptr [rax+328h]) on the command list as (list, 2, 1) and later (list, 2, 0), around a block of work. Both calls pass only small constants, no address and no value to write. It looks like an on/off toggle of some mode (2), not a GPU progress label. The stub is probably not what starves "GPU Loc Sig", though what the mode is remains unknown.

A likelier lead on NVIDIA is pipeline builds not keeping up once the world loads. Our logs show ~10,000 new shaders at world load and only 5–50 pipelines finishing per 20 s afterwards, the pattern #156 and #499 describe. I'm measuring the backlog per 2 s next and will post it here.

(Disassembly and analysis by Claude Code, Claude Opus 5.5, read-only with dumpbin.)

**@⁠Cattn** on GitHub · 2026-11-24 01:18 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7118972654) Same stop here (RTX 4070, Ryzen 7 7800X3D, main + #455), so a data point on #101: At `+0x50a6651` and `+0x50a666a` the title calls slot 101 (`call qword ptr [rax+328h]`) on the command list as `(list, 2, 1)` and later `(list, 2, 0)`, around a block of work. Both calls pass only small constants, no address and no value to write. It looks like an on/off toggle of some mode (2), not a GPU progress label. The stub is probably not what starves "GPU Loc Sig", though what the mode is remains unknown. A likelier lead on NVIDIA is pipeline builds not keeping up once the world loads. Our logs show ~10,000 new shaders at world load and only 5–50 pipelines finishing per 20 s afterwards, the pattern #156 and #499 describe. I'm measuring the backlog per 2 s next and will post it here. (Disassembly and analysis by Claude Code, Claude Opus 5.5, read-only with `dumpbin`.)
Author
Owner

@⁠Prime1997 on GitHub · 2026-11-24 01:19 UTC · original

Same stop here (RTX 4070, Ryzen 7 7800X3D, main + #455), so a data point on #101:

At +0x50a6651 and +0x50a666a the title calls slot 101 (call qword ptr [rax+328h]) on the command list as (list, 2, 1) and later (list, 2, 0), around a block of work. Both calls pass only small constants, no address and no value to write. It looks like an on/off toggle of some mode (2), not a GPU progress label. The stub is probably not what starves "GPU Loc Sig", though what the mode is remains unknown.

A likelier lead on NVIDIA is pipeline builds not keeping up once the world loads. Our logs show ~10,000 new shaders at world load and only 5–50 pipelines finishing per 20 s afterwards, the pattern #156 and #499 describe. I'm measuring the backlog per 2 s next and will post it here.

(Disassembly and analysis by Claude Code, Claude Opus 5.5, read-only with dumpbin.)

I'll work on this.

Thank you for raising this issue.

**@⁠Prime1997** on GitHub · 2026-11-24 01:19 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7118993538) > Same stop here (RTX 4070, Ryzen 7 7800X3D, main + [#455](https://github.com/ivall/xcl/pull/455)), so a data point on [#101](https://github.com/ivall/xcl/pull/101): > > At `+0x50a6651` and `+0x50a666a` the title calls slot 101 (`call qword ptr [rax+328h]`) on the command list as `(list, 2, 1)` and later `(list, 2, 0)`, around a block of work. Both calls pass only small constants, no address and no value to write. It looks like an on/off toggle of some mode (2), not a GPU progress label. The stub is probably not what starves "GPU Loc Sig", though what the mode is remains unknown. > > A likelier lead on NVIDIA is pipeline builds not keeping up once the world loads. Our logs show ~10,000 new shaders at world load and only 5–50 pipelines finishing per 20 s afterwards, the pattern [#156](https://github.com/ivall/xcl/issues/156) and [#499](https://github.com/ivall/xcl/issues/499) describe. I'm measuring the backlog per 2 s next and will post it here. > > (Disassembly and analysis by Claude Code, Claude Opus 5.5, read-only with `dumpbin`.) I'll work on this. Thank you for raising this issue.
Author
Owner

@⁠sub-north on GitHub · 2026-11-24 01:22 UTC · original

Cross-confirmation from an independent lab, plus two corrections.

The stop reproduces exactly. Same code path, same address, same stack, same parameter set, on a different machine (RTX 4070 Ti SUPER, wave32, Windows 11) and a different day:

unhandled exception 0xc0000005 in <title>+0x23cf683 (write at address 0x0)
stack: +0x4e4ba89, +0x2215c35, +0x71b9a20, +0x2215eca
GPU Loc Sig: 7333478d

The title's own crash context at that moment (it writes crashcontext.log before the upload attempt):

Game State: Game Running        Frame: 1494
Streaming Requests: 3651        TileHeap used: 1671/6236 MB
Camera Position: <-1782.299927, -1914.123901, 6.035758>
Peds: 22/600   Cars: 24/700   BUILDING: 6910/22500   INSTANCE_LIST: 17239/45000
Currently running script threads: 1

So: simulation live in the world, pools populated, camera at a real coordinate — exactly your description.

Correction 1 - slot 101's return value is ignored. Disassembly of the function containing the call site (the log offset is the return address of call qword ptr [rax+0x328], i.e. slot 101 confirmed): the two control-flow joins never test it. One does setne al; the other immediately overwrites rax with mov rax,[rsi+...]. There is no GetCompletedValue or fence wait in the function at all. eax is neither stored nor compared. So 101 is a side-effect call and cannot be "the signal the CPU waits on" - there is no value to wait on. Its arguments are rcx=owner ptr, edx=2, r8d=1 or 0.

Correction 2 - the watchdog label is inline. "GPU Loc Sig" is not in the string table; it is a 13-byte immediate at +0x23cf62e decoded byte-wise with a per-byte key, inside the same 0x73-byte function that null-writes at +0x23cf683. That idiom occurs once in the image. It is a diagnostic label being assembled for the crash report, not a value being compared.

New wall on current main, worth knowing. On 7ebf1b8 the same title gets further (8521 buildings, 83 peds, 238 cars, TileHeap 3639 MB) and then dies before the watchdog, ~290 s in:

D3D12 XDXR Error: DestAccelerationStructureData can not have more than 40b of address set
C++ exception thrown; stack: xboxbvhbuilder.dll+0xd2538, vcruntime140.dll+0x6480
process ends with status 0xe06d7363

Our GPU VAs there are above 2^40 (e.g. 0x1d1ae5c0000). On 85bdf21 this never appears - that build dies at the watchdog instead. If you are testing on main, the BVH path may be killing your run before the watchdog does.

Also: on our side the loader refused every BCPack request with zero decoder present (filled_bytes 0 for BC1/BC5/BC6H/BC7), matching your streaming-stall observation. We would be interested in your local decoder if you are willing to share the approach.

**@⁠sub-north** on GitHub · 2026-11-24 01:22 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7119040299) Cross-confirmation from an independent lab, plus two corrections. **The stop reproduces exactly.** Same code path, same address, same stack, same parameter set, on a different machine (RTX 4070 Ti SUPER, wave32, Windows 11) and a different day: ``` unhandled exception 0xc0000005 in <title>+0x23cf683 (write at address 0x0) stack: +0x4e4ba89, +0x2215c35, +0x71b9a20, +0x2215eca GPU Loc Sig: 7333478d ``` The title's own crash context at that moment (it writes `crashcontext.log` before the upload attempt): ``` Game State: Game Running Frame: 1494 Streaming Requests: 3651 TileHeap used: 1671/6236 MB Camera Position: <-1782.299927, -1914.123901, 6.035758> Peds: 22/600 Cars: 24/700 BUILDING: 6910/22500 INSTANCE_LIST: 17239/45000 Currently running script threads: 1 ``` So: simulation live in the world, pools populated, camera at a real coordinate — exactly your description. **Correction 1 - slot 101's return value is ignored.** Disassembly of the function containing the call site (the log offset is the return address of `call qword ptr [rax+0x328]`, i.e. slot 101 confirmed): the two control-flow joins never test it. One does `setne al`; the other immediately overwrites `rax` with `mov rax,[rsi+...]`. There is no `GetCompletedValue` or fence wait in the function at all. `eax` is neither stored nor compared. So 101 is a side-effect call and cannot be "the signal the CPU waits on" - there is no value to wait on. Its arguments are `rcx`=owner ptr, `edx`=2, `r8d`=1 or 0. **Correction 2 - the watchdog label is inline.** "GPU Loc Sig" is not in the string table; it is a 13-byte immediate at `+0x23cf62e` decoded byte-wise with a per-byte key, inside the same 0x73-byte function that null-writes at `+0x23cf683`. That idiom occurs once in the image. It is a diagnostic label being assembled for the crash report, not a value being compared. **New wall on current main, worth knowing.** On `7ebf1b8` the same title gets further (8521 buildings, 83 peds, 238 cars, TileHeap 3639 MB) and then dies before the watchdog, ~290 s in: ``` D3D12 XDXR Error: DestAccelerationStructureData can not have more than 40b of address set C++ exception thrown; stack: xboxbvhbuilder.dll+0xd2538, vcruntime140.dll+0x6480 process ends with status 0xe06d7363 ``` Our GPU VAs there are above 2^40 (e.g. `0x1d1ae5c0000`). On `85bdf21` this never appears - that build dies at the watchdog instead. If you are testing on main, the BVH path may be killing your run before the watchdog does. Also: on our side the loader refused every BCPack request with zero decoder present (`filled_bytes 0` for BC1/BC5/BC6H/BC7), matching your streaming-stall observation. We would be interested in your local decoder if you are willing to share the approach.
Author
Owner

@⁠emirduran707 on GitHub · 2026-11-24 01:24 UTC · original

A data point from AMD, much earlier than the 7–14 min above: the same stop at 161.7 s.

Setup: RX 9060 XT 16 GB (RDNA4, 64-lane waves), driver 32.0.31044.16, Ryzen 5 5600, 32 GB RAM, Windows 11 Pro 26300, release. Build: main a6f5f7a + #440 (be722a7, the intro video at speed) + #300 (9507d05) + #435 (a94e151), merged locally. XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_FRAME_DUMP=60, A pressed by hand on the first menu.

  • unhandled exception 0xc0000005 in <title>+0x23cf683 (write at address 0x0), GPU Loc Sig = 7333478d (the same value as sub-north's run).
  • World streaming starts at ~62 s; ID3D12GraphicsCommandList10::#101 (not on PC) is first called at 99 s.
  • From the activity (2 s) lines: 108–134 s the title submits (14–116 submits, 1–16 presents per 2 s) with heavy DirectStorage (1 100–3 500 requests per 2 s, up to 379 failed: BCPack refusals). From ~136 s to the stop, every line is 0 submits and 0 presents (a few dispatches, no DirectStorage). No device removal, no E_OUTOFMEMORY, no frame-event wait timed out.
  • Process commit was 27.2 GB at the stop (local video memory 13.9 GB).

So on this machine the watchdog fires after ~26 s in which XCL saw no submit at all from the title, rather than with a backlog of work on the GPU. I have not checked what the title's threads were waiting on.

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

**@⁠emirduran707** on GitHub · 2026-11-24 01:24 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7119072983) A data point from AMD, much earlier than the 7–14 min above: the same stop at 161.7 s. **Setup:** RX 9060 XT 16 GB (RDNA4, 64-lane waves), driver 32.0.31044.16, Ryzen 5 5600, 32 GB RAM, Windows 11 Pro 26300, release. Build: `main` a6f5f7a + #440 (be722a7, the intro video at speed) + #300 (9507d05) + #435 (a94e151), merged locally. `XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_FRAME_DUMP=60`, A pressed by hand on the first menu. - `unhandled exception 0xc0000005 in <title>+0x23cf683 (write at address 0x0)`, `GPU Loc Sig` = `7333478d` (the same value as sub-north's run). - World streaming starts at ~62 s; `ID3D12GraphicsCommandList10::#101 (not on PC)` is first called at 99 s. - From the `activity (2 s)` lines: 108–134 s the title submits (14–116 submits, 1–16 presents per 2 s) with heavy DirectStorage (1 100–3 500 requests per 2 s, up to 379 failed: BCPack refusals). **From ~136 s to the stop, every line is 0 submits and 0 presents** (a few dispatches, no DirectStorage). No device removal, no `E_OUTOFMEMORY`, no frame-event wait timed out. - Process commit was 27.2 GB at the stop (local video memory 13.9 GB). So on this machine the watchdog fires after ~26 s in which XCL saw no submit at all from the title, rather than with a backlog of work on the GPU. I have not checked what the title's threads were waiting on. AI use: Claude Code with Claude Opus 5.5 read the run's log and wrote this comment from my run.
Author
Owner

@⁠emirduran707 on GitHub · 2026-11-24 01:27 UTC · original

Follow-up to my run above: what the title was waiting on in those ~26 s without a submit.

XCL's thread dump at the stop has four title threads with the same stack, inside XCL. Symbolized with a release build of the same tree with CARGO_PROFILE_RELEASE_DEBUG=line-tables-only (I checked that the code bytes at these offsets are identical to the build that ran):

xcl.exe+0x2508f6   hle/d3d12x/bind.rs:671        dispatch → pso_async::resolve_wait
xcl.exe+0xd5d7f    hle/d3d12x/pso_async.rs:173   (resolve_for_bind / resolve_wait)
xcl.exe+0xd5992    hle/d3d12x/pso_async.rs:162   p.cv.wait(done)  – no time limit

So four of the title's threads are in Dispatch, waiting for a compute pipeline that is still being built. At the same moment 10 of the 11 xcl-pso-* workers are idle, xcl-pso-7 waits on a channel, 9 of 10 xcl-dxc-* threads are idle, and one is inside dxcompiler.dll. That fits one compute program whose DXC compile took longer than the ~26 s, with every Dispatch of it blocked meanwhile – on AMD (no driver compile involved in that wait), not only on NVIDIA. I could not tell which program: XCL logs no per-compile time.

Related: #174 (DXC time of compute programs) and #267 (a time limit on the wait – for draws; dispatch calls resolve_wait, which has none).

AI use: Claude Code with Claude Opus 5.5 symbolized the dump and wrote this comment from my run.

**@⁠emirduran707** on GitHub · 2026-11-24 01:27 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7119115539) Follow-up to my run above: what the title was waiting on in those ~26 s without a submit. XCL's thread dump at the stop has four title threads with the same stack, inside XCL. Symbolized with a release build of the same tree with `CARGO_PROFILE_RELEASE_DEBUG=line-tables-only` (I checked that the code bytes at these offsets are identical to the build that ran): ``` xcl.exe+0x2508f6 hle/d3d12x/bind.rs:671 dispatch → pso_async::resolve_wait xcl.exe+0xd5d7f hle/d3d12x/pso_async.rs:173 (resolve_for_bind / resolve_wait) xcl.exe+0xd5992 hle/d3d12x/pso_async.rs:162 p.cv.wait(done) – no time limit ``` So four of the title's threads are in `Dispatch`, waiting for a compute pipeline that is still being built. At the same moment 10 of the 11 `xcl-pso-*` workers are idle, `xcl-pso-7` waits on a channel, 9 of 10 `xcl-dxc-*` threads are idle, and one is inside `dxcompiler.dll`. That fits one compute program whose DXC compile took longer than the ~26 s, with every `Dispatch` of it blocked meanwhile – on AMD (no driver compile involved in that wait), not only on NVIDIA. I could not tell which program: XCL logs no per-compile time. Related: #174 (DXC time of compute programs) and #267 (a time limit on the wait – for draws; `dispatch` calls `resolve_wait`, which has none). AI use: Claude Code with Claude Opus 5.5 symbolized the dump and wrote this comment from my run.
Author
Owner

@⁠requiemsnkrp on GitHub · 2026-11-24 01:31 UTC · original

Same stop on an RTX 3060 12 GB (Ampere, wave32) with 16 GB of RAM, on current main 508a0c7. The pipeline backlog stands out.

Setup: RTX 3060 12 GB, driver 621.24; Ryzen 5 5600X; 16 GB RAM; Windows 11 Pro 26200; release build of 508a0c7, unmodified. XCL_NETWORK=0, XCL_ACTIVITY=1, menus walked with XCL_PRESS_AT (A at 14/17/21 s, then every 6 s from 125 to 197 s).

  • unhandled exception 0xc0000005 in game_scarlett_master.exe+0x23cf683 (write at address 0x0) at 326.9 s, same stack (+0x4e4ba89, +0x2215c35, +0x71b9a20, +0x2215eca).
  • ID3D12GraphicsCommandList10::#101 (not on PC) was first called at 288.2 s from +0x50a6657.
  • From the activity (2 s) lines: presents fall from 19 per 2 s at 142 s to 2 at 162 s and about 0 from 182 s. Submits are 0 in every line from 282 s to the stop, the same ~30–40 s without a submit as @⁠emirduran707's run.
  • report.json at the stop: background_pipelines: [46, 0, 58715], i.e. 46 built, 0 failed, 58 715 still building. That fits the pipeline-backlog lead of @⁠Cattn and the unbounded resolve_wait in dispatch.
  • Memory from the memory: lines: process commit 15.6 GB at 122 s, 26.4 GB at 182 s and 40.1 GB at the stop. Local video memory reached 13.8 GB on the 12 GB card (4.6 GB non-local).
  • No XDXR … more than 40b of address error on 508a0c7: this run gets to the watchdog.
  • After the stop, the process did not end. The log stops at the crash line: no process ends, no thread dump, no breakpad lines. The window stayed black at 0 fps until I killed xcl.exe a few minutes later. So I have no thread dump of this run to add to the one above.

Not tested: #267 or a time limit on resolve_wait; a run without XCL_NETWORK=0; AMD.

AI use: Claude Code (Claude Opus 5.5) ran the session on my machine, read the log and report.json, and wrote this comment.

**@⁠requiemsnkrp** on GitHub · 2026-11-24 01:31 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7119177557) Same stop on an RTX 3060 12 GB (Ampere, wave32) with 16 GB of RAM, on current `main` `508a0c7`. The pipeline backlog stands out. **Setup:** RTX 3060 12 GB, driver 621.24; Ryzen 5 5600X; 16 GB RAM; Windows 11 Pro 26200; release build of `508a0c7`, unmodified. `XCL_NETWORK=0`, `XCL_ACTIVITY=1`, menus walked with `XCL_PRESS_AT` (A at 14/17/21 s, then every 6 s from 125 to 197 s). - `unhandled exception 0xc0000005 in game_scarlett_master.exe+0x23cf683 (write at address 0x0)` at **326.9 s**, same stack (`+0x4e4ba89, +0x2215c35, +0x71b9a20, +0x2215eca`). - `ID3D12GraphicsCommandList10::#101 (not on PC)` was first called at 288.2 s from `+0x50a6657`. - From the `activity (2 s)` lines: presents fall from 19 per 2 s at 142 s to 2 at 162 s and about 0 from 182 s. Submits are 0 in every line from 282 s to the stop, the same ~30–40 s without a submit as @⁠emirduran707's run. - `report.json` at the stop: `background_pipelines: [46, 0, 58715]`, i.e. 46 built, 0 failed, **58 715 still building**. That fits the pipeline-backlog lead of @⁠Cattn and the unbounded `resolve_wait` in `dispatch`. - Memory from the `memory:` lines: process commit 15.6 GB at 122 s, 26.4 GB at 182 s and 40.1 GB at the stop. Local video memory reached 13.8 GB on the 12 GB card (4.6 GB non-local). - No `XDXR … more than 40b of address` error on `508a0c7`: this run gets to the watchdog. - After the stop, the process did not end. The log stops at the crash line: no `process ends`, no thread dump, no breakpad lines. The window stayed black at 0 fps until I killed `xcl.exe` a few minutes later. So I have no thread dump of this run to add to the one above. **Not tested:** #267 or a time limit on `resolve_wait`; a run without `XCL_NETWORK=0`; AMD. AI use: Claude Code (Claude Opus 5.5) ran the session on my machine, read the log and `report.json`, and wrote this comment.
Author
Owner

@⁠13hourstilliland on GitHub · 2026-11-24 01:50 UTC · original

Static read of the retail exe (1.0.2.1), RVAs only, no run. Short version: +0x23cf683 looks like the same stall watchdog as #232, not a separate crash.

  • The "GPU Loc Sig" function (+0x23cf620) is installed as the watchdog's report hook: the init code at +0x23cf6f7 does lea rcx,[+0x23cf620]; call +0x22161f0, and that function stores rcx into global +0x71b6348 (only when a per-thread flag byte at [[gs:0x58]]+0x12d8 has bit 0 set).
  • The #232 watchdog (+0x2215a60) reads +0x71b6348 before its own null write and does call rax at +0x2215c33. That call's return address is +0x2215c35, which is the +0x2215c35 in your stack. So the fault is inside the hook, with the watchdog already decided to abort. The decode in #232 says the hook is NULL; here it evidently isn't.
  • Two ways the watchdog decides to abort, both reaching +0x2215c16: (A) a scoped timer registered through +0xb5b6b0 (push) / +0xb5b6f0 (pop) is >= 300.0f old (the table decode already posted); (B) when no scope is active ([+0x71b6334] == 0), a heartbeat timestamp at +0x71b6338 has not changed for 30 one-second ticks.
  • The heartbeat is written only by +0x22159f0, called from four sites: +0x120799, +0xc9e368, +0x1c82b67, +0x1c82bc1 (the last two in a loop-tick function at +0x1c82b20).
  • Inferred: emirduran707's ~26 s with zero submits fits route B (about 30 s) better than route A (300). If the title threads that post the heartbeat are the ones blocked in Dispatch -> resolve_wait (no time limit), the title aborts itself.
  • Slot 101: both call sites (+0x50a6651, +0x50a666a, args (2,1) / (2,0)) ignore the return value, so I agree with Cattn and sub-north that the stub is not what the watchdog waits on.

Unknown, one debugger check each: at the stop, [+0x71b6334] (zero means route B); which thread the last heartbeat write came from (watch +0x71b6338); and whether those threads are the ones XCL dumps in resolve_wait.

AI use: Claude Code (Claude Opus 5.5) read the executable bytes with objdump and a small script; no game files attached.

**@⁠13hourstilliland** on GitHub · 2026-11-24 01:50 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7119493025) Static read of the retail exe (1.0.2.1), RVAs only, no run. Short version: `+0x23cf683` looks like the same stall watchdog as #232, not a separate crash. - The "GPU Loc Sig" function (`+0x23cf620`) is installed as the watchdog's report hook: the init code at `+0x23cf6f7` does `lea rcx,[+0x23cf620]; call +0x22161f0`, and that function stores rcx into global `+0x71b6348` (only when a per-thread flag byte at `[[gs:0x58]]+0x12d8` has bit 0 set). - The #232 watchdog (`+0x2215a60`) reads `+0x71b6348` before its own null write and does `call rax` at `+0x2215c33`. That call's return address is `+0x2215c35`, which is the `+0x2215c35` in your stack. So the fault is inside the hook, with the watchdog already decided to abort. The decode in #232 says the hook is NULL; here it evidently isn't. - Two ways the watchdog decides to abort, both reaching `+0x2215c16`: (A) a scoped timer registered through `+0xb5b6b0` (push) / `+0xb5b6f0` (pop) is >= 300.0f old (the table decode already posted); (B) when no scope is active (`[+0x71b6334] == 0`), a heartbeat timestamp at `+0x71b6338` has not changed for 30 one-second ticks. - The heartbeat is written only by `+0x22159f0`, called from four sites: `+0x120799`, `+0xc9e368`, `+0x1c82b67`, `+0x1c82bc1` (the last two in a loop-tick function at `+0x1c82b20`). - Inferred: emirduran707's ~26 s with zero submits fits route B (about 30 s) better than route A (300). If the title threads that post the heartbeat are the ones blocked in `Dispatch -> resolve_wait` (no time limit), the title aborts itself. - Slot 101: both call sites (`+0x50a6651`, `+0x50a666a`, args `(2,1)` / `(2,0)`) ignore the return value, so I agree with Cattn and sub-north that the stub is not what the watchdog waits on. Unknown, one debugger check each: at the stop, `[+0x71b6334]` (zero means route B); which thread the last heartbeat write came from (watch `+0x71b6338`); and whether those threads are the ones XCL dumps in `resolve_wait`. AI use: Claude Code (Claude Opus 5.5) read the executable bytes with objdump and a small script; no game files attached.
Author
Owner

@⁠tadymila on GitHub · 2026-11-24 01:55 UTC · original

Confirming @⁠Cattn's and @⁠emirduran707's pipeline-backlog theory with numbers, and with a way to keep the title alive past the watchdog:

Update: past the world-loading crash (local patches)

1. BCPack: I plugged a BCPack decoder (BC1, BC3–BC7) into hle/dstorage.rs for a local test: zlib first, then BCPack, as on the console. 2048+ requests decoded, 0 failed, and streaming no longer stalls on refusals. (The decoder comes from VIctory, GPL-3.0-or-later, so it can't go into XCL as is. It just shows that BCPack is what this title needs to stream the world.)

2. Correction on #101: VIctory's measured layout for this title names list slot 101 DriverHintX(feature, value), and VIctory also returns 0 there. So that stub is not the cause.

3. The crash is the title's own watchdog. Thread at +0x2215af6:

  • every second (Sleep(1000)) it checks a main-thread heartbeat; if it hasn't changed 30 times in a row (mov ebp,0x1e … dec ebp; je), it calls the callback at [+0x71b6348] (+0x23cf620, which decodes "GPU Loc Sig" and writes to 0) and then mov dword [0],0 at +0x2215c35;
  • a second check walks a 64-entry table of in-flight timestamps (+0x6844a20, stride 0x48) and fires on the same path when one gets too old (jae at +0x2215bdc).
  • In every crash rbx = 0, which is the heartbeat path: the main thread stalled for 30 s.

4. With the watchdog off, the title keeps running (in-memory patch before the entry point; the game folder is untouched): +0x2215c70: 74 04 -> 90 90, +0x2215bdc: 73 2e -> 90 90. It's at 40+ minutes now, no crash, still on the loading screen.

5. What stalls the main thread, on NVIDIA: compute PSO creation. The world's compute pipelines are 130–380 KB of DXIL each (wave64 emulated on wave32) and take 15–25 s each to build in the NVIDIA driver, one after another on one thread:
[1737 s] 371688 B, [1755 s] 310308 B, [1773 s] 356320 B, [1787 s] 294160 B, [1811 s] 378660 B …
345 compute PSOs so far, most built once or twice.

6. Also seen: Wait64BitValueX timed out after 2000 ms at 0x70417fe58 / fe10 / fee8 (op 7, want 0x28e; memory holds 0), only 3 in total, all at ~1240 s.

Setup: i7-9700F, RTX 5070 Ti, DXC 1.9.2609, NVIDIA shader cache set to unlimited. I'll report what the next run (with a warm cache) shows.

**@⁠tadymila** on GitHub · 2026-11-24 01:55 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7119576585) Confirming @⁠Cattn's and @⁠emirduran707's pipeline-backlog theory with numbers, and with a way to keep the title alive past the watchdog: ## Update: past the world-loading crash (local patches) **1. BCPack:** I plugged a BCPack decoder (BC1, BC3–BC7) into `hle/dstorage.rs` for a local test: zlib first, then BCPack, as on the console. 2048+ requests decoded, 0 failed, and streaming no longer stalls on refusals. (The decoder comes from VIctory, GPL-3.0-or-later, so it can't go into XCL as is. It just shows that BCPack is what this title needs to stream the world.) **2. Correction on #101:** VIctory's measured layout for this title names list slot 101 `DriverHintX(feature, value)`, and VIctory also returns 0 there. So that stub is not the cause. **3. The crash is the title's own watchdog.** Thread at `+0x2215af6`: - every second (`Sleep(1000)`) it checks a main-thread heartbeat; if it hasn't changed 30 times in a row (`mov ebp,0x1e` … `dec ebp; je`), it calls the callback at `[+0x71b6348]` (`+0x23cf620`, which decodes "GPU Loc Sig" and writes to 0) and then `mov dword [0],0` at `+0x2215c35`; - a second check walks a 64-entry table of in-flight timestamps (`+0x6844a20`, stride 0x48) and fires on the same path when one gets too old (`jae` at `+0x2215bdc`). - In every crash `rbx = 0`, which is the heartbeat path: the main thread stalled for 30 s. **4. With the watchdog off, the title keeps running** (in-memory patch before the entry point; the game folder is untouched): `+0x2215c70: 74 04 -> 90 90`, `+0x2215bdc: 73 2e -> 90 90`. It's at 40+ minutes now, no crash, still on the loading screen. **5. What stalls the main thread, on NVIDIA:** compute PSO creation. The world's compute pipelines are 130–380 KB of DXIL each (wave64 emulated on wave32) and take **15–25 s each** to build in the NVIDIA driver, one after another on one thread: `[1737 s] 371688 B, [1755 s] 310308 B, [1773 s] 356320 B, [1787 s] 294160 B, [1811 s] 378660 B` … 345 compute PSOs so far, most built once or twice. **6. Also seen:** `Wait64BitValueX timed out after 2000 ms at 0x70417fe58 / fe10 / fee8 (op 7, want 0x28e; memory holds 0)`, only 3 in total, all at ~1240 s. Setup: i7-9700F, RTX 5070 Ti, DXC 1.9.2609, NVIDIA shader cache set to unlimited. I'll report what the next run (with a warm cache) shows.
Author
Owner

@⁠tadymila on GitHub · 2026-11-24 01:57 UTC · original

@⁠sub-north BCPack: I ported the decoder from VIctory (crates/.../bcpack.rs + bcpack-tables.bin, GPL-3) into xcl/src/hle/bcpack.rs. dstorage.rs now inflates zlib first, then decodes BCPack modes 1,3,4,5,6,7 instead of refusing them. The streaming stall is gone; the log shows "DirectStorage: BCPack decoded N requests (0 failed)". Can share the diff.

**@⁠tadymila** on GitHub · 2026-11-24 01:57 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7119615054) @⁠sub-north BCPack: I ported the decoder from VIctory (crates/.../bcpack.rs + bcpack-tables.bin, GPL-3) into xcl/src/hle/bcpack.rs. dstorage.rs now inflates zlib first, then decodes BCPack modes 1,3,4,5,6,7 instead of refusing them. The streaming stall is gone; the log shows "DirectStorage: BCPack decoded N requests (0 failed)". Can share the diff.
Author
Owner

@⁠Simon-CR on GitHub · 2026-11-24 01:57 UTC · original

Independent cross-confirmation and local engineering status from an AMD RX 9070 XT (RDNA4, native wave64, 16 GiB VRAM, Ryzen 7 5800X, 64 GB RAM, Windows 11 26100) lab.

Where our local branch stands (latest run before integrating our two-pass mesh and async compute PSO fixes)

  • Reaches live world execution (Game State: Game Running, Frame 797, ~191 s, 1,611 presents, 13,551 draws and 2,048 dispatches with translated pipelines and 0 skipped, 46 translated PSOs, 0 DXIL compilation failures).
  • DirectStorage: 0 E_ACCESS_VIOLATION (0x89240009) failures (down from 1,986 in our prior run — fix details below), and 2,087 / 2,088 BC1 BCPack requests unpacked (148.7 MB).
  • Audio: 10,454 Opus packets decoded through xapu with 0 errors (11,050,760 non-zero samples).
  • Exact stop (t = 190.9 s): Reproduced the exact same <title>+0x23cf683 watchdog abort (mov dword [0], 0x4d8bd421).

Confirmed Root Cause of the 30-Second Stall on RDNA4

In our crash thread dump at t = 192 s, all 15 xcl-pso-* background worker threads were completely idle while two of the title's own render worker threads were stuck deep inside amdxc64.dll and three more render worker threads were blocked in pso_async::resolve_wait. Because resolve_for_bind / bind::dispatch calls resolve_wait — which steals p.job and executes the driver compile synchronously on the calling render thread — cold large world compute shaders stalled presentation for ~27–30 s and tripped the title's heartbeat watchdog.

Fixes Implemented & Tested Locally (Ready to Split into Clean PRs if Helpful)

We have built and unit/GPU-tested the following fixes locally and are about to kick off our combined verification run (we can open clean, focused PRs for any of these the maintainers want):

  1. Non-blocking / time-bounded compute PSO compilation + on-disk CachedPSO binary cache (pso_async.rs, real.rs, bind.rs):

    • Added a priority queue for xcl-pso-* workers so newly bound pipelines jump to the front, stopped resolve_wait from stealing heavy driver compiles onto title render threads, and added resolve_wait_timeout (default 1500 ms, configurable via XCL_COMPUTE_PSO_WAIT_MS) so fast startup compute shaders still run on their first frame while slow 20–30 s driver compiles finish in the background without tripping the 30 s watchdog.
    • Added an adapter + UMD-versioned on-disk GetCachedBlob() / CachedPSO cache (cache/pso_bin/) with stale-blob retry fallback so compiled pipelines reload in under 1 ms on subsequent runs.
  2. Solving the 40+ refused mesh pipelines (AS = 23, MS = 24) & Two-Pass DispatchMesh execution (emit.rs, null.rs, console_list.rs, device_x.rs, real.rs, bind.rs, gpu_pso_e2e.rs):

    • Static analysis of the newer retail title's PSO stream builder confirmed Xbox Scarlett numbers PSO subobjects as AS = 23 (0x17) and MS = 24 (0x18) (whereas PC SDK reserves 23 and uses AS = 24, MS = 25). The 40+ pipelines previously refused as "MS in the AS slot" are normal Xbox mesh shader pipelines.
    • Confirmed newer-layout command list vtable mapping: slot 126 = RSSetShadingRate (PC slot 77), slot 127 = RSSetShadingRateImage (PC slot 78), slot 128 = 2-argument console setter (kept as stub), and slot 129 = DispatchMesh (plus ExecuteIndirect with DISPATCH_MESH command signatures).
    • Added Mode::Mesh root-argument SGPR layout (s[8:9] spill pointer, inline root arguments at s16..s31) and wired full Two-Pass execution (Compute pass -> UAV barrier -> Pass-through DispatchMesh, including companion DISPATCH signatures and GPU-scaled indirect arguments for split-chunk shaders), plus a small split == 1 && mv <= cap fix on top of #304.
    • Verified live on RX 9070 XT: 9 / 9 gpu_pso_e2e tests passing (including synthetic single-chunk and split-chunk direct & indirect DispatchMesh pixel readbacks and 7 / 7 retail MS+PS pipelines).
  3. Stub audit (confirming slot 101 and the other per-frame stubs are not starving the watchdog):

    • Independently verified CommandList slot 101 passes (list, 2, 1) / (list, 2, 0) with an ignored return value (matching the findings above).
    • Also confirmed via static disassembly that the remaining per-frame stubs do not drop draws, copies, or GPU barriers: CommandQueue slot 31 is the copy-queue page-mapping helper paired with XMemMapPhysicalPagesScatter (already handled by XCL's sparse mapping hooks), CommandAllocator slot 9 registers an Xbox segment-grow callback, CommandList slot 75 takes a 1-bit PSO boolean, slot 142 takes a 64-bit CU occupancy mask, and slots 131 / 132 are init-only PM4 buffer sizing calls.
  4. DirectStorage 0x89240009 (1,986 -> 0) + commit/VRAM pressure & lock fixes (dstorage.rs, kernelx.rs, lazy.rs, vram.rs, sparse.rs, real.rs, uma.rs, eh.rs):

    • Eliminated the 1,986 DirectStorage E_ACCESS_VIOLATION burst by: (a) deferring QueueInner's capacity / 2 auto-submit when pending physical-page entries are still unready, (b) refreshing reused non-zero physical-page table slots on write_physical_pages failure (not only zero entries), (c) inserting into PHYS_BLOCKS before publishing page numbers, and (d) making lazy::commit() run VirtualAlloc(MEM_COMMIT) before removing a page from LAZY (same root cause as #467).
    • Added fence-safe 64 MiB idle heap retirement and reclaim_idle() to vram::Pages (which otherwise climbed past 9.9 GB / 155 pools on 16 GiB VRAM), cleaned up texture_memory() reservations + LAZY ranges on Release, added reclaim + a 30 s deadline to BIG_COMPILES::wait_for_commit(), refactored sparse::readback_now() into a 3-phase flow that drops STATE across the GPU fence wait, and added frame validation + VEH-guarded recovery around RtlVirtualUnwind in eh::dump_threads() (which previously faulted at ntdll.dll on live mutating thread stacks).
    • Added pure-Rust 8-mode / 285-config BC7 + parameterized BC3 / BC4 / BC5 BCPack modules plus the lanes.rs flushed-fragment zero-restoration fix (bc1-1-8 passes; retail BC7 still hits ~190 cross-mode/preset refusals without unpublished preset tables).

(Note: we also saw #504 on #486's LAST_CONTENT invalidation bug and are folding that fix in before our next combined run.)

We'll report back once the combined build (Two-Pass DispatchMesh + async/cached compute PSOs + pool retirement) runs past Frame 797. Happy to open clean, individual PRs for any of the items above.

AI use: analysis, implementation, and tests assisted by Antigravity (Gemini Pro) on AMD Radeon RX 9070 XT; zero game files or binaries included.

**@⁠Simon-CR** on GitHub · 2026-11-24 01:57 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7119616954) Independent cross-confirmation and local engineering status from an AMD RX 9070 XT (RDNA4, native wave64, 16 GiB VRAM, Ryzen 7 5800X, 64 GB RAM, Windows 11 26100) lab. ### Where our local branch stands (latest run before integrating our two-pass mesh and async compute PSO fixes) - Reaches live world execution (`Game State: Game Running`, Frame 797, ~191 s, 1,611 presents, 13,551 draws and 2,048 dispatches with translated pipelines and 0 skipped, 46 translated PSOs, 0 DXIL compilation failures). - **DirectStorage:** 0 `E_ACCESS_VIOLATION` (`0x89240009`) failures (down from 1,986 in our prior run — fix details below), and 2,087 / 2,088 `BC1` BCPack requests unpacked (`148.7 MB`). - **Audio:** 10,454 Opus packets decoded through `xapu` with 0 errors (`11,050,760` non-zero samples). - **Exact stop (`t = 190.9 s`):** Reproduced the exact same `<title>+0x23cf683` watchdog abort (`mov dword [0], 0x4d8bd421`). ### Confirmed Root Cause of the 30-Second Stall on RDNA4 In our crash thread dump at `t = 192 s`, all 15 `xcl-pso-*` background worker threads were completely idle while **two of the title's own render worker threads were stuck deep inside `amdxc64.dll`** and three more render worker threads were blocked in `pso_async::resolve_wait`. Because `resolve_for_bind` / `bind::dispatch` calls `resolve_wait` — which steals `p.job` and executes the driver compile synchronously on the calling render thread — cold large world compute shaders stalled presentation for ~27–30 s and tripped the title's heartbeat watchdog. ### Fixes Implemented & Tested Locally (Ready to Split into Clean PRs if Helpful) We have built and unit/GPU-tested the following fixes locally and are about to kick off our combined verification run (we can open clean, focused PRs for any of these the maintainers want): 1. **Non-blocking / time-bounded compute PSO compilation + on-disk `CachedPSO` binary cache (`pso_async.rs`, `real.rs`, `bind.rs`):** - Added a priority queue for `xcl-pso-*` workers so newly bound pipelines jump to the front, stopped `resolve_wait` from stealing heavy driver compiles onto title render threads, and added `resolve_wait_timeout` (default `1500 ms`, configurable via `XCL_COMPUTE_PSO_WAIT_MS`) so fast startup compute shaders still run on their first frame while slow 20–30 s driver compiles finish in the background without tripping the 30 s watchdog. - Added an adapter + UMD-versioned on-disk `GetCachedBlob()` / `CachedPSO` cache (`cache/pso_bin/`) with stale-blob retry fallback so compiled pipelines reload in under 1 ms on subsequent runs. 2. **Solving the 40+ refused mesh pipelines (`AS = 23`, `MS = 24`) & Two-Pass `DispatchMesh` execution (`emit.rs`, `null.rs`, `console_list.rs`, `device_x.rs`, `real.rs`, `bind.rs`, `gpu_pso_e2e.rs`):** - Static analysis of the newer retail title's PSO stream builder confirmed Xbox Scarlett numbers PSO subobjects as **`AS = 23` (`0x17`)** and **`MS = 24` (`0x18`)** (whereas PC SDK reserves `23` and uses `AS = 24`, `MS = 25`). The 40+ pipelines previously refused as "MS in the AS slot" are normal Xbox mesh shader pipelines. - Confirmed newer-layout command list vtable mapping: **slot 126 = `RSSetShadingRate`** (PC slot 77), **slot 127 = `RSSetShadingRateImage`** (PC slot 78), **slot 128 = 2-argument console setter** (kept as stub), and **slot 129 = `DispatchMesh`** (plus `ExecuteIndirect` with `DISPATCH_MESH` command signatures). - Added `Mode::Mesh` root-argument SGPR layout (`s[8:9]` spill pointer, inline root arguments at `s16..s31`) and wired full Two-Pass execution (Compute pass -> UAV barrier -> Pass-through `DispatchMesh`, including companion `DISPATCH` signatures and GPU-scaled indirect arguments for split-chunk shaders), plus a small `split == 1 && mv <= cap` fix on top of #304. - Verified live on RX 9070 XT: **9 / 9 `gpu_pso_e2e` tests passing** (including synthetic single-chunk and split-chunk direct & indirect `DispatchMesh` pixel readbacks and 7 / 7 retail MS+PS pipelines). 3. **Stub audit (confirming slot 101 and the other per-frame stubs are not starving the watchdog):** - Independently verified `CommandList` slot 101 passes `(list, 2, 1)` / `(list, 2, 0)` with an ignored return value (matching the findings above). - Also confirmed via static disassembly that the remaining per-frame stubs do not drop draws, copies, or GPU barriers: `CommandQueue` slot 31 is the copy-queue page-mapping helper paired with `XMemMapPhysicalPagesScatter` (already handled by XCL's sparse mapping hooks), `CommandAllocator` slot 9 registers an Xbox segment-grow callback, `CommandList` slot 75 takes a 1-bit PSO boolean, slot 142 takes a 64-bit CU occupancy mask, and slots 131 / 132 are init-only PM4 buffer sizing calls. 4. **DirectStorage `0x89240009` (`1,986 -> 0`) + commit/VRAM pressure & lock fixes (`dstorage.rs`, `kernelx.rs`, `lazy.rs`, `vram.rs`, `sparse.rs`, `real.rs`, `uma.rs`, `eh.rs`):** - Eliminated the 1,986 DirectStorage `E_ACCESS_VIOLATION` burst by: (a) deferring `QueueInner`'s `capacity / 2` auto-submit when pending physical-page entries are still unready, (b) refreshing reused non-zero physical-page table slots on `write_physical_pages` failure (not only zero entries), (c) inserting into `PHYS_BLOCKS` before publishing page numbers, and (d) making `lazy::commit()` run `VirtualAlloc(MEM_COMMIT)` *before* removing a page from `LAZY` (same root cause as #467). - Added fence-safe `64 MiB` idle heap retirement and `reclaim_idle()` to `vram::Pages` (which otherwise climbed past 9.9 GB / 155 pools on 16 GiB VRAM), cleaned up `texture_memory()` reservations + `LAZY` ranges on `Release`, added reclaim + a 30 s deadline to `BIG_COMPILES::wait_for_commit()`, refactored `sparse::readback_now()` into a 3-phase flow that drops `STATE` across the GPU fence wait, and added frame validation + VEH-guarded recovery around `RtlVirtualUnwind` in `eh::dump_threads()` (which previously faulted at `ntdll.dll` on live mutating thread stacks). - Added pure-Rust 8-mode / 285-config `BC7` + parameterized `BC3` / `BC4` / `BC5` BCPack modules plus the `lanes.rs` flushed-fragment zero-restoration fix (`bc1-1-8` passes; retail `BC7` still hits ~190 cross-mode/preset refusals without unpublished preset tables). *(Note: we also saw #504 on #486's `LAST_CONTENT` invalidation bug and are folding that fix in before our next combined run.)* We'll report back once the combined build (Two-Pass `DispatchMesh` + async/cached compute PSOs + pool retirement) runs past Frame 797. Happy to open clean, individual PRs for any of the items above. *AI use: analysis, implementation, and tests assisted by Antigravity (Gemini Pro) on AMD Radeon RX 9070 XT; zero game files or binaries included.*
Author
Owner

@⁠theswiss24 on GitHub · 2026-11-24 02:03 UTC · original

Another data point for the world-loading stop, on an RTX 4070 (12 GB), with #435 applied.

Setup: RTX 4070 12 GB (32-lane waves), driver 621.24; i9-9900K (clwb/clzero emulated); 48 GB RAM; Windows 11 26300. Release build of main 7ebf1b8 plus open PRs #300, #321, #468, #463, #451, #510, #487, #490, #348, #522 and #435. Run with XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_DXC_THREADS=4.

Same stop. unhandled exception 0xc0000005 in game_scarlett_master.exe+0x23cf683 (write at address 0x0) at 134 s, about 20 s after the world's ambient audio starts, with the screen blank. This matches the watchdog reading above.

#435 stops the memory growth before it. Without #435, the process's private bytes climbed about 4 GB every 30 s during world loading (10 → 29 GB in 2.5 min) and the stop came at 179 s. With #435, the XCL_ACTIVITY memory line levels off at about 28 GB committed (title textures 22,907 live, 40,150 uploads; target pages 9.6 GB; local video memory 14.0 GB on a 12 GB card) and stays flat for the last 20 s before the stop. So on this machine the stop is not an out-of-memory failure.

Network: without XCL_NETWORK=0, the title's crash reporter uploaded its minidump after this stop (HTTP 200). With it, WinHttpConnect is refused, as intended. Worth repeating for anyone testing: always set it.

Next here: pipelines are being pre-built (xcl shaders shaders.rpf --precompile --pipelines, NVIDIA shader cache set to Unlimited). I'll report whether a warm driver cache gets the main thread past the 30 s watchdog.

Tested and written by Claude (Claude Code).

**@⁠theswiss24** on GitHub · 2026-11-24 02:03 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7119712503) Another data point for the world-loading stop, on an RTX 4070 (12 GB), with #435 applied. **Setup:** RTX 4070 12 GB (32-lane waves), driver 621.24; i9-9900K (clwb/clzero emulated); 48 GB RAM; Windows 11 26300. Release build of `main` 7ebf1b8 plus open PRs #300, #321, #468, #463, #451, #510, #487, #490, #348, #522 and #435. Run with `XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_DXC_THREADS=4`. **Same stop.** `unhandled exception 0xc0000005 in game_scarlett_master.exe+0x23cf683 (write at address 0x0)` at 134 s, about 20 s after the world's ambient audio starts, with the screen blank. This matches the watchdog reading above. **#435 stops the memory growth before it.** Without #435, the process's private bytes climbed about 4 GB every 30 s during world loading (10 → 29 GB in 2.5 min) and the stop came at 179 s. With #435, the `XCL_ACTIVITY` memory line levels off at about 28 GB committed (title textures 22,907 live, 40,150 uploads; target pages 9.6 GB; local video memory 14.0 GB on a 12 GB card) and stays flat for the last 20 s before the stop. So on this machine the stop is not an out-of-memory failure. **Network:** without `XCL_NETWORK=0`, the title's crash reporter uploaded its minidump after this stop (HTTP 200). With it, `WinHttpConnect` is refused, as intended. Worth repeating for anyone testing: always set it. **Next here:** pipelines are being pre-built (`xcl shaders shaders.rpf --precompile --pipelines`, NVIDIA shader cache set to Unlimited). I'll report whether a warm driver cache gets the main thread past the 30 s watchdog. Tested and written by Claude (Claude Code).
Author
Owner

@⁠13hourstilliland on GitHub · 2026-11-24 02:09 UTC · original

A probe for "who stops feeding the watchdog", from a static read of the exe (1.0.2.1, RVAs only). It follows my comment above.

When no timed scope is open ([+0x71b6334] == 0) the watchdog aborts after 30 one-second ticks without a change of the heartbeat at +0x71b6338. Only +0x22159f0 writes it. Its callers:

  • +0x1c82b67 / +0x1c82bc1, inside +0x1c82b20: a "wait and keep the heartbeat going" loop (heartbeat, some pumping work, Sleep, repeat until done). It has 20 callers, so blocking loads that go through it are covered.
  • +0x120799 (function +0x120790, no direct callers, so reached through a pointer) and +0xc9e368 (function +0xc9e350, one caller at +0xc9e334). Inferred: one of these is the per-frame tick.

So the abort means the thread that runs the per-frame tick has been blocked for ~30 s outside that wait loop. That also fits @⁠sperm's #533 run, where bounding compute waits did not stop it: something else blocks that thread.

Probe, for anyone with a debugger or a vectored handler on the title:

  1. At the stop, read [+0x71b6334] (0 = this route).
  2. Put a hardware write breakpoint on +0x71b6338, log the return address (+0x120799, +0xc9e368, +0x1c82b67, +0x1c82bc1) and the thread id of each hit, and stop logging after a few seconds of normal frames.
  3. When it fails, the thread id of the last writer is the stalled thread. Its stack in XCL's thread dump names what it waits on.

Also on main: @⁠sub-north's 40b of address set stop. I opened #585 for it. It ends runs before this watchdog can.

AI use: Claude Code (Claude Opus 5.5) read the executable bytes with objdump and a small script; no game files attached.

**@⁠13hourstilliland** on GitHub · 2026-11-24 02:09 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7119816848) A probe for "who stops feeding the watchdog", from a static read of the exe (1.0.2.1, RVAs only). It follows my comment above. When no timed scope is open (`[+0x71b6334] == 0`) the watchdog aborts after 30 one-second ticks without a change of the heartbeat at `+0x71b6338`. Only `+0x22159f0` writes it. Its callers: - `+0x1c82b67` / `+0x1c82bc1`, inside `+0x1c82b20`: a "wait and keep the heartbeat going" loop (heartbeat, some pumping work, `Sleep`, repeat until done). It has 20 callers, so blocking loads that go through it are covered. - `+0x120799` (function `+0x120790`, no direct callers, so reached through a pointer) and `+0xc9e368` (function `+0xc9e350`, one caller at `+0xc9e334`). Inferred: one of these is the per-frame tick. So the abort means the thread that runs the per-frame tick has been blocked for ~30 s outside that wait loop. That also fits @⁠sperm's #533 run, where bounding compute waits did not stop it: something else blocks that thread. Probe, for anyone with a debugger or a vectored handler on the title: 1. At the stop, read `[+0x71b6334]` (0 = this route). 2. Put a hardware write breakpoint on `+0x71b6338`, log the return address (`+0x120799`, `+0xc9e368`, `+0x1c82b67`, `+0x1c82bc1`) and the thread id of each hit, and stop logging after a few seconds of normal frames. 3. When it fails, the thread id of the last writer is the stalled thread. Its stack in XCL's thread dump names what it waits on. Also on main: @⁠sub-north's `40b of address set` stop. I opened #585 for it. It ends runs before this watchdog can. AI use: Claude Code (Claude Opus 5.5) read the executable bytes with objdump and a small script; no game files attached.
Author
Owner

@⁠MJ26gaming on GitHub · 2026-11-24 02:17 UTC · original

Same stop here

Game and package version

New Retail Game / 930.048.020

What happens

Environment

  • XCL commit: 508a0c7

  • OS: Windows 11 x64

  • CPU: AMD Ryzen 9 8945HS

  • GPU: NVIDIA GeForce RTX 4070 Laptop GPU (8 GB VRAM)

  • RAM: 32 GB DDR5

  • DXC: 1.9.2602.17 (21d28f72)

  • Build: Release with debug symbols

  • Game version: 930.048.020

  • Game executable: game_scarlett_master.exe

Description

The game successfully launches and renders its menus. Audio and GameInput are functional, and menu performance reaches approximately 30 FPS.

When transitioning from the menus into gameplay, the game displays a loading screen before transitioning to a black screen. Shader compilation and audio decoding continue in the background, but the game eventually crashes.

The crash is reproducible across multiple runs, with the same faulting instruction, write address, and call stack.

Steps to reproduce

  1. Build XCL using cargo build --release --workspace.

  2. Launch the game through XCL.

  3. Navigate through the menus and attempt to enter gameplay.

  4. Observe the loading screen transitioning to a black screen.

  5. The game eventually terminates with exception 0xc0000005.

Expected behavior

The game completes loading and enters gameplay.

Actual behavior

The screen goes black and the game eventually crashes with a null pointer write.

Crash information

Unhandled exception 0xc0000005
Module: game_scarlett_master.exe+0x23cf683
Operation: write at address 0x0

rax=0x0 rbx=0x0 rcx=0x70024c348 rdx=0x1 rbp=0x0

Stack: game_scarlett_master.exe+0x4e4ba89 game_scarlett_master.exe+0x2215c35 game_scarlett_master.exe+0x71b9a20 game_scarlett_master.exe+0x2215eca

Exit code: 0xc0000005 (3221225477)

Relevant warnings

Numerous DirectStorage BCPack requests are refused because the compression modes are unsupported:

DirectStorage: BCPack BC7: mode 7 unsupported
DirectStorage: BCPack BC5: mode 5 unsupported
DirectStorage: BCPack BC1: mode 1 unsupported
DirectStorage: BCPack BC6H: mode 6 unsupported
DirectStorage: a request failed (0x89240030)

At least 2,048 BCPack requests were refused before the crash in one run.

Other potentially relevant graphics warnings:

D3D12.X: console shaders in the PSO without a translation:
mesh pipeline with its MS in the AS slot – refused

D3D12.X: a UAV of a resource that cannot have one on the PC (a depth buffer) – a null view

buffer view in the console heap: the buffer is not in UMA – the shader gets an empty V# (num_records 0)

D3D12.X: CopyMemoryToMemoryX: ... is not in unified memory – not done

The following unimplemented functions were also called:

Interface | Slot | Calls -- | -- | -- ID3D12CommandAllocator | 9 | 2206 ID3D12GraphicsCommandList10 | 142 | 2166 ID3D12GraphicsCommandList10 | 75 | 2089 ID3D12GraphicsCommandList10 | 126 | 2088 ID3D12CommandQueue | 31 | 284 ID3D12GraphicsCommandList10 | 101 | 12 ID3D12GraphicsCommandList10 | 131 | 8 ID3D12GraphicsCommandList10 | 132 | 5

Slots 131 and 132 had identical call counts and calling locations across two consecutive runs.

Shader statistics

  • Unique shaders: 19,214

  • Xbox-native shaders: 19,099

  • NGG hardware-stage shaders: 6,685

  • RDNA2 instructions decoded: 37,858,913

  • Undecoded instruction words: 0

  • Xbox shader parsing errors: 0

Compute pipeline compilation continues until immediately before the crash.

Additional testing

  • Rebuilding XCL from the latest source did not eliminate the gameplay crash.

  • Repairing Windows Gaming Services did not resolve the issue.

  • Shader caches were retained between runs.

  • An earlier build (3516080) crashed during the gameplay transition with an invalid memory read inside VCRUNTIME140.dll, with XCL functions on the stack. After updating to 508a0c7, the crash changed to the reproducible null pointer write described above.

  • I also have an RX 9070 XT available for comparison. Testing through Wine has been substantially slower, and native Windows testing on that GPU is still pending.

I have not established whether the BCPack refusals, unsupported graphics operations, or another issue directly causes the crash.

I can provide additional logs, debugger output, and hardware comparison results if useful. Note that this comment report was generated by AI. I have reviewed it though.

**@⁠MJ26gaming** on GitHub · 2026-11-24 02:17 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7119985315) [Same stop here](https://github.com/ivall/xcl/issues/581#issuecomment-7119901329) <h3 dir="auto">Game and package version</h3> <p dir="auto">New Retail Game / 930.048.020</p> <h3 dir="auto">What happens</h3> <h2 dir="auto"><span>Environment</span></h2><ul dir="auto"><li><p dir="auto"><span>XCL commit: </span><code dir="ltr" class="notranslate"><span>508a0c7</span></code></p></li><li><p dir="auto"><span>OS: Windows 11 x64</span></p></li><li><p dir="auto"><span>CPU: AMD Ryzen 9 8945HS</span></p></li><li><p dir="auto"><span>GPU: NVIDIA GeForce RTX 4070 Laptop GPU (8 GB VRAM)</span></p></li><li><p dir="auto"><span>RAM: 32 GB DDR5</span></p></li><li><p dir="auto"><span>DXC: 1.9.2602.17 (21d28f72)</span></p></li><li><p dir="auto"><span>Build: Release with debug symbols</span></p></li><li><p dir="auto"><span>Game version: </span><code dir="ltr" class="notranslate"><span>930.048.020</span></code></p></li><li><p dir="auto"><span>Game executable: </span><code dir="ltr" class="notranslate"><span>game_scarlett_master.exe</span></code></p></li></ul><h2 dir="auto"><span>Description</span></h2><p dir="auto"><span>The game successfully launches and renders its menus. Audio and GameInput are functional, and menu performance reaches approximately 30 FPS.</span></p><p dir="auto"><span>When transitioning from the menus into gameplay, the game displays a loading screen before transitioning to a black screen. Shader compilation and audio decoding continue in the background, but the game eventually crashes.</span></p><p dir="auto"><span>The crash is reproducible across multiple runs, with the same faulting instruction, write address, and call stack.</span></p><h2 dir="auto"><span>Steps to reproduce</span></h2><ol start="1" dir="auto"><li><p dir="auto"><span>Build XCL using </span><code dir="ltr" class="notranslate"><span>cargo build --release --workspace</span></code><span>.</span></p></li><li><p dir="auto"><span>Launch the game through XCL.</span></p></li><li><p dir="auto"><span>Navigate through the menus and attempt to enter gameplay.</span></p></li><li><p dir="auto"><span>Observe the loading screen transitioning to a black screen.</span></p></li><li><p dir="auto"><span>The game eventually terminates with exception </span><code dir="ltr" class="notranslate"><span>0xc0000005</span></code><span>.</span></p></li></ol><h2 dir="auto"><span>Expected behavior</span></h2><p dir="auto"><span>The game completes loading and enters gameplay.</span></p><h2 dir="auto"><span>Actual behavior</span></h2><p dir="auto"><span>The screen goes black and the game eventually crashes with a null pointer write.</span></p><h2 dir="auto"><span>Crash information</span></h2><pre class="notranslate"><code class="notranslate"><span>Unhandled exception 0xc0000005 Module: game_scarlett_master.exe+0x23cf683 Operation: write at address 0x0 <p dir="auto">rax=0x0 rbx=0x0 rcx=0x70024c348 rdx=0x1 rbp=0x0</p> <p dir="auto">Stack: game_scarlett_master.exe+0x4e4ba89 game_scarlett_master.exe+0x2215c35 game_scarlett_master.exe+0x71b9a20 game_scarlett_master.exe+0x2215eca</p> </span></code><p dir="auto"><code class="notranslate">Exit code: 0xc0000005 (3221225477)</code></p></pre><h2 dir="auto"><span>Relevant warnings</span></h2><p dir="auto"><span>Numerous DirectStorage BCPack requests are refused because the compression modes are unsupported:</span></p><div class="snippet-clipboard-content notranslate position-relative overflow-auto"><pre class="notranslate"><code class="notranslate"><span>DirectStorage: BCPack BC7: mode 7 unsupported DirectStorage: BCPack BC5: mode 5 unsupported DirectStorage: BCPack BC1: mode 1 unsupported DirectStorage: BCPack BC6H: mode 6 unsupported DirectStorage: a request failed (0x89240030)</span></code></pre><div class="zeroclipboard-container position-absolute right-0 top-0"> </div></div><p dir="auto"><span>At least 2,048 BCPack requests were refused before the crash in one run.</span></p><p dir="auto"><span>Other potentially relevant graphics warnings:</span></p><pre class="notranslate"><code class="notranslate"><span>D3D12.X: console shaders in the PSO without a translation: mesh pipeline with its MS in the AS slot – refused<p dir="auto"></p> <p dir="auto">D3D12.X: a UAV of a resource that cannot have one on the PC (a depth buffer) – a null view</p> <p dir="auto">buffer view in the console heap: the buffer is not in UMA – the shader gets an empty V# (num_records 0)</p> </span></code><p dir="auto"><code class="notranslate">D3D12.X: CopyMemoryToMemoryX: ... is not in unified memory – not done</code></p></pre><p dir="auto"><span>The following unimplemented functions were also called:</span></p><p dir="auto"></p> <markdown-accessiblity-table data-catalyst=""> Interface | Slot | Calls -- | -- | -- ID3D12CommandAllocator | 9 | 2206 ID3D12GraphicsCommandList10 | 142 | 2166 ID3D12GraphicsCommandList10 | 75 | 2089 ID3D12GraphicsCommandList10 | 126 | 2088 ID3D12CommandQueue | 31 | 284 ID3D12GraphicsCommandList10 | 101 | 12 ID3D12GraphicsCommandList10 | 131 | 8 ID3D12GraphicsCommandList10 | 132 | 5 </markdown-accessiblity-table> <p dir="auto"><span>Slots 131 and 132 had identical call counts and calling locations across two consecutive runs.</span></p><h2 dir="auto"><span>Shader statistics</span></h2><ul dir="auto"><li><p dir="auto"><span>Unique shaders: 19,214</span></p></li><li><p dir="auto"><span>Xbox-native shaders: 19,099</span></p></li><li><p dir="auto"><span>NGG hardware-stage shaders: 6,685</span></p></li><li><p dir="auto"><span>RDNA2 instructions decoded: 37,858,913</span></p></li><li><p dir="auto"><span>Undecoded instruction words: 0</span></p></li><li><p dir="auto"><span>Xbox shader parsing errors: 0</span></p></li></ul><p dir="auto"><span>Compute pipeline compilation continues until immediately before the crash.</span></p><h2 dir="auto"><span>Additional testing</span></h2><ul dir="auto"><li><p dir="auto"><span>Rebuilding XCL from the latest source did not eliminate the gameplay crash.</span></p></li><li><p dir="auto"><span>Repairing Windows Gaming Services did not resolve the issue.</span></p></li><li><p dir="auto"><span>Shader caches were retained between runs.</span></p></li><li><p dir="auto"><span>An earlier build (</span><code dir="ltr" class="notranslate"><span>3516080</span></code><span>) crashed during the gameplay transition with an invalid memory read inside </span><code dir="ltr" class="notranslate"><span>VCRUNTIME140.dll</span></code><span>, with XCL functions on the stack. After updating to </span><code dir="ltr" class="notranslate"><span>508a0c7</span></code><span>, the crash changed to the reproducible null pointer write described above.</span></p></li><li><p dir="auto"><span>I also have an RX 9070 XT available for comparison. Testing through Wine has been substantially slower, and native Windows testing on that GPU is still pending.</span></p></li></ul><p dir="auto"><span>I have not established whether the BCPack refusals, unsupported graphics operations, or another issue directly causes the crash.</span></p><p dir="auto"><span>I can provide additional logs, debugger output, and hardware comparison results if useful. Note that this comment report was generated by AI. I have reviewed it though.</span></p>
Author
Owner

@⁠emirduran707 on GitHub · 2026-11-24 02:20 UTC · original

How long the title's compute programs take in DXC, for the resolve_wait lead above: every compute program of the pack compiled once, offline, the way a title's pipeline translates it.

Run: xcl shaders <the title's shaders.rpf> --precompile --only cs (main a6f5f7a code for the recompiler; the build had #440 / #300 / #435 merged, which do not touch it), with a local timer around each program's pso::console_to_dxil_in (not committed). RX 9060 XT machine, Ryzen 5 5600 (6 cores / 12 threads, 11 DXC threads), DXC 1.9.2602.17, 4 memory windows, an empty DXIL cache.

compute programs 2 689, all compiled, 0 errors
DXC time, summed 35 216 s (2 721 s wall on 11 threads)
programs over 10 s 973
programs over 26 s 632
slowest 325.6 s, 322.5 s, 290.8 s, 263.7 s, 253.1 s (the top 10 are all over 179 s)

So once the world streams in, any of hundreds of compute programs that is not in the DXIL cache yet holds every Dispatch of it for longer than the title's ~30 s heartbeat. The cache never gets them either: the process ends at the watchdog before those compiles finish, so the next run waits for the same ones. This machine's DXIL cache now holds all 2 689; I'll check whether the stop goes away with a warm cache when I can drive the menus again, and post the result here.

Related: #174 (DXC time of compute programs: linked memory accessors), #267 (a time limit, for draws), and xcl shaders --precompile as a workaround that already exists.

AI use: Claude Code with Claude Opus 5.5 ran the compile and wrote this comment from my run.

**@⁠emirduran707** on GitHub · 2026-11-24 02:20 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7120032617) How long the title's compute programs take in DXC, for the `resolve_wait` lead above: every compute program of the pack compiled once, offline, the way a title's pipeline translates it. **Run:** `xcl shaders <the title's shaders.rpf> --precompile --only cs` (`main` a6f5f7a code for the recompiler; the build had #440 / #300 / #435 merged, which do not touch it), with a local timer around each program's `pso::console_to_dxil_in` (not committed). RX 9060 XT machine, Ryzen 5 5600 (6 cores / 12 threads, 11 DXC threads), DXC 1.9.2602.17, 4 memory windows, an empty DXIL cache. | | | |---|---| | compute programs | 2 689, all compiled, 0 errors | | DXC time, summed | 35 216 s (2 721 s wall on 11 threads) | | programs over 10 s | 973 | | **programs over 26 s** | **632** | | slowest | 325.6 s, 322.5 s, 290.8 s, 263.7 s, 253.1 s (the top 10 are all over 179 s) | So once the world streams in, any of hundreds of compute programs that is not in the DXIL cache yet holds every `Dispatch` of it for longer than the title's ~30 s heartbeat. The cache never gets them either: the process ends at the watchdog before those compiles finish, so the next run waits for the same ones. This machine's DXIL cache now holds all 2 689; I'll check whether the stop goes away with a warm cache when I can drive the menus again, and post the result here. Related: #174 (DXC time of compute programs: linked memory accessors), #267 (a time limit, for draws), and `xcl shaders --precompile` as a workaround that already exists. AI use: Claude Code with Claude Opus 5.5 ran the compile and wrote this comment from my run.
Author
Owner

@⁠vibryxcx on GitHub · 2026-11-24 02:30 UTC · original

An RDNA2 on Windows data point (the reports so far are NVIDIA, RDNA3 and RDNA4), on an Intel CPU that needs the console-instruction emulation: the same stop, at 275 s, with the same pipeline backlog. A second run back to back got past that point and ran into system memory instead.

Setup: AMD Radeon RX 6800 16 GB (RDNA2, native wave64), driver 32.0.21045.5002; Intel Core i5-10600KF (Comet Lake; clwb / monitorx emulated); 32 GB RAM; Windows 11 build 26200. Release build of plain main 9ce2070, DXC from XCL_DXC_DIR. XCL_NETWORK=0 XCL_ACTIVITY=1, XCL_PRESS_A_AT=14,17,21,125,131,…,197 (A at 14/17/21 s, then every 6 s from 125 to 197 s, as @⁠requiemsnkrp walked the menus). Run limit 600 s.

Run 1: the same stop.

  • unhandled exception 0xc0000005 in game_scarlett_master.exe+0x23cf683 (write at address 0x0) at 275.0 s, rbx=0x0, rcx=0x70024c348 (the heartbeat path, as above).
  • The title's crash context: Game State: Game Running, Game Running Time: 0h:4m:1s, Frame: 3490, Streaming Requests: 4387, TileHeap: used (1600Mb) - total (6236Mb).
  • From the activity (2 s) lines: 60 presents per 2 s up to 191 s, then 12 at 200 s, 3 at 210 s; the last submit at 244 s, then none for 32 s until the stop.
  • report.json at the stop: background_pipelines: [14, 0, 58745] – 14 built, 0 failed, 58,745 still building, close to the RTX 3060's [46, 0, 58715]. So native wave64 does not avoid the backlog here.
  • The thread dump at the stop: the 11 xcl-pso-* workers are all waiting, as in @⁠Simon-CR's RDNA4 dump. One title thread (22808) is running in xcl.exe (top frame xcl.exe+0x1c8454, called from game_scarlett_master.exe+0x4ecc821). I have not symbolized it.
  • Memory (memory: lines): commit 16.3 GB at 150 s, 21.3 GB at 210 s, 28.1 GB at 270 s; local video memory 6.9 → 11.4 GB on the 16 GB card.

Run 2, right after run 1: past 275 s without the watchdog.

  • Same build, same command. The activity looks the same up to the drop (60 presents per 2 s at 191 s, 2 at 201 s), but presents and submits do not stop for 30 s: there are a few every 20–40 s (last submit at 339 s).
  • No watchdog abort. The run was ended by my own runner at 353 s, when free system memory fell below 1 GB: commit 30.3 GB at 301 s and 32.5 GB at 331 s on the 32 GB machine.
  • The process was killed, so its report.json was not written at the end and I have no pipeline counts for this run.

I cannot say the second run lived longer because of a warmer cache: run 1 built only 14 pipelines before it stopped, and @⁠emirduran707's numbers above put the pack's compute programs at many hours of DXC time. It may just be variance in when the main thread stalls. What it does show on this machine is that once past the stop, the memory growth (about 4 GB every 30 s, like @⁠theswiss24's runs without #435) is the next limit on 32 GB.

Not tested: #435 or any other open PR; a run with the pipelines precompiled (xcl shaders … --precompile --pipelines); more than one run of each; symbolizing thread 22808.

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

**@⁠vibryxcx** on GitHub · 2026-11-24 02:30 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7120220301) An **RDNA2 on Windows** data point (the reports so far are NVIDIA, RDNA3 and RDNA4), on an Intel CPU that needs the console-instruction emulation: the same stop, at 275 s, with the same pipeline backlog. A second run back to back got past that point and ran into system memory instead. **Setup:** AMD Radeon RX 6800 16 GB (RDNA2, native wave64), driver 32.0.21045.5002; Intel Core i5-10600KF (Comet Lake; `clwb` / `monitorx` emulated); 32 GB RAM; Windows 11 build 26200. Release build of plain `main` `9ce2070`, DXC from `XCL_DXC_DIR`. `XCL_NETWORK=0 XCL_ACTIVITY=1`, `XCL_PRESS_A_AT=14,17,21,125,131,…,197` (A at 14/17/21 s, then every 6 s from 125 to 197 s, as @⁠requiemsnkrp walked the menus). Run limit 600 s. **Run 1: the same stop.** - `unhandled exception 0xc0000005 in game_scarlett_master.exe+0x23cf683 (write at address 0x0)` at **275.0 s**, `rbx=0x0`, `rcx=0x70024c348` (the heartbeat path, as above). - The title's crash context: `Game State: Game Running`, `Game Running Time: 0h:4m:1s`, `Frame: 3490`, `Streaming Requests: 4387`, `TileHeap: used (1600Mb) - total (6236Mb)`. - From the `activity (2 s)` lines: 60 presents per 2 s up to 191 s, then 12 at 200 s, 3 at 210 s; the last submit at 244 s, then none for 32 s until the stop. - `report.json` at the stop: `background_pipelines: [14, 0, 58745]` – 14 built, 0 failed, **58,745 still building**, close to the RTX 3060's `[46, 0, 58715]`. So native wave64 does not avoid the backlog here. - The thread dump at the stop: the 11 `xcl-pso-*` workers are all waiting, as in @⁠Simon-CR's RDNA4 dump. One title thread (22808) is running in `xcl.exe` (top frame `xcl.exe+0x1c8454`, called from `game_scarlett_master.exe+0x4ecc821`). I have not symbolized it. - Memory (`memory:` lines): commit 16.3 GB at 150 s, 21.3 GB at 210 s, 28.1 GB at 270 s; local video memory 6.9 → 11.4 GB on the 16 GB card. **Run 2, right after run 1: past 275 s without the watchdog.** - Same build, same command. The activity looks the same up to the drop (60 presents per 2 s at 191 s, 2 at 201 s), but presents and submits do not stop for 30 s: there are a few every 20–40 s (last submit at 339 s). - No watchdog abort. The run was ended by my own runner at **353 s**, when free system memory fell below 1 GB: commit 30.3 GB at 301 s and 32.5 GB at 331 s on the 32 GB machine. - The process was killed, so its `report.json` was not written at the end and I have no pipeline counts for this run. I cannot say the second run lived longer because of a warmer cache: run 1 built only 14 pipelines before it stopped, and @⁠emirduran707's numbers above put the pack's compute programs at many hours of DXC time. It may just be variance in when the main thread stalls. What it does show on this machine is that once past the stop, the memory growth (about 4 GB every 30 s, like @⁠theswiss24's runs without #435) is the next limit on 32 GB. **Not tested:** #435 or any other open PR; a run with the pipelines precompiled (`xcl shaders … --precompile --pipelines`); more than one run of each; symbolizing thread 22808. **AI use:** Claude Code (Claude Opus 5.5): ran the tests and wrote this report.
Author
Owner

@⁠tadymila on GitHub · 2026-11-24 02:31 UTC · original

Update (RTX 5070 Ti, watchdog bypassed): two findings.

  1. The "PSO backlog" on my box was mostly XCL waiting for commit, not the driver: wait_for_commit() in real.rs spins until 3 GB of page file is free before every ≥256 KB compute PSO. Free virtual memory was 1.5 GB of 83 GB (process at 64 GB commit), so each 1 MB CS "took" ~400 s. After raising the page file to 32–128 GB and restarting, warm-cache PSOs (300–370 KB DXIL) build in ~50 ms; 396 PSOs in 15 min vs 345 in 43 min before. Suggest logging when wait_for_commit blocks.

  2. Next wall: presents stop after ~600 frames (1.5 fps at 391 s). From 665 s the present thread hits Wait64BitValueX timed out after 2000 ms at 0x70417ff68..ffd8 (op 7, want 0x2af; memory holds 0) repeatedly — the counter is never written. #101 is first called at 456 s (game_scarlett_master.exe+0x50a6657). Earlier run showed the same pattern with want 0x28e. Screen stays black.

**@⁠tadymila** on GitHub · 2026-11-24 02:31 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7120231516) Update (RTX 5070 Ti, watchdog bypassed): two findings. 1) The "PSO backlog" on my box was mostly XCL waiting for commit, not the driver: `wait_for_commit()` in real.rs spins until 3 GB of page file is free before every ≥256 KB compute PSO. Free virtual memory was 1.5 GB of 83 GB (process at 64 GB commit), so each 1 MB CS "took" ~400 s. After raising the page file to 32–128 GB and restarting, warm-cache PSOs (300–370 KB DXIL) build in ~50 ms; 396 PSOs in 15 min vs 345 in 43 min before. Suggest logging when wait_for_commit blocks. 2) Next wall: presents stop after ~600 frames (1.5 fps at 391 s). From 665 s the present thread hits `Wait64BitValueX timed out after 2000 ms at 0x70417ff68..ffd8 (op 7, want 0x2af; memory holds 0)` repeatedly — the counter is never written. #101 is first called at 456 s (game_scarlett_master.exe+0x50a6657). Earlier run showed the same pattern with want 0x28e. Screen stays black.
Author
Owner

@⁠S1m0ne1997 on GitHub · 2026-11-24 02:34 UTC · original

RTX 4090: what the watchdog actually checks, DXC heap contention at first bind, and a run with #533

Setup: RTX 4090 24 GB, Ryzen (32 threads), 47 GB RAM, 8 GB pagefile (commit limit 55 GB), Windows 11 26300, main 2997c9a, release, DXC 1.9.2602.17. Game 1.0.2.1.

1. Confirms the heartbeat path from 13hourstilliland's read, at run time. A dump of the timer table at 0x146844A20 (64 slots, +0x04 = live timestamps) at the crash, on 3 runs: all 64 slots had zero live timestamps, so the abort came from the 30-tick heartbeat check (+0x71b6338), not from a slot.

2. Without the DXIL cache, the stall on this machine is DXC at first bind. Thread dumps (XCL_THREAD_DUMP_AT) at 235/255 s: game threads in real::translated_compute_pso → dxc::compile, another in pso_async::resolve_wait; of the xcl-dxc workers, 2 in dxc::wait_for_memory (the game holds ~22–27 GB of commit on an 8 GB pagefile, so less than 6 GB + 1 GB per compile is free – the double count #139 describes; same direction as tadymila's wait_for_commit finding). No nvgpucomp64 on the stacks in that run.

3. DXC workers serialize on the process heap. During xcl shaders --precompile --only cs with 32 workers I sampled every thread: 24 were in RtlEnterCriticalSection under RtlAllocateHeap/RtlFreeHeap called from dxcompiler, 2–3 were compiling. Creating each worker's compiler with DxcCreateInstance2 and an IMalloc over its own HeapCreate heap: 19 compiling at once, 0 on the heap lock, ~32 cores busy; the remaining 2 689 CS compiled in 789 s with 0 errors (before: ~200 shaders per 10 min). Local patch (~110 lines in dxc.rs, with a unit test); I can open a PR if that is wanted – I found none covering it.

4. With the CS cache filled, DXC is gone from the stall, and the driver remains. Same title, warm DXIL cache: at 235 s three game threads wait in resolve_wait under bind::graphics_bound, nvgpucomp64.dll is busy on the D3D background threads; all xcl-pso workers idle. That run did not end in the watchdog: at 248 s a read of 0xffffffffffffffff at +0x4eedb0f, with rcx=0xff8000007f800000 (+inf/−inf, the initial value of an empty bounds pair). An earlier run ended the same way at +0xa9ec5f with the same rcx. Not tracked down yet.

5. With #533 (5e6aca8) on top: at 214 s the bounded compute wait kicks in (still building after 2616 ms – proceeding with stand-in) and ~4 100 dispatches/ExecuteIndirects are skipped within 20 ms; the watchdog still fires at 240.7 s (+0x23cf683, same stack). So on this machine bounding the compute wait alone does not keep the main loop ticking.

Not tested: AMD; XCL_ASYNC_PSO=0; --pipelines for all CS (stopped after 450: the driver built them about one at a time, ~3 h estimated); a larger pagefile.

Measured, written and posted with Claude Code (Claude Opus 5.5); the runs and the game are the user's.

**@⁠S1m0ne1997** on GitHub · 2026-11-24 02:34 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7120280010) **RTX 4090: what the watchdog actually checks, DXC heap contention at first bind, and a run with #533** **Setup:** RTX 4090 24 GB, Ryzen (32 threads), 47 GB RAM, 8 GB pagefile (commit limit 55 GB), Windows 11 26300, `main` 2997c9a, release, DXC 1.9.2602.17. Game 1.0.2.1. **1. Confirms the heartbeat path from 13hourstilliland's read, at run time.** A dump of the timer table at `0x146844A20` (64 slots, +0x04 = live timestamps) at the crash, on 3 runs: all 64 slots had zero live timestamps, so the abort came from the 30-tick heartbeat check (`+0x71b6338`), not from a slot. **2. Without the DXIL cache, the stall on this machine is DXC at first bind.** Thread dumps (`XCL_THREAD_DUMP_AT`) at 235/255 s: game threads in `real::translated_compute_pso → dxc::compile`, another in `pso_async::resolve_wait`; of the `xcl-dxc` workers, 2 in `dxc::wait_for_memory` (the game holds ~22–27 GB of commit on an 8 GB pagefile, so less than 6 GB + 1 GB per compile is free – the double count #139 describes; same direction as tadymila's `wait_for_commit` finding). No `nvgpucomp64` on the stacks in that run. **3. DXC workers serialize on the process heap.** During `xcl shaders --precompile --only cs` with 32 workers I sampled every thread: 24 were in `RtlEnterCriticalSection` under `RtlAllocateHeap`/`RtlFreeHeap` called from dxcompiler, 2–3 were compiling. Creating each worker's compiler with `DxcCreateInstance2` and an `IMalloc` over its own `HeapCreate` heap: **19** compiling at once, 0 on the heap lock, ~32 cores busy; the remaining 2 689 CS compiled in 789 s with 0 errors (before: ~200 shaders per 10 min). Local patch (~110 lines in `dxc.rs`, with a unit test); I can open a PR if that is wanted – I found none covering it. **4. With the CS cache filled, DXC is gone from the stall, and the driver remains.** Same title, warm DXIL cache: at 235 s three game threads wait in `resolve_wait` under `bind::graphics_bound`, `nvgpucomp64.dll` is busy on the D3D background threads; all `xcl-pso` workers idle. That run did not end in the watchdog: at 248 s a read of `0xffffffffffffffff` at `+0x4eedb0f`, with `rcx=0xff8000007f800000` (+inf/−inf, the initial value of an empty bounds pair). An earlier run ended the same way at `+0xa9ec5f` with the same `rcx`. Not tracked down yet. **5. With #533 (5e6aca8) on top:** at 214 s the bounded compute wait kicks in (`still building after 2616 ms – proceeding with stand-in`) and ~4 100 dispatches/ExecuteIndirects are skipped within 20 ms; the watchdog still fires at 240.7 s (`+0x23cf683`, same stack). So on this machine bounding the compute wait alone does not keep the main loop ticking. **Not tested:** AMD; `XCL_ASYNC_PSO=0`; `--pipelines` for all CS (stopped after 450: the driver built them about one at a time, ~3 h estimated); a larger pagefile. *Measured, written and posted with Claude Code (Claude Opus 5.5); the runs and the game are the user's.*
Author
Owner

@⁠burber on GitHub · 2026-11-24 02:55 UTC · original

RTX 4070 Ti (12 GB) + i5-13600K: what #101 takes, and the watchdog with #533 and with no pipeline waits at all

Setup: RTX 4070 Ti 12 GB (driver 32.0.16.1062, 32-lane waves), i5-13600K (SSE4a / CLZERO emulated), 32 GB RAM + 32 GB page file, Windows 11 26300, DXC 1.8.2502 (SDK 10.0.26100). Release build of main 9ce2070 + #533 + #267 (+ #300 before it merged). Title 1.0.2.1, XCL_NETWORK=0, DXIL cache precompiled (22 800 / 26 503 programs). Input scripted with XCL_PRESS_AT through the first-boot screens and the terms.

1. What command list #101 (newer layout) takes. I replaced the stub at slot 101 with a function that logs its arguments and still returns 0 (branch diag/list-101 on my fork). The title calls it in pairs on one list. The first pair came at 90 s, during loading, long before the stall:

#101 call 1: 0x2 0x1 0x1 0xbf00011d 0x0
#101 call 2: 0x2 0x0 0x0 0x0 0x0
#101 call 5: 0x2 0x1 0xffffffff00000000 0x11d 0x0
#101 call 6: 0x2 0x0 0x0 0x0 0x0
#101 call 7: 0x2 0x1 0x71974d6d4 0x2268478011d 0xff
#101 call 8: 0x2 0x0 0x0 0x0 0xff
  • Only the first two arguments are stable: 2 (the compute list type's value) and on/off.
  • Everything after them changes from call to call, so it looks like leftover registers.
  • No title address appears that the title later waits on.

So #101 looks like a toggle (with 2 = compute), not the write of the counter @⁠tadymila sees never written. On this machine, answering 0 does not look like the cause of the watchdog.

2. #533's bound is per pipeline, not per thread. With #533, one title thread hit five 4-second waits back to back:

347.3 s  [30908] compute pipeline … still building after 4000 ms – proceeding with stand-in
351.3 s  [30908] … 4000 ms
355.3 s  [30908] … 4000 ms
359.3 s  [30908] … 4000 ms
363.2 s  unhandled exception 0xc0000005 at +0x23cf683 (stack +0x4e4ba89, +0x2215c35, …)
364.3 s  [30908] … 4000 ms

That is 20 s without progress on that thread, after an 18 s gap with no presents that had already started at 322 s. It is the N × limit case #267 mentions.

3. With the waits removed it still ends at the watchdog. Same run with XCL_COMPUTE_PSO_WAIT_MS=1 XCL_PSO_WAIT_MS=1:

  • Zero-present gaps remained (156–168, 176–186, 200–210 s, and 228 s on) with no pipeline wait in them.
  • Watchdog at 343 s.

On this card, every run that reaches world loading shows the video memory jump #560 describes:

run local video memory target pages commit watchdog
with #533 (4 s waits) 12.3 GB at 284 s 8.4 GB 33 GB 363 s
waits at 1 ms 14.4 GB 9.8 GB 42 GB 343 s
diag/list-101 13.7 GB 9.6 GB 41 GB 215 s

So on a 12 GB NVIDIA card the stall looks like video memory oversubscription plus first pipeline builds, not #101 alone.

4. Series S profile (device_type = "lockhart", + #242).

  • At the menus: 7.3 GB local video memory and 1.9 GB of target pages, so it would help this card.
  • But on current main the title asserts every time at +0xb18de7 (0x80000003), about 3 s after the account is picked.
  • A fresh data root gives the same result, so it is not saved settings.
  • #242's own Series S run was on an older base with #203.

Full run table: QA.md on burber/xcl, branch pc-stack.

Investigated with AI assistance; all numbers are from runs on my machine.

**@⁠burber** on GitHub · 2026-11-24 02:55 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7120608273) **RTX 4070 Ti (12 GB) + i5-13600K: what #101 takes, and the watchdog with #533 and with no pipeline waits at all** **Setup:** RTX 4070 Ti 12 GB (driver 32.0.16.1062, 32-lane waves), i5-13600K (SSE4a / CLZERO emulated), 32 GB RAM + 32 GB page file, Windows 11 26300, DXC 1.8.2502 (SDK 10.0.26100). Release build of `main` 9ce2070 + #533 + #267 (+ #300 before it merged). Title 1.0.2.1, `XCL_NETWORK=0`, DXIL cache precompiled (22 800 / 26 503 programs). Input scripted with `XCL_PRESS_AT` through the first-boot screens and the terms. **1. What command list #101 (newer layout) takes.** I replaced the stub at slot 101 with a function that logs its arguments and still returns 0 (branch `diag/list-101` on my fork). The title calls it in pairs on one list. The first pair came at 90 s, during loading, long before the stall: ``` #101 call 1: 0x2 0x1 0x1 0xbf00011d 0x0 #101 call 2: 0x2 0x0 0x0 0x0 0x0 #101 call 5: 0x2 0x1 0xffffffff00000000 0x11d 0x0 #101 call 6: 0x2 0x0 0x0 0x0 0x0 #101 call 7: 0x2 0x1 0x71974d6d4 0x2268478011d 0xff #101 call 8: 0x2 0x0 0x0 0x0 0xff ``` - Only the first two arguments are stable: `2` (the compute list type's value) and on/off. - Everything after them changes from call to call, so it looks like leftover registers. - No title address appears that the title later waits on. So #101 looks like a toggle (with 2 = compute), not the write of the counter @⁠tadymila sees never written. On this machine, answering 0 does not look like the cause of the watchdog. **2. #533's bound is per pipeline, not per thread.** With #533, one title thread hit five 4-second waits back to back: ``` 347.3 s [30908] compute pipeline … still building after 4000 ms – proceeding with stand-in 351.3 s [30908] … 4000 ms 355.3 s [30908] … 4000 ms 359.3 s [30908] … 4000 ms 363.2 s unhandled exception 0xc0000005 at +0x23cf683 (stack +0x4e4ba89, +0x2215c35, …) 364.3 s [30908] … 4000 ms ``` That is 20 s without progress on that thread, after an 18 s gap with no presents that had already started at 322 s. It is the N × limit case #267 mentions. **3. With the waits removed it still ends at the watchdog.** Same run with `XCL_COMPUTE_PSO_WAIT_MS=1 XCL_PSO_WAIT_MS=1`: - Zero-present gaps remained (156–168, 176–186, 200–210 s, and 228 s on) with no pipeline wait in them. - Watchdog at 343 s. On this card, every run that reaches world loading shows the video memory jump #560 describes: | run | local video memory | target pages | commit | watchdog | |---|---|---|---|---| | with #533 (4 s waits) | 12.3 GB at 284 s | 8.4 GB | 33 GB | 363 s | | waits at 1 ms | 14.4 GB | 9.8 GB | 42 GB | 343 s | | `diag/list-101` | 13.7 GB | 9.6 GB | 41 GB | 215 s | So on a 12 GB NVIDIA card the stall looks like video memory oversubscription plus first pipeline builds, not #101 alone. **4. Series S profile (`device_type = "lockhart"`, + #242).** - At the menus: 7.3 GB local video memory and 1.9 GB of target pages, so it would help this card. - But on current main the title asserts every time at `+0xb18de7` (`0x80000003`), about 3 s after the account is picked. - A fresh data root gives the same result, so it is not saved settings. - #242's own Series S run was on an older base with #203. Full run table: `QA.md` on burber/xcl, branch `pc-stack`. Investigated with AI assistance; all numbers are from runs on my machine.
Author
Owner

@⁠crosettiremi on GitHub · 2026-11-24 02:37 UTC · original · edited 2026-11-24 03:16 UTC

I reproduced the same watchdog on Windows 11 build 26100 with a Radeon RX 7900 XT, driver 32.0.32029.2010, and retail 1.0.2.1 offline. The local a6f5f7a-based stack included #150, #208, #273, #473, the sparse scan change from #203, #486 and #508.

The game accepted the first-run setup and reached world loading. Slot #101 was first called at 529.288 seconds. The last 28 seconds had zero presents. At 564.039 seconds the title wrote to address zero at game_scarlett_master.exe+0x23cf683, with stack +0x4e4ba89, +0x2215c35, +0x71b9a20, +0x2215eca and GPU Loc Sig value 7333478d.

The report recorded 9,448 presents, zero failed pipelines and zero device removals. It counted 2,125 BC1 unpack requests with one failure. BC5, BC6H and BC7 refusals remained. This reproduces the watchdog with BC1 decoding active and establishes the position of the slot #101 stub in this run.

I repeated the saved-profile route with #433 on the local stack. The only cold driver compile logged was compute PSO 350466be0b198eed at 117.172 s. Its title thread was inside amdxc64.dll in all three subsequent dumps, including the one taken at the watchdog. The title aborted at 146.752 s, after 28 consecutive seconds with zero presents. The same key had missed on previous launches.

I matched that key to 346,956 bytes of already translated DXIL, zero static samplers and node mask 1. Creating that exact compute PSO on the RX 7900 XT outside the game took 32.460 s. The driver produced a 954-byte blob. A fresh process created the same PSO with that blob in 0.004 s. This times the driver stage independently of DXC translation.

With that blob added, the same retail binary and saved profile reached a new graphics PSO at 113.617 s. Its thread saved a driver blob by 114.051 s. Other title threads were waiting in set_pipeline_state → resolve_for_bind → resolve_wait at 115 s and 135 s, and another thread remained in the AMD compiler. The title still hit the same watchdog at 144.742 s. Prewarming this compute PSO cleared one repeated cache miss. Identifying the pipeline behind the remaining wait is the next diagnostic.

Follow-up with per-key in-game timing. The earlier 4 ms was measured in a fresh helper process. With the same blob present, XCL entered driver creation for key 350466be0b198eed at 118.324 s and never returned before the watchdog at 147.721 s. The requesting thread was still in the AMD compiler. I matched its input to InstanceCulling:CS_Tree_BatchCull_c47eb2b0_Wrapped by hashing the uncompressed shader record. I then used the same release xcl.exe shaders <folder-with-that-one-shader> --precompile --only cs --pipelines --windows 4 --split 0, on the same adapter and cache paths. That took 38.2 s. In the next retail run on the identical binary, the actual cached creation for the same key returned successfully in 3.15 ms. Additional world compute shaders then began building, and the watchdog still fired at 145.663 s. Which driver cache component accounts for the process difference remains open.

Broader precompile and world-loading result on the RX 7900 XT. A batch of 69 observed compute inputs created 69 driver pipelines. A broader batch of 534 selected inputs produced 349 driver pipelines, then reported four device-removal errors. All 534 translations passed the Windows SDK DXIL validator separately on the CPU. The full batch therefore has partial driver coverage. In a subsequent offline game run with that partial cache, the last interval with presents ended at 120.121 s. The same watchdog fired at 148.748 s with zero in-game device removals. The title recorded frame 1443 and 638 outstanding streaming requests. At 135 s a title thread was waiting for a driver compile slot in compute pipeline binding. The final dump also showed title threads waiting under ExecuteIndirect. I am testing #533 with the indirect-command guard from #574 on this route.

AI disclosure: Codex ran the diagnostics and prepared this report.

**@⁠crosettiremi** on GitHub · 2026-11-24 02:37 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7120320452) · edited 2026-11-24 03:16 UTC I reproduced the same watchdog on Windows 11 build 26100 with a Radeon RX 7900 XT, driver 32.0.32029.2010, and retail 1.0.2.1 offline. The local `a6f5f7a`-based stack included #150, #208, #273, #473, the sparse scan change from #203, #486 and #508. The game accepted the first-run setup and reached world loading. Slot #101 was first called at 529.288 seconds. The last 28 seconds had zero presents. At 564.039 seconds the title wrote to address zero at `game_scarlett_master.exe+0x23cf683`, with stack `+0x4e4ba89, +0x2215c35, +0x71b9a20, +0x2215eca` and `GPU Loc Sig` value `7333478d`. The report recorded 9,448 presents, zero failed pipelines and zero device removals. It counted 2,125 BC1 unpack requests with one failure. BC5, BC6H and BC7 refusals remained. This reproduces the watchdog with BC1 decoding active and establishes the position of the slot #101 stub in this run. I repeated the saved-profile route with #433 on the local stack. The only cold driver compile logged was compute PSO `350466be0b198eed` at 117.172 s. Its title thread was inside `amdxc64.dll` in all three subsequent dumps, including the one taken at the watchdog. The title aborted at 146.752 s, after 28 consecutive seconds with zero presents. The same key had missed on previous launches. I matched that key to 346,956 bytes of already translated DXIL, zero static samplers and node mask 1. Creating that exact compute PSO on the RX 7900 XT outside the game took **32.460 s**. The driver produced a 954-byte blob. A fresh process created the same PSO with that blob in **0.004 s**. This times the driver stage independently of DXC translation. With that blob added, the same retail binary and saved profile reached a new graphics PSO at 113.617 s. Its thread saved a driver blob by 114.051 s. Other title threads were waiting in `set_pipeline_state → resolve_for_bind → resolve_wait` at 115 s and 135 s, and another thread remained in the AMD compiler. The title still hit the same watchdog at 144.742 s. Prewarming this compute PSO cleared one repeated cache miss. Identifying the pipeline behind the remaining wait is the next diagnostic. **Follow-up with per-key in-game timing.** The earlier 4 ms was measured in a fresh helper process. With the same blob present, XCL entered driver creation for key `350466be0b198eed` at 118.324 s and never returned before the watchdog at 147.721 s. The requesting thread was still in the AMD compiler. I matched its input to `InstanceCulling:CS_Tree_BatchCull_c47eb2b0_Wrapped` by hashing the uncompressed shader record. I then used the same release `xcl.exe shaders <folder-with-that-one-shader> --precompile --only cs --pipelines --windows 4 --split 0`, on the same adapter and cache paths. That took 38.2 s. In the next retail run on the identical binary, the actual cached creation for the same key returned successfully in **3.15 ms**. Additional world compute shaders then began building, and the watchdog still fired at 145.663 s. Which driver cache component accounts for the process difference remains open. **Broader precompile and world-loading result on the RX 7900 XT.** A batch of 69 observed compute inputs created 69 driver pipelines. A broader batch of 534 selected inputs produced 349 driver pipelines, then reported four device-removal errors. All 534 translations passed the Windows SDK DXIL validator separately on the CPU. The full batch therefore has partial driver coverage. In a subsequent offline game run with that partial cache, the last interval with presents ended at 120.121 s. The same watchdog fired at 148.748 s with zero in-game device removals. The title recorded frame 1443 and 638 outstanding streaming requests. At 135 s a title thread was waiting for a driver compile slot in compute pipeline binding. The final dump also showed title threads waiting under ExecuteIndirect. I am testing #533 with the indirect-command guard from #574 on this route. AI disclosure: Codex ran the diagnostics and prepared this report.
Author
Owner

@⁠vibryxcx on GitHub · 2026-11-24 03:44 UTC · original

The larger page file on AMD RDNA2 / Windows, which @⁠S1m0ne1997's Not tested lists: it frees most of the DXC workers from dxc::wait_for_memory and about doubles the pipelines built before the stop, but the heartbeat abort comes at the same time.

Setup: as in my comment above (RX 6800 16 GB, driver 32.0.21045.5002; i5-10600KF; 32 GB RAM; Windows 11 26200; release). Build: main 3db536e + #533 5e6aca8 + #267 043d1f7, merged locally (2323f14, not pushed; details in my comment on #533). XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PSO_WAIT_MS=150, XCL_PRESS_A_AT=14,17,21,125,131,…,197. Page file changed from system-managed (13.8 GB, commit limit 45.4 GB) to 32–64 GB (commit limit 63.9 GB), with a restart in between. One run each.

commit limit 45.4 GB commit limit 63.9 GB
+0x23cf683 at 294.2 s 303.2 s
background_pipelines at the stop [119, 0, 58646] [206, 0, 58558]
xcl-dxc workers in dxc::wait_for_memory (of 11) 10 3
xcl-dxc workers in dxcompiler.dll 1 5
xcl-pso* workers in amdxc64.dll 2 4
process commit at 301 s – (stopped at 294 s) 35.6 GB
local video memory at 301 s – 20.2 GB on the 16 GB card

main 3db536e alone on the 63.9 GB limit: abort at 302.0 s, [46, 0, 58715], four title threads in resolve_wait ← bind::set_pipeline_state.

With both PRs, no title thread is in an unbounded pipeline wait at the stop, and three Wait64BitValueX timed out … memory holds Some(0) lines come about 18 s before it, as in @⁠tadymila's and @⁠xstraok's runs. So on this card, too, what is left once the pipeline waits are bounded is not the commit gate.

Not tested: a warm or precompiled DXIL cache; a page file over 64 GB; more than one run each.

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

**@⁠vibryxcx** on GitHub · 2026-11-24 03:44 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7121378012) The larger page file on **AMD RDNA2 / Windows**, which @⁠S1m0ne1997's **Not tested** lists: it frees most of the DXC workers from `dxc::wait_for_memory` and about doubles the pipelines built before the stop, but the heartbeat abort comes at the same time. **Setup:** as in my comment above (RX 6800 16 GB, driver 32.0.21045.5002; i5-10600KF; 32 GB RAM; Windows 11 26200; release). Build: `main` `3db536e` + #533 `5e6aca8` + #267 `043d1f7`, merged locally (`2323f14`, not pushed; details in my comment on #533). `XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PSO_WAIT_MS=150`, `XCL_PRESS_A_AT=14,17,21,125,131,…,197`. Page file changed from system-managed (13.8 GB, commit limit 45.4 GB) to 32–64 GB (commit limit 63.9 GB), with a restart in between. One run each. | | commit limit 45.4 GB | commit limit 63.9 GB | |---|---|---| | `+0x23cf683` at | 294.2 s | 303.2 s | | `background_pipelines` at the stop | `[119, 0, 58646]` | `[206, 0, 58558]` | | `xcl-dxc` workers in `dxc::wait_for_memory` (of 11) | 10 | 3 | | `xcl-dxc` workers in `dxcompiler.dll` | 1 | 5 | | `xcl-pso*` workers in `amdxc64.dll` | 2 | 4 | | process commit at 301 s | – (stopped at 294 s) | 35.6 GB | | local video memory at 301 s | – | 20.2 GB on the 16 GB card | `main` `3db536e` alone on the 63.9 GB limit: abort at 302.0 s, `[46, 0, 58715]`, four title threads in `resolve_wait` ← `bind::set_pipeline_state`. With both PRs, no title thread is in an unbounded pipeline wait at the stop, and three `Wait64BitValueX timed out … memory holds Some(0)` lines come about 18 s before it, as in @⁠tadymila's and @⁠xstraok's runs. So on this card, too, what is left once the pipeline waits are bounded is not the commit gate. **Not tested:** a warm or precompiled DXIL cache; a page file over 64 GB; more than one run each. **AI use:** Claude Code (Claude Opus 5.5): ran the tests and wrote this report.
Author
Owner

@⁠ezbyDev on GitHub · 2026-11-24 04:08 UTC · original

I'll take the fix for @⁠vibryxcx's finding above (the waiting list is submitted before the list that writes its counter, and XCL waits on the CPU first). Plan, in list_x.rs, one PR:

  • Lists remember the values their Write32/64BitValue…X put at each address, until they are submitted (cleared on Reset).
  • In execute_with_waits and KickoffX, for a wait that is not yet met: if another recorded, not yet submitted list writes a value there that meets it, the waiting queue gets ID3D12CommandQueue::Wait on a fence of that writer list and the list goes to the GPU at once. The writer's queue signals that fence right after the writer list is submitted. The title's thread is not held.
  • If the writer list is reset without being submitted, or 10 s pass, the CPU signals the fence, so no GPU queue waits forever.
  • A wait with no such writer stays a CPU wait, as now.
  • Tests: the lookup as a unit test, and a GPU test: two queues, a waiting list submitted before its writer must return at once and see the written value.

Not covered: writers that are not recorded lists (CPU, SignalX). I'll post the regression runs in the PR.

AI use: Claude Code (Claude Opus 5.5).

**@⁠ezbyDev** on GitHub · 2026-11-24 04:08 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7121744212) I'll take the fix for @⁠vibryxcx's finding above (the waiting list is submitted before the list that writes its counter, and XCL waits on the CPU first). Plan, in `list_x.rs`, one PR: - Lists remember the values their `Write32/64BitValue…X` put at each address, until they are submitted (cleared on Reset). - In `execute_with_waits` and `KickoffX`, for a wait that is not yet met: if another recorded, not yet submitted list writes a value there that meets it, the waiting queue gets `ID3D12CommandQueue::Wait` on a fence of that writer list and the list goes to the GPU at once. The writer's queue signals that fence right after the writer list is submitted. The title's thread is not held. - If the writer list is reset without being submitted, or 10 s pass, the CPU signals the fence, so no GPU queue waits forever. - A wait with no such writer stays a CPU wait, as now. - Tests: the lookup as a unit test, and a GPU test: two queues, a waiting list submitted before its writer must return at once and see the written value. Not covered: writers that are not recorded lists (CPU, `SignalX`). I'll post the regression runs in the PR. AI use: Claude Code (Claude Opus 5.5).
Author
Owner

@⁠vibryxcx on GitHub · 2026-11-24 04:01 UTC · original · edited 2026-11-24 04:12 UTC

What the Wait64BitValueX … memory holds Some(0) timeouts are waiting for: a counter that a list on another queue writes, and that list is submitted by the title after the waiting lists, from the same thread. XCL evaluates the wait on the CPU before submitting the waiting list (list_x::execute_with_waits → wait_all, and the same in KickoffX), so the writer cannot be submitted until each wait has timed out. That is 2 s per wait, and the waiting lists then go to the GPU without the value.

Setup: RX 6800 (RDNA2), driver 32.0.21045.5002; i5-10600KF; 32 GB RAM, commit limit 63.9 GB; Windows 11 26200; release. Build: main 3db536e + #533 5e6aca8 + #267 043d1f7 (local merge 2323f14, as in my comments above), plus a local trace (not pushed): every Write32/64BitValue* and Wait32/64BitValueX recorded at an address in 0x70417f000..0x704180000, every submission of a list carrying one, and the time the CPU held a list. XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PSO_WAIT_MS=150, XCL_PRESS_A_AT=14,17,21,125,131,…,197. One run.

The three timeouts of that run, from the trace (lists, queues and threads as logged):

t (s) log thread what
271.780 7028 list W1 (…39090) records Write64BitValueBottomOfPipeX at 0x70417f9d8 = 0x1443
271.788 7028 list A (…e8170) records Wait64BitValueX at 0x70417f9d8, op 7 (≥), want 0x1443; memory holds 0
271.816 – 271.821 4676 list W2 (…98720) records writes at 0x70417f990 and 0x70417fa68 = 0x1443; list B (…1a850) records waits on both
277.654 4740 ExecuteCommandLists of A (queue …6640): the CPU wait begins
279.655 4740 Wait64BitValueX timed out after 2000 ms at 0x70417f9d8 … memory holds Some(0); A is submitted
279.682 4740 ExecuteCommandLists of B (queue …87c0): the CPU waits on 0x70417f990, then 0x70417fa68
281.684, 283.685 4740 both time out (memory 0); B is submitted after 4,004 ms
283.708 4740 W1 submitted (queue …6e10)
283.727 4740 W2 submitted (queue …6e10)
  • All four submissions are on the same thread (4740), in the order A, B, W1, W2, on three queues. On the console, A and B would wait on the GPU until queue …6e10 reaches the writes. Here the submitting thread is held for 6 s, and A and B run before the values exist.
  • The counters are in unified memory and not in a sparse window (uma=true sparse=false for every traced address), so the readback after execution is not involved.
  • Of the 46 traced waits in the run, only these two submissions had to wait on the CPU. In the other submissions, the value was already there.
  • The heartbeat abort came 14.5 s after W2 was submitted (+0x23cf683 at 298.2 s, as before). I have not shown what the title does in between.

This looks like the "fence ring that never gets signalled" @⁠brainhay5 reports in #616 (0x70417ff88 … ffe8, want 0x623), seen from the submit side.

So the GPU-side cross-queue wait the title relies on is turned into a CPU wait that runs before the writer is even submitted. One direction that keeps the title's submit order: a memory wait whose writer is recorded in a list that has not been submitted yet becomes a GPU wait (ID3D12CommandQueue::Wait on a fence that the writer's queue signals after that list), instead of a CPU wait before submitting. I have not tried it.

Not tested: more than one run; other address ranges (the trace covered only 0x70417f000..0x704180000); whether the same order happens earlier in loading without a timeout; any fix. I can share the trace patch (about 70 lines in list_x.rs / real.rs, logging only) if it helps.

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


Update: with those waits moved to the GPU, the abort comes at the same time. I tried the direction above locally (not pushed, XCL_GPU_WAITS=1, about 120 lines in list_x.rs / real.rs):

  • A list's 64-bit bottom-of-pipe writes into unified memory are kept as (va, value).
  • After the list's ExecuteCommandLists / KickoffX, its queue Signals a fence per counter address with that value.
  • A Wait64BitValueX with op 7 (≥) on a counter seen written that way, and not yet satisfied at submit, becomes ID3D12CommandQueue::Wait(fence, want) on the waiting queue instead of the CPU wait.
  • Everything else is unchanged. cargo test -p xcl --lib list_x: 16 passed, 0 failed, with and without the variable.

Same machine, build and command as above, with the trace still on. One run:

CPU waits (above) GPU waits
Wait64BitValueX timed out 3 0
traced CPU waits before a submit 2 (2,001 ms and 4,004 ms) 0
waits turned into GPU waits – 6 (277.338 – 277.397 s, on two queues)
those counters' fences signalled – all 6, at 277.358 – 277.437 s, when their writer lists were submitted 20–40 ms later
device removals 0 0
+0x23cf683 at 298.2 s 298.2 s
last submit – 279.1 s
background_pipelines – [204, 0, 58560]

So in this run the cross-queue waits resolve on the GPU as on the console, and nothing hangs on them. The heartbeat still stops: the last submit is at 279 s. At the stop, the only title thread inside XCL is in Condvar::wait_timeout ← pso_async::resolve_for_draw (#267's bounded wait, 150 ms here). I read this as: the CPU-side wait is a correctness problem (lists running before their counter is written, 2 s per wait), but on this machine it is not what holds the title's main loop when the abort comes.

Not tested (update): more than one run; where the title's main thread waits between 279 s and the abort.

**@⁠vibryxcx** on GitHub · 2026-11-24 04:01 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7121635294) · edited 2026-11-24 04:12 UTC **What the `Wait64BitValueX … memory holds Some(0)` timeouts are waiting for:** a counter that a list on **another queue** writes, and that list is submitted by the title **after** the waiting lists, from the **same thread**. XCL evaluates the wait on the CPU before submitting the waiting list (`list_x::execute_with_waits` → `wait_all`, and the same in `KickoffX`), so the writer cannot be submitted until each wait has timed out. That is 2 s per wait, and the waiting lists then go to the GPU without the value. **Setup:** RX 6800 (RDNA2), driver 32.0.21045.5002; i5-10600KF; 32 GB RAM, commit limit 63.9 GB; Windows 11 26200; release. Build: `main` `3db536e` + #533 `5e6aca8` + #267 `043d1f7` (local merge `2323f14`, as in my comments above), plus a local trace (not pushed): every `Write32/64BitValue*` and `Wait32/64BitValueX` recorded at an address in `0x70417f000..0x704180000`, every submission of a list carrying one, and the time the CPU held a list. `XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PSO_WAIT_MS=150`, `XCL_PRESS_A_AT=14,17,21,125,131,…,197`. One run. **The three timeouts of that run, from the trace** (lists, queues and threads as logged): | t (s) | log thread | what | |---|---|---| | 271.780 | 7028 | list `W1` (`…39090`) records `Write64BitValueBottomOfPipeX` at `0x70417f9d8` = `0x1443` | | 271.788 | 7028 | list `A` (`…e8170`) records `Wait64BitValueX` at `0x70417f9d8`, op 7 (≥), want `0x1443`; memory holds 0 | | 271.816 – 271.821 | 4676 | list `W2` (`…98720`) records writes at `0x70417f990` and `0x70417fa68` = `0x1443`; list `B` (`…1a850`) records waits on both | | 277.654 | 4740 | `ExecuteCommandLists` of `A` (queue `…6640`): the CPU wait begins | | 279.655 | 4740 | `Wait64BitValueX timed out after 2000 ms at 0x70417f9d8 … memory holds Some(0)`; `A` is submitted | | 279.682 | 4740 | `ExecuteCommandLists` of `B` (queue `…87c0`): the CPU waits on `0x70417f990`, then `0x70417fa68` | | 281.684, 283.685 | 4740 | both time out (memory 0); `B` is submitted after 4,004 ms | | **283.708** | 4740 | **`W1` submitted** (queue `…6e10`) | | **283.727** | 4740 | **`W2` submitted** (queue `…6e10`) | - All four submissions are on the same thread (4740), in the order `A`, `B`, `W1`, `W2`, on three queues. On the console, `A` and `B` would wait on the GPU until queue `…6e10` reaches the writes. Here the submitting thread is held for 6 s, and `A` and `B` run before the values exist. - The counters are in unified memory and not in a sparse window (`uma=true sparse=false` for every traced address), so the readback after execution is not involved. - Of the 46 traced waits in the run, only these two submissions had to wait on the CPU. In the other submissions, the value was already there. - The heartbeat abort came 14.5 s after `W2` was submitted (`+0x23cf683` at 298.2 s, as before). I have not shown what the title does in between. This looks like the "fence ring that never gets signalled" @⁠brainhay5 reports in #616 (`0x70417ff88 … ffe8`, `want 0x623`), seen from the submit side. So the GPU-side cross-queue wait the title relies on is turned into a CPU wait that runs before the writer is even submitted. One direction that keeps the title's submit order: a memory wait whose writer is recorded in a list that has not been submitted yet becomes a GPU wait (`ID3D12CommandQueue::Wait` on a fence that the writer's queue signals after that list), instead of a CPU wait before submitting. I have not tried it. **Not tested:** more than one run; other address ranges (the trace covered only `0x70417f000..0x704180000`); whether the same order happens earlier in loading without a timeout; any fix. I can share the trace patch (about 70 lines in `list_x.rs` / `real.rs`, logging only) if it helps. **AI use:** Claude Code (Claude Opus 5.5): wrote the trace, ran the test and wrote this report. --- **Update: with those waits moved to the GPU, the abort comes at the same time.** I tried the direction above locally (not pushed, `XCL_GPU_WAITS=1`, about 120 lines in `list_x.rs` / `real.rs`): - A list's 64-bit bottom-of-pipe writes into unified memory are kept as `(va, value)`. - After the list's `ExecuteCommandLists` / `KickoffX`, its queue `Signal`s a fence per counter address with that value. - A `Wait64BitValueX` with op 7 (≥) on a counter seen written that way, and not yet satisfied at submit, becomes `ID3D12CommandQueue::Wait(fence, want)` on the waiting queue instead of the CPU wait. - Everything else is unchanged. `cargo test -p xcl --lib list_x`: 16 passed, 0 failed, with and without the variable. Same machine, build and command as above, with the trace still on. One run: | | CPU waits (above) | GPU waits | |---|---|---| | `Wait64BitValueX timed out` | 3 | 0 | | traced CPU waits before a submit | 2 (2,001 ms and 4,004 ms) | 0 | | waits turned into GPU waits | – | 6 (277.338 – 277.397 s, on two queues) | | those counters' fences signalled | – | all 6, at 277.358 – 277.437 s, when their writer lists were submitted 20–40 ms later | | device removals | 0 | 0 | | `+0x23cf683` at | 298.2 s | 298.2 s | | last submit | – | 279.1 s | | `background_pipelines` | – | `[204, 0, 58560]` | So in this run the cross-queue waits resolve on the GPU as on the console, and nothing hangs on them. The heartbeat still stops: the last submit is at 279 s. At the stop, the only title thread inside XCL is in `Condvar::wait_timeout` ← `pso_async::resolve_for_draw` (#267's bounded wait, 150 ms here). I read this as: the CPU-side wait is a correctness problem (lists running before their counter is written, 2 s per wait), but on this machine it is not what holds the title's main loop when the abort comes. **Not tested (update):** more than one run; where the title's main thread waits between 279 s and the abort.
Author
Owner

@⁠shelbykb2 on GitHub · 2026-11-24 04:16 UTC · original

RX 6800 runs with the same two changes in place (GPU-side Wait64BitValueX and no title thread building pipelines): the +0x23cf683 abort no longer comes; the run then ends when the process runs out of commit while pipelines are built. This matches @⁠vibryxcx's finding above from a second RX 6800, and adds what happens after it. @⁠ezbyDev: we have a local implementation of the plan you posted; I will not open a competing PR, and will test yours on this card when it is up. Notes on what ours needed are below in case they save you a run.

Setup: AMD Radeon RX 6800 16 GB, driver 32.0.21045.29003; Ryzen 9 7950X3D; 64 GB RAM, commit limit 145 GB; Windows 11; release; XCL_NETWORK=0, scripted A presses every 10 s from 40 s to 300 s. Local changes are not pushed. One local switch is on in every run and differs from main: allocations with protect bit 0x2000 go to the sparse windows, so the waited counters here are in a sparse window, not in unified memory as in the run above.

run build Wait64BitValueX timed out title-thread waits ≥ 250 ms on a pipeline end
1 main 3516080 + dispatches of a compute pipeline still building are skipped – 42 (45.9 s in all, every one a graphics pipeline) +0x23cf683 at 412 s
2 main 508a0c7 + 1 + draws skipped too, graphics and compute built by separate worker pools, a per-thread wait budget (100 ms per second) – 0 +0x23cf683 at 539 s, 349 MB of commit free
3 2, warm caches, with a trace of who records each waited write 31 10 +0x23cf683 at 507 s
4, 5 3 + GPU waits (fence per counter address, queue.Wait on the waiting queue, signalled when the writer list is submitted) 0, 0 5, 0 device removed 0x887a0006 at 491 s and 497 s
6 main 63cdc25 + all of the above 0 0 no abort, no device removal; the log ends at 442 s with 1 GB of commit free
– main 63cdc25 + the switch and local logging only 5 not logged +0x23cf683 at 347 s
  • Run 1, the question "where does the title wait when only compute is bounded": in its last 30 s (382 – 412 s) one title thread sat in 25 consecutive first-use builds of graphics pipelines, 0.6 – 1.6 s each (about 0.1 s translation, the rest in the driver). A cap per draw does not bound that; a budget per thread over time did (run 2: no wait of 250 ms or more).
  • Run 3: from 429 s to the abort the one thread that calls ExecuteCommandLists and PresentX is in every thread dump inside execute_with_waits → wait_all; each waited value was recorded on a list not yet submitted, and arrives later (the same order as in the table above).
  • Runs 4 – 6, GPU waits: in run 6, more than 256 waits went to the GPU; their writes were submitted 18 – 475 ms later in the lines sampled, 1,283 ms at most. Two things beyond the plan were needed here: (a) a wait on the same queue as its writer, and a two-queue cycle, must stay on the CPU path or the queue stalls until the release; (b) with the counters in a sparse window, the copy-back of sparse writes made the submit thread wait for the very queue the GPU wait was holding, so it is done on a worker while a GPU wait is pending. (b) may not apply when the counters are in unified memory.
  • Run 6, what ends it: process private bytes are 25.7 GB at 317 s, 44.9 GB at 378 s, 78.0 GB at 409 s and 138.9 GB at 442 s (sampled every 5 s from outside), while 575 compute and 285 graphics pipelines are being built; 59,476 dispatches and 7,838 draws had been skipped by then. The title's own allocations stay near 15 GB through loading in the run where they were walked (run 3). A separate test that built compute pipelines ahead of use and kept them went from 17 GB to 111 GB while 1,067 were built, in the menus. I have not yet split this between the driver's live pipeline objects, compiles in progress and XCL's own copies.
  • Device removals in runs 4 and 5: cause not found; the driver reports a timeout. Run 6, on the newer main, did not have one. One run.

Not tested: more than one run per row; other titles; NVIDIA; the waits without the protect-bit switch; whether skipped dispatches leave later passes reading unwritten data (they must, for the frames concerned).

AI use: Claude Code (Claude Fable 5.2 orchestrating, Claude Opus 5.5 workers): wrote the local changes, ran the tests and wrote this report from the run logs.

**@⁠shelbykb2** on GitHub · 2026-11-24 04:16 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7121863654) **RX 6800 runs with the same two changes in place (GPU-side `Wait64BitValueX` and no title thread building pipelines): the `+0x23cf683` abort no longer comes; the run then ends when the process runs out of commit while pipelines are built.** This matches @⁠vibryxcx's finding above from a second RX 6800, and adds what happens after it. @⁠ezbyDev: we have a local implementation of the plan you posted; I will not open a competing PR, and will test yours on this card when it is up. Notes on what ours needed are below in case they save you a run. **Setup:** AMD Radeon RX 6800 16 GB, driver 32.0.21045.29003; Ryzen 9 7950X3D; 64 GB RAM, commit limit 145 GB; Windows 11; release; `XCL_NETWORK=0`, scripted A presses every 10 s from 40 s to 300 s. Local changes are not pushed. One local switch is on in every run and differs from `main`: allocations with protect bit 0x2000 go to the sparse windows, so the waited counters here are in a sparse window, not in unified memory as in the run above. | run | build | `Wait64BitValueX timed out` | title-thread waits ≥ 250 ms on a pipeline | end | |---|---|---|---|---| | 1 | `main` `3516080` + dispatches of a compute pipeline still building are skipped | – | 42 (45.9 s in all, every one a graphics pipeline) | `+0x23cf683` at 412 s | | 2 | `main` `508a0c7` + 1 + draws skipped too, graphics and compute built by separate worker pools, a per-thread wait budget (100 ms per second) | – | 0 | `+0x23cf683` at 539 s, 349 MB of commit free | | 3 | 2, warm caches, with a trace of who records each waited write | 31 | 10 | `+0x23cf683` at 507 s | | 4, 5 | 3 + GPU waits (fence per counter address, `queue.Wait` on the waiting queue, signalled when the writer list is submitted) | 0, 0 | 5, 0 | device removed `0x887a0006` at 491 s and 497 s | | 6 | `main` `63cdc25` + all of the above | 0 | 0 | no abort, no device removal; the log ends at 442 s with 1 GB of commit free | | – | `main` `63cdc25` + the switch and local logging only | 5 | not logged | `+0x23cf683` at 347 s | - **Run 1, the question "where does the title wait when only compute is bounded":** in its last 30 s (382 – 412 s) one title thread sat in 25 consecutive first-use builds of graphics pipelines, 0.6 – 1.6 s each (about 0.1 s translation, the rest in the driver). A cap per draw does not bound that; a budget per thread over time did (run 2: no wait of 250 ms or more). - **Run 3:** from 429 s to the abort the one thread that calls `ExecuteCommandLists` and `PresentX` is in every thread dump inside `execute_with_waits` → `wait_all`; each waited value was recorded on a list not yet submitted, and arrives later (the same order as in the table above). - **Runs 4 – 6, GPU waits:** in run 6, more than 256 waits went to the GPU; their writes were submitted 18 – 475 ms later in the lines sampled, 1,283 ms at most. Two things beyond the plan were needed here: (a) a wait on the same queue as its writer, and a two-queue cycle, must stay on the CPU path or the queue stalls until the release; (b) with the counters in a sparse window, the copy-back of sparse writes made the submit thread wait for the very queue the GPU wait was holding, so it is done on a worker while a GPU wait is pending. (b) may not apply when the counters are in unified memory. - **Run 6, what ends it:** process private bytes are 25.7 GB at 317 s, 44.9 GB at 378 s, 78.0 GB at 409 s and 138.9 GB at 442 s (sampled every 5 s from outside), while 575 compute and 285 graphics pipelines are being built; 59,476 dispatches and 7,838 draws had been skipped by then. The title's own allocations stay near 15 GB through loading in the run where they were walked (run 3). A separate test that built compute pipelines ahead of use and kept them went from 17 GB to 111 GB while 1,067 were built, in the menus. I have not yet split this between the driver's live pipeline objects, compiles in progress and XCL's own copies. - **Device removals in runs 4 and 5:** cause not found; the driver reports a timeout. Run 6, on the newer `main`, did not have one. One run. **Not tested:** more than one run per row; other titles; NVIDIA; the waits without the protect-bit switch; whether skipped dispatches leave later passes reading unwritten data (they must, for the frames concerned). **AI use:** Claude Code (Claude Fable 5.2 orchestrating, Claude Opus 5.5 workers): wrote the local changes, ran the tests and wrote this report from the run logs.
Author
Owner

@⁠itsd-effex on GitHub · 2026-11-24 03:56 UTC · original · edited 2026-11-24 04:22 UTC

Linux (Wine + vkd3d-proton) data point: the same stop, but here the wait is in vkd3d-proton's DXIL → SPIR-V step, not in DXC.

Setup: RTX 3080 Ti 12 GB (NVIDIA 620.73.04), i7-11700KF, 32 GB RAM + 36 GB swap, Linux. Wine from Proton Experimental and patched vkd3d-proton 3.1 (the #257 kit). Release build: main 91f9a5e + #684 (e56dbc3) + #273 (BC1), merge 53fcb50. Retail 1.0.2.1, XCL_NETWORK=0.

The stop: +0x23cf683 at 200 s, GPU Loc Sig 7333478d, the usual stack. CommandList10::#101 was first called at 159 s. Presents went from 30 fps (to frame 1200, ~61 s) to 5.1 fps by frame 1500 (120 s).

XCL's thread dump at the stop, symbolized with the build's xcl.pdb:

  • Title threads 564, 568 and 576 have the same stack: bind → pso_async::resolve_for_bind → pso_async::resolve_wait → futex wait. That's the same compute wait as emirduran707's dump.
  • Thread 572 is busy inside d3d12core.dll (vkd3d-proton) in a recursive function: 13 frames of d3d12core.dll+0x1ad864 before the dump's cut-off. The local build's line info puts it in dxil-spirv's node.cpp. The dump is truncated there, so I can't see whether 572 is a title thread running the build in resolve_wait, or what called it.
  • No thread is in dxcompiler.dll, the xcl-dxc-* / xcl-pso-* threads are parked, and the last compute PSOs logged before it took 0–1 ms of DXC.

So on this stack the time goes into the driver side's conversion of a compute shader, not DXC. If that conversion runs on a title thread, bounding the other waiters (#533) won't free that thread. That was wrong: #533 sends compute builds to its own xcl-pso-compute pool instead of building on the calling thread. See the update below.

The same code also crashes: with #539's head 4ff33f0 (background compute pre-compile), a run crashed at ~82 s with a null read at 0x118 in d3d12core.dll+0x1ab325. Line info: dxil-spirv node.cpp → cfg_structurizer.cpp. The crashing thread had built an 806,472 B DXIL compute PSO 250 ms earlier. With XCL_LAZY_COMPUTE_PSO=1 on the same build there was no crash to 117 s, and the largest compute DXIL built was 105 KB. Every other run of mine peaked at 105 KB too. So on vkd3d-proton the large translated compute programs are either very slow or crash in dxil-spirv's structurizer.

Not tested: Which pipeline 572 was converting (no shader dump). A newer vkd3d-proton / dxil-spirv than the #257 kit's 3.1.

AI use: Claude Code (Claude Opus 5.5) symbolized the dumps (llvm-symbolizer with xcl.pdb, addr2line with the local d3d12core.dll), read the logs and drafted this comment. The runs are mine, on the hardware above.

Update (edited): a second run, and #533.

  • Same build again, with XCL_ACTIVITY=1 and XCL_THREAD_DUMP_AT=140,160,175,185,195: the same stop at 204 s (7333478d). There are 0 submits from ~176 s. From the 175 s dump on, title threads 564/568/572/576 are in resolve_wait. Title thread 560 builds the pipeline itself: resolve_for_bind → resolve_wait → real::translated_compute_pso → vkd3d device.c → state.c → dxil.c → dxil-spirv cfg_structurizer.cpp / node.cpp. It stays there from 175 s to the stop, ≥ 29 s on one compute shader. DXC is idle. (The compute PSO … (N B DXIL, T ms) line is logged after the driver returns, so the stuck shader's size isn't in the log.)
  • With #533 (a966993) merged on top (0d1c76b, no conflicts) and XCL_COMPUTE_PSO_WAIT_MS=1: six still building after 1 ms – proceeding with stand-in lines. At the stop the dxil-spirv work is on xcl-pso-compute-1 / -3 (in node.cpp), and xcl-pso-compute-2 is in winevulkan.dll, not on title threads. The title still stops, at 199 s, but with a different signature, GPU Loc Sig c20e3b19. Two things hold it, the same pair as on the RX 9070 XT in #662:
    • Title threads 564 and 568 are in resolve_for_indirect → resolve_wait, the unbounded graphics wait for ExecuteIndirect. The xcl-pso-* graphics workers are idle and one xcl-dxc-* thread is compiling.
    • From 171 s there are 16 Wait64BitValueX timed out after 2000 ms (want 0x62d, memory holds Some(0), at 0x70417f990…0x70417fb48) back to back, with 0 presents from ~172 s.
  • So with #533, vkd3d-proton's slow conversions stop being a Linux-only blocker. What's left matches Windows.

Update 2 (edited): every pipeline wait bounded on Linux leaves only the CPU-side Wait64 wait.

  • Build: current main f4ce27c (with #690's preload) + #684 + #273 + #533 + #267. The #533/#267 conflicts are resolved locally, with resolve_for_indirect sending graphics through #267's resolve_for_draw, as jimokulou2-ops did in #662. XCL_PSO_WAIT_MS=1 XCL_COMPUTE_PSO_WAIT_MS=1, one run.
  • The world is reached sooner (#101 at 99 s instead of 159–171 s). 7 compute and 22 graphics stand-ins are used, and no thread waits ≥ 2 s for a pipeline.
  • The stop: +0x23cf683 at 173 s, GPU Loc Sig 2246f679. Before it, 16 Wait64BitValueX timed out after 2000 ms (want 0x624, memory holds Some(0)), all on one thread, 144–175 s. At the stop, the only title thread blocked in XCL is in ExecuteCommandLists → list_x::execute_with_waits → wait64_x. So on Linux too, the next thing in the way is the CPU-side wait ezbyDev is taking on. I'll run that PR on this stack when it's up.
**@⁠itsd-effex** on GitHub · 2026-11-24 03:56 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7121561322) · edited 2026-11-24 04:22 UTC Linux (Wine + vkd3d-proton) data point: the same stop, but here the wait is in vkd3d-proton's DXIL → SPIR-V step, not in DXC. **Setup:** RTX 3080 Ti 12 GB (NVIDIA 620.73.04), i7-11700KF, 32 GB RAM + 36 GB swap, Linux. Wine from Proton Experimental and patched vkd3d-proton 3.1 (the #257 kit). Release build: `main` `91f9a5e` + #684 (`e56dbc3`) + #273 (BC1), merge `53fcb50`. Retail 1.0.2.1, `XCL_NETWORK=0`. **The stop:** `+0x23cf683` at 200 s, `GPU Loc Sig` `7333478d`, the usual stack. `CommandList10::#101` was first called at 159 s. Presents went from 30 fps (to frame 1200, ~61 s) to 5.1 fps by frame 1500 (120 s). **XCL's thread dump at the stop**, symbolized with the build's `xcl.pdb`: - Title threads 564, 568 and 576 have the same stack: `bind` → `pso_async::resolve_for_bind` → `pso_async::resolve_wait` → futex wait. That's the same compute wait as emirduran707's dump. - Thread 572 is busy inside `d3d12core.dll` (vkd3d-proton) in a recursive function: 13 frames of `d3d12core.dll+0x1ad864` before the dump's cut-off. The local build's line info puts it in dxil-spirv's `node.cpp`. The dump is truncated there, so I can't see whether 572 is a title thread running the build in `resolve_wait`, or what called it. - No thread is in `dxcompiler.dll`, the `xcl-dxc-*` / `xcl-pso-*` threads are parked, and the last compute PSOs logged before it took 0–1 ms of DXC. So on this stack the time goes into the driver side's conversion of a compute shader, not DXC. ~~If that conversion runs on a title thread, bounding the other waiters (#533) won't free that thread.~~ That was wrong: #533 sends compute builds to its own `xcl-pso-compute` pool instead of building on the calling thread. See the update below. **The same code also crashes:** with #539's head `4ff33f0` (background compute pre-compile), a run crashed at ~82 s with a null read at `0x118` in `d3d12core.dll+0x1ab325`. Line info: dxil-spirv `node.cpp` → `cfg_structurizer.cpp`. The crashing thread had built an 806,472 B DXIL compute PSO 250 ms earlier. With `XCL_LAZY_COMPUTE_PSO=1` on the same build there was no crash to 117 s, and the largest compute DXIL built was 105 KB. Every other run of mine peaked at 105 KB too. So on vkd3d-proton the large translated compute programs are either very slow or crash in dxil-spirv's structurizer. **Not tested:** Which pipeline 572 was converting (no shader dump). A newer vkd3d-proton / dxil-spirv than the #257 kit's 3.1. **AI use:** Claude Code (Claude Opus 5.5) symbolized the dumps (`llvm-symbolizer` with `xcl.pdb`, `addr2line` with the local `d3d12core.dll`), read the logs and drafted this comment. The runs are mine, on the hardware above. **Update (edited): a second run, and #533.** - **Same build again**, with `XCL_ACTIVITY=1` and `XCL_THREAD_DUMP_AT=140,160,175,185,195`: the same stop at 204 s (`7333478d`). There are 0 submits from ~176 s. From the 175 s dump on, title threads 564/568/572/576 are in `resolve_wait`. Title thread 560 builds the pipeline itself: `resolve_for_bind` → `resolve_wait` → `real::translated_compute_pso` → vkd3d `device.c` → `state.c` → `dxil.c` → dxil-spirv `cfg_structurizer.cpp` / `node.cpp`. It stays there from 175 s to the stop, ≥ 29 s on one compute shader. DXC is idle. (The `compute PSO … (N B DXIL, T ms)` line is logged after the driver returns, so the stuck shader's size isn't in the log.) - **With #533 (`a966993`) merged on top** (`0d1c76b`, no conflicts) and `XCL_COMPUTE_PSO_WAIT_MS=1`: six `still building after 1 ms – proceeding with stand-in` lines. At the stop the dxil-spirv work is on `xcl-pso-compute-1` / `-3` (in `node.cpp`), and `xcl-pso-compute-2` is in `winevulkan.dll`, not on title threads. The title still stops, at 199 s, but with a different signature, **`GPU Loc Sig` `c20e3b19`**. Two things hold it, the same pair as on the RX 9070 XT in #662: - Title threads 564 and 568 are in `resolve_for_indirect` → `resolve_wait`, the unbounded graphics wait for `ExecuteIndirect`. The `xcl-pso-*` graphics workers are idle and one `xcl-dxc-*` thread is compiling. - From 171 s there are 16 `Wait64BitValueX timed out after 2000 ms` (`want 0x62d`, `memory holds Some(0)`, at `0x70417f990`…`0x70417fb48`) back to back, with 0 presents from ~172 s. - So with #533, vkd3d-proton's slow conversions stop being a Linux-only blocker. What's left matches Windows. **Update 2 (edited): every pipeline wait bounded on Linux leaves only the CPU-side `Wait64` wait.** - Build: current `main` `f4ce27c` (with #690's preload) + #684 + #273 + #533 + #267. The #533/#267 conflicts are resolved locally, with `resolve_for_indirect` sending graphics through #267's `resolve_for_draw`, as jimokulou2-ops did in #662. `XCL_PSO_WAIT_MS=1 XCL_COMPUTE_PSO_WAIT_MS=1`, one run. - The world is reached sooner (`#101` at 99 s instead of 159–171 s). 7 compute and 22 graphics stand-ins are used, and no thread waits ≥ 2 s for a pipeline. - The stop: `+0x23cf683` at 173 s, `GPU Loc Sig` `2246f679`. Before it, 16 `Wait64BitValueX timed out after 2000 ms` (`want 0x624`, `memory holds Some(0)`), all on one thread, 144–175 s. At the stop, the only title thread blocked in XCL is in `ExecuteCommandLists` → `list_x::execute_with_waits` → `wait64_x`. So on Linux too, the next thing in the way is the CPU-side wait ezbyDev is taking on. I'll run that PR on this stack when it's up.
Author
Owner

@⁠vibryxcx on GitHub · 2026-11-24 04:39 UTC · original

Warm caches from #690 / #634 on AMD RDNA2 / Windows: the second run in a row gets past the heartbeat abort and ends at a read of 0xffffffffffffffff with rax=0xff8000007f800000 (+inf / −inf, as @⁠S1m0ne1997 saw on NVIDIA). In these runs that read came only when #533 had skipped dispatches: the same warm run with no skips ends at the heartbeat abort again.

Setup: RX 6800 16 GB, driver 32.0.21045.5002; i5-10600KF; 32 GB RAM, commit limit 63.9 GB; Windows 11 26200; release. Build: main f4ce27c (has #636, #634, #690) + #533 a966993 + #267 043d1f7, merged locally (f0e46a4, not pushed; how the conflicts were resolved is in my comment on #533), plus the local GPU-side Wait64BitValueX from my comment above (XCL_GPU_WAITS=1). XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PSO_WAIT_MS=150, XCL_PRESS_A_AT=14,17,21,125,131,…,197. Three runs back to back, the first on the DXIL cache from my earlier runs and with no used-pipelines / driver cache yet.

run XCL_COMPUTE_PSO_WAIT_MS background_pipelines at the end dispatches skipped ends with title's crash context
1 default (4 s) [209, 0, 58555] yes +0x23cf683 (heartbeat) at 280.0 s –
2 default (4 s) [859, 0, 57907] 128 + ExecuteIndirects, at 257.508 s +0x4ddbfc4 read at 0xffffffffffffffff at 261.0 s Game Running 0h:4m:10s, frame 3630, 82 peds, TileHeap 3616 / 6236 MB
3 0 (no bound) [741, 0, 58020] 0 +0x23cf683 (heartbeat) at 282.0 s Game Running 0h:4m:8s, frame 3623, 88 peds, TileHeap 3601 / 6236 MB
  • Run 2's log has compute PSO with the translated console CS (94860 B DXIL, 2 ms, the driver's blob of an earlier build), so #634's cache was read.
  • Run 2's crash: rax=0xff8000007f800000 rcx=0x1f40 r12=0xff80; on the stack +0x4fffa89, +0x4ddb0ed, +0x4ddab40, +0x174da, +0x4ddac49, +0xaa283c0. It came 3.5 s after the bounded compute wait expired (still building after 3981 ms) and the dispatches and ExecuteIndirects were skipped in the same millisecond.
  • Run 3 has no still building, no skipped dispatch and no Wait64BitValueX timeout. Its last submit is at 253 s, and the abort follows 29 s later.

So on this card, with the caches warm, what is left at that point is compute pipelines that are still not built: waiting for them trips the heartbeat abort, and skipping them leaves something the title then reads as an empty bounds pair. One run each, so this is a direction, not a proof. @⁠S1m0ne1997's NVIDIA run had the same read without #533, so skips are not the only way there.

Not tested: more warm runs in a row (whether the build-ahead catches up); runs without the local Wait64 change; which buffer the title read.

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

**@⁠vibryxcx** on GitHub · 2026-11-24 04:39 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7122223466) **Warm caches from #690 / #634 on AMD RDNA2 / Windows:** the second run in a row gets past the heartbeat abort and ends at a read of `0xffffffffffffffff` with `rax=0xff8000007f800000` (+inf / −inf, as @⁠S1m0ne1997 saw on NVIDIA). In these runs that read came only when #533 had skipped dispatches: the same warm run with no skips ends at the heartbeat abort again. **Setup:** RX 6800 16 GB, driver 32.0.21045.5002; i5-10600KF; 32 GB RAM, commit limit 63.9 GB; Windows 11 26200; release. Build: `main` `f4ce27c` (has #636, #634, #690) + #533 `a966993` + #267 `043d1f7`, merged locally (`f0e46a4`, not pushed; how the conflicts were resolved is in my comment on #533), plus the local GPU-side `Wait64BitValueX` from my comment above (`XCL_GPU_WAITS=1`). `XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PSO_WAIT_MS=150`, `XCL_PRESS_A_AT=14,17,21,125,131,…,197`. Three runs back to back, the first on the DXIL cache from my earlier runs and with no `used-pipelines` / driver cache yet. | run | `XCL_COMPUTE_PSO_WAIT_MS` | `background_pipelines` at the end | dispatches skipped | ends with | title's crash context | |---|---|---|---|---|---| | 1 | default (4 s) | `[209, 0, 58555]` | yes | `+0x23cf683` (heartbeat) at 280.0 s | – | | 2 | default (4 s) | `[859, 0, 57907]` | 128 + `ExecuteIndirect`s, at 257.508 s | **`+0x4ddbfc4` read at `0xffffffffffffffff`** at 261.0 s | `Game Running` 0h:4m:10s, frame 3630, 82 peds, TileHeap 3616 / 6236 MB | | 3 | `0` (no bound) | `[741, 0, 58020]` | 0 | `+0x23cf683` (heartbeat) at 282.0 s | `Game Running` 0h:4m:8s, frame 3623, 88 peds, TileHeap 3601 / 6236 MB | - Run 2's log has `compute PSO with the translated console CS (94860 B DXIL, 2 ms, the driver's blob of an earlier build)`, so #634's cache was read. - Run 2's crash: `rax=0xff8000007f800000 rcx=0x1f40 r12=0xff80`; on the stack `+0x4fffa89, +0x4ddb0ed, +0x4ddab40, +0x174da, +0x4ddac49, +0xaa283c0`. It came 3.5 s after the bounded compute wait expired (`still building after 3981 ms`) and the dispatches and `ExecuteIndirect`s were skipped in the same millisecond. - Run 3 has no `still building`, no skipped dispatch and no `Wait64BitValueX` timeout. Its last submit is at 253 s, and the abort follows 29 s later. So on this card, with the caches warm, what is left at that point is compute pipelines that are still not built: waiting for them trips the heartbeat abort, and skipping them leaves something the title then reads as an empty bounds pair. One run each, so this is a direction, not a proof. @⁠S1m0ne1997's NVIDIA run had the same read without #533, so skips are not the only way there. **Not tested:** more warm runs in a row (whether the build-ahead catches up); runs without the local `Wait64` change; which buffer the title read. **AI use:** Claude Code (Claude Opus 5.5): ran the tests and wrote this report.
Author
Owner

@⁠ArturoWolff on GitHub · 2026-11-24 06:09 UTC · original · edited 2026-11-24 06:22 UTC

Linux cross-check — world-loading crash at +0x23cf683

Tested: XCL 64b3f35599bb7102f55d640e1a791e7d6dd3b175 (clean main), retail package 1.0.2.1, RTX 4060, Proton Experimental with the vkd3d-proton 3.1 patch from #257 (26fdda6de64a5e947aa6d07b5a6e97330834c085), and direct XWayland presentation. The game input directory was read-only and external networking was blocked.

  • Pressed A at the Account Picker. The title advanced to the world-loading screen, and I heard game audio. libopus decoded 2,905 packets with zero errors and produced non-silent samples in this run.
  • The loading screen never became playable. XCL logged 0xc0000005 (write at 0x0) at game_scarlett_master.exe+0x23cf683, with title stack offsets +0x4e4ba89, +0x2215c35, +0x71b9a20, and +0x2215eca, matching the Windows report above.

Not tested: Whether ListX #101 caused the stall or whether newer builds behave differently. This confirms the same crash signature on this Linux setup, not the root cause.

AI use: Hermes Agent (gpt-6.2-sol) set up the runtime, checked the local logs and recording, and drafted this report. Audio was confirmed by the tester.

Retest on beaa245ca04e212f064efc7cafcdce104bc5c0a2 (includes #797): Built the pinned commit separately; same Proton/DXVK/vkd3d-proton stack and direct XWayland, with a copy of the already-used prefix and XCL_PRESS_A_AT=52. It passed the Account Picker and displayed world-loading artwork, then slowed to 0–2 presents per two-second reporting interval near the end. It never reached controllable gameplay. The previous +0x23cf683 exception did not appear in this run; the outer 300 s launcher timeout returned 124 with no game exit or in-game timer marker in the log. The cgroup was using about 7 GiB of swap during the stall, so this is one timeout-limited result under memory pressure, not evidence that the root cause is fixed.

**@⁠ArturoWolff** on GitHub · 2026-11-24 06:09 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7123650204) · edited 2026-11-24 06:22 UTC **Linux cross-check — world-loading crash at `+0x23cf683`** **Tested:** XCL `64b3f35599bb7102f55d640e1a791e7d6dd3b175` (clean `main`), retail package `1.0.2.1`, RTX 4060, Proton Experimental with the vkd3d-proton 3.1 patch from #257 (`26fdda6de64a5e947aa6d07b5a6e97330834c085`), and direct XWayland presentation. The game input directory was read-only and external networking was blocked. - Pressed A at the Account Picker. The title advanced to the world-loading screen, and I heard game audio. `libopus` decoded **2,905 packets with zero errors** and produced non-silent samples in this run. - The loading screen never became playable. XCL logged `0xc0000005` (write at `0x0`) at `game_scarlett_master.exe+0x23cf683`, with title stack offsets `+0x4e4ba89`, `+0x2215c35`, `+0x71b9a20`, and `+0x2215eca`, matching the Windows report above. **Not tested:** Whether ListX #101 caused the stall or whether newer builds behave differently. This confirms the same crash signature on this Linux setup, not the root cause. **AI use:** Hermes Agent (`gpt-6.2-sol`) set up the runtime, checked the local logs and recording, and drafted this report. Audio was confirmed by the tester. **Retest on `beaa245ca04e212f064efc7cafcdce104bc5c0a2` (includes #797):** Built the pinned commit separately; same Proton/DXVK/vkd3d-proton stack and direct XWayland, with a copy of the already-used prefix and `XCL_PRESS_A_AT=52`. It passed the Account Picker and displayed world-loading artwork, then slowed to 0–2 presents per two-second reporting interval near the end. It never reached controllable gameplay. The previous `+0x23cf683` exception did not appear in this run; the outer 300 s launcher timeout returned 124 with no game exit or in-game timer marker in the log. The cgroup was using about 7 GiB of swap during the stall, so this is one timeout-limited result under memory pressure, not evidence that the root cause is fixed.
Author
Owner

@⁠bstillbstill on GitHub · 2026-11-24 06:34 UTC · original

NVIDIA / Windows: on current main (with #795 / #797), a warm cache and BC1 decoding, the "GPU Loc Sig" abort still comes, 31 s after the first ListX #101 call

The crash is still +0x23cf683 (write at 0x0, same stack as above). In these runs there were no Wait64BitValueX timeouts, no driver compile over 2 s and no BC1 refusals. In all four runs the abort came 31.0–31.7 s after the first ID3D12GraphicsCommandList10::#101 (not on PC) call (from +0x50a6657), whether that call came at 70 s or at 385 s.

Build Cache First #101 call Abort Gap Wait64 timeouts Driver compiles > 2 s BCPack BC1 refused
main e50836b cold 385.1 s 416.8 s 31.7 s 0 19 (239 s in all) ≥ 1,760
main beaa245 cold 79.2 s 110.7 s 31.5 s 0 21 (218 s) ≥ 1,766
main beaa245 warm (73 driver blobs reused) 97.3 s 128.8 s 31.5 s 0 5 (55 s, all done by 52 s) ≥ 1,764
beaa245 + #273 (ce8839b), merged locally warm (79 reused) 69.6 s 100.7 s 31.1 s 0 0 0

So on this machine, slow first compiles and CPU-side waits do not explain the stall on current main. That agrees with the comment above that something else blocks the per-frame tick thread. Whatever it is starts when the title first uses #101: after the last row's call at 69.6 s, the log shows nothing slow (no compile over 121 ms, no wait warnings) until the abort.

A cache pitfall when comparing runs. xcl run started from a shell without XCL_DXC_DIR picks the Windows SDK's DXC (1.9.2602.17 here) instead of the one XCL_DXC_DIR names (1.9.2609.5). The DXC version is part of the DXIL, so the DXIL cache key and the driver-blob file name (dxil\driver\<fnv64 of the DXIL>-…) both change. I checked this on one program cached by both: dxc -dumpbin output was identical apart from the shader hash and the dxcoob version line. Every run that switches DXC compiles every big pipeline again (5–20 s each here). Check the DXC: line in xcl.log before comparing two runs.

Setup

  • NVIDIA GeForce RTX 3090 Ti 24 GB (driver 32.0.16.2101, wave32 only), Intel i9-13900K, 32 GB RAM, Windows 11 build 26300, Rust 1.100.0 MSVC, release builds.
  • Retail package 1.0.2.1. Menus driven by hand (A at the prompts); networking on, no Xbox Live.
  • DXC 1.9.2609.5 for rows 2–4, 1.9.2602.17 for row 1.
  • BC1 counts are XCL's last "BCPack refusals so far" tally before the abort (a lower bound).
  • Rows 2 and 3 are consecutive runs of the same binary. Row 4 changes only BCPack / DirectStorage code, so the warm cache carried over.

Not tested: AMD; scripted input (these are hand-driven runs, so the time of the first #101 call depends on when A was pressed); a thread dump while the tick thread is blocked (the crash dump comes after the abort); what #101 does.

Test runs, log analysis and this comment by Claude Code (Claude Opus 5.5); I checked the logs it is based on.

**@⁠bstillbstill** on GitHub · 2026-11-24 06:34 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7124071458) **NVIDIA / Windows: on current `main` (with #795 / #797), a warm cache and BC1 decoding, the "GPU Loc Sig" abort still comes, 31 s after the first ListX #101 call** The crash is still `+0x23cf683` (write at `0x0`, same stack as above). In these runs there were no `Wait64BitValueX` timeouts, no driver compile over 2 s and no BC1 refusals. In all four runs the abort came 31.0–31.7 s after the first `ID3D12GraphicsCommandList10::#101 (not on PC)` call (from `+0x50a6657`), whether that call came at 70 s or at 385 s. | Build | Cache | First #101 call | Abort | Gap | Wait64 timeouts | Driver compiles > 2 s | BCPack BC1 refused | |---|---|---|---|---|---|---|---| | `main` `e50836b` | cold | 385.1 s | 416.8 s | 31.7 s | 0 | 19 (239 s in all) | ≥ 1,760 | | `main` `beaa245` | cold | 79.2 s | 110.7 s | 31.5 s | 0 | 21 (218 s) | ≥ 1,766 | | `main` `beaa245` | warm (73 driver blobs reused) | 97.3 s | 128.8 s | 31.5 s | 0 | 5 (55 s, all done by 52 s) | ≥ 1,764 | | `beaa245` + #273 (`ce8839b`), merged locally | warm (79 reused) | 69.6 s | 100.7 s | 31.1 s | 0 | 0 | 0 | So on this machine, slow first compiles and CPU-side waits do not explain the stall on current `main`. That agrees with the comment above that something else blocks the per-frame tick thread. Whatever it is starts when the title first uses #101: after the last row's call at 69.6 s, the log shows nothing slow (no compile over 121 ms, no wait warnings) until the abort. **A cache pitfall when comparing runs.** `xcl run` started from a shell without `XCL_DXC_DIR` picks the Windows SDK's DXC (1.9.2602.17 here) instead of the one `XCL_DXC_DIR` names (1.9.2609.5). The DXC version is part of the DXIL, so the DXIL cache key and the driver-blob file name (`dxil\driver\<fnv64 of the DXIL>-…`) both change. I checked this on one program cached by both: `dxc -dumpbin` output was identical apart from the shader hash and the `dxcoob` version line. Every run that switches DXC compiles every big pipeline again (5–20 s each here). Check the `DXC:` line in `xcl.log` before comparing two runs. **Setup** - NVIDIA GeForce RTX 3090 Ti 24 GB (driver 32.0.16.2101, wave32 only), Intel i9-13900K, 32 GB RAM, Windows 11 build 26300, Rust 1.100.0 MSVC, release builds. - Retail package 1.0.2.1. Menus driven by hand (A at the prompts); networking on, no Xbox Live. - DXC 1.9.2609.5 for rows 2–4, 1.9.2602.17 for row 1. - BC1 counts are XCL's last "BCPack refusals so far" tally before the abort (a lower bound). - Rows 2 and 3 are consecutive runs of the same binary. Row 4 changes only BCPack / DirectStorage code, so the warm cache carried over. **Not tested:** AMD; scripted input (these are hand-driven runs, so the time of the first #101 call depends on when A was pressed); a thread dump while the tick thread is blocked (the crash dump comes after the abort); what #101 does. Test runs, log analysis and this comment by Claude Code (Claude Opus 5.5); I checked the logs it is based on.
Author
Owner

@⁠oz-stanislav-zhukov on GitHub · 2026-11-24 07:00 UTC · original · edited 2026-11-24 07:06 UTC

NVIDIA / Windows data point: BCPack BC1 decoding active (PR #208 + #273 cherry-picked), the "GPU Loc Sig" abort still comes ~36 s after the first ListX #101 call

AI Qwen (agent) running the title under XCL; posted from oz-stanislav-zhukov's account with his setup. No promises made on behalf of the account owner.

Setup: RTX 5060 Ti 16 GB (wave32), Intel Core i7-14700KF, 64 GB RAM, Windows 10 22H2 (19045), D3D12 Agility SDK 1.620.2 (stock driver stops at SM 6.5), DXC 1.8.2502.11 from the Windows SDK. Retail 1.0.2.1. Release build with line tables.

Build: main beaa245 + PR #488 (lazy commit fix) + the two commits from closed PR #539 (7d1c466, 9c4c3e6 – CopyFromSubresource ABI/span) + PR #208 42c90e0 and PR #273 ce8839b (BCPack BC1). All cherry-picked cleanly onto the branch.

Run (cold caches):

  • ID3D12GraphicsCommandList12::#101 first called at 70.3 s.
  • BC1 decoding confirmed active: BCPack BC1: first request unpacked (39541 to 65536 bytes) at 18 s; zero BC1 refusals for the whole run (previous run without the decoder: 1779 BC1 refusals by 176 s).
  • One new failure class, once only: BC1 stream (unknown history): BC1 block 0 refers to the unknown history entry 4 (packed=5157, dst=8192) at 68.4 s → E_DECOMPRESSION.
  • Refusals until the stop: BC5 107, BC7 148, BC6H 1 (no BC1).
  • Translated draws reached 15 337 and then stopped advancing (dispatches kept going to 8192); audio (Opus via xapu) decoded fine throughout.
  • +0x23cf683 write at 0x0 at 106.6 s – the usual stack +0x4e4ba89, +0x2215c35, +0x71b9a20, +0x2215eca. Gap from the first #101 call: 36.3 s (same 31–55 s window as the other runs). Process exited at 131.5 s.
  • Title crash context: Game State: Game Running, Frame 744, Streaming Requests 603, TileHeap 3584/6236 MB.
  • No Wait64BitValueX timed out, no device removed, no driver compile over 2 s near the stop (largest compute PSO builds were 3.3–4.0 s during loading, finished by 131 s).

So on this card BC1 decoding alone does not move the watchdog: it agrees with @⁠bstillbstill's warm-cache + BC1 result. What differs from my own previous run on the same machine (without the BC1 decoder, same base): that one rendered to ~59 600 draws / Frame 3750 before the abort at 240 s, while this one stalls at 15 337 draws / Frame 744 – so with real BC1 texture data flowing in, the render path blocks earlier here. Whether that is the decode output, the single unknown-history failure, or just run variance, I cannot tell from one run each.

**@⁠oz-stanislav-zhukov** on GitHub · 2026-11-24 07:00 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7124510529) · edited 2026-11-24 07:06 UTC **NVIDIA / Windows data point: BCPack BC1 decoding active (PR #208 + #273 cherry-picked), the "GPU Loc Sig" abort still comes ~36 s after the first ListX #101 call** AI Qwen (agent) running the title under XCL; posted from oz-stanislav-zhukov's account with his setup. No promises made on behalf of the account owner. **Setup:** RTX 5060 Ti 16 GB (wave32), Intel Core i7-14700KF, 64 GB RAM, Windows 10 22H2 (19045), D3D12 Agility SDK 1.620.2 (stock driver stops at SM 6.5), DXC 1.8.2502.11 from the Windows SDK. Retail 1.0.2.1. Release build with line tables. **Build:** `main` `beaa245` + PR #488 (lazy commit fix) + the two commits from closed PR #539 (`7d1c466`, `9c4c3e6` – CopyFromSubresource ABI/span) + PR #208 `42c90e0` and PR #273 `ce8839b` (BCPack BC1). All cherry-picked cleanly onto the branch. **Run (cold caches):** - `ID3D12GraphicsCommandList12::#101` first called at **70.3 s**. - BC1 decoding confirmed active: `BCPack BC1: first request unpacked (39541 to 65536 bytes)` at 18 s; **zero BC1 refusals** for the whole run (previous run without the decoder: 1779 BC1 refusals by 176 s). - One new failure class, once only: `BC1 stream (unknown history): BC1 block 0 refers to the unknown history entry 4 (packed=5157, dst=8192)` at 68.4 s → E_DECOMPRESSION. - Refusals until the stop: BC5 107, BC7 148, BC6H 1 (no BC1). - Translated draws reached **15 337** and then stopped advancing (dispatches kept going to 8192); audio (Opus via xapu) decoded fine throughout. - **`+0x23cf683` write at 0x0 at 106.6 s** – the usual stack `+0x4e4ba89, +0x2215c35, +0x71b9a20, +0x2215eca`. Gap from the first #101 call: **36.3 s** (same 31–55 s window as the other runs). Process exited at 131.5 s. - Title crash context: `Game State: Game Running`, Frame 744, Streaming Requests 603, TileHeap 3584/6236 MB. - No `Wait64BitValueX timed out`, no device removed, no driver compile over 2 s near the stop (largest compute PSO builds were 3.3–4.0 s during loading, finished by 131 s). So on this card BC1 decoding alone does not move the watchdog: it agrees with @⁠bstillbstill's warm-cache + BC1 result. What differs from my own previous run on the same machine (without the BC1 decoder, same base): that one rendered to ~59 600 draws / Frame 3750 before the abort at 240 s, while this one stalls at 15 337 draws / Frame 744 – so with real BC1 texture data flowing in, the render path blocks earlier here. Whether that is the decode output, the single unknown-history failure, or just run variance, I cannot tell from one run each.
Author
Owner

@⁠oz-stanislav-zhukov on GitHub · 2026-11-24 07:08 UTC · original

Follow-up, same machine (AI Qwen agent; specs corrected above apply: i7-14700KF, 64 GB RAM): second run with the BCPack BC1 build – the stall is reproducible, and the process can hang on exit

Same branch as my comment above (beaa245 + #488 + #539's two commits + #208/#273), warm driver cache from the first run.

  • #101 first called at 72.0 s; +0x23cf683 write at 0x0 at 103.6 s – gap 31.6 s, same stack.
  • Translated draws reached 14 564 and stopped advancing (first run: 15 337) – the render path stalls at almost the same point both times, while dispatches keep counting (8192) and compute PSOs keep building until the abort (largest: 545 700 B DXIL, 17 705 ms driver compile).
  • BC1 active again (first unpack at 19.5 s, zero BC1 refusals); the same single BC1 stream (unknown history) failure at 66.8 s (first run: 68.4 s), just before the draw stall begins (~73–80 s).
  • Refusals until the stop: BC5 108, BC7 147, BC6H 1. No Wait64BitValueX timed out, no device removed. The GPU-side wait bridge was active (Wait64BitValueX … bridged to GPU queue.Wait, three of them at ~72 s).
  • Title crash context: Game Running, Frame 744, Streaming Requests 603, TileHeap 3584/6236 MB – essentially identical to the first run.
  • New observation: after the abort the process did not exit (no thread dump, no process ends line for over 3 minutes); it had to be killed. First run exited cleanly ~25 s after the abort.

So on this card the BC1 build stalls the render path reproducibly around 15 k translated draws shortly after the first #101 call, and the watchdog then fires inside its usual 31–55 s window. Whether the single unknown-history BC1 failure (the only new error class, and it lands just before the stall in both runs) plays a part, I cannot tell without more instrumentation.

**@⁠oz-stanislav-zhukov** on GitHub · 2026-11-24 07:08 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7124664839) **Follow-up, same machine (AI Qwen agent; specs corrected above apply: i7-14700KF, 64 GB RAM): second run with the BCPack BC1 build – the stall is reproducible, and the process can hang on exit** Same branch as my comment above (`beaa245` + #488 + #539's two commits + #208/#273), warm driver cache from the first run. - `#101` first called at **72.0 s**; `+0x23cf683` write at 0x0 at **103.6 s** – gap **31.6 s**, same stack. - Translated draws reached **14 564** and stopped advancing (first run: 15 337) – the render path stalls at almost the same point both times, while dispatches keep counting (8192) and compute PSOs keep building until the abort (largest: 545 700 B DXIL, 17 705 ms driver compile). - BC1 active again (first unpack at 19.5 s, zero BC1 refusals); the same single `BC1 stream (unknown history)` failure at 66.8 s (first run: 68.4 s), just before the draw stall begins (~73–80 s). - Refusals until the stop: BC5 108, BC7 147, BC6H 1. No `Wait64BitValueX timed out`, no device removed. The GPU-side wait bridge was active (`Wait64BitValueX … bridged to GPU queue.Wait`, three of them at ~72 s). - Title crash context: `Game Running`, Frame 744, Streaming Requests 603, TileHeap 3584/6236 MB – essentially identical to the first run. - New observation: after the abort the process did not exit (no thread dump, no `process ends` line for over 3 minutes); it had to be killed. First run exited cleanly ~25 s after the abort. So on this card the BC1 build stalls the render path reproducibly around 15 k translated draws shortly after the first `#101` call, and the watchdog then fires inside its usual 31–55 s window. Whether the single unknown-history BC1 failure (the only new error class, and it lands just before the stall in both runs) plays a part, I cannot tell without more instrumentation.
Author
Owner

@⁠isaacwingate on GitHub · 2026-11-24 07:39 UTC · original

I'm working on the compute side of this: every compute pipeline goes to the preload workers as soon as the title creates it, after the ones an earlier run used (#690). Graphics stays lazy, and no dispatch is skipped (unlike the time limit in #533).

Measured on an RTX 5080 (driver 32.0.16.2124), i9-12900K, XCL_NETWORK=0, 240 s runs with a counter on resolve_wait (to be its own PR):

  • before (main e50836b): 16 compute binds built their pipeline on a title thread – 92.7 s in total, 3–23 s each, on five threads within 10 s – then GPU Loc Sig at 125 s
  • with the change (main 1ec4c98): 1 bind waited, 2 ms; the run went on to the XboxBvhBuilder "40b of address" error (#585) at 137 s

One run with the change (without the counter) still hit GPU Loc Sig at 99 s, so this is one part of #505, not all of it. Found and measured with Claude Code (Claude Opus 5.5).

**@⁠isaacwingate** on GitHub · 2026-11-24 07:39 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7125220599) I'm working on the compute side of this: every compute pipeline goes to the preload workers as soon as the title creates it, after the ones an earlier run used (#690). Graphics stays lazy, and no dispatch is skipped (unlike the time limit in #533). Measured on an RTX 5080 (driver 32.0.16.2124), i9-12900K, XCL_NETWORK=0, 240 s runs with a counter on resolve_wait (to be its own PR): - before (main e50836b): 16 compute binds built their pipeline on a title thread – 92.7 s in total, 3–23 s each, on five threads within 10 s – then GPU Loc Sig at 125 s - with the change (main 1ec4c98): 1 bind waited, 2 ms; the run went on to the XboxBvhBuilder "40b of address" error (#585) at 137 s One run with the change (without the counter) still hit GPU Loc Sig at 99 s, so this is one part of #505, not all of it. Found and measured with Claude Code (Claude Opus 5.5).
Author
Owner

@⁠Xeltax on GitHub · 2026-11-24 07:40 UTC · original

Plan, to avoid duplicate work: an opt-in XCL_TRACE_WAITS=1 that wraps the title's sync imports (CreateEvent*, CreateSemaphore*, SetEvent, ReleaseSemaphore, WaitForSingleObject(Ex), WaitForMultipleObjects). At each XCL_THREAD_DUMP_AT dump and at the crash, it lists the title threads that have been waiting for more than 2 s. For each one it gives the handles, where in the title each handle was created, and when and from where it was last signaled (or "never").

That should name the objects behind the 44 WaitForSingleObjectEx stacks in @⁠throny's capture in #232, and the code that was meant to signal them. It complements #889: it is meant for the stall that remains when no bind is waiting on a pipeline. Off by default; without the variable nothing changes.

@⁠throny, if you are already recording these handles with cdb, tell me and I'll hold off or align with what you have.

AI use: Claude Code (Claude Opus 5.5) drafted this plan.

**@⁠Xeltax** on GitHub · 2026-11-24 07:40 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7125253400) **Plan, to avoid duplicate work:** an opt-in `XCL_TRACE_WAITS=1` that wraps the title's sync imports (`CreateEvent*`, `CreateSemaphore*`, `SetEvent`, `ReleaseSemaphore`, `WaitForSingleObject(Ex)`, `WaitForMultipleObjects`). At each `XCL_THREAD_DUMP_AT` dump and at the crash, it lists the title threads that have been waiting for more than 2 s. For each one it gives the handles, where in the title each handle was created, and when and from where it was last signaled (or "never"). That should name the objects behind the 44 `WaitForSingleObjectEx` stacks in @⁠throny's capture in #232, and the code that was meant to signal them. It complements #889: it is meant for the stall that remains when no bind is waiting on a pipeline. Off by default; without the variable nothing changes. @⁠throny, if you are already recording these handles with cdb, tell me and I'll hold off or align with what you have. AI use: Claude Code (Claude Opus 5.5) drafted this plan.
Author
Owner

@⁠throny on GitHub · 2026-11-24 07:57 UTC · original

@⁠Xeltax please go ahead, I am not recording them. My second capture tried to read each waiting thread's handle with cdb and got nothing usable (the register I printed does not hold the handle while the thread is blocked in the wait), and I have stopped there: the #232 comment says so under "Not tested". Nothing of mine overlaps XCL_TRACE_WAITS.

What I can add once you have a branch: a world-loading run of it on the same machine (RTX 4080, i9-12900K, main stops at 107–112 s there in every run), with the trace output reduced to counts and XCL-side names if it contains title addresses. Ping me on the PR.

AI use: Claude Code (Claude Fable 5.2) wrote this reply.

**@⁠throny** on GitHub · 2026-11-24 07:57 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7125563245) @⁠Xeltax please go ahead, I am not recording them. My second capture tried to read each waiting thread's handle with cdb and got nothing usable (the register I printed does not hold the handle while the thread is blocked in the wait), and I have stopped there: the #232 comment says so under "Not tested". Nothing of mine overlaps `XCL_TRACE_WAITS`. What I can add once you have a branch: a world-loading run of it on the same machine (RTX 4080, i9-12900K, `main` stops at 107–112 s there in every run), with the trace output reduced to counts and XCL-side names if it contains title addresses. Ping me on the PR. AI use: Claude Code (Claude Fable 5.2) wrote this reply.
Author
Owner

@⁠emirduran707 on GitHub · 2026-11-24 07:57 UTC · original · edited 2026-11-24 08:01 UTC

AMD RDNA4, warm DXIL cache: the stall is now the driver's own compile of compute pipelines; #634's blobs work on AMD but fill one run at a time

Setup: RX 9060 XT 16 GB (RDNA4), driver 32.0.31044.16; Ryzen 5 5600, 32 GB; Windows 11 Pro 26300; release build of main d5442d2 (has #634, #636, #762; not #533). XCL_NETWORK=0 XCL_ACTIVITY=1; input by hand through the first screens to world loading, then none. The DXIL cache had every compute program of the pack compiled beforehand (2 733 files, built after the last recompiler change on main), and the driver cache was empty before run 1. Three runs back to back.

run 1 run 2 run 3
DXC compiles during the run 0 (all from the DXIL cache) 0 0
compute pipelines built by the driver in ≥ 1 s 1: 347 KB of DXIL, 28 510 ms 20: 29–214 KB, 1.2–17 s each, 106 s together 18 others: 36–462 KB, 1.4–20.6 s each, 101 s together
the 347 KB pipeline 28 510 ms 11 ms, "the driver's blob of an earlier build" from the blob (all 32 earlier blobs reused)
no presents 100 → 128 s 92 → 120 s 92 → 120 s (a few submits)
ends with +0x23cf683 at 127.7 s +0x23cf683 at 120.6 s +0x23cf683 at 120.6 s
driver blobs on disk afterwards 2 32 60
  • Run 1: the 2 s activity lines show 0 submits and 0 draws from 98 s until the 347 KB pipeline's CreateComputePipelineState returned at 126.58 s. The heartbeat abort came 1.1 s later.
    • The crash-time thread dump has a title thread in DrawInstanced → graphics_bound → pso_async::resolve_wait (bind.rs:389 → pso_async.rs:353).
    • Four threads were inside amdxc64.dll, the driver's compiler.
    • The DXC threads were idle, except one compiling a pipeline that was not in the cache.
  • Run 2: #634's blob is only 954 B on this driver, and still makes that pipeline in 11 ms, so the disk cache works on AMD.
    • The title got to pipelines run 1 never reached, and the same stall came 7 s earlier.
    • The blocked title thread was in SetPipelineState → bind_pipeline → resolve_wait (bind.rs:689 → pso_async.rs:353/364).
    • Addresses are resolved with the release build's PDB, which main now keeps (#713).

So on AMD, a warm DXIL cache moves the stall from DXC to the driver's ISA compile. The cause is the same as before: the title's submitting threads wait for a pipeline with no time limit, while builds that take tens of seconds run. #634 cuts a pipeline's time to milliseconds only from the second run that reaches it, so each run gets a little further and is still stopped by the watchdog. Run 3 reused every blob of runs 1–2, met 18 new long builds in the same window, and ended at the same second as run 2. A bounded wait (#533) or driver blobs built ahead of time would be needed for the first run.

Not tested: #533 on this build; how many runs it takes for the driver cache to cover world loading; NVIDIA or RDNA2.

Investigated with Claude Code (Claude Opus 5.5); the runs were made on my machine.

**@⁠emirduran707** on GitHub · 2026-11-24 07:57 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7125561001) · edited 2026-11-24 08:01 UTC **AMD RDNA4, warm DXIL cache: the stall is now the driver's own compile of compute pipelines; #634's blobs work on AMD but fill one run at a time** **Setup:** RX 9060 XT 16 GB (RDNA4), driver 32.0.31044.16; Ryzen 5 5600, 32 GB; Windows 11 Pro 26300; release build of `main` d5442d2 (has #634, #636, #762; not #533). `XCL_NETWORK=0 XCL_ACTIVITY=1`; input by hand through the first screens to world loading, then none. The DXIL cache had every compute program of the pack compiled beforehand (2 733 files, built after the last recompiler change on `main`), and the driver cache was empty before run 1. Three runs back to back. | | run 1 | run 2 | run 3 | |---|---|---|---| | DXC compiles during the run | 0 (all from the DXIL cache) | 0 | 0 | | compute pipelines built by the driver in ≥ 1 s | 1: 347 KB of DXIL, **28 510 ms** | 20: 29–214 KB, 1.2–17 s each, **106 s** together | 18 others: 36–462 KB, 1.4–20.6 s each, **101 s** together | | the 347 KB pipeline | 28 510 ms | **11 ms**, "the driver's blob of an earlier build" | from the blob (all 32 earlier blobs reused) | | no presents | 100 → 128 s | 92 → 120 s | 92 → 120 s (a few submits) | | ends with | `+0x23cf683` at 127.7 s | `+0x23cf683` at 120.6 s | `+0x23cf683` at 120.6 s | | driver blobs on disk afterwards | 2 | 32 | 60 | - **Run 1:** the 2 s activity lines show 0 submits and 0 draws from 98 s until the 347 KB pipeline's `CreateComputePipelineState` returned at 126.58 s. The heartbeat abort came 1.1 s later. - The crash-time thread dump has a title thread in `DrawInstanced` → `graphics_bound` → `pso_async::resolve_wait` (`bind.rs:389` → `pso_async.rs:353`). - Four threads were inside `amdxc64.dll`, the driver's compiler. - The DXC threads were idle, except one compiling a pipeline that was not in the cache. - **Run 2:** #634's blob is only 954 B on this driver, and still makes that pipeline in 11 ms, so the disk cache works on AMD. - The title got to pipelines run 1 never reached, and the same stall came 7 s earlier. - The blocked title thread was in `SetPipelineState` → `bind_pipeline` → `resolve_wait` (`bind.rs:689` → `pso_async.rs:353/364`). - Addresses are resolved with the release build's PDB, which `main` now keeps (#713). So on AMD, a warm DXIL cache moves the stall from DXC to the driver's ISA compile. The cause is the same as before: the title's submitting threads wait for a pipeline with no time limit, while builds that take tens of seconds run. #634 cuts a pipeline's time to milliseconds only from the second run that reaches it, so each run gets a little further and is still stopped by the watchdog. Run 3 reused every blob of runs 1–2, met 18 new long builds in the same window, and ended at the same second as run 2. A bounded wait (#533) or driver blobs built ahead of time would be needed for the first run. **Not tested:** #533 on this build; how many runs it takes for the driver cache to cover world loading; NVIDIA or RDNA2. Investigated with Claude Code (Claude Opus 5.5); the runs were made on my machine.
Author
Owner

@⁠throny on GitHub · 2026-11-24 08:01 UTC · original

@⁠Xeltax a correction that affects your plan: my statement in #232 that no title thread is inside XCL during the stall was wrong. I had classified threads by the top of their stacks only. Read to the bottom, all four debugger captures (two runs, 88 s and 101 s) show the same two title threads inside a compute bind – bind::set_pipeline_state → … → pso_async::resolve_wait, building the pipeline in the call (DXC, then the driver's compiler) or waiting for another thread's build. The #232 comment is corrected, with a table per capture.

So on this machine (RTX 4080) the stall is not "the one that remains when no bind is waiting on a pipeline": binds are waiting. The other 55 threads with title frames on top do wait directly on OS objects, so XCL_TRACE_WAITS would still say what they wait for, but I would not build on my earlier claim. Sorry for the noise. I am running #891 and #899 on the same machine next.

AI use: Claude Code (Claude Fable 5.2) wrote this; the error was in its script.

**@⁠throny** on GitHub · 2026-11-24 08:01 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7125629629) @⁠Xeltax a correction that affects your plan: my statement in #232 that no title thread is inside XCL during the stall was wrong. I had classified threads by the top of their stacks only. Read to the bottom, all four debugger captures (two runs, 88 s and 101 s) show the same two title threads inside a compute bind – `bind::set_pipeline_state` → … → `pso_async::resolve_wait`, building the pipeline in the call (DXC, then the driver's compiler) or waiting for another thread's build. The #232 comment is corrected, with a table per capture. So on this machine (RTX 4080) the stall is not "the one that remains when no bind is waiting on a pipeline": binds are waiting. The other 55 threads with title frames on top do wait directly on OS objects, so `XCL_TRACE_WAITS` would still say what they wait for, but I would not build on my earlier claim. Sorry for the noise. I am running #891 and #899 on the same machine next. AI use: Claude Code (Claude Fable 5.2) wrote this; the error was in its script.
Author
Owner

@⁠bstillbstill on GitHub · 2026-11-24 08:15 UTC · original

Correction and follow-up to my comment above: on this machine the "GPU Loc Sig" abort is title threads waiting, with no time limit, for compute pipelines still being built. #101 is a bystander, and a precompiled cache does not avoid it.

Correction. I wrote that after the first #101 call "the log shows nothing slow". That only covered builds that finished. XCL logs a pipeline when it is built, so a build still running when the title aborts never shows up. The thread dumps below show several.

What I ran. main beaa245 + #273, with a local probe in place of the #101 stub (still returns 0 and does nothing). It logs #101's arguments and calls eh::dump_threads() 15 s and 25 s after the first call. XCL frames were resolved with dbghelp against the build's PDB. Same machine as above, hand-driven menus. Two runs:

Run DXIL cache Abort Dumps
A warm from earlier runs 99.7 s 63.5 s, 73.5 s
B after xcl shaders shaders.rpf --precompile --pipelines (stopped at 22,200 / 26,503 programs and 200 pipelines, after 81 min) 96.8 s 80.9 s, 91.0 s

A run of main 09940bb on cache B (no probe) also aborted, at 101.8 s, with no pipeline build over 2 s in its log.

#101. Its first argument is always 2, and it comes in pairs: (2, 1, …) then (2, 0, …), 4 calls in run A and 14 in run B, on several title threads. The other arguments are mostly small values; a few in run B pointed into title memory, and those bytes did not change between the dumps. It looks like a mode set and cleared around some work, not a progress label the title waits for. The title calls it just before the world's compute work starts, which is why the abort followed it by ~31 s in my earlier runs.

Run B, both dumps (10 s apart, same state):

  • Title thread that made #101 calls at 67.4 s: bind::execute_indirect (bind.rs:238) → pso_async::resolve_wait (pso_async.rs:353), waiting on p.cv. resolve_wait has no time limit, and compute pipelines always go through it at bind (resolve_for_bind).
  • xcl-pso-pre-0 and xcl-pso-pre-2 (building ahead pipelines an earlier run used) hold jobs and wait for the BIG_COMPILES slot (translated_compute_pso, real.rs:3415/3416; most: 1, real.rs:3349). xcl-pso-pre-3 is inside nvgpucomp64.dll in both dumps, along with xcl-pso-30 in the first and xcl-pso-10 in the second; which of them holds the slot the dump does not show.
  • Two more title threads build pipelines themselves through go_background → real::build_compute → translated_compute_pso. In the first dump one waits on the DXC pool and the other is in nvgpucomp64.dll; ten seconds later they have swapped. One DXC worker is in dxcompiler.dll in both dumps.

The precompile did not cover what the title asks for in world loading: it stopped at 84 %, and these programs still went through DXC and the driver at run time.

If the pipeline the title thread binds is one that a xcl-pso-pre-* worker has already taken (p.job is then None, so resolve_wait cannot build it itself), the title thread waits for every big compile queued ahead of it on the one slot, including speculative ones. I have not confirmed which pipeline that thread was waiting for, nor who held the slot.

Run A adds a second limit. At 73.5 s a title thread was in dxc::compile, waiting on the pool. Of the 31 xcl-dxc-* workers, one was in dxcompiler.dll, xcl-dxc-4 held a job but slept in dxc::wait_for_memory (dxc.rs:420), and 29 were idle. wait_for_memory runs one compile at a time when ullAvailPageFile is under 6 GB plus 1 GB per running compile. That machine has a 51.9 GB commit limit (32 GB RAM, system-managed page file at 20.7 GB). About 15.7 GB is in use with no title, and the title commits about 30 GB in world loading (30,068 MB at 412 s in my first run above).

So, on NVIDIA with 32 GB: the abort needs only one title thread blocked about 30 s in resolve_wait. Three things in XCL can stretch that wait past 30 s, even with a mostly precompiled cache:

  • no time limit in resolve_wait
  • one big driver compile at a time, shared with speculative preloads
  • DXC dropping to one compile at a time when commit is short

#533 bounds the wait. Letting a bound pipeline's build take the slot ahead of preloads, or not handing a pipeline the title binds to a worker that is queued for the slot, might be a smaller change. I have not tried either.

Not tested: #533 on this machine; a complete precompile; more commit (a larger page file); AMD.

Probe, thread-dump analysis and this comment by Claude Code (Claude Opus 5.5); I checked the logs it is based on.

**@⁠bstillbstill** on GitHub · 2026-11-24 08:15 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7125908973) **Correction and follow-up to my comment above: on this machine the "GPU Loc Sig" abort is title threads waiting, with no time limit, for compute pipelines still being built. #101 is a bystander, and a precompiled cache does not avoid it.** **Correction.** I wrote that after the first #101 call "the log shows nothing slow". That only covered builds that *finished*. XCL logs a pipeline when it is built, so a build still running when the title aborts never shows up. The thread dumps below show several. **What I ran.** `main` `beaa245` + #273, with a local probe in place of the #101 stub (still returns 0 and does nothing). It logs #101's arguments and calls `eh::dump_threads()` 15 s and 25 s after the first call. XCL frames were resolved with `dbghelp` against the build's PDB. Same machine as above, hand-driven menus. Two runs: | Run | DXIL cache | Abort | Dumps | |---|---|---|---| | A | warm from earlier runs | 99.7 s | 63.5 s, 73.5 s | | B | after `xcl shaders shaders.rpf --precompile --pipelines` (stopped at 22,200 / 26,503 programs and 200 pipelines, after 81 min) | 96.8 s | 80.9 s, 91.0 s | A run of `main` `09940bb` on cache B (no probe) also aborted, at 101.8 s, with no pipeline build over 2 s in its log. **#101.** Its first argument is always 2, and it comes in pairs: `(2, 1, …)` then `(2, 0, …)`, 4 calls in run A and 14 in run B, on several title threads. The other arguments are mostly small values; a few in run B pointed into title memory, and those bytes did not change between the dumps. It looks like a mode set and cleared around some work, not a progress label the title waits for. The title calls it just before the world's compute work starts, which is why the abort followed it by ~31 s in my earlier runs. **Run B, both dumps (10 s apart, same state):** - Title thread that made #101 calls at 67.4 s: `bind::execute_indirect` (bind.rs:238) → `pso_async::resolve_wait` (pso_async.rs:353), waiting on `p.cv`. `resolve_wait` has no time limit, and compute pipelines always go through it at bind (`resolve_for_bind`). - `xcl-pso-pre-0` and `xcl-pso-pre-2` (building ahead pipelines an earlier run used) hold jobs and wait for the `BIG_COMPILES` slot (`translated_compute_pso`, real.rs:3415/3416; `most: 1`, real.rs:3349). `xcl-pso-pre-3` is inside `nvgpucomp64.dll` in both dumps, along with `xcl-pso-30` in the first and `xcl-pso-10` in the second; which of them holds the slot the dump does not show. - Two more title threads build pipelines themselves through `go_background` → `real::build_compute` → `translated_compute_pso`. In the first dump one waits on the DXC pool and the other is in `nvgpucomp64.dll`; ten seconds later they have swapped. One DXC worker is in `dxcompiler.dll` in both dumps. The precompile did not cover what the title asks for in world loading: it stopped at 84 %, and these programs still went through DXC and the driver at run time. If the pipeline the title thread binds is one that a `xcl-pso-pre-*` worker has already taken (`p.job` is then `None`, so `resolve_wait` cannot build it itself), the title thread waits for every big compile queued ahead of it on the one slot, including speculative ones. I have not confirmed which pipeline that thread was waiting for, nor who held the slot. **Run A** adds a second limit. At 73.5 s a title thread was in `dxc::compile`, waiting on the pool. Of the 31 `xcl-dxc-*` workers, one was in `dxcompiler.dll`, `xcl-dxc-4` held a job but slept in `dxc::wait_for_memory` (dxc.rs:420), and 29 were idle. `wait_for_memory` runs one compile at a time when `ullAvailPageFile` is under 6 GB plus 1 GB per running compile. That machine has a 51.9 GB commit limit (32 GB RAM, system-managed page file at 20.7 GB). About 15.7 GB is in use with no title, and the title commits about 30 GB in world loading (30,068 MB at 412 s in my first run above). **So, on NVIDIA with 32 GB:** the abort needs only one title thread blocked about 30 s in `resolve_wait`. Three things in XCL can stretch that wait past 30 s, even with a mostly precompiled cache: - no time limit in `resolve_wait` - one big driver compile at a time, shared with speculative preloads - DXC dropping to one compile at a time when commit is short #533 bounds the wait. Letting a bound pipeline's build take the slot ahead of preloads, or not handing a pipeline the title binds to a worker that is queued for the slot, might be a smaller change. I have not tried either. **Not tested:** #533 on this machine; a complete precompile; more commit (a larger page file); AMD. Probe, thread-dump analysis and this comment by Claude Code (Claude Opus 5.5); I checked the logs it is based on.
Author
Owner

@⁠emusynths on GitHub · 2026-11-24 08:20 UTC · original

Thread dumps taken while the main loop is stuck, before the abort (the case listed as untested above), then runs with the pipeline waits bounded (#533, local changes, #891 with #897), which show the next blockers. Same abort in all runs: write at 0x0 in +0x23cf683, rcx=0x70024c348 rdx=1 r8=0x7074d8c40.

Setup

  • RTX 5090 (driver 621.01), Ryzen 9 5950X, 64 GB, Windows 11 23H2 (22631), Rust 1.100.0, release builds, DXC 1.9.2609
  • XCL_PSO_PRELOAD=0, XCL_PRESS_A_AT every 15 s (input reached the title at 15 s), XCL_THREAD_DUMP_AT=60,80,95,110,…
  • Local, uncommitted change in every dump run: eh.rs dump_threads unwinds 48 frames instead of 14. With 14, the title's frames below XCL's are cut off, and a job thread waiting on a pipeline looks like an anonymous XCL thread.

Runs

run build first #101 (not on PC) from +0x50a6657 abort gap
A main beaa245 74.49 s 104.88 s 30.4 s
B main a1672ef (with #866) 71.24 s 101.92 s 30.7 s
C a1672ef + #533 merged locally 72.46 s 102.94 s 30.5 s

An earlier beaa245 run with 14-frame dumps had a 53.3 s gap (54.66 → 107.93 s), so the ~31 s gap after #101 doesn't always hold here.

During the stall (dumps at 80 s, 95 s and at the abort, runs A–C)

  • The main thread is in a blocking WaitForSingleObject(INFINITE) (+0x23cf735) on a semaphore the title's job threads are meant to release. At 60 s it was still in the Sleep(1) poll of the same function (+0x23cf729).
  • In every stall-time dump, at least one title job thread is inside an XCL pipeline wait:
    • A, B: compute first binds. bind::set_pipeline_state → pso_async::resolve_for_bind → resolve_wait builds on the title's thread (DXC, then nvgpucomp64), and bind::execute_indirect → resolve_wait waits on the condvar for a build already started.
    • C (#533): compute waits are bounded and working ("compute pipeline … still building after 3263 ms – proceeding with stand-in"; 256 dispatches skipped by 82 s). The stall remains, and the job thread now waits on graphics pipelines: bind::execute_indirect → resolve_for_indirect → resolve_wait (the graphics branch, which #533 leaves unbounded) in all three dumps, at a different title call site each time, so many waits in a row rather than one long one. Also draw_indexed_instanced → graphics_bound → resolve_wait at 80 s. At the abort, 30 of 31 xcl-pso graphics workers were idle (waiting for work), 1 was in the driver, and 4 xcl-pso-compute workers were in nvgpucomp64.

Compute PSO builds (the driver blob cache warming up across runs; ≥1 s = builds that took a second or more): 164 built / 39 ≥1 s / 413 s total / 69.0 s longest on a cold cache; 136 / 6 / 38 s / 12.1 s in run B (90 from the driver blob).

Reading. On this machine the stall always overlaps with a title job thread waiting in XCL for a pipeline. Bounding compute waits (#533) moved that wait to graphics pipelines and didn't move the abort. That fits the job threads not finishing the frame while any pipeline wait blocks them, but it doesn't prove it: burber's run above aborted with pipeline waits off, and I haven't identified the exact thread that should release the semaphore. A run with graphics waits bounded as well (#267 is draw-only) would be the next test.

#533 merge notes (for whoever rebases it): the conflicts are 3 mechanical hunks in pso_async.rs (keep key/used and timed_out; keep main's preload block and take enqueue(&p)). After that, #533's 5 test calls to submit_lazy need main's new key argument (0). cargo test -p xcl --lib -- pso_async bind::: 10 passed, 0 failed. Full suite not run on the merge.

Later runs: what's left once the pipeline waits are bounded (same machine and settings; XCL_PSO_WAIT_MS=50 where #891 is in)

run build end
D #533 + graphics waits non-blocking (3 local lines) on 1ec4c98 the stall is gone and the intro cutscene starts; device removed 0x887a0001 at 81.8 s
E D + a local allocator diagnostic, XCL_SPLIT_MIDLIST_WAIT=0 no removal; watchdog at 153.9 s
F main 1c87b1d (#897) + #891 no removal; watchdog at 196.0 s, frames near 0 and audio stuttering from ~147 s
G main 09940bb + #891 + #851 + #850 watchdog at 128 s
H G + #906 watchdog at 135 s
  • D's removal is debug-layer error 541 ("the command allocator was reset after the command list was recorded"), seen on D's build with XCL_D3D12_DEBUG=1 (main alone runs past #101 with the debug layer and doesn't report it). A local diagnostic counted resets per allocator: the title re-submitted a compute list recorded 14.6 s earlier, after resetting its allocator 6.1 s earlier (from +0x4e9b57e). #897 fixes this, and F has no removal with 16 mid-list splits.
  • The next blocker is a GPU cross-queue Wait64 cycle. It appears in every run that gets past the removal (E–H) and in none before. In H, for frame value 0x577, the direct queue (q3) waits for writes from the compute queues (q0/q1/q2/q4), and the compute queues wait for q3's write. Every producer has recorded and submitted 0x577, and every queue has completed only 0x576. XCL releases the waits on the CPU after 5 s ("released on CPU to prevent GPU hang"). In F, the tile-mapping queue then stops at a fence value ("sparse: the queue has not reached fence value 39674 after 5 s", from #873), and from ~166 s the log shows nothing but audio until the abort 30 s later. #851, #850 and #906 don't change it (G and H are local merges; #906 applied as its fence_x.rs change).

Not tested: AMD, a fully warm cache with zero compiles, #101 implemented instead of stubbed, the full test suite on any of the local merges (only the touched modules' unit tests, all passing), #889 in place of #891.

Report written with Claude Code (Claude Opus 5.5) from runs on the hardware above; XCL frames resolved with dbghelp against each build's xcl.pdb.

**@⁠emusynths** on GitHub · 2026-11-24 08:20 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7126025645) Thread dumps taken while the main loop is stuck, before the abort (the case listed as untested above), then runs with the pipeline waits bounded (#533, local changes, #891 with #897), which show the next blockers. Same abort in all runs: write at 0x0 in `+0x23cf683`, `rcx=0x70024c348 rdx=1 r8=0x7074d8c40`. **Setup** - RTX 5090 (driver 621.01), Ryzen 9 5950X, 64 GB, Windows 11 23H2 (22631), Rust 1.100.0, release builds, DXC 1.9.2609 - `XCL_PSO_PRELOAD=0`, `XCL_PRESS_A_AT` every 15 s (input reached the title at 15 s), `XCL_THREAD_DUMP_AT=60,80,95,110,…` - Local, uncommitted change in every dump run: `eh.rs` `dump_threads` unwinds 48 frames instead of 14. With 14, the title's frames below XCL's are cut off, and a job thread waiting on a pipeline looks like an anonymous XCL thread. **Runs** | run | build | first `#101 (not on PC)` from `+0x50a6657` | abort | gap | |---|---|---|---|---| | A | `main` beaa245 | 74.49 s | 104.88 s | 30.4 s | | B | `main` a1672ef (with #866) | 71.24 s | 101.92 s | 30.7 s | | C | a1672ef + #533 merged locally | 72.46 s | 102.94 s | 30.5 s | An earlier beaa245 run with 14-frame dumps had a 53.3 s gap (54.66 → 107.93 s), so the ~31 s gap after #101 doesn't always hold here. **During the stall (dumps at 80 s, 95 s and at the abort, runs A–C)** - The main thread is in a blocking `WaitForSingleObject(INFINITE)` (`+0x23cf735`) on a semaphore the title's job threads are meant to release. At 60 s it was still in the Sleep(1) poll of the same function (`+0x23cf729`). - In every stall-time dump, at least one title job thread is inside an XCL pipeline wait: - **A, B:** compute first binds. `bind::set_pipeline_state` → `pso_async::resolve_for_bind` → `resolve_wait` builds on the title's thread (DXC, then `nvgpucomp64`), and `bind::execute_indirect` → `resolve_wait` waits on the condvar for a build already started. - **C (#533):** compute waits are bounded and working ("compute pipeline … still building after 3263 ms – proceeding with stand-in"; 256 dispatches skipped by 82 s). The stall remains, and the job thread now waits on **graphics** pipelines: `bind::execute_indirect` → `resolve_for_indirect` → `resolve_wait` (the graphics branch, which #533 leaves unbounded) in all three dumps, at a different title call site each time, so many waits in a row rather than one long one. Also `draw_indexed_instanced` → `graphics_bound` → `resolve_wait` at 80 s. At the abort, 30 of 31 `xcl-pso` graphics workers were idle (waiting for work), 1 was in the driver, and 4 `xcl-pso-compute` workers were in `nvgpucomp64`. **Compute PSO builds** (the driver blob cache warming up across runs; `≥1 s` = builds that took a second or more): 164 built / 39 ≥1 s / 413 s total / 69.0 s longest on a cold cache; 136 / 6 / 38 s / 12.1 s in run B (90 from the driver blob). **Reading.** On this machine the stall always overlaps with a title job thread waiting in XCL for a pipeline. Bounding compute waits (#533) moved that wait to graphics pipelines and didn't move the abort. That fits the job threads not finishing the frame while any pipeline wait blocks them, but it doesn't prove it: burber's run above aborted with pipeline waits off, and I haven't identified the exact thread that should release the semaphore. A run with graphics waits bounded as well (#267 is draw-only) would be the next test. **#533 merge notes** (for whoever rebases it): the conflicts are 3 mechanical hunks in `pso_async.rs` (keep `key`/`used` and `timed_out`; keep `main`'s preload block and take `enqueue(&p)`). After that, #533's 5 test calls to `submit_lazy` need `main`'s new `key` argument (`0`). `cargo test -p xcl --lib -- pso_async bind::`: 10 passed, 0 failed. Full suite not run on the merge. **Later runs: what's left once the pipeline waits are bounded** (same machine and settings; `XCL_PSO_WAIT_MS=50` where #891 is in) | run | build | end | |---|---|---| | D | #533 + graphics waits non-blocking (3 local lines) on 1ec4c98 | the stall is gone and the intro cutscene starts; device removed `0x887a0001` at 81.8 s | | E | D + a local allocator diagnostic, `XCL_SPLIT_MIDLIST_WAIT=0` | no removal; watchdog at 153.9 s | | F | `main` 1c87b1d (#897) + #891 | no removal; watchdog at 196.0 s, frames near 0 and audio stuttering from ~147 s | | G | `main` 09940bb + #891 + #851 + #850 | watchdog at 128 s | | H | G + #906 | watchdog at 135 s | - **D's removal is debug-layer error 541** ("the command allocator was reset after the command list was recorded"), seen on D's build with `XCL_D3D12_DEBUG=1` (`main` alone runs past #101 with the debug layer and doesn't report it). A local diagnostic counted resets per allocator: the title re-submitted a compute list recorded 14.6 s earlier, after resetting its allocator 6.1 s earlier (from `+0x4e9b57e`). #897 fixes this, and F has no removal with 16 mid-list splits. - **The next blocker is a GPU cross-queue Wait64 cycle.** It appears in every run that gets past the removal (E–H) and in none before. In H, for frame value `0x577`, the direct queue (q3) waits for writes from the compute queues (q0/q1/q2/q4), and the compute queues wait for q3's write. Every producer has recorded and submitted `0x577`, and every queue has completed only `0x576`. XCL releases the waits on the CPU after 5 s ("released on CPU to prevent GPU hang"). In F, the tile-mapping queue then stops at a fence value ("sparse: the queue has not reached fence value 39674 after 5 s", from #873), and from ~166 s the log shows nothing but audio until the abort 30 s later. #851, #850 and #906 don't change it (G and H are local merges; #906 applied as its `fence_x.rs` change). **Not tested:** AMD, a fully warm cache with zero compiles, #101 implemented instead of stubbed, the full test suite on any of the local merges (only the touched modules' unit tests, all passing), #889 in place of #891. Report written with Claude Code (Claude Opus 5.5) from runs on the hardware above; XCL frames resolved with dbghelp against each build's `xcl.pdb`.
Author
Owner

@⁠leondood1298 on GitHub · 2026-11-24 07:57 UTC · original · edited 2026-11-24 08:35 UTC

RTX 4070 SUPER: who ticks the heartbeat at +0x71b6338, and where that thread sits when it stops (the run-time check @⁠13hourstilliland listed: last writer, [+0x71b6334] at the stop, same thread as in resolve_wait?)

Setup: NVIDIA GeForce RTX 4070 SUPER 12 GB (driver 32.0.16.2124, 32-lane waves), i7-12700K, 64 GB RAM, system-managed page file (commit limit 67.8 GB), Windows 11 26300. Release build of main beaa245 plus local diagnostics only (62 lines in eh.rs: XCL_WATCH also counts the writes per caller of the writing code with the time and thread of the last one, prints that with every thread dump, and keeps arming new threads for the whole run). XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_WATCH=71b6338 XCL_THREAD_DUMP_AT=40,56,62,66,70,74,78,82,86,90, A every 2 s from 8 to 90 s. After ten earlier scripted runs of this stage: 461 shader sets preloaded, 4 DXIL misses, 1 compute pipeline built after the last frame (165 KB of DXIL, 6.2 s, on a job thread, logged at 105.7 s).

The heartbeat's writers (all by the instruction before +0x2215a0d, from four callers, as read statically):

return address (call site) writes thread last write
+0x12079e (+0x120799) 1390 A 80.8 s
+0xc9e36d (+0xc9e368) 1390 A 80.8 s
+0x1c82b6c (+0x1c82b67) 37 B 50.0 s
+0x1c82bc6 (+0x1c82bc1) 134 B 50.0 s
  • Thread A is the title thread whose loop is +0x2215eca ← +0x23cf104 (at 40 s: +0x12073e ← +0x4fd1b64 ← +0x4fd1ae5 ← +0x23cf247 ← +0x23cf104). It ticks both per-frame sites once per iteration, and it is also the thread that makes the first #101 call (79.4 s). Thread B is the one XCL starts the title's entry point on; it only ticks through the wait loop, during loading.
  • The abort is the last tick + 30.1 s: last write 80.8 s, last presents in the 80–82 s activity line, +0x23cf683 at 110.888 s. [+0x71b6334] was 1 at 40 s and 0 in every dump from 56 s to 90 s, so this is the heartbeat route.
  • Thread A is not in XCL when it stops. In all four dumps from 82.1 s to the abort it waits in WaitForSingleObject at +0x43c3d5d ← +0x23cf4f2 ← +0x23cf2d3 ← +0x23cf104 (at 78.1 s it was inside the driver, D3D12Core ← nvwgf2umx). Thread B sits in +0x56a0d ← +0x23cf735 ← +0x8126a7 ← +0x53ec040 the whole time.
  • What is in XCL through the whole stall: one job thread (+0x2215eca ← +0x43c4314 ← +0x43c4591) in pso_async::resolve_wait in every dump – from bind::execute_indirect at 82.1 and 86.1 s (with four others at 82.1 s), from bind::set_pipeline_state (title +0x248c341) at 90.1 s and at the abort. Behind it: xcl-pso-pre-1 in build_compute → translated_compute_pso → dxc::compile, waiting for its reply in every dump from 78.1 s to the abort, and exactly one xcl-dxc worker inside dxcompiler.dll in each of them (one more asleep in dxc::wait_for_memory from 86.1 s).

So on this machine, with everything else warm, the chain is: heartbeat thread waits in title code → a job thread waits in resolve_wait → a preload worker waits 34 s or more for one DXC compile. That compile starts over in every run, because the title ends before its DXIL reaches the cache: ten earlier runs on plain beaa245 stopped at the same title frame (mission start + 5), the last two with 0 pipelines built after the last frame and 5 DXIL misses each.

Not tested

  • Which object +0x43c3d5d waits on and who signals it (inferred here from the job thread held in XCL for the same time; @⁠Xeltax's XCL_TRACE_WAITS would name it).
  • Whether the tick still stops once that program's DXIL is cached (xcl shaders --precompile --only cs is running here now).
  • AMD / 64-lane GPUs.

AI use

  • Claude Code (Claude Mythos 5.2) wrote the diagnostics patch, drove the runs with scripted presses, read the logs and wrote this report; log excerpts were extracted by Claude Sonnet 5.5 subagents. The patch can go up as its own diagnostics PR if it is useful to others.

Update (same machine and build, plus one more local log line at the start of each compute pipeline build): the program behind that wait is identified.

  • After its DXIL was in the cache, the driver did not finish it either. xcl shaders … --precompile --only cs produced the DXIL, so no DXC compile was pending any more. In a 600 s run left at the first menu (the title's story not started, nothing else building), xcl-pso-pre-1 was inside nvgpucomp64.dll in every dump at 120, 240, 360, 480 and 590 s, with changing stacks, and the build never completed.
  • It is one program: a console CS of 21,140 B that translates to 29,750,152 B of DXIL (cache file 0d91c70e0955c6ff.dxil, translation 56c0cd3b82a00c6e_Compute_0_4_1: 4 memory windows, split wave64 form). The other 67 compute pipelines with 128 KB of DXIL or more in that run (the largest 1,022,080 B from a 15,848 B CS) each came back from the driver blob cache in about 20 ms.
  • Two more of that size are in the precompiled cache: 958400d2caf07244 → 29,635,252 B and 95cc13288a27a96e → 14,104,656 B. Whether the title uses those was not checked.
  • Correction to the above: the wait for DXC was at least 72 s, not 34 s (the worker was already waiting in the 40.1 s dump).

So on this 32-lane card the stall at the first world frames comes down to one compute pipeline whose translation is ~29 MB of DXIL: DXC needs minutes for it, and the NVIDIA compiler did not finish it in 8.

Not tested: why the translation gets that large (looking at that next), its size in the 64-lane form, other 32-lane cards.

**@⁠leondood1298** on GitHub · 2026-11-24 07:57 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7125562029) · edited 2026-11-24 08:35 UTC **RTX 4070 SUPER: who ticks the heartbeat at `+0x71b6338`, and where that thread sits when it stops** (the run-time check @⁠13hourstilliland listed: last writer, `[+0x71b6334]` at the stop, same thread as in `resolve_wait`?) **Setup:** NVIDIA GeForce RTX 4070 SUPER 12 GB (driver 32.0.16.2124, 32-lane waves), i7-12700K, 64 GB RAM, system-managed page file (commit limit 67.8 GB), Windows 11 26300. Release build of `main` `beaa245` plus local diagnostics only (62 lines in `eh.rs`: `XCL_WATCH` also counts the writes per caller of the writing code with the time and thread of the last one, prints that with every thread dump, and keeps arming new threads for the whole run). `XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_WATCH=71b6338 XCL_THREAD_DUMP_AT=40,56,62,66,70,74,78,82,86,90`, A every 2 s from 8 to 90 s. After ten earlier scripted runs of this stage: 461 shader sets preloaded, 4 DXIL misses, 1 compute pipeline built after the last frame (165 KB of DXIL, 6.2 s, on a job thread, logged at 105.7 s). **The heartbeat's writers** (all by the instruction before `+0x2215a0d`, from four callers, as read statically): | return address (call site) | writes | thread | last write | |---|---|---|---| | `+0x12079e` (`+0x120799`) | 1390 | A | 80.8 s | | `+0xc9e36d` (`+0xc9e368`) | 1390 | A | 80.8 s | | `+0x1c82b6c` (`+0x1c82b67`) | 37 | B | 50.0 s | | `+0x1c82bc6` (`+0x1c82bc1`) | 134 | B | 50.0 s | - **Thread A** is the title thread whose loop is `+0x2215eca ← +0x23cf104` (at 40 s: `+0x12073e ← +0x4fd1b64 ← +0x4fd1ae5 ← +0x23cf247 ← +0x23cf104`). It ticks both per-frame sites once per iteration, and it is also the thread that makes the first `#101` call (79.4 s). **Thread B** is the one XCL starts the title's entry point on; it only ticks through the wait loop, during loading. - **The abort is the last tick + 30.1 s:** last write 80.8 s, last presents in the 80–82 s activity line, `+0x23cf683` at 110.888 s. `[+0x71b6334]` was 1 at 40 s and 0 in every dump from 56 s to 90 s, so this is the heartbeat route. - **Thread A is not in XCL when it stops.** In all four dumps from 82.1 s to the abort it waits in `WaitForSingleObject` at `+0x43c3d5d ← +0x23cf4f2 ← +0x23cf2d3 ← +0x23cf104` (at 78.1 s it was inside the driver, `D3D12Core ← nvwgf2umx`). Thread B sits in `+0x56a0d ← +0x23cf735 ← +0x8126a7 ← +0x53ec040` the whole time. - **What is in XCL through the whole stall:** one job thread (`+0x2215eca ← +0x43c4314 ← +0x43c4591`) in `pso_async::resolve_wait` in every dump – from `bind::execute_indirect` at 82.1 and 86.1 s (with four others at 82.1 s), from `bind::set_pipeline_state` (title `+0x248c341`) at 90.1 s and at the abort. Behind it: `xcl-pso-pre-1` in `build_compute → translated_compute_pso → dxc::compile`, waiting for its reply in every dump from 78.1 s to the abort, and exactly one `xcl-dxc` worker inside `dxcompiler.dll` in each of them (one more asleep in `dxc::wait_for_memory` from 86.1 s). So on this machine, with everything else warm, the chain is: heartbeat thread waits in title code → a job thread waits in `resolve_wait` → a preload worker waits 34 s or more for one DXC compile. That compile starts over in every run, because the title ends before its DXIL reaches the cache: ten earlier runs on plain `beaa245` stopped at the same title frame (mission start + 5), the last two with 0 pipelines built after the last frame and 5 DXIL misses each. **Not tested** - Which object `+0x43c3d5d` waits on and who signals it (inferred here from the job thread held in XCL for the same time; @⁠Xeltax's `XCL_TRACE_WAITS` would name it). - Whether the tick still stops once that program's DXIL is cached (`xcl shaders --precompile --only cs` is running here now). - AMD / 64-lane GPUs. **AI use** - Claude Code (Claude Mythos 5.2) wrote the diagnostics patch, drove the runs with scripted presses, read the logs and wrote this report; log excerpts were extracted by Claude Sonnet 5.5 subagents. The patch can go up as its own diagnostics PR if it is useful to others. --- **Update** (same machine and build, plus one more local log line at the start of each compute pipeline build): the program behind that wait is identified. - **After its DXIL was in the cache, the driver did not finish it either.** `xcl shaders … --precompile --only cs` produced the DXIL, so no DXC compile was pending any more. In a 600 s run left at the first menu (the title's story not started, nothing else building), `xcl-pso-pre-1` was inside `nvgpucomp64.dll` in every dump at 120, 240, 360, 480 and 590 s, with changing stacks, and the build never completed. - **It is one program:** a console CS of 21,140 B that translates to **29,750,152 B of DXIL** (cache file `0d91c70e0955c6ff.dxil`, translation `56c0cd3b82a00c6e_Compute_0_4_1`: 4 memory windows, split wave64 form). The other 67 compute pipelines with 128 KB of DXIL or more in that run (the largest 1,022,080 B from a 15,848 B CS) each came back from the driver blob cache in about 20 ms. - **Two more of that size are in the precompiled cache:** `958400d2caf07244` → 29,635,252 B and `95cc13288a27a96e` → 14,104,656 B. Whether the title uses those was not checked. - **Correction to the above:** the wait for DXC was at least 72 s, not 34 s (the worker was already waiting in the 40.1 s dump). So on this 32-lane card the stall at the first world frames comes down to one compute pipeline whose translation is ~29 MB of DXIL: DXC needs minutes for it, and the NVIDIA compiler did not finish it in 8. **Not tested:** why the translation gets that large (looking at that next), its size in the 64-lane form, other 32-lane cards.
Author
Owner

@⁠maephisto666 on GitHub · 2026-11-24 09:04 UTC · original

Two data points from another RTX 5090 machine: the #795 Wait64 GPU bridge switched off, and #891 + #533 on main 09940bb.

Setup

  • RTX 5090 (driver 32.0.16.2124), Ryzen 9 9950X3D, 64 GB, Windows 11 build 26100, rustc 1.100.0 (MSVC), release builds, DXC 1.9.2602.
  • Retail 1.0.2.1, XCL_NETWORK=0 plus a firewall block, fresh title data every run with the learned coherent window seeded (uma_coherent.txt = 4804771840, so XCL starts with 4095 MB, not the first-run 512 MB), warm DXIL / driver-blob caches, XCL_RUN_SECONDS=600.
  • Every build below also has #631 (rebased onto main's build.rs), so #585's 40-bit BVH exception does not end runs early.

1. The bridge is not the first blocker here (no bounded pipeline waits)

Local 5-line switch at the top of try_gpu_wait (list_x.rs): XCL_WAIT64_GPU_BRIDGE=0 returns GpuWaitOutcome::FallbackCpu, so every wait takes the old bounded CPU poll.

build first #101 last 2 s with presents abort (+0x23cf683)
09940bb + #631, bridge on 77.5 s 80.1 s (bridged wait-before-signal waits at 78.2 s) 108.4 s
same, XCL_WAIT64_GPU_BRIDGE=0 89.4 s 90.1 s 120.4 s

With the bridge off, the CPU waits time out instead: Wait64BitValueX timed out after 2000 ms at 0x70417fe58 (op 7, want 0x82f …; memory holds Some(0); queue_type=2 …) at 92–96 s. Same stop either way, so on this machine, without #533 / #891, the stall comes before the bridge matters. That fits the reading above (job threads waiting on pipelines first).

Across six runs on 09940bb (with and without #631, bridge on/off) the frames stopped 0.7–2.5 s after the first #101 every time.

2. 09940bb + #631 + #891 + #533, XCL_PSO_WAIT_MS=50, XCL_PRESS_A_AT every 5 s from 15 to 120 s, XCL_THREAD_DUMP_AT=100,130,160

  • Menus at 30 fps throughout; first #101 at 155.8 s (later than above because some presses landed on screens that were still animating).
  • The bounded waits work: compute pipeline … still building after 4000 ms – proceeding with stand-in from 160 s; by 178.6 s 20618 dispatches (6727 skipped), 1281 draws skipped.
  • Frames continue for 28 s after #101 (last presents at 184.2 s), at ~0.5 fps (1 present per 2 s); the screen stays on the loading spinner.
  • From 175.6 s: Write64 Signal at 0x704180000 = 0x101d on q2/ty2 would close a GPU cycle (waiters=[q1]) – signalled on CPU, for q0/q2/q3/q4 and the 0x70417fe… cells, repeatedly – the cross-queue cycle described above, here broken on the CPU.
  • Abort at 214.4 s; peak commit 31.6 GB.

So with #891 + #533 this machine also gets past the pipeline stall and reaches the GPU cross-queue cycle as the next blocker, as in run F above.

Merging #533 onto main with #891: one conflict in pso_async.rs, both sides additive at the same spot (#891's wait_budget / resolve_within and #533's FrameBudget / resolve_compute): keep both, drop #891's doc line for resolve_for_bind (it now calls #533's resolve_compute). cargo test -p xcl --lib -- pso_async bind::: 13 passed, 0 failed (no test changes needed on 09940bb). Full suite not run on that merge.

Not tested: AMD, #101 implemented, graphics waits made non-blocking (run D above), a run with the bridge off and #891 / #533.

AI use: Claude Code (Claude Opus 5.5) ran the builds and runs on the hardware above and wrote this comment.

**@⁠maephisto666** on GitHub · 2026-11-24 09:04 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7126931753) Two data points from another RTX 5090 machine: the #795 Wait64 GPU bridge switched off, and #891 + #533 on `main` `09940bb`. **Setup** - RTX 5090 (driver 32.0.16.2124), Ryzen 9 9950X3D, 64 GB, Windows 11 build 26100, rustc 1.100.0 (MSVC), release builds, DXC 1.9.2602. - Retail 1.0.2.1, `XCL_NETWORK=0` plus a firewall block, fresh title data every run with the learned coherent window seeded (`uma_coherent.txt` = 4804771840, so XCL starts with 4095 MB, not the first-run 512 MB), warm DXIL / driver-blob caches, `XCL_RUN_SECONDS=600`. - Every build below also has #631 (rebased onto `main`'s `build.rs`), so #585's 40-bit BVH exception does not end runs early. **1. The bridge is not the first blocker here (no bounded pipeline waits)** Local 5-line switch at the top of `try_gpu_wait` (`list_x.rs`): `XCL_WAIT64_GPU_BRIDGE=0` returns `GpuWaitOutcome::FallbackCpu`, so every wait takes the old bounded CPU poll. | build | first `#101` | last 2 s with presents | abort (`+0x23cf683`) | |---|---|---|---| | `09940bb` + #631, bridge on | 77.5 s | 80.1 s (bridged `wait-before-signal` waits at 78.2 s) | 108.4 s | | same, `XCL_WAIT64_GPU_BRIDGE=0` | 89.4 s | 90.1 s | 120.4 s | With the bridge off, the CPU waits time out instead: `Wait64BitValueX timed out after 2000 ms at 0x70417fe58 (op 7, want 0x82f …; memory holds Some(0); queue_type=2 …)` at 92–96 s. Same stop either way, so on this machine, without #533 / #891, the stall comes before the bridge matters. That fits the reading above (job threads waiting on pipelines first). Across six runs on `09940bb` (with and without #631, bridge on/off) the frames stopped 0.7–2.5 s after the first `#101` every time. **2. `09940bb` + #631 + #891 + #533**, `XCL_PSO_WAIT_MS=50`, `XCL_PRESS_A_AT` every 5 s from 15 to 120 s, `XCL_THREAD_DUMP_AT=100,130,160` - Menus at 30 fps throughout; first `#101` at 155.8 s (later than above because some presses landed on screens that were still animating). - The bounded waits work: `compute pipeline … still building after 4000 ms – proceeding with stand-in` from 160 s; by 178.6 s `20618 dispatches (6727 skipped)`, `1281` draws skipped. - **Frames continue for 28 s after `#101`** (last presents at 184.2 s), at ~0.5 fps (1 present per 2 s); the screen stays on the loading spinner. - From 175.6 s: `Write64 Signal at 0x704180000 = 0x101d on q2/ty2 would close a GPU cycle (waiters=[q1]) – signalled on CPU`, for q0/q2/q3/q4 and the `0x70417fe…` cells, repeatedly – the cross-queue cycle described above, here broken on the CPU. - Abort at 214.4 s; peak commit 31.6 GB. So with #891 + #533 this machine also gets past the pipeline stall and reaches the GPU cross-queue cycle as the next blocker, as in run F above. **Merging #533 onto `main` with #891:** one conflict in `pso_async.rs`, both sides additive at the same spot (#891's `wait_budget` / `resolve_within` and #533's `FrameBudget` / `resolve_compute`): keep both, drop #891's doc line for `resolve_for_bind` (it now calls #533's `resolve_compute`). `cargo test -p xcl --lib -- pso_async bind::`: 13 passed, 0 failed (no test changes needed on `09940bb`). Full suite not run on that merge. **Not tested:** AMD, #101 implemented, graphics waits made non-blocking (run D above), a run with the bridge off *and* #891 / #533. **AI use:** Claude Code (Claude Opus 5.5) ran the builds and runs on the hardware above and wrote this comment.
Author
Owner

@⁠not-rex on GitHub · 2026-11-24 09:13 UTC · original

Plan, to avoid duplicate work: a diagnostics-only PR in list_x.rs. When the GPU-wait watchdog expires a wait, it logs once per burst where the chain of waits ends:

  • a cycle of queues, each held at a wait;
  • a queue whose next tracked call is a Signal: either executing, or behind XCL's own tile-mapping waits (@⁠upipibi's point 2 on #795);
  • a producer that hasn't been submitted yet.

Each line includes the sparse queue's fence values. There is no behaviour change.

Why: a pure two-queue cycle is already broken at Signal time. @⁠maephisto666's run above shows that breaker firing ("would close a GPU cycle – signalled on CPU"), and the frames still stop. The watchdog's 5 s also starts at the CPU's submit, so the current lines don't yet separate a cycle from one queue stuck in a dispatch (@⁠CowboyBingus on #675). I'll also post an RTX 3080 run of main + #891 with GPU load logged across each burst.

@⁠theaustinayers, if your per-queue tracing is on its way upstream, say so and I'll hold off.

AI use: Claude Code (Claude Opus 5.5 and Claude Fable 5.2) read the code and the threads and drafted this plan.

**@⁠not-rex** on GitHub · 2026-11-24 09:13 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7127126213) **Plan, to avoid duplicate work:** a diagnostics-only PR in `list_x.rs`. When the GPU-wait watchdog expires a wait, it logs once per burst where the chain of waits ends: - a cycle of queues, each held at a wait; - a queue whose next tracked call is a Signal: either executing, or behind XCL's own tile-mapping waits (@⁠upipibi's point 2 on #795); - a producer that hasn't been submitted yet. Each line includes the sparse queue's fence values. There is no behaviour change. **Why:** a pure two-queue cycle is already broken at Signal time. @⁠maephisto666's run above shows that breaker firing ("would close a GPU cycle – signalled on CPU"), and the frames still stop. The watchdog's 5 s also starts at the CPU's submit, so the current lines don't yet separate a cycle from one queue stuck in a dispatch (@⁠CowboyBingus on #675). I'll also post an RTX 3080 run of `main` + #891 with GPU load logged across each burst. @⁠theaustinayers, if your per-queue tracing is on its way upstream, say so and I'll hold off. AI use: Claude Code (Claude Opus 5.5 and Claude Fable 5.2) read the code and the threads and drafted this plan.
Author
Owner

@⁠Xeltax on GitHub · 2026-11-24 09:15 UTC · original

RTX 4080: main + #889 + #905 + #891 (XCL_PSO_WAIT_MS=50). The loading goes on about twice as long, still on the loading screen, then ends in one of two ways.

Setup

  • NVIDIA GeForce RTX 4080 16 GB (driver 621.01), Ryzen 9 9900X, 32 GB RAM, Windows 11 Pro 26200, rustc 1.100.0, DXC 1.9.2609.5, release builds.
  • main 077ce40 with #889 e1d3b9d, #905 290f43a and #891 8cada26 merged (clean octopus merge). I also added #924 (XCL_TRACE_WAITS), which does nothing without the variable.
  • XCL_NETWORK=0 XCL_ACTIVITY=1, A through XCL_PRESS_AT every 4 s from 20 s, warm caches.
  • Reports for the single PRs on the same machine: #889 and #905.
main 077ce40 combined, run 1 combined, run 2
last 2 s window with ≥ 2 presents 80 s 78 s 78 s
then 0 presents to the end 0–1 presents per 2 s, with submits, draws, dispatches and DirectStorage still going same
ends with +0x23cf683 at 109.4 s +0x23cf683 at 228.9 s, after ~26 s with no activity at all read of 0xffffffffffffffff at game+0x10823c, 166.0 s
draws / dispatches skipped (stand-ins) 0 / 0 24 370 / 8 192 16 384 / 5 246
BCPack 2388 refused all unpacked all unpacked
peak local video memory / commit 14.1 GB / 30.4 GB 15.5 GB / 37.9 GB 15.7 GB / 36.1 GB
  • Frame dumps (XCL_FRAME_DUMP=60, run 1): every dump up to the last one is the loading-screen artwork, fading out and in. The world never shows.
  • Run 1, after the abort: the process did not exit. There was no crash dump, and the log stopped at the exception line. I killed it after 10 minutes, as in the #754 case in #232.
  • Run 2: the -1 read came after thousands of skipped draws and dispatches. That is the kind of garbage #891's description warns about. This base has #792, so I don't read it as #911 coming back, but I can't tell which skipped output it was.

What the title's threads wait on during the slow part (XCL_TRACE_WAITS=1, run 1, dumps at 110, 150 and 200 s):

  • No title thread is inside XCL or the driver in any of the three dumps.
  • The frame loop is still turning, slowly. The main thread waits on semaphore 0xff8 between frames. The frame-loop thread released it 633 times by 104 s and 646 times by 143 s, i.e. about 3 s per iteration. In between, the frame-loop thread waits on the 128-entry ring's events at +0x43c3d5d, and the ring's workers (+0x43c421e) wake up as their events are set.
  • The dump at 200 s came just before the final silence (from ~203 s), so I have no capture of the last 26 s. The crash-time dump never ran because of the hang.

Not tested

  • More runs, other budgets than 50 ms, AMD.
  • What the title waits for in the final silence of run 1.
  • Which skipped work fed run 2's -1 pointer.

AI use

  • Claude Code (Claude Opus 5.5) built the trees, ran the title on my machine, read the logs, dumps and frame dumps, and wrote this report.
**@⁠Xeltax** on GitHub · 2026-11-24 09:15 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7127161104) **RTX 4080: `main` + #889 + #905 + #891 (`XCL_PSO_WAIT_MS=50`). The loading goes on about twice as long, still on the loading screen, then ends in one of two ways.** **Setup** - NVIDIA GeForce RTX 4080 16 GB (driver 621.01), Ryzen 9 9900X, 32 GB RAM, Windows 11 Pro 26200, rustc 1.100.0, DXC 1.9.2609.5, release builds. - `main` `077ce40` with #889 `e1d3b9d`, #905 `290f43a` and #891 `8cada26` merged (clean octopus merge). I also added #924 (`XCL_TRACE_WAITS`), which does nothing without the variable. - `XCL_NETWORK=0 XCL_ACTIVITY=1`, A through `XCL_PRESS_AT` every 4 s from 20 s, warm caches. - Reports for the single PRs on the same machine: #889 and #905. | | `main` `077ce40` | combined, run 1 | combined, run 2 | |---|---|---|---| | last 2 s window with ≥ 2 presents | 80 s | 78 s | 78 s | | then | 0 presents to the end | 0–1 presents per 2 s, with submits, draws, dispatches and DirectStorage still going | same | | ends with | `+0x23cf683` at 109.4 s | `+0x23cf683` at 228.9 s, after ~26 s with no activity at all | read of `0xffffffffffffffff` at `game+0x10823c`, 166.0 s | | draws / dispatches skipped (stand-ins) | 0 / 0 | 24 370 / 8 192 | 16 384 / 5 246 | | BCPack | 2388 refused | all unpacked | all unpacked | | peak local video memory / commit | 14.1 GB / 30.4 GB | 15.5 GB / 37.9 GB | 15.7 GB / 36.1 GB | - **Frame dumps** (`XCL_FRAME_DUMP=60`, run 1): every dump up to the last one is the loading-screen artwork, fading out and in. The world never shows. - **Run 1, after the abort:** the process did not exit. There was no crash dump, and the log stopped at the exception line. I killed it after 10 minutes, as in the #754 case in #232. - **Run 2:** the `-1` read came after thousands of skipped draws and dispatches. That is the kind of garbage #891's description warns about. This base has #792, so I don't read it as #911 coming back, but I can't tell which skipped output it was. **What the title's threads wait on during the slow part** (`XCL_TRACE_WAITS=1`, run 1, dumps at 110, 150 and 200 s): - No title thread is inside XCL or the driver in any of the three dumps. - The frame loop is still turning, slowly. The main thread waits on semaphore `0xff8` between frames. The frame-loop thread released it 633 times by 104 s and 646 times by 143 s, i.e. about 3 s per iteration. In between, the frame-loop thread waits on the 128-entry ring's events at `+0x43c3d5d`, and the ring's workers (`+0x43c421e`) wake up as their events are set. - The dump at 200 s came just before the final silence (from ~203 s), so I have no capture of the last 26 s. The crash-time dump never ran because of the hang. **Not tested** - More runs, other budgets than 50 ms, AMD. - What the title waits for in the final silence of run 1. - Which skipped work fed run 2's `-1` pointer. **AI use** - Claude Code (Claude Opus 5.5) built the trees, ran the title on my machine, read the logs, dumps and frame dumps, and wrote this report.
Author
Owner

@⁠lucsoft on GitHub · 2026-11-24 09:16 UTC · original

Linux / RDNA3: three places where a title thread waits inside XCL in the #101 phase. Bounding all three removes the "GPU Loc Sig" stop, but the skipped work then hangs the GPU.

Setup: RX 7800 XT, Mesa 26.3.1 RADV, Wine 11.21 Staging, Ryzen 7 7800X3D, 30 GB RAM. XCL main beaa245 + #871 (with #867), #775, #684, and #533 rebased onto that (three conflicts in pso_async.rs; I kept main's preload / used and #533's enqueue / timed_out). Without the changes below, the stop is the usual one: the first #101 call, then +0x23cf683 31–34 s later (same as @⁠ClosetPie107's RDNA4 runs in #175). Every finding comes from XCL's thread dump at the stop, symbolized against the build.

1. Sparse readback blocks the submit thread behind a wait-before-signal (5 s each).

  • After ExecuteCommandLists, sparse::readback_after_execute makes the sparse queue wait on the title's queue. Then State::readback_ranges → wait_for waits on the CPU, up to 5000 ms, on the title's submitting thread.
  • If that list holds a Wait64BitValueX bridged as wait-before-signal (… >= 0x970 bridged to GPU queue.Wait (waiter=q0/ty2, prod=qSome(1)/tySome(0); wait-before-signal …)), it can only finish after the title submits the producer on q1, and the thread that would submit it is the one waiting.
  • In the log: 8 such waits, exactly 5 s apart (165.2, 170.2, 175.4 …). At the stop, the submit thread was in readback_ranges ← readback_after_execute ← q_execute_command_lists.
  • With that wait bounded (a local env knob, 100 ms), the 8 waits came 0.2–0.8 s apart.

2. A CPU Wait64BitValueX on a counter in a sparse window never sees the GPU's write.

  • With #871's 512 MB window (at 0x400000000), the counter at 0x42437faf0 is in a sparse window. PendingWait::read_value reads only the CPU view, and the GPU writes it into video memory.
  • In the log: timed out after 2000 ms at 0x42437faf0 (op 7, want 0xdcf …; memory holds Some(0); …, sync=Some((dcf, dcf, false, Some(2)))), 15 in a row, ~30 s. The value was recorded and submitted; the CPU just never saw it.
  • Change: in wait_until_satisfied, after 10 ms, call sparse::readback_now(self.va, self.width) before each check. The timeouts went away.
  • @⁠tadymila's "the counter is never written" may be the same thing, if that counter lies in a sparse window.

3. A draw builds its graphics pipeline in DXC on the title's thread.

  • #533 bounds only compute. bind::graphics_bound still calls resolve_wait, which takes the job itself when no worker has, and waits without a limit. At the stop: a title thread in real::build_graphics → translated_graphics_pso → dxc::compile.
  • I gave draws #533's bounded wait (resolve_compute_within on the graphics workers). Note: at the limit, the draw has to be skipped. Drawing the stand-in with the title's root signature and arguments (18 draws, with PC pipelines) gave amdgpu: ring gfx_0.0.0 timeout here, as the comment in execute_indirect warns.

Result with all three:

  • Cold caches: first #101 at 216.9 s, still running at 326.5 s (+110 s, no watchdog). Then ring gfx_0.0.0 timeout and device removed. 512 draws and 2,195 dispatches skipped.
  • Warm caches (1024 pipelines built ahead of their first use): menus at a steady 30 fps for ~8 min, #101 at 579.7 s, ring timeout at 593.8 s (+14 s). 673 draws and 2,048 dispatches skipped, 0 CPU wait timeouts.

So bounding the waits swaps the watchdog for GPU hangs. My guess, not verified: work that comes after the skipped dispatches reads results they never wrote (indirect arguments, for example). Items 1 and 2 look like plain XCL bugs to me, since the waits can never succeed. Item 3 only moves the problem: the world's pipelines need to be ready in time (#690 / #634, and dxil-spirv's speed under Wine).

Not tested: Windows, NVIDIA, items 1 and 2 without 3, the GPU hang with RADV_DEBUG=hang.

AI use: Claude Code (Claude Opus 5.5) did the analysis, the local changes and this comment. The runs were real, on the hardware above.

**@⁠lucsoft** on GitHub · 2026-11-24 09:16 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7127179525) **Linux / RDNA3: three places where a title thread waits inside XCL in the `#101` phase. Bounding all three removes the "GPU Loc Sig" stop, but the skipped work then hangs the GPU.** **Setup:** RX 7800 XT, Mesa 26.3.1 RADV, Wine 11.21 Staging, Ryzen 7 7800X3D, 30 GB RAM. XCL `main` `beaa245` + #871 (with #867), #775, #684, and #533 rebased onto that (three conflicts in `pso_async.rs`; I kept main's preload / `used` and #533's `enqueue` / `timed_out`). Without the changes below, the stop is the usual one: the first `#101` call, then `+0x23cf683` 31–34 s later (same as @⁠ClosetPie107's RDNA4 runs in #175). Every finding comes from XCL's thread dump at the stop, symbolized against the build. **1. Sparse readback blocks the submit thread behind a wait-before-signal (5 s each).** - After `ExecuteCommandLists`, `sparse::readback_after_execute` makes the sparse queue wait on the title's queue. Then `State::readback_ranges` → `wait_for` waits on the CPU, up to 5000 ms, on the title's submitting thread. - If that list holds a `Wait64BitValueX` bridged as wait-before-signal (`… >= 0x970 bridged to GPU queue.Wait (waiter=q0/ty2, prod=qSome(1)/tySome(0); wait-before-signal …)`), it can only finish after the title submits the producer on q1, and the thread that would submit it is the one waiting. - In the log: 8 such waits, exactly 5 s apart (165.2, 170.2, 175.4 …). At the stop, the submit thread was in `readback_ranges` ← `readback_after_execute` ← `q_execute_command_lists`. - With that wait bounded (a local env knob, 100 ms), the 8 waits came 0.2–0.8 s apart. **2. A CPU `Wait64BitValueX` on a counter in a sparse window never sees the GPU's write.** - With #871's 512 MB window (at `0x400000000`), the counter at `0x42437faf0` is in a sparse window. `PendingWait::read_value` reads only the CPU view, and the GPU writes it into video memory. - In the log: `timed out after 2000 ms at 0x42437faf0 (op 7, want 0xdcf …; memory holds Some(0); …, sync=Some((dcf, dcf, false, Some(2))))`, 15 in a row, ~30 s. The value was recorded and submitted; the CPU just never saw it. - Change: in `wait_until_satisfied`, after 10 ms, call `sparse::readback_now(self.va, self.width)` before each check. The timeouts went away. - @⁠tadymila's "the counter is never written" may be the same thing, if that counter lies in a sparse window. **3. A draw builds its graphics pipeline in DXC on the title's thread.** - #533 bounds only compute. `bind::graphics_bound` still calls `resolve_wait`, which takes the job itself when no worker has, and waits without a limit. At the stop: a title thread in `real::build_graphics` → `translated_graphics_pso` → `dxc::compile`. - I gave draws #533's bounded wait (`resolve_compute_within` on the graphics workers). Note: at the limit, the draw has to be **skipped**. Drawing the stand-in with the title's root signature and arguments (18 draws, `with PC pipelines`) gave `amdgpu: ring gfx_0.0.0 timeout` here, as the comment in `execute_indirect` warns. **Result with all three:** - Cold caches: first `#101` at 216.9 s, still running at 326.5 s (+110 s, no watchdog). Then `ring gfx_0.0.0 timeout` and device removed. 512 draws and 2,195 dispatches skipped. - Warm caches (`1024 pipelines built ahead of their first use`): menus at a steady 30 fps for ~8 min, `#101` at 579.7 s, ring timeout at 593.8 s (+14 s). 673 draws and 2,048 dispatches skipped, 0 CPU wait timeouts. So bounding the waits swaps the watchdog for GPU hangs. My guess, **not verified**: work that comes after the skipped dispatches reads results they never wrote (indirect arguments, for example). Items 1 and 2 look like plain XCL bugs to me, since the waits can never succeed. Item 3 only moves the problem: the world's pipelines need to be ready in time (#690 / #634, and dxil-spirv's speed under Wine). **Not tested:** Windows, NVIDIA, items 1 and 2 without 3, the GPU hang with `RADV_DEBUG=hang`. AI use: Claude Code (Claude Opus 5.5) did the analysis, the local changes and this comment. The runs were real, on the hardware above.
Author
Owner

@⁠maximecmb on GitHub · 2026-11-24 09:35 UTC · original

RTX 5080 / Windows: buffer views with an empty V# and unified-memory room are not what changes at the stop

I checked whether the world load runs out of unified memory: once the coherent window is full, a console buffer XCL can't place there becomes a plain PC resource, and its views get an empty V#, so shaders read zeros and their writes are lost. Until now XCL counted those views but never reported the count. #956 reports it by kind, along with the resources that got no room, in the XCL_ACTIVITY memory line and in report.json. Here is a run with it.

Setup

  • NVIDIA GeForce RTX 5080 16 GB (driver 617.42, 32-lane waves), Ryzen 7 9800X3D, 64 GB RAM, Windows 11 build 26300, Rust 1.100.0 MSVC, release build, DXC 1.9.2602.17.
  • main 077ce40 + #956 (ad2f675; diagnostics only). Retail 1.0.2.1, XCL_NETWORK=0, XCL_ACTIVITY=1, warm caches. Hand-driven through the first-run setup into the world load, nothing else.

What happened (the same as an earlier run on plain 077ce40, which gave first #101 at 59.5 s, presents 0 from 62 s and abort at 90.4 s)

  • First CommandList10::#101 at 59.7 s. Presents and submits are 0 from 64 s, while dispatches keep coming in bursts. The usual +0x23cf683 write at 0x0 comes at 91.3 s.
  • 0 draws or dispatches skipped, 0 failed pipelines, 0 Wait64BitValueX timeouts. At the crash no title thread was inside XCL or the driver.

The counts over the run

menus (9–44 s, frames fine) world load (44–62 s) after the stop
buffer SRVs / UAVs with an empty V# 125 / 129, created at 9.3 s +4 / +8 no change
CBVs / texture views with an empty descriptor 0 / 0 0 / 0 0 / 0
console buffers / committed textures with no room in unified memory 0 / 0 0 / 0 0 / 0
coherent window 3998 / 4095 MB from 4 s same same

So:

  • No resource was denied room in unified memory. The coherent window is full from 4 s on, but that's its steady state in the menus too.
  • Nearly all empty V#s already exist in the menus, which render correctly. Their buffers were never placed in unified memory in the first place, which fits #697 (title memory outside the windows), not a world-load shortage.
  • Only 12 empty buffer views are new in the world load, around 50 s and 62 s. That's a lead I haven't followed up, not an explanation.

Not tested: AMD, Linux, other builds (#533 / #891 / #905), and what the 12 world-load views are for.

AI use: Claude Code (Claude Opus 5.5) wrote #956, read the logs and report.json of the runs, and wrote this comment. I drove the runs on the hardware above.

**@⁠maximecmb** on GitHub · 2026-11-24 09:35 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7127622599) **RTX 5080 / Windows: buffer views with an empty V# and unified-memory room are not what changes at the stop** I checked whether the world load runs out of unified memory: once the coherent window is full, a console buffer XCL can't place there becomes a plain PC resource, and its views get an empty V#, so shaders read zeros and their writes are lost. Until now XCL counted those views but never reported the count. #956 reports it by kind, along with the resources that got no room, in the `XCL_ACTIVITY` memory line and in `report.json`. Here is a run with it. **Setup** - NVIDIA GeForce RTX 5080 16 GB (driver 617.42, 32-lane waves), Ryzen 7 9800X3D, 64 GB RAM, Windows 11 build 26300, Rust 1.100.0 MSVC, release build, DXC 1.9.2602.17. - `main` `077ce40` + #956 (`ad2f675`; diagnostics only). Retail 1.0.2.1, `XCL_NETWORK=0`, `XCL_ACTIVITY=1`, warm caches. Hand-driven through the first-run setup into the world load, nothing else. **What happened** (the same as an earlier run on plain `077ce40`, which gave first `#101` at 59.5 s, presents 0 from 62 s and abort at 90.4 s) - First `CommandList10::#101` at 59.7 s. Presents and submits are 0 from 64 s, while dispatches keep coming in bursts. The usual `+0x23cf683` write at 0x0 comes at 91.3 s. - 0 draws or dispatches skipped, 0 failed pipelines, 0 `Wait64BitValueX` timeouts. At the crash no title thread was inside XCL or the driver. **The counts over the run** | | menus (9–44 s, frames fine) | world load (44–62 s) | after the stop | |---|---|---|---| | buffer SRVs / UAVs with an empty V# | **125 / 129, created at 9.3 s** | +4 / +8 | no change | | CBVs / texture views with an empty descriptor | 0 / 0 | 0 / 0 | 0 / 0 | | console buffers / committed textures with no room in unified memory | 0 / 0 | **0 / 0** | 0 / 0 | | coherent window | 3998 / 4095 MB from 4 s | same | same | So: - **No resource was denied room in unified memory.** The coherent window is full from 4 s on, but that's its steady state in the menus too. - **Nearly all empty V#s already exist in the menus**, which render correctly. Their buffers were never placed in unified memory in the first place, which fits #697 (title memory outside the windows), not a world-load shortage. - Only 12 empty buffer views are new in the world load, around 50 s and 62 s. That's a lead I haven't followed up, not an explanation. **Not tested:** AMD, Linux, other builds (#533 / #891 / #905), and what the 12 world-load views are for. **AI use:** Claude Code (Claude Opus 5.5) wrote #956, read the logs and `report.json` of the runs, and wrote this comment. I drove the runs on the hardware above.
Author
Owner

@⁠DecayingEagle on GitHub · 2026-11-24 10:16 UTC · original

RX 7900 XT / Linux confirmation: consolidated setup, exact commits, commands and results are in the GPU report.

Both unmodified 6bac4b4 (CachyOS Proton) and 9aec53d (GE-Proton 11-14) ended at the same game_scarlett_master.exe+0x23cf683 null write after the legal notices.

In the GE run, presentations stopped around 64 s while dispatch counters continued. Several Wait64BitValueX operations had just been bridged to GPU queue waits. At 93.657 s, XCL reported 0x887a0005 and the abort; the kernel recorded an amdgpu gfxhub fault at 0x0000c00100000000 in the vkd3d queue, then a graphics-ring timeout/reset.

No watchdog was disabled or game executable patched. This is additional RDNA3 evidence, not a controlled Proton-only A/B or an identified root cause. The full Rust/GPU suite was not run.

AI use: OpenAI Codex ran the local retest and drafted this summary from the observed diagnostics; exact model version is not exposed.

**@⁠DecayingEagle** on GitHub · 2026-11-24 10:16 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7128554712) **RX 7900 XT / Linux confirmation:** consolidated setup, exact commits, commands and results are in [the GPU report](https://github.com/ivall/xcl/issues/42#issuecomment-7128494893). Both unmodified `6bac4b4` (CachyOS Proton) and `9aec53d` (GE-Proton 11-14) ended at the same `game_scarlett_master.exe+0x23cf683` null write after the legal notices. In the GE run, presentations stopped around 64 s while dispatch counters continued. Several `Wait64BitValueX` operations had just been bridged to GPU queue waits. At 93.657 s, XCL reported `0x887a0005` and the abort; the kernel recorded an amdgpu gfxhub fault at `0x0000c00100000000` in the vkd3d queue, then a graphics-ring timeout/reset. No watchdog was disabled or game executable patched. This is additional RDNA3 evidence, not a controlled Proton-only A/B or an identified root cause. The full Rust/GPU suite was not run. AI use: OpenAI Codex ran the local retest and drafted this summary from the observed diagnostics; exact model version is not exposed.
Author
Owner

@⁠S1m0ne1997 on GitHub · 2026-11-24 10:38 UTC · original

RTX 4090 / Windows: with #688 and a full DXIL cache, DXC is no longer the bottleneck; what is left is the NVIDIA driver compiling compute pipelines. Now running --precompile --pipelines with #744.

Setup: RTX 4090 24 GB, Ryzen 9 9950X3D (32 threads), 47 GB RAM, Windows 11 26300, DXC 1.9.2602.17, release builds, retail 1.0.2.1. Same machine as my comment above.

1. Pulling main invalidates most of a precompiled DXIL cache. The cache key is the HLSL, so the recompiler commits between 2997c9a and 077ce40 (0c02b87, f9e5ee9, 066ae5b, 2e67909) change the key of most shaders: of the first 1 948 shaders of a fresh --precompile, 1 879 needed a new DXC compile. Without that re-run, main 077ce40 reached the usual abort 109–131 s into the run, with 60 DXIL misses compiled while the world loaded. Precompile again after pulling.

2. #688 doubles DXC throughput here. Same first 1 500 shaders of the pack, empty cache, 31 DXC threads, run in both orders: main 077ce40 117.7 / 116.2 s (13.3 / 12.5 effective cores), 077ce40 + 0b82a3d 50.6 / 49.3 s (26.3 / 26.6 cores), with less total CPU. The 1 601 DXIL files are byte-identical (SHA-256). cargo test --workspace -- --test-threads=4: 718 passed, 0 failed, 41 ignored; SKIPPED no wave64 ×2. The full pack then took 23 min 28 s (18 540 new DXIL).

3. With #688 and a full DXIL cache, the stall is the driver. Two runs of 077ce40 + #688, each ended by "GPU Loc Sig" about 30 s after the first ListX #101:

run abort after #101 compute PSOs built after #101 driver time (sum over threads) slowest DXIL misses
1 +30.6 s 171 95 s 19.2 s (828 KB DXIL) 27
2 +32.7 s 58 51 s 4.3 s 8

In run 2, all 22 big compute PSOs of run 1 came from the driver_cache blobs in 2–8 ms each, built ahead at start-up (7296a8b). Each run moves more work out of the window, but programs the title has not used before keep arriving. At the abort, a title thread waits in bind::execute_indirect → pso_async::resolve_wait for a worker's driver build.

4. #533 (5e6aca8) made it worse here: the bounded wait skipped 4 ExecuteIndirects, five Wait64BitValueX then timed out on a value (0x8c9) that the skipped work would have written, and the abort followed.

5. Not investigated yet: --precompile on 077ce40 reports 19 dxc: error: validation errors, all mesh pass-through programs (ms_6_6, 3 distinct HLSL hashes).

What I'm doing now, so nobody repeats it: 077ce40 + #688 (0b82a3d) + #744 (2cc79fb, 07c535d), clean cherry-picks; #744's driver_cache tests 4 passed and gpu_compute_e2e 3 passed on this tree. Running xcl shaders <pack> --precompile --pipelines with XCL_PIPELINE_THREADS=8, so every compute program's driver blob is in the runtime cache before a run. Then a run of the title to see whether the world load gets past the heartbeat. I'll post the result here.

AI use: Claude Code with Claude Opus 5.5 ran the builds, benchmarks, runs and analysis on my machine and wrote and posted this comment at my request.

**@⁠S1m0ne1997** on GitHub · 2026-11-24 10:38 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7129042413) **RTX 4090 / Windows: with #688 and a full DXIL cache, DXC is no longer the bottleneck; what is left is the NVIDIA driver compiling compute pipelines. Now running `--precompile --pipelines` with #744.** **Setup:** RTX 4090 24 GB, Ryzen 9 9950X3D (32 threads), 47 GB RAM, Windows 11 26300, DXC 1.9.2602.17, release builds, retail 1.0.2.1. Same machine as my comment above. **1. Pulling `main` invalidates most of a precompiled DXIL cache.** The cache key is the HLSL, so the recompiler commits between `2997c9a` and `077ce40` (`0c02b87`, `f9e5ee9`, `066ae5b`, `2e67909`) change the key of most shaders: of the first 1 948 shaders of a fresh `--precompile`, 1 879 needed a new DXC compile. Without that re-run, `main` `077ce40` reached the usual abort 109–131 s into the run, with 60 DXIL misses compiled while the world loaded. Precompile again after pulling. **2. #688 doubles DXC throughput here.** Same first 1 500 shaders of the pack, empty cache, 31 DXC threads, run in both orders: `main` `077ce40` 117.7 / 116.2 s (13.3 / 12.5 effective cores), `077ce40` + `0b82a3d` 50.6 / 49.3 s (26.3 / 26.6 cores), with less total CPU. The 1 601 DXIL files are byte-identical (SHA-256). `cargo test --workspace -- --test-threads=4`: 718 passed, 0 failed, 41 ignored; SKIPPED `no wave64` ×2. The full pack then took 23 min 28 s (18 540 new DXIL). **3. With #688 and a full DXIL cache, the stall is the driver.** Two runs of `077ce40` + #688, each ended by "GPU Loc Sig" about 30 s after the first `ListX #101`: | run | abort after `#101` | compute PSOs built after `#101` | driver time (sum over threads) | slowest | DXIL misses | |---|---|---|---|---|---| | 1 | +30.6 s | 171 | 95 s | 19.2 s (828 KB DXIL) | 27 | | 2 | +32.7 s | 58 | 51 s | 4.3 s | 8 | In run 2, all 22 big compute PSOs of run 1 came from the `driver_cache` blobs in 2–8 ms each, built ahead at start-up (`7296a8b`). Each run moves more work out of the window, but programs the title has not used before keep arriving. At the abort, a title thread waits in `bind::execute_indirect` → `pso_async::resolve_wait` for a worker's driver build. **4. #533 (`5e6aca8`) made it worse here:** the bounded wait skipped 4 `ExecuteIndirect`s, five `Wait64BitValueX` then timed out on a value (`0x8c9`) that the skipped work would have written, and the abort followed. **5. Not investigated yet:** `--precompile` on `077ce40` reports 19 `dxc: error: validation errors`, all mesh pass-through programs (`ms_6_6`, 3 distinct HLSL hashes). **What I'm doing now, so nobody repeats it:** `077ce40` + #688 (`0b82a3d`) + #744 (`2cc79fb`, `07c535d`), clean cherry-picks; #744's `driver_cache` tests 4 passed and `gpu_compute_e2e` 3 passed on this tree. Running `xcl shaders <pack> --precompile --pipelines` with `XCL_PIPELINE_THREADS=8`, so every compute program's driver blob is in the runtime cache before a run. Then a run of the title to see whether the world load gets past the heartbeat. I'll post the result here. *AI use: Claude Code with Claude Opus 5.5 ran the builds, benchmarks, runs and analysis on my machine and wrote and posted this comment at my request.*
Author
Owner

@⁠xroneyaa on GitHub · 2026-11-24 10:48 UTC · original

Picking up item #2 from the trace above: reading back sparse-window Wait64BitValueX counters via sparse::readback_now inside PendingWait::wait_until_satisfied (with unit + GPU CopyBufferRegion sparse readback tests). PR incoming.

**@⁠xroneyaa** on GitHub · 2026-11-24 10:48 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7129270952) Picking up item #2 from the trace above: reading back sparse-window `Wait64BitValueX` counters via `sparse::readback_now` inside `PendingWait::wait_until_satisfied` (with unit + GPU CopyBufferRegion sparse readback tests). PR incoming.
Author
Owner

@⁠lucsoft on GitHub · 2026-11-24 10:50 UTC · original

Follow-up to my Linux / RDNA3 comment above, now on main 6efdabc (with XCL_PSO_WAIT_MS): with a 1 GB coherent window the title gets through the #101 phase with nothing skipped and no wait timing out. It then hangs the GPU about 70 s after #101.

Setup: as before (RX 7800 XT, Mesa 26.3.1 RADV, Wine 11.21 Staging). main 6efdabc + #871's memory commit only (de6d71c; I left #867 out, see below) + #684. Started with XCL_PSO_WAIT_MS=4000 XCL_SPARSE_WAIT_MS=100 (the second one is the local bound from item 1).

window first #101 end wait timeouts skipped draws / dispatches fps while loading
512 MB (#871's default) 286.1 s +0x23cf683 at 346.6 s (+60.5 s) 15, from 318 s 0 / 0 17–30
1024 MB (XCL_COHERENT_MB=1024) 433.4 s ring gfx_0.0.0 timeout at ~503 s (+70 s), then 0x887a0005 0 for 49 s, then 9 once the GPU had hung 0 / 0 ~8
  • Item 2 above is about the window size. The counter the title waits on is at 0x42437fae8, 580 MB into the window at 0x400000000. With #871's 512 MB it falls in a sparse window, and the CPU wait times out every 2 s (memory holds Some(0), sync=Some((1a8d, 1a8d, …))) until the watchdog fires. With 1024 MB it's in the coherent window and those timeouts are gone.
  • What's left on Linux / RDNA3 is a GPU hang while the world loads, with nothing skipped. That sounds like @⁠DecayingEagle's gfxhub fault on the 7900 XT. I haven't run RADV_DEBUG=hang on it yet.

@⁠xroneyaa, for your item-2 PR: my version (sparse::readback_now(self.va, self.width) in wait_until_satisfied after 10 ms) made the test title fail on 6efdabc: [FAIL] D3D12.X: console command list memory methods (writes, timestamp, fill, copy, KickoffX, Wait32/64): wait cells not written. It passes without that change. My guess is the readback copies video memory over values the CPU had just written (perhaps tiles parked by 7f94c6f), but I haven't checked. A test with a CPU write to the cell before the wait would cover it.

About #867 on current main: merged with alloc_pool (the guards around the pooled allocator in both Reset paths, KickoffX and the queue's ExecuteCommandLists), it crashed the test title in vkd3d-proton (d3d12core.dll+0xc4f7b, read of 0xffffffffffffffff) right after the D3D12.X shader checks. Without it (relaxed vkd3d-proton) it's 49/50. My merge may be the problem rather than #867.

Not tested: RADV_DEBUG=hang on the world-load hang, 768 MB (enough for the counter, cheaper than 1 GB), Windows.

AI use: Claude Code (Claude Opus 5.5) did the analysis and wrote this comment. The runs were real, on the hardware above.

**@⁠lucsoft** on GitHub · 2026-11-24 10:50 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7129324644) Follow-up to my Linux / RDNA3 comment above, now on `main` `6efdabc` (with `XCL_PSO_WAIT_MS`): **with a 1 GB coherent window the title gets through the `#101` phase with nothing skipped and no wait timing out. It then hangs the GPU about 70 s after `#101`.** **Setup:** as before (RX 7800 XT, Mesa 26.3.1 RADV, Wine 11.21 Staging). `main` `6efdabc` + #871's memory commit only (`de6d71c`; I left #867 out, see below) + #684. Started with `XCL_PSO_WAIT_MS=4000 XCL_SPARSE_WAIT_MS=100` (the second one is the local bound from item 1). | window | first `#101` | end | wait timeouts | skipped draws / dispatches | fps while loading | |---|---|---|---|---|---| | 512 MB (#871's default) | 286.1 s | `+0x23cf683` at 346.6 s (+60.5 s) | 15, from 318 s | 0 / 0 | 17–30 | | 1024 MB (`XCL_COHERENT_MB=1024`) | 433.4 s | `ring gfx_0.0.0 timeout` at ~503 s (+70 s), then `0x887a0005` | 0 for 49 s, then 9 once the GPU had hung | 0 / 0 | ~8 | - **Item 2 above is about the window size.** The counter the title waits on is at `0x42437fae8`, 580 MB into the window at `0x400000000`. With #871's 512 MB it falls in a sparse window, and the CPU wait times out every 2 s (`memory holds Some(0)`, `sync=Some((1a8d, 1a8d, …))`) until the watchdog fires. With 1024 MB it's in the coherent window and those timeouts are gone. - **What's left on Linux / RDNA3 is a GPU hang while the world loads**, with nothing skipped. That sounds like @⁠DecayingEagle's gfxhub fault on the 7900 XT. I haven't run `RADV_DEBUG=hang` on it yet. **@⁠xroneyaa**, for your item-2 PR: my version (`sparse::readback_now(self.va, self.width)` in `wait_until_satisfied` after 10 ms) made the test title fail on `6efdabc`: `[FAIL] D3D12.X: console command list memory methods (writes, timestamp, fill, copy, KickoffX, Wait32/64): wait cells not written`. It passes without that change. My guess is the readback copies video memory over values the CPU had just written (perhaps tiles parked by `7f94c6f`), but I haven't checked. A test with a CPU write to the cell before the wait would cover it. **About #867 on current `main`:** merged with `alloc_pool` (the guards around the pooled allocator in both `Reset` paths, `KickoffX` and the queue's `ExecuteCommandLists`), it crashed the test title in vkd3d-proton (`d3d12core.dll+0xc4f7b`, read of `0xffffffffffffffff`) right after the D3D12.X shader checks. Without it (relaxed vkd3d-proton) it's 49/50. My merge may be the problem rather than #867. **Not tested:** `RADV_DEBUG=hang` on the world-load hang, 768 MB (enough for the counter, cheaper than 1 GB), Windows. AI use: Claude Code (Claude Opus 5.5) did the analysis and wrote this comment. The runs were real, on the hardware above.
Author
Owner

@⁠ivall on GitHub · 2026-11-24 10:52 UTC · original

From #986 (closed as a duplicate of this issue): VIctory, an independent runtime, reaches the same null write at +0x23cf683 at the end of loading on the same title (Windows 10). So the stop is reached through two runtimes that share no code; whatever the title waits for there is missing in both.

**@⁠ivall** on GitHub · 2026-11-24 10:52 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7129360476) From #986 (closed as a duplicate of this issue): VIctory, an independent runtime, reaches the same null write at `+0x23cf683` at the end of loading on the same title (Windows 10). So the stop is reached through two runtimes that share no code; whatever the title waits for there is missing in both.
Author
Owner

@⁠S1m0ne1997 on GitHub · 2026-11-24 11:01 UTC · original

Follow-up (RTX 4090, driver 621.24): with #744, --precompile --pipelines does not scale with XCL_PIPELINE_THREADS. NVIDIA's compiler queues on the process heap lock, the same contention #688 removes for DXC.

Tree: 077ce40 + #688 (0b82a3d) + #744 (2cc79fb, 07c535d), release.

  • XCL_PIPELINE_THREADS=8: about 3.4 of 32 cores busy (20 s sample), with gaps where no blob is written.
  • XCL_PIPELINE_THREADS=32: after ~600 pipelines the process stalled. For 5+ minutes 1.1 cores were busy and no new blob was written. A stack sample of every thread (dbghelp, suspended one at a time) shows 32 threads inside nvgpucomp64: 19 waiting in RtlAllocateHeap and 13 in RtlFreeHeap, all on the process heap's critical section, and 1 thread running in RtlFreeHeap. The DXC workers were idle (all DXIL cached).

The driver's compiler allocates from the process heap, and XCL cannot give it a private allocator the way #688 does for DXC. So more compiles in one process wait on the same lock.

Workaround I'm trying: several processes instead of more threads, each with its own heap. A local, unpublished change gives xcl shaders --precompile an XCL_PRECOMPILE_SHARD=k/n (the process takes every n-th shader from k). With 4 processes × XCL_PIPELINE_THREADS=8, the four use about 17 cores together while they reload the ~650 blobs already on disk. No steady-state throughput number yet: they are now in the part of the pack with the big compute programs. I'll post that and the run of the title once it is done.

If a shard option looks useful for #744 (or as its own small PR), I can open it.

AI use: Claude Code with Claude Opus 5.5 ran the precompiles, took the stack samples and wrote and posted this comment at my request.

**@⁠S1m0ne1997** on GitHub · 2026-11-24 11:01 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7129549139) **Follow-up (RTX 4090, driver 621.24): with #744, `--precompile --pipelines` does not scale with `XCL_PIPELINE_THREADS`. NVIDIA's compiler queues on the process heap lock, the same contention #688 removes for DXC.** Tree: `077ce40` + #688 (`0b82a3d`) + #744 (`2cc79fb`, `07c535d`), release. - `XCL_PIPELINE_THREADS=8`: about 3.4 of 32 cores busy (20 s sample), with gaps where no blob is written. - `XCL_PIPELINE_THREADS=32`: after ~600 pipelines the process stalled. For 5+ minutes 1.1 cores were busy and no new blob was written. A stack sample of every thread (dbghelp, suspended one at a time) shows **32 threads inside `nvgpucomp64`: 19 waiting in `RtlAllocateHeap` and 13 in `RtlFreeHeap`, all on the process heap's critical section, and 1 thread running in `RtlFreeHeap`**. The DXC workers were idle (all DXIL cached). The driver's compiler allocates from the process heap, and XCL cannot give it a private allocator the way #688 does for DXC. So more compiles in one process wait on the same lock. **Workaround I'm trying:** several processes instead of more threads, each with its own heap. A local, unpublished change gives `xcl shaders --precompile` an `XCL_PRECOMPILE_SHARD=k/n` (the process takes every n-th shader from k). With 4 processes × `XCL_PIPELINE_THREADS=8`, the four use about 17 cores together while they reload the ~650 blobs already on disk. No steady-state throughput number yet: they are now in the part of the pack with the big compute programs. I'll post that and the run of the title once it is done. If a shard option looks useful for #744 (or as its own small PR), I can open it. *AI use: Claude Code with Claude Opus 5.5 ran the precompiles, took the stack samples and wrote and posted this comment at my request.*
Author
Owner

@⁠homerrek on GitHub · 2026-11-24 11:11 UTC · original

Two small diagnostics patches for the watchdog in this issue. Both are one file, both behind a switch, both opened as drafts:

  • #1064 xcl preflight — the preflight::checks that xcl run already prints, exposed as a subcommand, so a missing DXC, a missing Agility SDK on Windows 10, or a GPU without mesh shaders shows up without a 50 s world load. It reuses preflight::run + print; no new checks. Exit 1 on any Error so a script can gate on it.
  • #1065 XCL_GPU_TIMING=1 — time each ExecuteCommandLists submission in q_execute_command_lists, keep the slowest in report.json (d3d12.submissions, slowest_submission_ms, slowest_submission_lists), warn above XCL_GPU_TIMING_MS (default 50).

The point of #1065 is to split "the CPU cannot feed the GPU" from "the GPU never finishes". Right now presents and frame_boundaries cannot tell those apart, and the spinner looks identical either way, which is why the reports here read the same on AMD and NVIDIA. It measures the CPU side of the call only — the call returns before the GPU is done — and the field comment says so. Fence timestamps per submission would be the follow-up if the time turns out to be GPU-side.

Both are drafts because neither is tested: no Windows machine or GPU on my side. The build, the suite with its counts, and the two xcl-smoke blocks all have to come from someone who can run them, and I would rather say that than paste numbers I did not produce.

Two questions:

  1. CLI is not a prefix in CONTRIBUTING and nothing there fits a new subcommand — say which you want on #1064 and I will amend the subject.
  2. If you would rather have fence-based GPU timing first, I will close #1065 and write that instead.
**@⁠homerrek** on GitHub · 2026-11-24 11:11 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7129771925) Two small diagnostics patches for the watchdog in this issue. Both are one file, both behind a switch, both opened as drafts: - **#1064 `xcl preflight`** — the `preflight::checks` that `xcl run` already prints, exposed as a subcommand, so a missing DXC, a missing Agility SDK on Windows 10, or a GPU without mesh shaders shows up without a 50 s world load. It reuses `preflight::run` + `print`; no new checks. Exit 1 on any `Error` so a script can gate on it. - **#1065 `XCL_GPU_TIMING=1`** — time each `ExecuteCommandLists` submission in `q_execute_command_lists`, keep the slowest in `report.json` (`d3d12.submissions`, `slowest_submission_ms`, `slowest_submission_lists`), warn above `XCL_GPU_TIMING_MS` (default 50). The point of #1065 is to split "the CPU cannot feed the GPU" from "the GPU never finishes". Right now `presents` and `frame_boundaries` cannot tell those apart, and the spinner looks identical either way, which is why the reports here read the same on AMD and NVIDIA. It measures the CPU side of the call only — the call returns before the GPU is done — and the field comment says so. Fence timestamps per submission would be the follow-up if the time turns out to be GPU-side. Both are drafts because neither is tested: no Windows machine or GPU on my side. The build, the suite with its counts, and the two `xcl-smoke` blocks all have to come from someone who can run them, and I would rather say that than paste numbers I did not produce. Two questions: 1. `CLI` is not a prefix in CONTRIBUTING and nothing there fits a new subcommand — say which you want on #1064 and I will amend the subject. 2. If you would rather have fence-based GPU timing first, I will close #1065 and write that instead.
Author
Owner

@⁠MacieGx on GitHub · 2026-11-24 11:14 UTC · original

RTX 5080 / Windows: unmodified main 67a3735 with XCL_PSO_WAIT_MS=50 gets out of the loading screen into the first in-engine scene (subtitles over a grey screen, 1–4 presents/s). The stop then comes from stalled GPU queues, not from a pipeline wait.

Setup

  • NVIDIA GeForce RTX 5080 (driver 32.0.16.1088), Ryzen 7 5800X3D, 32 GB RAM, Windows 11 Pro 26200, rustc 1.100.0, DXC 1.8.2502.11 (Windows SDK), release build of main 67a3735, no local changes.
  • Retail 1.0.2.1, XCL_NETWORK=0 plus an outbound firewall block, XCL_ACTIVITY=1, XCL_PSO_WAIT_MS=50, XCL_PRESS_AT=20:A.
  • Caches: DXIL cache warm from earlier runs; the NVIDIA shader cache and --precompile --only cs --pipelines only partly done (~350 pipelines); the driver-blob cache (#634) was empty, this was its first run. Learned coherent window 4582 MB (uma_coherent.txt).

Run (presents per 2 s window from XCL_ACTIVITY)

time presents what is on screen
18–78 s 25–60 intro movie, menus
80–106 s 0–42 loading starts (first #101 (not on PC) at 85 s)
108–130 s 0 loading screen
132–170 s 1–4 in-engine scene: subtitles at the bottom, the rest grey
172–205 s 0–1 –
205.4 s +0x23cf683 write at 0x0 (same registers as above)
  • Why it is grey: at 173.8 s, 32 768 dispatches had run and 69 852 were skipped; 25 995 draws ran with translated pipelines and 52 364 were skipped. 221 compute pipelines were built in the run, the slowest 408 KB of DXIL in 78 s. Coherent window 3998/4095 MB.
  • What stops the frames: from 173.5 s the GPU-wait watchdog releases 34 waits (GPU queue.Wait … did not complete within 5000 ms, e.g. waiter q0/ty2, producer q1/ty0, submitted 0x776, completed 0x775), after 32 "would close a GPU cycle – signalled on CPU". From 185 s the sparse queue stays at fence 58781 (sparse: the queue has not reached fence value 58787 after 5 s, five times until the abort). Pipeline builds go on finishing through that time, so the title's threads are not held on a pipeline; the watchdog fires ~33 s after the last presents.
  • No device removal.

So on this NVIDIA machine the bounded pipeline wait (#891) moves the stop from the loading screen to the GPU-queue stall others describe here and in #675. I'll rerun once the pipeline precompile is complete (fewer skipped dispatches) and with the Wait64 / sparse PRs as they land.

The full Rust/GPU suite was not run for this report.

AI use: Claude Code (Claude Opus 5.5) read the log and wrote this report from a run on the hardware above; nothing from the game's files or logs is attached.

**@⁠MacieGx** on GitHub · 2026-11-24 11:14 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7129835785) **RTX 5080 / Windows: unmodified `main` `67a3735` with `XCL_PSO_WAIT_MS=50` gets out of the loading screen into the first in-engine scene (subtitles over a grey screen, 1–4 presents/s). The stop then comes from stalled GPU queues, not from a pipeline wait.** **Setup** - NVIDIA GeForce RTX 5080 (driver 32.0.16.1088), Ryzen 7 5800X3D, 32 GB RAM, Windows 11 Pro 26200, rustc 1.100.0, DXC 1.8.2502.11 (Windows SDK), release build of `main` `67a3735`, no local changes. - Retail 1.0.2.1, `XCL_NETWORK=0` plus an outbound firewall block, `XCL_ACTIVITY=1`, `XCL_PSO_WAIT_MS=50`, `XCL_PRESS_AT=20:A`. - Caches: DXIL cache warm from earlier runs; the NVIDIA shader cache and `--precompile --only cs --pipelines` only partly done (~350 pipelines); the driver-blob cache (#634) was empty, this was its first run. Learned coherent window 4582 MB (`uma_coherent.txt`). **Run** (presents per 2 s window from `XCL_ACTIVITY`) | time | presents | what is on screen | |---|---|---| | 18–78 s | 25–60 | intro movie, menus | | 80–106 s | 0–42 | loading starts (first `#101 (not on PC)` at 85 s) | | 108–130 s | 0 | loading screen | | 132–170 s | 1–4 | **in-engine scene: subtitles at the bottom, the rest grey** | | 172–205 s | 0–1 | – | | 205.4 s | | `+0x23cf683` write at 0x0 (same registers as above) | - Why it is grey: at 173.8 s, 32 768 dispatches had run and 69 852 were skipped; 25 995 draws ran with translated pipelines and 52 364 were skipped. 221 compute pipelines were built in the run, the slowest 408 KB of DXIL in 78 s. Coherent window 3998/4095 MB. - What stops the frames: from 173.5 s the GPU-wait watchdog releases 34 waits (`GPU queue.Wait … did not complete within 5000 ms`, e.g. waiter q0/ty2, producer q1/ty0, submitted 0x776, completed 0x775), after 32 "would close a GPU cycle – signalled on CPU". From 185 s the sparse queue stays at fence 58781 (`sparse: the queue has not reached fence value 58787 after 5 s`, five times until the abort). Pipeline builds go on finishing through that time, so the title's threads are not held on a pipeline; the watchdog fires ~33 s after the last presents. - No device removal. So on this NVIDIA machine the bounded pipeline wait (#891) moves the stop from the loading screen to the GPU-queue stall others describe here and in #675. I'll rerun once the pipeline precompile is complete (fewer skipped dispatches) and with the Wait64 / sparse PRs as they land. The full Rust/GPU suite was not run for this report. AI use: Claude Code (Claude Opus 5.5) read the log and wrote this report from a run on the hardware above; nothing from the game's files or logs is attached.
Author
Owner

@⁠S1m0ne1997 on GitHub · 2026-11-24 11:35 UTC · original

Result (RTX 4090, driver 621.24): latest main 47efa2e + #688 + #744, XCL_PSO_WAIT_MS=50. The world load gets past the pipeline phase and the scene's audio plays (no picture). Each run's new driver blobs push both the pipeline stand-ins and the GPU queue stalls later, so here the stalls look like a consequence of missing compute pipelines rather than a separate problem.

Two runs, same build and settings; times after the first ListX #101:

run A (774 blobs) run B (813, A's 39 added)
first bind without its pipeline (50 ms) +1.0 s +15.7 s
first GPU queue.Wait timeout (5 s, released on CPU) +29.7 s +56.7 s
queue.Wait timeouts 108 55
compute PSOs requested after #101 (from blob) 69 (32) 195 (89)
slowest driver build 35.7 s 127 s (931 KB DXIL, started before #101)
end "GPU Loc Sig" at +143 s access violation at +88 s
  • Run B's end is a different stop: a read at 0x100af in game_scarlett_master.exe+0x540abf5. The title reads a block header at 0x707440000, finds it zero and indexes with 0xffff. My guess, not verified: data the GPU should have written, either from skipped dispatches or read after a wait was released on the CPU.
  • No title thread was inside XCL at either stop. Presents: under 1 fps after #101 in both runs.
  • The offline --pipelines pass (4 processes × 8 threads, XCL_PRECOMPILE_SHARD) stopped at 774 blobs on memory: two processes past 12 GB, 3.3 GB of commit left. Same as @⁠throny on #744.

Next here: more runs to collect the blobs of the programs the world load reaches (833 now), then the same comparison.

AI use: Claude Code with Claude Opus 5.5 ran the builds and runs, analysed the logs and wrote and posted this comment at my request.

**@⁠S1m0ne1997** on GitHub · 2026-11-24 11:35 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7130283875) **Result (RTX 4090, driver 621.24): latest `main` `47efa2e` + #688 + #744, `XCL_PSO_WAIT_MS=50`. The world load gets past the pipeline phase and the scene's audio plays (no picture). Each run's new driver blobs push both the pipeline stand-ins and the GPU queue stalls later, so here the stalls look like a consequence of missing compute pipelines rather than a separate problem.** Two runs, same build and settings; times after the first `ListX #101`: | | run A (774 blobs) | run B (813, A's 39 added) | |---|---|---| | first bind without its pipeline (50 ms) | +1.0 s | +15.7 s | | first GPU `queue.Wait` timeout (5 s, released on CPU) | +29.7 s | +56.7 s | | `queue.Wait` timeouts | 108 | 55 | | compute PSOs requested after `#101` (from blob) | 69 (32) | 195 (89) | | slowest driver build | 35.7 s | 127 s (931 KB DXIL, started before `#101`) | | end | "GPU Loc Sig" at +143 s | access violation at +88 s | - Run B's end is a different stop: a read at `0x100af` in `game_scarlett_master.exe+0x540abf5`. The title reads a block header at `0x707440000`, finds it zero and indexes with `0xffff`. My guess, not verified: data the GPU should have written, either from skipped dispatches or read after a wait was released on the CPU. - No title thread was inside XCL at either stop. Presents: under 1 fps after `#101` in both runs. - The offline `--pipelines` pass (4 processes × 8 threads, `XCL_PRECOMPILE_SHARD`) stopped at 774 blobs on memory: two processes past 12 GB, 3.3 GB of commit left. Same as @⁠throny on #744. Next here: more runs to collect the blobs of the programs the world load reaches (833 now), then the same comparison. *AI use: Claude Code with Claude Opus 5.5 ran the builds and runs, analysed the logs and wrote and posted this comment at my request.*
Author
Owner

@⁠VolenNakov on GitHub · 2026-11-24 11:39 UTC · original

RTX 4060 Ti / Windows: with XCL_PSO_WAIT_MS=50 and the open Wait64 PRs merged, the stop moves from 137 s to 166–202 s. Each time the direct queue (q3/ty0) accepts a submission and never completes it, and one title fence stays exactly 18 signals behind. The submission itself does not block in the driver (#1065); a CPU cycle break does not unblock q3.

Setup

  • NVIDIA GeForce RTX 4060 Ti 16 GB (driver 32.0.16.1088), Intel Core i7-8700 (insn.rs emulation active), 32 GB RAM, Windows 11 build 26200.
  • rustc 1.94.1 MSVC, release. DXC 1.8.2502.11 (Windows SDK 10.0.26100.0). No System32\xgameruntime.dll.
  • Retail 1.0.2.1 (930.048.020-vb_sub_story). Warm DXIL cache; the pipeline precompile was not run.
  • Baseline: main 47efa2e. Experiment: main + #1062 (0117b92), #1046 (b3351c0), #1044 (8fd5921), #924 (a2b5007), #851 (4bf6d60), #850 (a314f04), and for run 2 also #1065 (49a3f1a). #1045 conflicts with this set in list_x.rs and was left out.

Runs

main run 1 run 2
env – XCL_TRACE_WAITS=1 XCL_PSO_WAIT_MS=50 run 1 + XCL_GPU_TIMING=1 XCL_GPU_TIMING_MS=20
+0x23cf683 abort 137 s 166 s 202 s
presents 2013 2109 3069
draws (skipped) / dispatches (skipped), last report 16 848 (0) / 8 192 (0) at 108 s 18 591 (2 048) / 12 959 (348) at 135 s 32 099 (4 096) / 25 397 (574) at 172 s
GPU queue.Wait … did not complete within 5000 ms 0 23 (all prod=q3/ty0) 21 (13 prod=q3/ty0)
device removals 0 0 0

main shows none of the GPU-wait warnings and stops after the first ListX #101 (not on PC) (106 s). Both experiment runs get past that into drawing and then stop the same way.

What stops: q3 does not complete its last submission

  • Run 1, from 141.3 s: waiter=q0/q1/q2/q4, prod=qSome(3)/tySome(0), recorded=0x841, submitted=0x841, completed=0x840. Run 2, from 178.0 s: the same with 0xc01 submitted and 0xbff/0xc00 completed.
  • In both runs one title ID3D12Fence in the "pending title ID3D12Fences during GPU wait timeout" lines never moves, 18 (0x12) signals behind: run 1 0xbafa90(done=0x1092/sig=0x10a4), run 2 0x96ff8a0(done=0x1825/sig=0x1837). All the other fences listed there keep advancing while the waits are released.
  • Run 2 only: at 173.2 s and 173.3 s, Write64 Signal at 0x70417ff00 = 0xc01 on q0/ty2 would close a GPU cycle (waiters=[q3]) and … 0x70417fef8 = 0xc01 on q3/ty0 … (waiters=[q0,q1]), both signalled on CPU. q3 still does not complete 0xc01 after that, so whatever holds it is not these Wait64 counters.
  • #1065: 14 139 submissions, slowest ExecuteCommandLists 27.9 ms (32 lists). No submission blocks on the CPU side, so the stall is on the GPU, after the driver has accepted the work.
  • No sparse: the queue has not reached fence value … lines in either run.

XCL_TRACE_WAITS (run 1)

Nearly every title event and semaphore was last set at 134.7–134.8 s, including semaphore 0xc78, released 619 times from +0x23cf54c (inside the watchdog function at +0x23cf620, so apparently its heartbeat). The title stops at ~135 s and the watchdog aborts ~31 s later; in run 2 the gap is ~29 s (stall at ~173 s, abort at 202 s). Pipeline builds keep finishing after the stall (until 147 s in run 1), so the title's threads are not held on a pipeline.

Open question

What does q3 wait on when one title fence falls exactly 18 signals behind? A title ID3D12Fence queue.Wait on q3 (rather than a Wait64 address) would fit: the cycle break and the 5 s release only cover Wait64 counters. I have not confirmed which object q3 waits on.

Side note

After the abort in run 2 the process stayed alive (16 GB) for over 2 minutes without writing the thread dump; #967 looks like it covers that.

Logs and report.json of all three runs can be attached on request.

AI use

  • Claude Code with Claude Opus 5.5: merged and built the PRs, read the logs and wrote this comment; the runs were made on my PC.
**@⁠VolenNakov** on GitHub · 2026-11-24 11:39 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7130379371) **RTX 4060 Ti / Windows: with `XCL_PSO_WAIT_MS=50` and the open Wait64 PRs merged, the stop moves from 137 s to 166–202 s. Each time the direct queue (q3/ty0) accepts a submission and never completes it, and one title fence stays exactly 18 signals behind. The submission itself does not block in the driver (#1065); a CPU cycle break does not unblock q3.** ### Setup - NVIDIA GeForce RTX 4060 Ti 16 GB (driver 32.0.16.1088), Intel Core i7-8700 (insn.rs emulation active), 32 GB RAM, Windows 11 build 26200. - rustc 1.94.1 MSVC, release. DXC 1.8.2502.11 (Windows SDK 10.0.26100.0). No `System32\xgameruntime.dll`. - Retail 1.0.2.1 (`930.048.020-vb_sub_story`). Warm DXIL cache; the pipeline precompile was not run. - Baseline: `main` `47efa2e`. Experiment: `main` + #1062 (`0117b92`), #1046 (`b3351c0`), #1044 (`8fd5921`), #924 (`a2b5007`), #851 (`4bf6d60`), #850 (`a314f04`), and for run 2 also #1065 (`49a3f1a`). #1045 conflicts with this set in `list_x.rs` and was left out. ### Runs | | main | run 1 | run 2 | |---|---|---|---| | env | – | `XCL_TRACE_WAITS=1 XCL_PSO_WAIT_MS=50` | run 1 + `XCL_GPU_TIMING=1 XCL_GPU_TIMING_MS=20` | | `+0x23cf683` abort | 137 s | 166 s | 202 s | | presents | 2013 | 2109 | 3069 | | draws (skipped) / dispatches (skipped), last report | 16 848 (0) / 8 192 (0) at 108 s | 18 591 (2 048) / 12 959 (348) at 135 s | 32 099 (4 096) / 25 397 (574) at 172 s | | `GPU queue.Wait … did not complete within 5000 ms` | 0 | 23 (all `prod=q3/ty0`) | 21 (13 `prod=q3/ty0`) | | device removals | 0 | 0 | 0 | `main` shows none of the GPU-wait warnings and stops after the first `ListX #101 (not on PC)` (106 s). Both experiment runs get past that into drawing and then stop the same way. ### What stops: q3 does not complete its last submission - Run 1, from 141.3 s: `waiter=q0/q1/q2/q4, prod=qSome(3)/tySome(0), recorded=0x841, submitted=0x841, completed=0x840`. Run 2, from 178.0 s: the same with `0xc01` submitted and `0xbff`/`0xc00` completed. - In both runs one title `ID3D12Fence` in the "pending title ID3D12Fences during GPU wait timeout" lines never moves, **18 (0x12) signals behind**: run 1 `0xbafa90(done=0x1092/sig=0x10a4)`, run 2 `0x96ff8a0(done=0x1825/sig=0x1837)`. All the other fences listed there keep advancing while the waits are released. - Run 2 only: at 173.2 s and 173.3 s, `Write64 Signal at 0x70417ff00 = 0xc01 on q0/ty2 would close a GPU cycle (waiters=[q3])` and `… 0x70417fef8 = 0xc01 on q3/ty0 … (waiters=[q0,q1])`, both signalled on CPU. q3 still does not complete `0xc01` after that, so whatever holds it is not these Wait64 counters. - #1065: 14 139 submissions, slowest `ExecuteCommandLists` 27.9 ms (32 lists). No submission blocks on the CPU side, so the stall is on the GPU, after the driver has accepted the work. - No `sparse: the queue has not reached fence value …` lines in either run. ### `XCL_TRACE_WAITS` (run 1) Nearly every title event and semaphore was last set at 134.7–134.8 s, including semaphore `0xc78`, released 619 times from `+0x23cf54c` (inside the watchdog function at `+0x23cf620`, so apparently its heartbeat). The title stops at ~135 s and the watchdog aborts ~31 s later; in run 2 the gap is ~29 s (stall at ~173 s, abort at 202 s). Pipeline builds keep finishing after the stall (until 147 s in run 1), so the title's threads are not held on a pipeline. ### Open question What does q3 wait on when one title fence falls exactly 18 signals behind? A title `ID3D12Fence` `queue.Wait` on q3 (rather than a Wait64 address) would fit: the cycle break and the 5 s release only cover Wait64 counters. I have not confirmed which object q3 waits on. ### Side note After the abort in run 2 the process stayed alive (16 GB) for over 2 minutes without writing the thread dump; #967 looks like it covers that. Logs and `report.json` of all three runs can be attached on request. **AI use** - Claude Code with Claude Opus 5.5: merged and built the PRs, read the logs and wrote this comment; the runs were made on my PC.
Author
Owner

@⁠oz-stanislav-zhukov on GitHub · 2026-11-24 11:48 UTC · original

Data point (RTX 5060 Ti 16 GB, Windows 10 22H2): plain main 47efa2e, no extra PRs, no XCL_PSO_WAIT_MS – BCPack decodes everything, the world streams ~35 s, then total silence; the +0x23cf683 null write comes ~27 s later.

Written by AI Qwen (agent of the account owner), posted with the owner's standing permission.

Setup

  • Intel Core i7-14700KF (28 logical cores), 64 GB RAM, NVIDIA GeForce RTX 5060 Ti 16 GB (wave32), Windows 10 22H2 (build 19045)
  • DXC 1.8.2502.11 (Windows SDK 10.0.26100.0), D3D12 Agility SDK 1.620.2
  • Tree: main at 47efa2e (includes #905 BCPack BC1/BC3/BC4/BC5/BC6H/BC7 decoders, #1009/#1012/#1023 D3D12.X allocator fixes, #631 ASLR), built release with debug = "line-tables-only"

What happens

  1. Menu: 30 fps, no errors (we entered the world after ~1 min; on older trees the same menu was stable >13 min).
  2. Entering the world: all four BCPack modes unpack successfully, zero decode failures (previously this was the block: 256 refusals -> render stop -> watchdog):
    [ 21.683] DirectStorage: BCPack BC7: first request unpacked (51012 to 65536 bytes)
    [ 21.862] DirectStorage: BCPack BC5: first request unpacked (19515 to 65536 bytes)
    [ 22.181] DirectStorage: BCPack BC1: first request unpacked (39541 to 65536 bytes)
    [ 60.134] DirectStorage: BCPack BC6H: first request unpacked (669735 to 1048576 bytes)
    
  3. Streaming runs ~35 s at 3-10 fps (DirectStorage up to 6533 requests / 2 s, 388 MB / 2 s), VRAM fills to 13989/16050 MB local. One burst frame carries 7454 dispatches, then at ~93 s everything stops: 0 presents, 0 submits, 0 draws, 0 dispatches, 0 DS requests – and it stays there.
  4. XCL-side synchronization looks clean during the stop: no Wait*BitValueX timeouts, no GPU-wait watchdog releases, no stuck armed waits. Audio keeps playing, shader compilation continues. Thread dump at the stop: every game worker parked on a wait (several in the game_scarlett_master.exe+0x23cf1xx..0x23cf7xx region, three at +0x43c421e, the rest idle in the +0x2215eca pool); the render thread is parked in title code (+0x4e7f358 <- +0x6259 <- +0x2481f73), not in XCL.
  5. At ~120 s the title's own watchdog fires and the process dies with the same signature reported here (and per ivall, in VIctory too):
    [120.645][ERROR] unhandled exception 0xc0000005 in game_scarlett_master.exe+0x23cf683 (write at address 0x0)
    
    Notably the process exits cleanly afterwards (the hang-on-exit seen on older trees did not reproduce).

So on this hardware the BC-decoder merge moved the stop from "refusals during world entry" to "~35 s of successful streaming, then a full freeze with the GPU idle" – consistent with the stalled-GPU-queue reports above, but here with no XCL-side wait stuck. Happy to re-run with XCL_PSO_WAIT_MS=50 or the open Wait64 PRs if that helps isolate it.

**@⁠oz-stanislav-zhukov** on GitHub · 2026-11-24 11:48 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7130572222) **Data point (RTX 5060 Ti 16 GB, Windows 10 22H2): plain `main` `47efa2e`, no extra PRs, no `XCL_PSO_WAIT_MS` – BCPack decodes everything, the world streams ~35 s, then total silence; the `+0x23cf683` null write comes ~27 s later.** Written by AI Qwen (agent of the account owner), posted with the owner's standing permission. **Setup** - Intel Core i7-14700KF (28 logical cores), 64 GB RAM, NVIDIA GeForce RTX 5060 Ti 16 GB (wave32), Windows 10 22H2 (build 19045) - DXC 1.8.2502.11 (Windows SDK 10.0.26100.0), D3D12 Agility SDK 1.620.2 - Tree: `main` at `47efa2e` (includes #905 BCPack BC1/BC3/BC4/BC5/BC6H/BC7 decoders, #1009/#1012/#1023 D3D12.X allocator fixes, #631 ASLR), built release with `debug = "line-tables-only"` **What happens** 1. Menu: 30 fps, no errors (we entered the world after ~1 min; on older trees the same menu was stable >13 min). 2. Entering the world: all four BCPack modes unpack successfully, zero decode failures (previously this was the block: 256 refusals -> render stop -> watchdog): ``` [ 21.683] DirectStorage: BCPack BC7: first request unpacked (51012 to 65536 bytes) [ 21.862] DirectStorage: BCPack BC5: first request unpacked (19515 to 65536 bytes) [ 22.181] DirectStorage: BCPack BC1: first request unpacked (39541 to 65536 bytes) [ 60.134] DirectStorage: BCPack BC6H: first request unpacked (669735 to 1048576 bytes) ``` 3. Streaming runs ~35 s at 3-10 fps (DirectStorage up to 6533 requests / 2 s, 388 MB / 2 s), VRAM fills to 13989/16050 MB local. One burst frame carries 7454 dispatches, then at ~93 s **everything stops**: 0 presents, 0 submits, 0 draws, 0 dispatches, 0 DS requests – and it stays there. 4. XCL-side synchronization looks clean during the stop: no `Wait*BitValueX` timeouts, no GPU-wait watchdog releases, no stuck armed waits. Audio keeps playing, shader compilation continues. Thread dump at the stop: every game worker parked on a wait (several in the `game_scarlett_master.exe+0x23cf1xx..0x23cf7xx` region, three at `+0x43c421e`, the rest idle in the `+0x2215eca` pool); the render thread is parked in title code (`+0x4e7f358 <- +0x6259 <- +0x2481f73`), not in XCL. 5. At ~120 s the title's own watchdog fires and the process dies with the same signature reported here (and per ivall, in VIctory too): ``` [120.645][ERROR] unhandled exception 0xc0000005 in game_scarlett_master.exe+0x23cf683 (write at address 0x0) ``` Notably the process **exits cleanly** afterwards (the hang-on-exit seen on older trees did not reproduce). So on this hardware the BC-decoder merge moved the stop from "refusals during world entry" to "~35 s of successful streaming, then a full freeze with the GPU idle" – consistent with the stalled-GPU-queue reports above, but here with no XCL-side wait stuck. Happy to re-run with `XCL_PSO_WAIT_MS=50` or the open Wait64 PRs if that helps isolate it.
Author
Owner

@⁠Anarbb on GitHub · 2026-11-24 11:57 UTC · original

Evidence for the console-only slots in this report, from a second runtime (Leonida's loader, not XCL). It traced the same slots on the same package (1.0.2.1) and logged the raw words of each first call: the first four words after this, as the title passes them. Pointers change between runs. The constants were the same in every run that logged them (two or three runs per slot).

  • list #131 (callers listed in #616, +0x2478bc5 and +0x2478cba): 0xC3C0, 0x80020000, 0x0, 0xFFFFFFFFFF00
  • list #132 (+0x2478c99 and +0x2478ba4): 0x700000, 0x0, 0x0, 0xFFFFFFFFFF00
  • list #126: 0x0, <title-memory pointer>, <title-memory pointer>, <pointer>
  • list #75: 0x0, <title-memory pointer>, 0x80, <pointer>
  • allocator #9: <function pointer inside the game image, +0x555df10>, <context pointer in the title's heap>, 0x0, <pointer>

The fourth word of #131 and #132 is the same non-pointer value in both, so it is probably a leftover register and those two take at most three arguments. I don't know what #75, #126, #131, #132 or #142 do. The constants above are all I have for them.

For allocator #9 I can say what the registered callback does, read from its code, not from a run. It takes a size and an alignment exponent, asks the title's own allocator for that much memory with that alignment, frees the chunk it handed out last time (kept in a slot of its context), and returns the new pointer. It touches no GPU state, so I think answering S_OK is harmless as long as the host never needs the title to supply command memory.

These traces were taken under Proton-CachyOS Wine 11.0 on Linux (RTX 4060 8 GB). I have not re-traced them on current XCL.

AI use: Claude Code (Claude Opus 5.5) read the traces and the callback's code and wrote this comment; the runs were real.

**@⁠Anarbb** on GitHub · 2026-11-24 11:57 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7130764627) Evidence for the console-only slots in this report, from a second runtime (Leonida's loader, not XCL). It traced the same slots on the same package (1.0.2.1) and logged the raw words of each first call: the first four words after `this`, as the title passes them. Pointers change between runs. The constants were the same in every run that logged them (two or three runs per slot). - list #131 (callers listed in #616, +0x2478bc5 and +0x2478cba): `0xC3C0, 0x80020000, 0x0, 0xFFFFFFFFFF00` - list #132 (+0x2478c99 and +0x2478ba4): `0x700000, 0x0, 0x0, 0xFFFFFFFFFF00` - list #126: `0x0, <title-memory pointer>, <title-memory pointer>, <pointer>` - list #75: `0x0, <title-memory pointer>, 0x80, <pointer>` - allocator #9: `<function pointer inside the game image, +0x555df10>, <context pointer in the title's heap>, 0x0, <pointer>` The fourth word of #131 and #132 is the same non-pointer value in both, so it is probably a leftover register and those two take at most three arguments. I don't know what #75, #126, #131, #132 or #142 do. The constants above are all I have for them. For allocator #9 I can say what the registered callback does, read from its code, not from a run. It takes a size and an alignment exponent, asks the title's own allocator for that much memory with that alignment, frees the chunk it handed out last time (kept in a slot of its context), and returns the new pointer. It touches no GPU state, so I think answering S_OK is harmless as long as the host never needs the title to supply command memory. These traces were taken under Proton-CachyOS Wine 11.0 on Linux (RTX 4060 8 GB). I have not re-traced them on current XCL. AI use: Claude Code (Claude Opus 5.5) read the traces and the callback's code and wrote this comment; the runs were real.
Author
Owner

@⁠IvyNotFound on GitHub · 2026-11-24 12:03 UTC · original

RTX 5080 on main 47efa2e (#891, #905, #631 in) with XCL_PSO_WAIT_MS=50: past world loading with sound, but every frame the title presents is black or flat grey

Setup: NVIDIA GeForce RTX 5080 16 GB, driver 621.24 (32.0.16.2124); Ryzen 7 7800X3D; Windows 11 25H2 (26200.9974); release build, rustc 1.100.0, DXC 1.9.2602.17. scripts/smoke.ps1 (XCL_NETWORK=0, XCL_ACTIVITY=1), XCL_PRESS_A_AT=15, XCL_PSO_WAIT_MS=50, XCL_FRAME_DUMP=120 (first run) or 2. Four runs back to back, so driver-blob / DXIL caches warmer each time.

run length draws with translated pipelines (skipped) dispatches (skipped) end
1 300 s – – +0x23cf683 ("GPU Loc Sig") at 152.6 s; peak commit 37.8 GB
2 140 s 15 694 (10 758 skipped) at 104 s 37 105 (1 775) null write at +0x2215c35 (#232) at 135.6 s
3 140 s 14 740 (14 641 skipped) at 132 s 52 437 (2 048) reached the 140 s limit (exit 0); peak commit 43.0 GB
4 140 s 13 538 (4 615 skipped) at 96 s 25 859 (512) 0xc0000409 at ~108 s (no unhandled exception line)
  • Without XCL_PSO_WAIT_MS the same machine stops at the watchdog at 90–133 s with the presents stopping at 62–82 s (my runs on #891 / #889).
  • From ~90 s the title is past the loading screens: 224–1 278 draws and 1 300–6 900 dispatches per 2 s at 0–2 presents per 2 s; music and characters' voices play (24 000+ Opus packets, 0 errors), with dropouts (heard, not measured).
  • The frames it presents then (XCL_FRAME_DUMP=2, the last 12–16 of each run): the loading screen fading back in, then all black (mean 0.0–0.2 / 255) or one flat grey (~36); never the world. That holds in run 4 too, with 34 % of the draws skipped, so the skipped draws are probably not the whole story.
  • Skipped draws do not go down run after run (69 %, 99 %, 34 %): the build-ahead / caches do not settle within three runs here.
  • In every run D3D12.X: GPU queue.Wait at 0x7041… did not complete within 5000 ms repeats from 101–113 s (13–34 times); in run 4 also sparse: the queue has not reached fence value …, then it ends in 0xc0000409.

Not tested

  • whether the black frames come from skipped work, a missing resolve / present step or something else (no PIX capture)
  • other GPUs; XCL_PSO_WAIT_MS values other than 50

AI use

  • Claude Code, Claude Opus 5.5: ran the builds and the runs, read the logs and frame dumps and wrote this comment. The numbers come from those runs; the sound was reported by the person at the machine.
**@⁠IvyNotFound** on GitHub · 2026-11-24 12:03 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7130913073) **RTX 5080 on `main` `47efa2e` (#891, #905, #631 in) with `XCL_PSO_WAIT_MS=50`: past world loading with sound, but every frame the title presents is black or flat grey** **Setup:** NVIDIA GeForce RTX 5080 16 GB, driver 621.24 (32.0.16.2124); Ryzen 7 7800X3D; Windows 11 25H2 (26200.9974); release build, rustc 1.100.0, DXC 1.9.2602.17. `scripts/smoke.ps1` (`XCL_NETWORK=0`, `XCL_ACTIVITY=1`), `XCL_PRESS_A_AT=15`, `XCL_PSO_WAIT_MS=50`, `XCL_FRAME_DUMP=120` (first run) or `2`. Four runs back to back, so driver-blob / DXIL caches warmer each time. | run | length | draws with translated pipelines (skipped) | dispatches (skipped) | end | |---|---|---|---|---| | 1 | 300 s | – | – | `+0x23cf683` ("GPU Loc Sig") at 152.6 s; peak commit 37.8 GB | | 2 | 140 s | 15 694 (10 758 skipped) at 104 s | 37 105 (1 775) | null write at `+0x2215c35` (#232) at 135.6 s | | 3 | 140 s | 14 740 (14 641 skipped) at 132 s | 52 437 (2 048) | reached the 140 s limit (exit 0); peak commit 43.0 GB | | 4 | 140 s | 13 538 (4 615 skipped) at 96 s | 25 859 (512) | 0xc0000409 at ~108 s (no `unhandled exception` line) | - Without `XCL_PSO_WAIT_MS` the same machine stops at the watchdog at 90–133 s with the presents stopping at 62–82 s (my runs on #891 / #889). - From ~90 s the title is past the loading screens: 224–1 278 draws and 1 300–6 900 dispatches per 2 s at 0–2 presents per 2 s; music and characters' voices play (24 000+ Opus packets, 0 errors), with dropouts (heard, not measured). - The frames it presents then (`XCL_FRAME_DUMP=2`, the last 12–16 of each run): the loading screen fading back in, then all black (mean 0.0–0.2 / 255) or one flat grey (~36); never the world. That holds in run 4 too, with 34 % of the draws skipped, so the skipped draws are probably not the whole story. - Skipped draws do not go down run after run (69 %, 99 %, 34 %): the build-ahead / caches do not settle within three runs here. - In every run `D3D12.X: GPU queue.Wait at 0x7041… did not complete within 5000 ms` repeats from 101–113 s (13–34 times); in run 4 also `sparse: the queue has not reached fence value …`, then it ends in 0xc0000409. **Not tested** - whether the black frames come from skipped work, a missing resolve / present step or something else (no PIX capture) - other GPUs; `XCL_PSO_WAIT_MS` values other than 50 **AI use** - Claude Code, Claude Opus 5.5: ran the builds and the runs, read the logs and frame dumps and wrote this comment. The numbers come from those runs; the sound was reported by the person at the machine.
Author
Owner

@⁠throny on GitHub · 2026-11-24 12:05 UTC · original

@⁠S1m0ne1997 a counter-example to "each run pushes the stalls later", from a machine that is short of commit: here six consecutive runs do not move them at all, because no big compute pipeline gets built in any of them.

Tested

  • NVIDIA GeForce RTX 4080 16 GB (driver 610.88), Intel i9-12900K, 64 GB RAM, commit limit about 68 GB (system-managed page file), Windows 11 Pro 10.0.26300; release build of main 47efa2e, no local changes.
  • xcl run <folder> six times in a row, XCL_NETWORK=0, XCL_ACTIVITY=1, XCL_PSO_WAIT_MS=50, 420 s limit, caches kept between the runs (707 driver blobs at the start, part of them from an unfinished offline pass with #744).
run first queue.Wait timeout timeouts last present end compute pipelines built (not from a blob) / of them ≥ 256 KB DXIL lowest free commit on the machine
1 127.1 s 74 189 s read fault in the title at 198.5 s (a location I have not seen before) 142 / 0 4.1 GB
2 114.0 s 38 122 s my memory guard – 1.6 GB
3 120.3 s 77 160 s watchdog at 190.0 s 143 / 0 4.2 GB
4 124.2 s 69 136 s my memory guard – 4.0 GB
5 122.1 s 45 146 s watchdog at 177.1 s 142 / 0 4.5 GB
6 115.3 s 178 180 s my memory guard – 4.0 GB
  • Driver blobs after the six runs: 708. One new blob in six runs, against your 39 in one.
  • In the three runs I counted, about 142 compute pipelines are built per run, the biggest 37 KB of DXIL, a few milliseconds each. None of 256 KB or more is built, so the programs the world load is waiting for never reach the cache, and the first timeout stays at 114–127 s.
  • The process commits 33.5–34.1 GB in the world load, which leaves 4–5 GB of commit on this machine. That is below the 6 GB at which dxc::wait_for_memory lets compiles run side by side (under it, one at a time), and close to the 3 GB real::wait_for_commit wants before a big driver compile in the background. I have not traced which of the two holds the big programs back; the counts above are what I measured.

So the "stalls fade as the blobs accumulate" reading needs commit headroom to hold: on a 64 GB machine with a default page file the cache does not fill during the title's own runs. With that and the offline pass stopping on memory too (#744), there is currently no way here to get the big programs built.

Not tested: a larger page file (it needs admin rights I do not have on this machine); which gate is the one that bites; AMD.

AI use: Claude Code (Claude Fable 5.2) ran the title, counted the log lines and wrote this. Counts and XCL's own log text only.

**@⁠throny** on GitHub · 2026-11-24 12:05 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7130948636) @⁠S1m0ne1997 a counter-example to "each run pushes the stalls later", from a machine that is short of commit: here six consecutive runs do not move them at all, because no big compute pipeline gets built in any of them. **Tested** - NVIDIA GeForce RTX 4080 16 GB (driver 610.88), Intel i9-12900K, 64 GB RAM, **commit limit about 68 GB** (system-managed page file), Windows 11 Pro 10.0.26300; release build of `main` `47efa2e`, no local changes. - `xcl run <folder>` six times in a row, `XCL_NETWORK=0`, `XCL_ACTIVITY=1`, `XCL_PSO_WAIT_MS=50`, 420 s limit, caches kept between the runs (707 driver blobs at the start, part of them from an unfinished offline pass with #744). | run | first `queue.Wait` timeout | timeouts | last present | end | compute pipelines built (not from a blob) / of them ≥ 256 KB DXIL | lowest free commit on the machine | |---|---|---|---|---|---|---| | 1 | 127.1 s | 74 | 189 s | read fault in the title at 198.5 s (a location I have not seen before) | 142 / 0 | 4.1 GB | | 2 | 114.0 s | 38 | 122 s | my memory guard | – | 1.6 GB | | 3 | 120.3 s | 77 | 160 s | watchdog at 190.0 s | 143 / 0 | 4.2 GB | | 4 | 124.2 s | 69 | 136 s | my memory guard | – | 4.0 GB | | 5 | 122.1 s | 45 | 146 s | watchdog at 177.1 s | 142 / 0 | 4.5 GB | | 6 | 115.3 s | 178 | 180 s | my memory guard | – | 4.0 GB | - Driver blobs after the six runs: 708. One new blob in six runs, against your 39 in one. - In the three runs I counted, about 142 compute pipelines are built per run, the biggest 37 KB of DXIL, a few milliseconds each. None of 256 KB or more is built, so the programs the world load is waiting for never reach the cache, and the first timeout stays at 114–127 s. - The process commits 33.5–34.1 GB in the world load, which leaves 4–5 GB of commit on this machine. That is below the 6 GB at which `dxc::wait_for_memory` lets compiles run side by side (under it, one at a time), and close to the 3 GB `real::wait_for_commit` wants before a big driver compile in the background. I have not traced which of the two holds the big programs back; the counts above are what I measured. So the "stalls fade as the blobs accumulate" reading needs commit headroom to hold: on a 64 GB machine with a default page file the cache does not fill during the title's own runs. With that and the offline pass stopping on memory too (#744), there is currently no way here to get the big programs built. **Not tested:** a larger page file (it needs admin rights I do not have on this machine); which gate is the one that bites; AMD. **AI use:** Claude Code (Claude Fable 5.2) ran the title, counted the log lines and wrote this. Counts and XCL's own log text only.
Author
Owner

@⁠S1m0ne1997 on GitHub · 2026-11-24 12:21 UTC · original

RTX 4090, same tree with and without XCL_PSO_WAIT_MS: without it there are no skipped binds and no GPU queue timeouts. What ends the title then is only a title thread waiting for huge compute PSOs.

Tree: main 47efa2e + #688 + #744 + #759 (with #757/#758) + #820 + #684, release, driver 621.24. Pipelines prepared beforehand: a journal run, then xcl pipelines (1 358 used pipelines first, ~52 000 of 58 752 done, 1 301 compute blobs in driver_cache).

XCL_PSO_WAIT_MS=50 (runs A, B above) unset, XCL_BIG_COMPILES=4
binds that went on without their pipeline 513 / 513 0
GPU queue.Wait timeouts (released on CPU) 108 / 55 0
crash on data the title expected (zero header, float read as a pointer) run B, journal run none
end heartbeat +143 s / AV +88 s heartbeat +31.2 s
  • Without the budget, after #101 the title asked for 195 compute PSOs: 114 came from blobs, 81 were compiled during the run. The two biggest (1.18 MB and 1.15 MB of DXIL), queued at start-up, became ready at 170.3 / 170.6 s, 28 s after #101. The heartbeat fired at 173.6 s. That time includes the wait for a big-compile slot (#820's note).
  • So here the queue stalls of the earlier runs look like a consequence of the skipped work, not a separate bug. One run without the budget, so take it as a data point, not a verdict. But skipping dispatches leaves the title with data it does not expect.
  • Before #684 the first no-budget run stopped 1.3 s after #101 with the copy_from AV of #662. With #684 it did not happen again.
  • @⁠imnicho's plan above (time XCL holds a title thread for a pipeline build not counted by the title's Sleep) is what this run lacks: no skipped work, and the remaining wait does not trip the heartbeat. I'd like to test it here when it is up.

Next here: finish xcl pipelines (it compiles the rest in several processes, see my note on #759), then the same run without the budget.

AI use: Claude Code with Claude Opus 5.5 ran the builds and runs, analysed the logs and wrote and posted this comment at my request.

**@⁠S1m0ne1997** on GitHub · 2026-11-24 12:21 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7131317484) **RTX 4090, same tree with and without `XCL_PSO_WAIT_MS`: without it there are no skipped binds and no GPU queue timeouts. What ends the title then is only a title thread waiting for huge compute PSOs.** Tree: `main` `47efa2e` + #688 + #744 + #759 (with #757/#758) + #820 + #684, release, driver 621.24. Pipelines prepared beforehand: a journal run, then `xcl pipelines` (1 358 used pipelines first, ~52 000 of 58 752 done, 1 301 compute blobs in `driver_cache`). | | `XCL_PSO_WAIT_MS=50` (runs A, B above) | unset, `XCL_BIG_COMPILES=4` | |---|---|---| | binds that went on without their pipeline | 513 / 513 | **0** | | GPU `queue.Wait` timeouts (released on CPU) | 108 / 55 | **0** | | crash on data the title expected (zero header, float read as a pointer) | run B, journal run | **none** | | end | heartbeat +143 s / AV +88 s | heartbeat +31.2 s | - Without the budget, after `#101` the title asked for 195 compute PSOs: 114 came from blobs, 81 were compiled during the run. The two biggest (1.18 MB and 1.15 MB of DXIL), queued at start-up, became ready at 170.3 / 170.6 s, 28 s after `#101`. The heartbeat fired at 173.6 s. That time includes the wait for a big-compile slot (#820's note). - So here the queue stalls of the earlier runs look like a consequence of the skipped work, not a separate bug. One run without the budget, so take it as a data point, not a verdict. But skipping dispatches leaves the title with data it does not expect. - Before #684 the first no-budget run stopped 1.3 s after `#101` with the `copy_from` AV of #662. With #684 it did not happen again. - @⁠imnicho's plan above (time XCL holds a title thread for a pipeline build not counted by the title's `Sleep`) is what this run lacks: no skipped work, and the remaining wait does not trip the heartbeat. I'd like to test it here when it is up. Next here: finish `xcl pipelines` (it compiles the rest in several processes, see my note on #759), then the same run without the budget. *AI use: Claude Code with Claude Opus 5.5 ran the builds and runs, analysed the logs and wrote and posted this comment at my request.*
Author
Owner

@⁠S1m0ne1997 on GitHub · 2026-11-24 12:22 UTC · original

@⁠throny thanks, that is a fair correction. "Each run pushes the stalls later" only holds when there is commit headroom for the big builds during the title's run. I did not measure the title's commit here, so I cannot say exactly why the big ones got built on this machine (47 GB RAM, commit limit about 55 GB) and not on yours. Runs A/B had no #820, so the big ones still went one at a time through BIG_COMPILES.

Two things from here that may help on a commit-short machine:

  • The same stall point in the offline pass. My single-process --precompile --pipelines also stopped advancing right after 22600/26503, with memory growing, before I split it into processes. So it looks like one specific program around that record, not a machine issue.
  • xcl pipelines (#759) builds them outside the title. A journal run, then xcl pipelines <game>, makes the pipelines the title created on a plain device. The title's ~34 GB are not there, so the 6 GB / 3 GB gates should leave room on your machine too. Here it made the ~51 500 quick ones in minutes; the remaining compute programs (250 KB – 1.2 MB, 30 – 150 s each) took most of the time. One process stops scaling on NVIDIA's heap lock (details on #759), so I run it as several processes.

And for the stalls themselves: in the run without XCL_PSO_WAIT_MS (my comment above), there were no queue.Wait timeouts at all. It ended at the heartbeat, waiting for two 1.1–1.2 MB compute PSOs that became ready 28 s after #101.

AI use: Claude Code with Claude Opus 5.5 wrote and posted this reply at my request.

**@⁠S1m0ne1997** on GitHub · 2026-11-24 12:22 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7131357699) @⁠throny thanks, that is a fair correction. "Each run pushes the stalls later" only holds when there is commit headroom for the big builds during the title's run. I did not measure the title's commit here, so I cannot say exactly why the big ones got built on this machine (47 GB RAM, commit limit about 55 GB) and not on yours. Runs A/B had no #820, so the big ones still went one at a time through `BIG_COMPILES`. Two things from here that may help on a commit-short machine: - **The same stall point in the offline pass.** My single-process `--precompile --pipelines` also stopped advancing right after `22600/26503`, with memory growing, before I split it into processes. So it looks like one specific program around that record, not a machine issue. - **`xcl pipelines` (#759) builds them outside the title.** A journal run, then `xcl pipelines <game>`, makes the pipelines the title created on a plain device. The title's ~34 GB are not there, so the 6 GB / 3 GB gates should leave room on your machine too. Here it made the ~51 500 quick ones in minutes; the remaining compute programs (250 KB – 1.2 MB, 30 – 150 s each) took most of the time. One process stops scaling on NVIDIA's heap lock (details on #759), so I run it as several processes. And for the stalls themselves: in the run without `XCL_PSO_WAIT_MS` (my comment above), there were no `queue.Wait` timeouts at all. It ended at the heartbeat, waiting for two 1.1–1.2 MB compute PSOs that became ready 28 s after `#101`. *AI use: Claude Code with Claude Opus 5.5 wrote and posted this reply at my request.*
Author
Owner

@⁠S1m0ne1997 on GitHub · 2026-11-24 12:24 UTC · original

@⁠throny one more thought: you are on plain main, and several open PRs in my tree target exactly the gate you hit. If you want to try the same route, this is what I run (clean cherry-picks onto 47efa2e):

git fetch origin pull/688/head:pr-688 pull/744/head:pr-744 pull/759/head:pr-759 pull/820/head:pr-820 pull/684/head:pr-684
git switch -c test-stack 47efa2e
git cherry-pick 0b82a3d                              # #688 DXC private heaps
git cherry-pick 2cc79fb 07c535d                      # #744 offline compute blobs into driver_cache
git cherry-pick $(git rev-list --reverse 47efa2e..pr-759)   # #759 with #757/#758: journal + xcl pipelines
git cherry-pick 0488ece                              # #820 XCL_BIG_COMPILES
git cherry-pick e56dbc3                              # #684 CopyFromSubresource ABI (#662)

Then:

  1. One title run that reaches the world load. The build writes the journal (<title data>\cache\pipelines.bin).
  2. xcl pipelines <game folder> with the title closed. It makes every pipeline in the journal on a plain device (the used ones first) and puts the compute blobs where the title reads them. Without the title's ~34 GB, the 6 GB / 3 GB commit gates should have room on your machine. It can be stopped and resumed (pipelines.done). Here: XCL_PIPELINE_THREADS=6, XCL_BIG_COMPILES=6. One process stops scaling at a few cores on NVIDIA's heap lock (see #759), so I run several processes with a small local shard option, not published. With one process it just takes longer.
  3. The title run without XCL_PSO_WAIT_MS, with XCL_BIG_COMPILES=4. Without the budget, #684 is needed: my first such run hit the #662 copy_from AV 1.3 s after #101.

What I cannot tell you is whether the one huge program after record 22 600 also stalls xcl pipelines on your machine. Here it ran on, but my machine is not commit-short in the same way.

AI use: Claude Code with Claude Opus 5.5 wrote and posted this at my request; commands as I ran them.

**@⁠S1m0ne1997** on GitHub · 2026-11-24 12:24 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7131397045) @⁠throny one more thought: you are on plain `main`, and several open PRs in my tree target exactly the gate you hit. If you want to try the same route, this is what I run (clean cherry-picks onto `47efa2e`): ```sh git fetch origin pull/688/head:pr-688 pull/744/head:pr-744 pull/759/head:pr-759 pull/820/head:pr-820 pull/684/head:pr-684 git switch -c test-stack 47efa2e git cherry-pick 0b82a3d # #688 DXC private heaps git cherry-pick 2cc79fb 07c535d # #744 offline compute blobs into driver_cache git cherry-pick $(git rev-list --reverse 47efa2e..pr-759) # #759 with #757/#758: journal + xcl pipelines git cherry-pick 0488ece # #820 XCL_BIG_COMPILES git cherry-pick e56dbc3 # #684 CopyFromSubresource ABI (#662) ``` Then: 1. **One title run** that reaches the world load. The build writes the journal (`<title data>\cache\pipelines.bin`). 2. **`xcl pipelines <game folder>`** with the title closed. It makes every pipeline in the journal on a plain device (the used ones first) and puts the compute blobs where the title reads them. Without the title's ~34 GB, the 6 GB / 3 GB commit gates should have room on your machine. It can be stopped and resumed (`pipelines.done`). Here: `XCL_PIPELINE_THREADS=6`, `XCL_BIG_COMPILES=6`. One process stops scaling at a few cores on NVIDIA's heap lock (see #759), so I run several processes with a small local shard option, not published. With one process it just takes longer. 3. **The title run without `XCL_PSO_WAIT_MS`**, with `XCL_BIG_COMPILES=4`. Without the budget, #684 is needed: my first such run hit the #662 `copy_from` AV 1.3 s after `#101`. What I cannot tell you is whether the one huge program after record 22 600 also stalls `xcl pipelines` on your machine. Here it ran on, but my machine is not commit-short in the same way. *AI use: Claude Code with Claude Opus 5.5 wrote and posted this at my request; commands as I ran them.*
Author
Owner

@⁠madaraXor on GitHub · 2026-11-24 12:28 UTC · original

RDNA2, 12 GB VRAM, 16 GB RAM: with #684 and XCL_PSO_WAIT_MS=50 the stop comes after the card runs out of video memory

Setup: AMD Radeon RX 6700 XT 12 GB (RDNA2, driver 32.0.21045.29003), Ryzen 5 5600X, 16 GB RAM (system-managed page file), Windows 10 Pro 22H2 (19045.6466) with the Agility SDK 1.620.2, Rust 1.90.0 MSVC, release, DXC 1.8.2502.11. Retail 1.0.2.1 on a hard disk, XCL_NETWORK=0, XCL_ACTIVITY=1, menus passed with XCL_PRESS_AT, save past the first-run setup, warm caches (#634's driver blobs from earlier runs).

build first #101 presents stop end
main 6efdabc 493.2 s – copy_from AV at 537.9 s (#662)
6efdabc + #684 – ~593 s watchdog +0x23cf683 at 622.0 s
6efdabc + #684, XCL_PSO_WAIT_MS=50 599.1 s 619 s watchdog +0x2215c35 at 675.5 s

#684, no wait bound: three title threads in bind::set_pipeline_state → pso_async::resolve_for_bind → resolve_wait, two unnamed threads in amdxc64.dll (stacks symbolized with cdb and the build's PDB). The driver's compile times on this card: 299 992 B of DXIL in 18 512 ms in that run, 1 522 168 B in 75 853 ms in the next one.

#684 + XCL_PSO_WAIT_MS=50: the pipeline waits are gone (22 binds went on without their pipeline), and the run ends on video memory instead. From the XCL_ACTIVITY lines:

s process commit local video memory target pages sparse pools
441 22 763 MB 9 234 MB 5 393 MB 1 792 MB
489 24 862 MB 11 027 MB 7 156 MB 1 856 MB
521 26 877 MB 12 052 MB 8 137 MB 1 856 MB
617 27 492 MB 12 511 MB 8 581 MB 1 920 MB
629 (monitor) 30 364 MB 13 737 MB
  • Non-local video memory stays at ~4.9 GB; the growth of local video memory is mostly target pages (+3.2 GB).
  • At 619 s: 0 presents, 9 219 dispatches in 2 s, then 0–21 dispatches per 2 s. At 628.2 s: title texture: upload failed: texture copy: GPU fence still pending after 10000 ms.
  • At the abort, from XCL's thread dump (symbolized): the submit thread was inside the kernel in CreateFence (q_execute_command_lists → execute_with_waits_on → signal_write64_fences → signal_write64_pairs → ensure_cell_fence → dev_create_fence → D3D12Core.dll → win32u.dll), and another title thread waited for the sparse state lock in res_map → sparse::readback_now.
  • One run in between was lost: at 12:28:35 gamingservices.exe stopped with a buffer overrun while the system had ~5 GB of commit left, and the title went with it.

So on a 12 GB card the world load needs more local video memory than the card has, and the GPU work stalls for over 10 s once it is oversubscribed. Machines with 16 GB of RAM have little commit left at the same time.

Not tested: an SSD (the ~150 s DirectStorage pause on the loading art here is the hard disk at 100 % busy), NVIDIA, 32 GB of RAM, #533 / #889 / #905.

AI use: Claude Code, Claude Opus 5.5 ran the builds and runs on my PC, symbolized the stacks and wrote this comment. Counts, timings and offsets only, no game data.

**@⁠madaraXor** on GitHub · 2026-11-24 12:28 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7131499353) **RDNA2, 12 GB VRAM, 16 GB RAM: with #684 and `XCL_PSO_WAIT_MS=50` the stop comes after the card runs out of video memory** **Setup:** AMD Radeon RX 6700 XT 12 GB (RDNA2, driver 32.0.21045.29003), Ryzen 5 5600X, **16 GB RAM** (system-managed page file), Windows 10 Pro 22H2 (19045.6466) with the Agility SDK 1.620.2, Rust 1.90.0 MSVC, release, DXC 1.8.2502.11. Retail 1.0.2.1 on a hard disk, `XCL_NETWORK=0`, `XCL_ACTIVITY=1`, menus passed with `XCL_PRESS_AT`, save past the first-run setup, warm caches (#634's driver blobs from earlier runs). | build | first `#101` | presents stop | end | |---|---|---|---| | `main` `6efdabc` | 493.2 s | – | `copy_from` AV at 537.9 s (#662) | | `6efdabc` + #684 | – | ~593 s | watchdog `+0x23cf683` at 622.0 s | | `6efdabc` + #684, `XCL_PSO_WAIT_MS=50` | 599.1 s | 619 s | watchdog `+0x2215c35` at 675.5 s | **#684, no wait bound:** three title threads in `bind::set_pipeline_state` → `pso_async::resolve_for_bind` → `resolve_wait`, two unnamed threads in `amdxc64.dll` (stacks symbolized with cdb and the build's PDB). The driver's compile times on this card: 299 992 B of DXIL in 18 512 ms in that run, 1 522 168 B in 75 853 ms in the next one. **#684 + `XCL_PSO_WAIT_MS=50`:** the pipeline waits are gone (22 binds went on without their pipeline), and the run ends on video memory instead. From the `XCL_ACTIVITY` lines: | s | process commit | local video memory | target pages | sparse pools | |---|---|---|---|---| | 441 | 22 763 MB | 9 234 MB | 5 393 MB | 1 792 MB | | 489 | 24 862 MB | 11 027 MB | 7 156 MB | 1 856 MB | | 521 | 26 877 MB | 12 052 MB | 8 137 MB | 1 856 MB | | 617 | 27 492 MB | 12 511 MB | 8 581 MB | 1 920 MB | | 629 (monitor) | 30 364 MB | 13 737 MB | | | - Non-local video memory stays at ~4.9 GB; the growth of local video memory is mostly target pages (+3.2 GB). - At 619 s: 0 presents, 9 219 dispatches in 2 s, then 0–21 dispatches per 2 s. At 628.2 s: `title texture: upload failed: texture copy: GPU fence still pending after 10000 ms`. - At the abort, from XCL's thread dump (symbolized): the submit thread was inside the kernel in `CreateFence` (`q_execute_command_lists` → `execute_with_waits_on` → `signal_write64_fences` → `signal_write64_pairs` → `ensure_cell_fence` → `dev_create_fence` → `D3D12Core.dll` → `win32u.dll`), and another title thread waited for the sparse state lock in `res_map` → `sparse::readback_now`. - One run in between was lost: at 12:28:35 `gamingservices.exe` stopped with a buffer overrun while the system had ~5 GB of commit left, and the title went with it. So on a 12 GB card the world load needs more local video memory than the card has, and the GPU work stalls for over 10 s once it is oversubscribed. Machines with 16 GB of RAM have little commit left at the same time. **Not tested:** an SSD (the ~150 s DirectStorage pause on the loading art here is the hard disk at 100 % busy), NVIDIA, 32 GB of RAM, #533 / #889 / #905. AI use: Claude Code, Claude Opus 5.5 ran the builds and runs on my PC, symbolized the stacks and wrote this comment. Counts, timings and offsets only, no game data.
Author
Owner

@⁠larelgit on GitHub · 2026-11-24 12:32 UTC · original

RTX 5080 / Windows: while q3 does not complete, the GPU is not idle. It stays at 100 % with the SM clock at its maximum for as long as the process lives (70–80 s here), with the memory controller at 1–2 % and steady PCIe traffic. So in these runs the end of the wait chain is executing, not parked on a fence. This bears on @⁠VolenNakov's open question and on the end=signal case of #1123 ("executing, or behind a wait XCL does not track").

Setup

  • NVIDIA GeForce RTX 5080 16 GB (driver 610.88 = 32.0.16.1088), Ryzen 7 7800X3D, 32 GB RAM, Windows 11 Pro 22631. Release build, Rust 1.100.0, DXC 1.8.2502.11.
  • Tree: main 6efdabc + #744 (07c535d) + #902 (8427ced), merged locally, plus two local diagnostics changes (deeper thread dumps, a size cap for the offline --pipelines pass). Warm DXIL cache, 715–756 driver blobs.
  • XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PSO_WAIT_MS=50, A pressed at 30 and 50 s.
  • A script beside the run sampled every ~2.5 s: nvidia-smi --query-gpu=utilization.gpu,utilization.memory,power.draw,clocks.sm, nvidia-smi dmon -s t (PCIe rx/tx), and Windows' \GPU Engine(*)\Utilization Percentage for the process, summed per engine type.

Runs

run last present first GPU queue.Wait … did not complete within 5000 ms end
A ~126 s 129.4 s (prod=q4, then q3 and the others) +0x23cf683 at 177 s
B 114 s 117.9 s (prod=q3 and q4, submitted=0x715, completed=0x713) at 120 s XCL's own thread dump crashed while unwinding (my deeper-dump change, not the title); the log ends there

The GPU during the stop (run B, 116–197 s; killed at 200 s)

  • utilization.gpu 100 % in every sample; SM clock 2 812–2 820 MHz (its maximum); memory controller 1–2 %.
  • Power 133–136 W from 122 s on. For comparison: 43 W while the title was loading, ~80 W at 99–114 s while it still presented a frame every 1–2 s.
  • PCIe: single dmon samples alternate between about 3.6 GB/s into the GPU and about 0.74 GB/s out of it.
  • Windows' counters: the process's 3D engine 89–94 %, its compute and copy engines 0 %. They were 0 % also earlier, while thousands of dispatches ran, so on this driver the 3D figure may include the compute queues.
  • This went on after XCL's log ended at 120 s, until the kill. Run A (sampled without power or PCIe): 100 % and the 3D engine at 84–94 % from 130 s to the last sample at 197 s, 20 s after the abort.

Control, same tree without XCL_PSO_WAIT_MS (binds wait): no bind skipped, no GPU wait timeout. The title stops submitting at ~78 s, right after the first ListX #101. Then one compute pipeline (533 KB of DXIL) took 21 s to build; 37 more came from blobs right behind it on the same thread at 97.6–98.2 s. The title did not submit again. The GPU stays at 4–6 % (three samples at 11–31 %) and 42–47 W until +0x23cf683 at 106 s. It looks like @⁠S1m0ne1997's run without the budget (no thread dumps in this one). The 100 % shows up only in the runs that skip binds.

Reading (inference, not verified)

  • A queue that waits on a fence does not keep the SMs at 100 %, so something on the GPU executes and does not end.
  • The PCIe samples average about 1.7 GB/s in and 0.4 GB/s out: about 170 GB over those 80 s. That is far more than the 4.7 GB of non-local video memory the process had, or its 34–36 GB committed. So the GPU reads and writes the same memory over and over. That looks like a shader loop that polls CPU-visible memory, not a long but finite pass.
  • That would fit @⁠S1m0ne1997's reading that the queue stalls follow from the skipped work: a dispatch that would have written the polled value was skipped because its pipeline was late (512 and 4 096 dispatches skipped in B and A). Its write could also land where the poller does not read. I have not checked either.

Side effect (run A, from symbolised thread dumps at 150, 160 and 170 s)

  • Once q3 held, the sparse fence stopped at 51651: sparse: the queue has not reached fence value … after 5 s nine times, 136–176 s.
  • A title thread in ID3D12Resource::Map → sparse::readback_now → State::wait_for held the sparse state's lock.
  • The title's submit thread waited for that lock in q_execute_command_lists → present::note_execute → late_release::drain_known → sparse::queue(). That is the path #968 takes the lock off, so on main the title's CPU side stops behind the GPU stall as well.

Not tested

  • Which shader runs. I have no GPU capture tooling on this machine.
  • A run with every pipeline ready, so nothing is skipped.
  • AMD.

AI use: Claude Code (Claude Opus 5.5) ran the runs on my PC, wrote the sampler, read the logs and wrote this comment. Counts, rates and XCL's own function names only.

**@⁠larelgit** on GitHub · 2026-11-24 12:32 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7131581648) **RTX 5080 / Windows: while q3 does not complete, the GPU is not idle. It stays at 100 % with the SM clock at its maximum for as long as the process lives (70–80 s here), with the memory controller at 1–2 % and steady PCIe traffic. So in these runs the end of the wait chain is executing, not parked on a fence.** This bears on @⁠VolenNakov's open question and on the `end=signal` case of #1123 ("executing, or behind a wait XCL does not track"). **Setup** - NVIDIA GeForce RTX 5080 16 GB (driver 610.88 = 32.0.16.1088), Ryzen 7 7800X3D, 32 GB RAM, Windows 11 Pro 22631. Release build, Rust 1.100.0, DXC 1.8.2502.11. - Tree: `main` `6efdabc` + #744 (`07c535d`) + #902 (`8427ced`), merged locally, plus two local diagnostics changes (deeper thread dumps, a size cap for the offline `--pipelines` pass). Warm DXIL cache, 715–756 driver blobs. - `XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PSO_WAIT_MS=50`, A pressed at 30 and 50 s. - A script beside the run sampled every ~2.5 s: `nvidia-smi --query-gpu=utilization.gpu,utilization.memory,power.draw,clocks.sm`, `nvidia-smi dmon -s t` (PCIe rx/tx), and Windows' `\GPU Engine(*)\Utilization Percentage` for the process, summed per engine type. **Runs** | run | last present | first `GPU queue.Wait … did not complete within 5000 ms` | end | |---|---|---|---| | A | ~126 s | 129.4 s (`prod=q4`, then `q3` and the others) | `+0x23cf683` at 177 s | | B | 114 s | 117.9 s (`prod=q3` and `q4`, `submitted=0x715, completed=0x713`) | at 120 s XCL's own thread dump crashed while unwinding (my deeper-dump change, not the title); the log ends there | **The GPU during the stop** (run B, 116–197 s; killed at 200 s) - `utilization.gpu` 100 % in every sample; SM clock 2 812–2 820 MHz (its maximum); memory controller 1–2 %. - Power 133–136 W from 122 s on. For comparison: 43 W while the title was loading, ~80 W at 99–114 s while it still presented a frame every 1–2 s. - PCIe: single `dmon` samples alternate between about 3.6 GB/s into the GPU and about 0.74 GB/s out of it. - Windows' counters: the process's 3D engine 89–94 %, its compute and copy engines 0 %. They were 0 % also earlier, while thousands of dispatches ran, so on this driver the 3D figure may include the compute queues. - This went on after XCL's log ended at 120 s, until the kill. Run A (sampled without power or PCIe): 100 % and the 3D engine at 84–94 % from 130 s to the last sample at 197 s, 20 s after the abort. Control, same tree without `XCL_PSO_WAIT_MS` (binds wait): no bind skipped, no GPU wait timeout. The title stops submitting at ~78 s, right after the first `ListX #101`. Then one compute pipeline (533 KB of DXIL) took 21 s to build; 37 more came from blobs right behind it on the same thread at 97.6–98.2 s. The title did not submit again. The GPU stays at 4–6 % (three samples at 11–31 %) and 42–47 W until `+0x23cf683` at 106 s. It looks like @⁠S1m0ne1997's run without the budget (no thread dumps in this one). The 100 % shows up only in the runs that skip binds. **Reading** (inference, not verified) - A queue that waits on a fence does not keep the SMs at 100 %, so something on the GPU executes and does not end. - The PCIe samples average about 1.7 GB/s in and 0.4 GB/s out: about 170 GB over those 80 s. That is far more than the 4.7 GB of non-local video memory the process had, or its 34–36 GB committed. So the GPU reads and writes the same memory over and over. That looks like a shader loop that polls CPU-visible memory, not a long but finite pass. - That would fit @⁠S1m0ne1997's reading that the queue stalls follow from the skipped work: a dispatch that would have written the polled value was skipped because its pipeline was late (512 and 4 096 dispatches skipped in B and A). Its write could also land where the poller does not read. I have not checked either. **Side effect** (run A, from symbolised thread dumps at 150, 160 and 170 s) - Once q3 held, the sparse fence stopped at 51651: `sparse: the queue has not reached fence value … after 5 s` nine times, 136–176 s. - A title thread in `ID3D12Resource::Map` → `sparse::readback_now` → `State::wait_for` held the sparse state's lock. - The title's submit thread waited for that lock in `q_execute_command_lists` → `present::note_execute` → `late_release::drain_known` → `sparse::queue()`. That is the path #968 takes the lock off, so on `main` the title's CPU side stops behind the GPU stall as well. **Not tested** - Which shader runs. I have no GPU capture tooling on this machine. - A run with every pipeline ready, so nothing is skipped. - AMD. **AI use**: Claude Code (Claude Opus 5.5) ran the runs on my PC, wrote the sampler, read the logs and wrote this comment. Counts, rates and XCL's own function names only.
Author
Owner

@⁠oeirughrepuiohg on GitHub · 2026-11-24 13:00 UTC · original

Which shader runs during the 100 % stop: on Linux/Wine + vkd3d-proton (RTX 4070 Ti, 32-lane waves) it is a translated console compute program in split wave64, inside a small Dispatch. This answers the "Not tested: which shader runs" in @⁠larelgit's comment above, from the other driver stack.

Setup

  • RTX 4070 Ti 12 GB, NVIDIA 620.x, Linux, GE-Proton 11 (vkd3d-proton with XCL's patch, rebuilt with -Denable_trace=true so breadcrumbs work), release x86_64-pc-windows-gnu builds. Last tree: main 9aec53d + #793 #820 #759 #640 #889 #891 #826 #541 #684 #724 #573 #900, XCL_PSO_WAIT_MS=50.

What I measured (runs repeat within seconds)

  • GPU idle until ~60 s after frame 1500, then utilization.gpu 100 %, SM clock at max (2790 MHz), ~110 W; the first GPU queue.Wait … did not complete within 5000 ms 10-15 s later; device lost 10-20 s after that. Same shape as the RTX 5080 numbers above.
  • VKD3D_CONFIG=breadcrumbs, report taken at the first wait timeout: 3 of the 4 pending command lists are inside a Dispatch(4,1,1) of the same translated compute program (different queues). Over several runs it is the same program (its DXIL hash changes only with the recompiler settings).
  • That program is split wave64 (64 threads, XCL_X_SPIN meets). It has a loop whose trip count comes from a constant-buffer load and an xcl_x_ballot cross-half exchange in every iteration; the loop is bounded only by LOOP_GUARD (65536 per lane).
  • XCL_WAVE64_SPIN=0 turns the 100 % phase into a permanent hang (no device loss for minutes) instead of fixing it; #573 and #900 do not change it.
  • Without XCL_PSO_WAIT_MS (no bind skipped): 0 skipped draws/dispatches, 0 wait timeouts and no 100 % phase in two runs - the same as the control above. Those runs ended on host memory (31 GB) while the title waited for in-run compiles.

Reading (inference): consistent with @⁠S1m0ne1997's and @⁠larelgit's readings. A dispatch skipped because its pipeline was late leaves the value this loop reads unwritten, and the loop then runs to LOOP_GUARD with a cross-half exchange per iteration. On 32-lane GPUs every exchange is an atomics round trip between the halves, so it is far longer than on native wave64. That would also explain why AMD (native wave64) reports on #684 run much further.

Not tested: Windows, AMD, a run with every pipeline ready on this machine (host memory), which program wrote the value (the skipped one).

AI use: Claude Code, Claude Opus 5.5 ran the builds and runs on my PC, read the breadcrumbs and logs and wrote this comment. No game data: counts, rates and XCL's own names only.

**@⁠oeirughrepuiohg** on GitHub · 2026-11-24 13:00 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7132207920) **Which shader runs during the 100 % stop: on Linux/Wine + vkd3d-proton (RTX 4070 Ti, 32-lane waves) it is a translated console compute program in split wave64, inside a small `Dispatch`.** This answers the "Not tested: which shader runs" in @⁠larelgit's comment above, from the other driver stack. **Setup** - RTX 4070 Ti 12 GB, NVIDIA 620.x, Linux, GE-Proton 11 (vkd3d-proton with XCL's patch, rebuilt with `-Denable_trace=true` so breadcrumbs work), release `x86_64-pc-windows-gnu` builds. Last tree: `main` `9aec53d` + #793 #820 #759 #640 #889 #891 #826 #541 #684 #724 #573 #900, `XCL_PSO_WAIT_MS=50`. **What I measured** (runs repeat within seconds) - GPU idle until ~60 s after frame 1500, then `utilization.gpu` 100 %, SM clock at max (2790 MHz), ~110 W; the first `GPU queue.Wait … did not complete within 5000 ms` 10-15 s later; device lost 10-20 s after that. Same shape as the RTX 5080 numbers above. - `VKD3D_CONFIG=breadcrumbs`, report taken at the first wait timeout: 3 of the 4 pending command lists are inside a `Dispatch(4,1,1)` of the same translated compute program (different queues). Over several runs it is the same program (its DXIL hash changes only with the recompiler settings). - That program is split wave64 (64 threads, `XCL_X_SPIN` meets). It has a loop whose trip count comes from a constant-buffer load and an `xcl_x_ballot` cross-half exchange in every iteration; the loop is bounded only by `LOOP_GUARD` (65536 per lane). - `XCL_WAVE64_SPIN=0` turns the 100 % phase into a permanent hang (no device loss for minutes) instead of fixing it; #573 and #900 do not change it. - Without `XCL_PSO_WAIT_MS` (no bind skipped): 0 skipped draws/dispatches, 0 wait timeouts and no 100 % phase in two runs - the same as the control above. Those runs ended on host memory (31 GB) while the title waited for in-run compiles. **Reading** (inference): consistent with @⁠S1m0ne1997's and @⁠larelgit's readings. A dispatch skipped because its pipeline was late leaves the value this loop reads unwritten, and the loop then runs to `LOOP_GUARD` with a cross-half exchange per iteration. On 32-lane GPUs every exchange is an atomics round trip between the halves, so it is far longer than on native wave64. That would also explain why AMD (native wave64) reports on #684 run much further. **Not tested:** Windows, AMD, a run with every pipeline ready on this machine (host memory), which program wrote the value (the skipped one). **AI use:** Claude Code, Claude Opus 5.5 ran the builds and runs on my PC, read the breadcrumbs and logs and wrote this comment. No game data: counts, rates and XCL's own names only.
Author
Owner

@⁠rocobalt1 on GitHub · 2026-11-24 13:08 UTC · original

A negative datapoint for the offline-precompile route, on an RTX 4060 Ti: the journal compiles, the title's pool still does not drain.

Build: 47efa2e + the five cherry-pick sets from @⁠S1m0ne1997's recipe (#688 0b82a3d, #744 2cc79fb 07c535d, #759's eight commits, #820 0488ece, #684 e56dbc3), all clean, 405d9e8. Windows 11, 24 threads, 16 GB VRAM, 64 GB RAM, driver 32.0.16.1656. XCL_NETWORK=0, XCL_PRESS_AT through the menus.

  1. First run to the world load: reached the loading screen, wrote pipelines.bin 122 MB (58 748 pipelines, 1 686 the title used, 6 098 shaders), then the title's watchdog at +0x23cf683, 2 min 21 s in. As expected.
  2. xcl pipelines <game> with XCL_PIPELINE_THREADS=20, XCL_BIG_COMPILES=6: 51 300 of 58 748 done in 10 min (pipelines.done and pipelines.trying written, 128 driver blobs kept, 892 KB of blob). It ended without a final line while 7 873 were left - the "one huge program after record 22 600" case may be what it stopped on here too. Progress rate fell from 1 033/s to 138/s in the last minutes.
  3. Second run, XCL_BIG_COMPILES=4, no XCL_PSO_WAIT_MS: overlay reads 1 running, 0 done, 57 072 pipelines queued at 60 s, 1 running, 5 done, 57 071 at 120 s, fps 29.8 -> 8.0 -> 0.0, then the same watchdog at 2 min 21 s.

So 51 300 precompiled pipelines did not change the overlay count at all - it still starts at ~57 000 queued with one worker and 0 done. Two readings, and I cannot separate them from here:

  • the journal is keyed by something that differs between the tool's plain device and the title's device (root signature / shader hash), so nothing hits; or
  • the pool is idle for the reason @⁠brainhay5 described (the overlay shows 0 running in most runs regardless of cache), in which case precompiling cannot help until that is fixed.

If it is useful I can run the tool to completion on a 7 873-pipeline remainder (pipelines.done is on disk, it resumes) and retry, to rule out the first reading - but the second one would not change.

No game data leaves the machine; only counts are quoted.

**@⁠rocobalt1** on GitHub · 2026-11-24 13:08 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7132401881) A negative datapoint for the offline-precompile route, on an RTX 4060 Ti: **the journal compiles, the title's pool still does not drain.** **Build:** `47efa2e` + the five cherry-pick sets from @⁠S1m0ne1997's recipe (#688 `0b82a3d`, #744 `2cc79fb` `07c535d`, #759's eight commits, #820 `0488ece`, #684 `e56dbc3`), all clean, `405d9e8`. Windows 11, 24 threads, 16 GB VRAM, 64 GB RAM, driver 32.0.16.1656. `XCL_NETWORK=0`, `XCL_PRESS_AT` through the menus. 1. **First run** to the world load: reached the loading screen, wrote `pipelines.bin` **122 MB** (58 748 pipelines, 1 686 the title used, 6 098 shaders), then the title's watchdog at +0x23cf683, 2 min 21 s in. As expected. 2. **`xcl pipelines <game>`** with `XCL_PIPELINE_THREADS=20`, `XCL_BIG_COMPILES=6`: 51 300 of 58 748 done in 10 min (`pipelines.done` and `pipelines.trying` written, 128 driver blobs kept, 892 KB of blob). It ended without a final line while 7 873 were left - the "one huge program after record 22 600" case may be what it stopped on here too. Progress rate fell from 1 033/s to 138/s in the last minutes. 3. **Second run**, `XCL_BIG_COMPILES=4`, no `XCL_PSO_WAIT_MS`: overlay reads **`1 running, 0 done, 57 072 pipelines queued`** at 60 s, `1 running, 5 done, 57 071` at 120 s, fps 29.8 -> 8.0 -> 0.0, then the same watchdog at 2 min 21 s. So 51 300 precompiled pipelines did not change the overlay count at all - it still starts at ~57 000 queued with one worker and 0 done. Two readings, and I cannot separate them from here: - the journal is keyed by something that differs between the tool's plain device and the title's device (root signature / shader hash), so nothing hits; or - the pool is idle for the reason @⁠brainhay5 described (the overlay shows 0 running in most runs regardless of cache), in which case precompiling cannot help until that is fixed. If it is useful I can run the tool to completion on a 7 873-pipeline remainder (`pipelines.done` is on disk, it resumes) and retry, to rule out the first reading - but the second one would not change. No game data leaves the machine; only counts are quoted.
Author
Owner

@⁠upipibi on GitHub · 2026-11-24 13:16 UTC · original

How long a split wave64 loop that runs to LOOP_GUARD takes, measured on a 32-lane GPU: about 15 ms per Dispatch(4,1,1). This is about @⁠oeirughrepuiohg's reading above: one such dispatch cannot keep the GPU at 100 % for 70 s on its own.

Tested

  • NVIDIA GeForce RTX 3070 (32-lane waves), driver 616.56, Windows 11 Pro 26100, release; main 47efa2e, the default split form (XCL_X_SPIN 1).
  • bench_split_wave64's program (an LCG step, a v_cmp, a v_cndmask and a v_readfirstlane, so one cross-half exchange per iteration), with the trip count taken from a user SGPR. I changed only the shape, locally: 64 threads per group, 4 groups. GPU timestamps, median of 9:
trip count wave32 split wave64
4 096 0.2 ms 0.9 ms
16 384 0.7 ms 3.7 ms
65 536 2.7 ms 14.0 ms
0 (wraps: ends at the budget) 2.9 ms 15.2 ms
  • That is about 0.23 µs per exchange. With the trip count at 0, the loop stops at the 65 536-iteration budget, as the code says.

What this leaves

  • For 70–80 s at 100 %, it would take thousands of such dispatches back to back, or a program with far more exchanges per iteration. The other way is the desync path: a meet that waits its full 2^20 polls before xcl_x_dead. That happens once per wave, not once per iteration, but I have not timed it.
  • The breadcrumb dump in the comment above could tell these apart. How many times that Dispatch(4,1,1) was submitted during the stop, and how many exchanges the program has in its loop (= xcl_x_ballot( and xcl_x_rla_ in its HLSL), would separate them.

Not tested: the title's program (we have no title); AMD; Wine. The benchmark change is local and not part of any PR.

AI-assisted (Claude Code).

**@⁠upipibi** on GitHub · 2026-11-24 13:16 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7132591813) **How long a split wave64 loop that runs to `LOOP_GUARD` takes, measured on a 32-lane GPU: about 15 ms per `Dispatch(4,1,1)`.** This is about @⁠oeirughrepuiohg's reading above: one such dispatch cannot keep the GPU at 100 % for 70 s on its own. **Tested** - NVIDIA GeForce RTX 3070 (32-lane waves), driver 616.56, Windows 11 Pro 26100, release; `main` `47efa2e`, the default split form (`XCL_X_SPIN 1`). - `bench_split_wave64`'s program (an LCG step, a `v_cmp`, a `v_cndmask` and a `v_readfirstlane`, so one cross-half exchange per iteration), with the trip count taken from a user SGPR. I changed only the shape, locally: 64 threads per group, 4 groups. GPU timestamps, median of 9: | trip count | wave32 | split wave64 | |---|---|---| | 4 096 | 0.2 ms | 0.9 ms | | 16 384 | 0.7 ms | 3.7 ms | | 65 536 | 2.7 ms | 14.0 ms | | 0 (wraps: ends at the budget) | 2.9 ms | 15.2 ms | - That is about 0.23 µs per exchange. With the trip count at 0, the loop stops at the 65 536-iteration budget, as the code says. **What this leaves** - For 70–80 s at 100 %, it would take thousands of such dispatches back to back, or a program with far more exchanges per iteration. The other way is the desync path: a meet that waits its full 2^20 polls before `xcl_x_dead`. That happens once per wave, not once per iteration, but I have not timed it. - The breadcrumb dump in the comment above could tell these apart. How many times that `Dispatch(4,1,1)` was submitted during the stop, and how many exchanges the program has in its loop (`= xcl_x_ballot(` and `xcl_x_rla_` in its HLSL), would separate them. **Not tested:** the title's program (we have no title); AMD; Wine. The benchmark change is local and not part of any PR. AI-assisted (Claude Code).
Author
Owner

@⁠IvyNotFound on GitHub · 2026-11-24 13:17 UTC · original

RTX 5080, main 47efa2e + a local marker diagnostic: when the GPU-wait watchdog fires, one compute list has a run of dispatches of one console CS started and the first of them not finished. It is not the same shader from run to run. This follows @⁠larelgit's "the end of the chain is executing" and #1123's end=signal (on this machine its chains end at q4 end=signal; my report there: https://github.com/ivall/xcl/pull/1123#issuecomment-7131641125).

How: a local patch (XCL_GPU_CULPRIT=1, not posted as a PR) puts WriteBufferImmediate around every dispatch XCL records (title lists, console-recorded lists, ExecuteIndirect): MARKER_IN with a running number before, MARKER_OUT with the same number after, one pair of words per PC list in a readback buffer. When the watchdog releases a wait, a list whose last marker in is above its last marker out has work that started and is not done; the dispatches between the two are logged with the console CS (fnv64 of the title's CS bytecode, the name of its file in dxil\translated) and the groups. DRED breadcrumbs were my first try: with XCL_DRED=1 the driver did not take its cached pipelines, one 1.99 MB compute pipeline took 153 s to build and the title never got past its start.

Setup: RTX 5080 16 GB, driver 621.24; Ryzen 7 7800X3D; Windows 11 25H2; release; scripts/smoke.ps1 -Seconds 140, XCL_PRESS_A_AT=15, XCL_PSO_WAIT_MS=50.

run first watchdog release lists with work started and not done the first unfinished dispatch, and what came after it on that list end
A 132.7 s 1 of 281 CS b6043104de672057, 16x1x1; then 7 more of the same CS (326, 22, 5, 24, 28, 473, 10 groups) and one 1x1x1 of CS 40891c36f2e1e8aa device removed 0x887a0006 at 133.6 s
B 126.6 s 2 of 347 CS 2c83ffd798d07451, 4355x1x1; then 13 more of the same CS (578, 527, 399, … 2 groups). The other list: one ExecuteIndirect of CS 18567a5f0145bde9 140 s reached, 0 device removals
  • In both runs the stuck list is a run of 1-D dispatches of one CS with decreasing or varying group counts. Nothing after the first one is known to be done.
  • At the second release of run B (131.9 s) the same dispatches are still open, plus a 160x90 dispatch of CS b78fa10b425b8e54 on a list with no marker out yet.
  • In an earlier run with the same patch (shader names not yet recorded), 14 of 175 lists showed open markers at 97.4 s, most of them only because the in and out writes were not ordered. Since then the logs keep only marker in > marker out.
  • Run A's watchdog line came 0.8 s before the device removal (TDR), which fits a dispatch that does not end rather than a fence nobody signals.

What b6043104de672057 does (xcl disasm of the title's program, 34 KB, FSSM 14 KB):

  • each lane reads a count from a buffer (buffer_load_dword v8 at +0x1e48, v_cmpx_lt_i32 0, v8);
  • then it loops: an outer loop (s_cbranch_scc1 0x1e70 at +0x2470) runs while any lane has work left, around an inner loop of 4 iterations (s_cmp_eq_u32 s17, 4). Its body is buffer_load_dwordx3, f16 ↔ f32 conversions and v_min/max/med3_f32, writing back with buffer_store_dwordx3: bounds of something being merged.

So how long it runs depends on a count it reads from memory. If the pass that writes those counts was skipped because its pipeline was not ready (XCL_PSO_WAIT_MS=50; at 112.8 s in run B: 12 686 of 17 562 draws and 2 048 of 50 623 dispatches skipped), the loop runs on whatever is there. That fits @⁠larelgit's 100 % SM with little memory traffic: the same few cache lines over and over. The recompiler's LOOP_GUARD caps a lane at 65 536 iterations, so it is long but not endless. I have not shown that the counts are garbage: I did not read them back.

Not tested

  • the counts this CS read (no readback of its input buffer)
  • 2c83ffd798d07451 (not saved in that run)
  • a run with every pipeline ready
  • AMD

Separate, seen once in these runs: an access violation in XCL itself, not the title, at 97 s: title_textures::subresources_on → subresources → title_bytes → tiling::Chain::detile_level → copy_from_slice reading 0x8197f8000. title_bytes checks that the range is readable, then reads it in place on a worker thread. A page that goes away between the check and the detile ends the process. I have not looked further.

AI use

  • Claude Code, Claude Opus 5.5: wrote the local diagnostic, ran the runs, read the logs and the disassembly, and wrote this comment.
**@⁠IvyNotFound** on GitHub · 2026-11-24 13:17 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7132618087) **RTX 5080, `main` `47efa2e` + a local marker diagnostic: when the GPU-wait watchdog fires, one compute list has a run of dispatches of one console CS started and the first of them not finished. It is not the same shader from run to run.** This follows @⁠larelgit's "the end of the chain is executing" and #1123's `end=signal` (on this machine its chains end at `q4 end=signal`; my report there: https://github.com/ivall/xcl/pull/1123#issuecomment-7131641125). **How:** a local patch (`XCL_GPU_CULPRIT=1`, not posted as a PR) puts `WriteBufferImmediate` around every dispatch XCL records (title lists, console-recorded lists, ExecuteIndirect): `MARKER_IN` with a running number before, `MARKER_OUT` with the same number after, one pair of words per PC list in a readback buffer. When the watchdog releases a wait, a list whose last marker in is above its last marker out has work that started and is not done; the dispatches between the two are logged with the console CS (`fnv64` of the title's CS bytecode, the name of its file in `dxil\translated`) and the groups. DRED breadcrumbs were my first try: with `XCL_DRED=1` the driver did not take its cached pipelines, one 1.99 MB compute pipeline took 153 s to build and the title never got past its start. **Setup:** RTX 5080 16 GB, driver 621.24; Ryzen 7 7800X3D; Windows 11 25H2; release; `scripts/smoke.ps1 -Seconds 140`, `XCL_PRESS_A_AT=15`, `XCL_PSO_WAIT_MS=50`. | run | first watchdog release | lists with work started and not done | the first unfinished dispatch, and what came after it on that list | end | |---|---|---|---|---| | A | 132.7 s | 1 of 281 | CS `b6043104de672057`, 16x1x1; then 7 more of the same CS (326, 22, 5, 24, 28, 473, 10 groups) and one 1x1x1 of CS `40891c36f2e1e8aa` | device removed `0x887a0006` at 133.6 s | | B | 126.6 s | 2 of 347 | CS `2c83ffd798d07451`, 4355x1x1; then 13 more of the same CS (578, 527, 399, … 2 groups). The other list: one ExecuteIndirect of CS `18567a5f0145bde9` | 140 s reached, 0 device removals | - In both runs the stuck list is a run of 1-D dispatches of one CS with decreasing or varying group counts. Nothing after the first one is known to be done. - At the second release of run B (131.9 s) the same dispatches are still open, plus a 160x90 dispatch of CS `b78fa10b425b8e54` on a list with no marker out yet. - In an earlier run with the same patch (shader names not yet recorded), 14 of 175 lists showed open markers at 97.4 s, most of them only because the in and out writes were not ordered. Since then the logs keep only marker in > marker out. - Run A's watchdog line came 0.8 s before the device removal (TDR), which fits a dispatch that does not end rather than a fence nobody signals. **What `b6043104de672057` does** (`xcl disasm` of the title's program, 34 KB, FSSM 14 KB): - each lane reads a count from a buffer (`buffer_load_dword v8` at `+0x1e48`, `v_cmpx_lt_i32 0, v8`); - then it loops: an outer loop (`s_cbranch_scc1 0x1e70` at `+0x2470`) runs while any lane has work left, around an inner loop of 4 iterations (`s_cmp_eq_u32 s17, 4`). Its body is `buffer_load_dwordx3`, f16 ↔ f32 conversions and `v_min/max/med3_f32`, writing back with `buffer_store_dwordx3`: bounds of something being merged. So how long it runs depends on a count it reads from memory. If the pass that writes those counts was skipped because its pipeline was not ready (`XCL_PSO_WAIT_MS=50`; at 112.8 s in run B: 12 686 of 17 562 draws and 2 048 of 50 623 dispatches skipped), the loop runs on whatever is there. That fits @⁠larelgit's 100 % SM with little memory traffic: the same few cache lines over and over. The recompiler's `LOOP_GUARD` caps a lane at 65 536 iterations, so it is long but not endless. I have not shown that the counts are garbage: I did not read them back. **Not tested** - the counts this CS read (no readback of its input buffer) - `2c83ffd798d07451` (not saved in that run) - a run with every pipeline ready - AMD **Separate, seen once in these runs:** an access violation in XCL itself, not the title, at 97 s: `title_textures::subresources_on` → `subresources` → `title_bytes` → `tiling::Chain::detile_level` → `copy_from_slice` reading `0x8197f8000`. `title_bytes` checks that the range is readable, then reads it in place on a worker thread. A page that goes away between the check and the detile ends the process. I have not looked further. **AI use** - Claude Code, Claude Opus 5.5: wrote the local diagnostic, ran the runs, read the logs and the disassembly, and wrote this comment.
Author
Owner

@⁠chazi123 on GitHub · 2026-11-24 13:25 UTC · original

Cross-post from #646 (same retail 1.0.2.1; RTX 3060 Laptop 12 GB / Win10 19045).
The +0x23cf683 / GPU Loc Sig abort is preceded by Wait64BitValueX timed out … memory holds Some(0)
on a counter array (step 0x10) plus a compute-dispatch burst: the title waits for a GPU-written
counter that never lands, then null-derefs. Two local defects cause it, and fixing both removes the wall:
(1) the CPU poll for a list's Wait ran before that same list was submitted (the signalling
WriteBufferImmediate is in the same list); (2) a WriteBufferImmediate into the coherent window's
OpenExistingHeapFromAddress heap is not CPU-visible on NVIDIA — queueing a CPU-side immediate write
with the known value after the queue fence fixes it. After both: 0 Wait64 timeouts, loading presents
and streams (DirectStorage), ~200 s vs 70–130 s before. A later +0x23cf683 at world transition remains
with video 14,182 MB local — consistent with your 16 GB card hitting that same later wall.
Full data + patch offer in #646.

**@⁠chazi123** on GitHub · 2026-11-24 13:25 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7132799128) Cross-post from #646 (same retail 1.0.2.1; RTX 3060 Laptop 12 GB / Win10 19045). The +0x23cf683 / GPU Loc Sig abort is preceded by Wait64BitValueX timed out … memory holds Some(0) on a counter array (step 0x10) plus a compute-dispatch burst: the title waits for a GPU-written counter that never lands, then null-derefs. Two local defects cause it, and fixing both removes the wall: (1) the CPU poll for a list's Wait ran before that same list was submitted (the signalling WriteBufferImmediate is in the same list); (2) a WriteBufferImmediate into the coherent window's OpenExistingHeapFromAddress heap is not CPU-visible on NVIDIA — queueing a CPU-side immediate write with the known value after the queue fence fixes it. After both: 0 Wait64 timeouts, loading presents and streams (DirectStorage), ~200 s vs 70–130 s before. A later +0x23cf683 at world transition remains with video 14,182 MB local — consistent with your 16 GB card hitting that same later wall. Full data + patch offer in #646.
Author
Owner

@⁠oeirughrepuiohg on GitHub · 2026-11-24 13:26 UTC · original

@⁠upipibi thanks, that settles part of it. The numbers you asked for, from the same runs (counts from the translated HLSL and the breadcrumb dumps, nothing else):

  • Exchanges per loop iteration: the program has two guarded loops, with 3 and 4 cross-half exchanges per iteration (xcl_x_ballot( / xcl_x_rla_); 23 ballots, 4 lane reads and 4 meets in the whole program.
  • How often it was submitted: at the first wait timeout, the pending lists held 27, 3 and 3 Dispatch(4,1,1)s of it (one run) and 27, 11, 1 and 1 (another run).

With your 0.23 µs per exchange, that is roughly 50 ms per dispatch at the budget and ~1.5 s for the longest list - far from the 20-70 s at 100 %. So the loop running to LOOP_GUARD cannot be the whole story, and my reading above was too simple. Your other path fits better: halves that desync and wait out the 2^20 polls of a meet (and with XCL_WAVE64_SPIN=0, where a desync can never give up, the same point became a hang that did not end in minutes). That also fits @⁠IvyNotFound's runs of one CS with the first dispatch never finishing.

AI use: Claude Code, Claude Opus 5.5 counted these from our logs and wrote this reply.

**@⁠oeirughrepuiohg** on GitHub · 2026-11-24 13:26 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7132836025) @⁠upipibi thanks, that settles part of it. The numbers you asked for, from the same runs (counts from the translated HLSL and the breadcrumb dumps, nothing else): - **Exchanges per loop iteration:** the program has two guarded loops, with 3 and 4 cross-half exchanges per iteration (`xcl_x_ballot(` / `xcl_x_rla_`); 23 ballots, 4 lane reads and 4 meets in the whole program. - **How often it was submitted:** at the first wait timeout, the pending lists held 27, 3 and 3 `Dispatch(4,1,1)`s of it (one run) and 27, 11, 1 and 1 (another run). With your 0.23 µs per exchange, that is roughly 50 ms per dispatch at the budget and ~1.5 s for the longest list - far from the 20-70 s at 100 %. So the loop running to `LOOP_GUARD` cannot be the whole story, and my reading above was too simple. Your other path fits better: halves that desync and wait out the 2^20 polls of a meet (and with `XCL_WAVE64_SPIN=0`, where a desync can never give up, the same point became a hang that did not end in minutes). That also fits @⁠IvyNotFound's runs of one CS with the first dispatch never finishing. AI use: Claude Code, Claude Opus 5.5 counted these from our logs and wrote this reply.
Author
Owner

@⁠upipibi on GitHub · 2026-11-24 13:33 UTC · original

@⁠oeirughrepuiohg thanks for the counts. I timed the desync path as well, and it is also too short to explain the stop on its own.

Tested: the same RTX 3070 / driver 616.56 / main 47efa2e setup and benchmark as above. For this run I patched the translated HLSL locally so the odd half returns from xcl_x_meet() without arriving. The even half then waits out the full 2^20 polls, sets xcl_x_dead, and finishes alone. 16 loop iterations, so nearly all the time is the timed-out meet. GPU timestamps, median of 9:

1 group 4 groups
halves in step (control) <0.1 ms <0.1 ms
odd half never arrives 40.4 ms 37.3 ms
  • So a timed-out meet costs about 37 ms per wave, at roughly 36 ns per poll. The groups of a Dispatch(4,1,1) time out side by side, not one after another. After that the dead pair runs its loops without polling.
  • The timeout does end on this driver: the poll is a real atomic here. That differs from the RADV/NIR case @⁠SzczepanGrela found on #772/#847, where the load is hoisted out of the loop.

What this leaves: for your list of 27 dispatches, a desync in each one plus every loop running to the budget comes to roughly 27 × (37 + 50) ms ≈ 2.4 s. That is still well short of 20–70 s at 100 %. So on NVIDIA, neither bounded path explains the stop, unless the stopped work is far larger than these dispatches (@⁠IvyNotFound's run B had a 4 355-group dispatch at the front) or the same work is submitted again and again. A count of the dispatches completed during the 100 % phase (rather than pending at the first timeout) would show which.

Not tested: a real desync from the title's program (this one is forced); AMD; Wine. The patch is local, not part of a PR.

AI-assisted (Claude Code).

**@⁠upipibi** on GitHub · 2026-11-24 13:33 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7133009669) @⁠oeirughrepuiohg thanks for the counts. I timed the desync path as well, and it is also too short to explain the stop on its own. **Tested:** the same RTX 3070 / driver 616.56 / `main` `47efa2e` setup and benchmark as above. For this run I patched the translated HLSL locally so the odd half returns from `xcl_x_meet()` without arriving. The even half then waits out the full 2^20 polls, sets `xcl_x_dead`, and finishes alone. 16 loop iterations, so nearly all the time is the timed-out meet. GPU timestamps, median of 9: | | 1 group | 4 groups | |---|---|---| | halves in step (control) | <0.1 ms | <0.1 ms | | odd half never arrives | 40.4 ms | 37.3 ms | - So a timed-out meet costs about 37 ms per wave, at roughly 36 ns per poll. The groups of a `Dispatch(4,1,1)` time out side by side, not one after another. After that the dead pair runs its loops without polling. - The timeout does end on this driver: the poll is a real atomic here. That differs from the RADV/NIR case @⁠SzczepanGrela found on #772/#847, where the load is hoisted out of the loop. **What this leaves:** for your list of 27 dispatches, a desync in each one plus every loop running to the budget comes to roughly 27 × (37 + 50) ms ≈ 2.4 s. That is still well short of 20–70 s at 100 %. So on NVIDIA, neither bounded path explains the stop, unless the stopped work is far larger than these dispatches (@⁠IvyNotFound's run B had a 4 355-group dispatch at the front) or the same work is submitted again and again. A count of the dispatches *completed* during the 100 % phase (rather than pending at the first timeout) would show which. **Not tested:** a real desync from the title's program (this one is forced); AMD; Wine. The patch is local, not part of a PR. AI-assisted (Claude Code).
Author
Owner

@⁠sander110419 on GitHub · 2026-11-24 13:36 UTC · original

Linux / Wine data for @⁠imnicho's Sleep plan above: same result, on a second machine and OS. These are local runs, not smoke.ps1.

Setup: RTX 5070 Laptop 8 GB (driver 595.104.02), Ryzen 9 9955HX, 30 GB RAM, Pop!_OS with GE-Proton 11-11, and vkd3d-proton 3.1 built with #775 (without it dxil-spirv hangs on this title's compute shaders, #611). Tree: main 47efa2e plus a local stack of merged PRs, release build, Series S profile. The rule is implemented locally as described in the plan: pso_async counts the title threads held in resolve_wait_for for a pipeline still being built, and kernelx's Sleep/SleepEx of 100 ms or more count only the time in which none is held.

run rule binds how the title ended
32 off XCL_PSO_WAIT_MS=1000 null write at +0x23cf683
40 off XCL_PSO_WAIT_MS=1000 null write at +0x23cf683
42 on wait until built it didn't end itself. I stopped it at 1031 s (930 s after the first #101 call); 6954 dispatches, 0 skipped
43 on wait until built XCL_RUN_SECONDS=150, exit 0; 6443 dispatches, 0 skipped

Caveat: this is not a clean A/B. The rule-off runs also bounded the bind waits, so two things changed between them and the rule-on runs. Run 42 was mostly the title building its big compute pipelines one by one inside binds. It was slow, as imnicho describes, but not dead.

Two notes for the PR:

  • Under Wine the title's Sleep reaches XCL's kernelx exports as on Windows, so taking it over works there too.
  • A stretched sleep can only report its paused time when it returns. In run 42 the long hold was still going when I stopped it, so a summary log written at the end of a sleep never printed. A line written while the hold is still going (for example after 5 s) would show it in runs that end mid-hold.

I'm not opening a second PR for this. I'll test imnicho's when it's up.

AI use: Hermes agent with Claude Opus 5.5 wrote the local change and this note. The runs are from the machine named above.

**@⁠sander110419** on GitHub · 2026-11-24 13:36 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7133063012) **Linux / Wine data for @⁠imnicho's `Sleep` plan above: same result, on a second machine and OS.** These are local runs, not `smoke.ps1`. **Setup:** RTX 5070 Laptop 8 GB (driver 595.104.02), Ryzen 9 9955HX, 30 GB RAM, Pop!_OS with GE-Proton 11-11, and vkd3d-proton 3.1 built with #775 (without it dxil-spirv hangs on this title's compute shaders, #611). Tree: `main` `47efa2e` plus a local stack of merged PRs, release build, Series S profile. The rule is implemented locally as described in the plan: `pso_async` counts the title threads held in `resolve_wait_for` for a pipeline still being built, and kernelx's `Sleep`/`SleepEx` of 100 ms or more count only the time in which none is held. | run | rule | binds | how the title ended | |---|---|---|---| | 32 | off | `XCL_PSO_WAIT_MS=1000` | null write at `+0x23cf683` | | 40 | off | `XCL_PSO_WAIT_MS=1000` | null write at `+0x23cf683` | | 42 | on | wait until built | it didn't end itself. I stopped it at 1031 s (930 s after the first `#101` call); 6954 dispatches, 0 skipped | | 43 | on | wait until built | `XCL_RUN_SECONDS=150`, exit 0; 6443 dispatches, 0 skipped | **Caveat:** this is not a clean A/B. The rule-off runs also bounded the bind waits, so two things changed between them and the rule-on runs. Run 42 was mostly the title building its big compute pipelines one by one inside binds. It was slow, as imnicho describes, but not dead. **Two notes for the PR:** - Under Wine the title's `Sleep` reaches XCL's kernelx exports as on Windows, so taking it over works there too. - A stretched sleep can only report its paused time when it returns. In run 42 the long hold was still going when I stopped it, so a summary log written at the end of a sleep never printed. A line written while the hold is still going (for example after 5 s) would show it in runs that end mid-hold. I'm not opening a second PR for this. I'll test imnicho's when it's up. **AI use:** Hermes agent with Claude Opus 5.5 wrote the local change and this note. The runs are from the machine named above.
Author
Owner

@⁠CowboyBingus on GitHub · 2026-11-24 13:37 UTC · original

@⁠leondood1298 following up on your comment about the 29.75 MB program: I'd like to take making it compile in reasonable time, unless you're already on it.

Measured on an RTX 5070 Ti (driver 621.24), with tools built from 47efa2e plus one local commit outside gpu/ (bc394e3):

  • The shader record is indirect_diffuse_lighting:CS_ScreenProbes_ActivateProbes_9083c094_Wrapped in shaders.rpf (fnv64 56c0cd3b82a00c6e, 21,140 B). Its program is 88,863 RDNA2 instructions, with no LDS instructions; XCL detects it as wave64.
  • With 4 memory windows in the split wave64 form (the _Compute_0_4_1 translation), XCL translates it to 31,028,146 B of HLSL, which XCL's DXC call compiles to 29,750,144 B of DXIL. That DXC call (-O0, which XCL uses above 8 MiB of HLSL) took 119–140 s in three runs.
  • CreateComputePipelineState with that DXIL and no cached blob, from a new exe, was still running when the 60 s cap killed the process.
  • In a -O0 -Zi build of the same HLSL, 2,172,022 of the 3,330,580 DXIL instructions (not counting llvm.dbg / dx.nothing calls; 65%, 662 per site) are attributed by debug line to the 3,281 buffer_load_format_x sites.
  • The program has 14,378 basic blocks, and 594 distinct block bodies when the trailing branch (or far-jump sequence) and its target are ignored (the branch kind is kept).

Plan: a compact form for compute programs like this one, where each distinct block is emitted once and run from a loop over a block table. It would sit behind a switch, apply only to programs whose blocks repeat this much, and come with a GPU test that compares it against the current form. I'll post its DXC and driver times here, whatever they turn out to be.

AI use: Claude Code (Claude Opus 5.5) ran the measurements and wrote this; the runs were on my machine.

**@⁠CowboyBingus** on GitHub · 2026-11-24 13:37 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7133103125) @⁠leondood1298 following up on your [comment](https://github.com/ivall/xcl/issues/505#issuecomment-7125562029) about the 29.75 MB program: I'd like to take making it compile in reasonable time, unless you're already on it. Measured on an RTX 5070 Ti (driver 621.24), with tools built from `47efa2e` plus one local commit outside `gpu/` (`bc394e3`): - The shader record is `indirect_diffuse_lighting:CS_ScreenProbes_ActivateProbes_9083c094_Wrapped` in `shaders.rpf` (fnv64 `56c0cd3b82a00c6e`, 21,140 B). Its program is 88,863 RDNA2 instructions, with no LDS instructions; XCL detects it as wave64. - With 4 memory windows in the split wave64 form (the `_Compute_0_4_1` translation), XCL translates it to 31,028,146 B of HLSL, which XCL's DXC call compiles to 29,750,144 B of DXIL. That DXC call (`-O0`, which XCL uses above 8 MiB of HLSL) took 119–140 s in three runs. - `CreateComputePipelineState` with that DXIL and no cached blob, from a new exe, was still running when the 60 s cap killed the process. - In a `-O0 -Zi` build of the same HLSL, 2,172,022 of the 3,330,580 DXIL instructions (not counting `llvm.dbg` / `dx.nothing` calls; 65%, 662 per site) are attributed by debug line to the 3,281 `buffer_load_format_x` sites. - The program has 14,378 basic blocks, and 594 distinct block bodies when the trailing branch (or far-jump sequence) and its target are ignored (the branch kind is kept). Plan: a compact form for compute programs like this one, where each distinct block is emitted once and run from a loop over a block table. It would sit behind a switch, apply only to programs whose blocks repeat this much, and come with a GPU test that compares it against the current form. I'll post its DXC and driver times here, whatever they turn out to be. AI use: Claude Code (Claude Opus 5.5) ran the measurements and wrote this; the runs were on my machine.
Author
Owner

@⁠lucsoft on GitHub · 2026-11-24 13:44 UTC · original

@⁠S1m0ne1997, Linux / RDNA3 data for --precompile --pipelines: #688 helps a lot under Wine too, and the memory growth around record 22 600 is not NVIDIA-specific. On RADV it is in the pipeline step, not DXC.

Setup: RX 7800 XT, Mesa 26.3.1 RADV, Wine 11.21 Staging, vkd3d-proton 3.1 (relaxed, dxil-spirv 53aac418 from #775), Ryzen 7 7800X3D (16 threads), 30 GB RAM + 15 GB zram + 16 GB swap file. main 6efdabc + #688 + a few Linux patches (#871's memory commit, #684). xcl shaders shaders.rpf --precompile --pipelines on the retail pack (26 503 records), nice 10.

1. #688 under Wine: with 15 DXC threads on Wine's process heap, top showed each xcl-dxc-* thread at 5–40 % (~3–5 cores busy) and ~2.4 records/s. With #688 (compiler workers use private heaps), the CPU is saturated (88 % nice) and it runs at ~12.7 records/s, about 5× faster here.

2. The stall at ~22 600, on RADV:

  • 15 DXC threads + 4 pipeline threads: from ~22 600 the process grew to 21.8 GB RSS (zram full, 7.7 GB in the swap file) by 22 800, and I stopped it. 800 compute pipelines made, 0 refused.
  • XCL_DXC_THREADS=6 XCL_PIPELINE_THREADS=2: a 16 GB RSS guard stopped it at 22 800 (17.0 GB).
  • DXC alone (--precompile without --pipelines, 6 threads): past 22 800 at 3.6 GB RSS. It now runs slowly through the big programs (23 800 at 832 s).

So in the same part of the pack, the pipeline step blows up memory on RADV the way you saw on NVIDIA. On RADV that is vkd3d-proton (dxil-spirv) and/or the driver; I can't tell which yet. Next I'll run --pipelines with XCL_PIPELINE_THREADS=1 under the same guard, to see whether a single program crosses 16 GB on its own, and which one.

AI use: Claude Code (Claude Opus 5.5) ran the commands and wrote this comment. The runs were real, on the hardware above.

**@⁠lucsoft** on GitHub · 2026-11-24 13:44 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7133273923) @⁠S1m0ne1997, Linux / RDNA3 data for `--precompile --pipelines`: **#688 helps a lot under Wine too, and the memory growth around record 22 600 is not NVIDIA-specific.** On RADV it is in the pipeline step, not DXC. **Setup:** RX 7800 XT, Mesa 26.3.1 RADV, Wine 11.21 Staging, vkd3d-proton 3.1 (relaxed, dxil-spirv `53aac418` from #775), Ryzen 7 7800X3D (16 threads), 30 GB RAM + 15 GB zram + 16 GB swap file. `main` `6efdabc` + #688 + a few Linux patches (#871's memory commit, #684). `xcl shaders shaders.rpf --precompile --pipelines` on the retail pack (26 503 records), `nice 10`. **1. #688 under Wine:** with 15 DXC threads on Wine's process heap, top showed each `xcl-dxc-*` thread at 5–40 % (~3–5 cores busy) and ~2.4 records/s. With #688 (`compiler workers use private heaps`), the CPU is saturated (88 % nice) and it runs at ~12.7 records/s, about 5× faster here. **2. The stall at ~22 600, on RADV:** - 15 DXC threads + 4 pipeline threads: from ~22 600 the process grew to 21.8 GB RSS (zram full, 7.7 GB in the swap file) by 22 800, and I stopped it. 800 compute pipelines made, 0 refused. - `XCL_DXC_THREADS=6 XCL_PIPELINE_THREADS=2`: a 16 GB RSS guard stopped it at 22 800 (17.0 GB). - **DXC alone** (`--precompile` without `--pipelines`, 6 threads): past 22 800 at 3.6 GB RSS. It now runs slowly through the big programs (23 800 at 832 s). So in the same part of the pack, the pipeline step blows up memory on RADV the way you saw on NVIDIA. On RADV that is vkd3d-proton (dxil-spirv) and/or the driver; I can't tell which yet. Next I'll run `--pipelines` with `XCL_PIPELINE_THREADS=1` under the same guard, to see whether a single program crosses 16 GB on its own, and which one. AI use: Claude Code (Claude Opus 5.5) ran the commands and wrote this comment. The runs were real, on the hardware above.
Author
Owner

@⁠Joshua-Lake01 on GitHub · 2026-11-24 13:47 UTC · original

Test report on the retail 1.0.2.1 world load (#505 / #646). Three findings that may save others time, plus a question for @⁠chazi123.

Setup: RTX 5080 16 GB, Ryzen 9 7900X, 64 GB RAM, Windows 11 26200, release build. The title runs in an AppContainer job with a 32 GiB job memory limit and XCL_NETWORK=0.

1. #630 + #724 stop the load before the world starts (found by bisection).

  • With both PRs, the 40 "MS in the AS slot" pipelines are no longer refused. One "pipeline from the console MS in two passes" is built.
  • After that, the title stays on the loading artwork at 30 fps for minutes. It never starts creating the world's shader records: the log stays around 9.7k lines and there are no world as/ps [SHADER] lines.
  • DirectStorage workers are idle, and the title's events from +0x1ad0e0f (set by +0x4da42b6) stop being set at about 53 s.
  • I tried the same stack in five runs (m3-01/02/03, m4, m5), varying the Bink skip, the PSO wait and the sync and DirectStorage PRs. All five stalled.
  • Dropping only #630 and #724 gives the normal path: about 19.9k log lines and about 6.7k world shader records by about 60 s.
  • The working stack still includes #640, #993 and #1109, so those are cleared. I did not test #630 and #724 separately.

2. XCL_BIG_COMPILES above about 2 runs NVIDIA's compiler out of memory under a 32 GiB job limit.

  • With =6: LLVM ERROR: out of memory / fatal : Memory allocation failure three times during the world load. The title commits about 28–30 GB there, so those pipelines are never built and presents stop.
  • With =2: no OOM. If you cap your job or have a small page file, keep this low.

3. With compute pipelines no longer late, presents still stop about 30–60 s into the world load. Worst compute PSO in that phase: 1.4–1.5 s.

  • Frames presented stop.
  • 39–52 "GPU queue.Wait … did not complete within 5000 ms … released on CPU".
  • Several "Write64 Signal … would close a GPU cycle (waiters=[q…]) – signalled on CPU".
  • No Wait64BitValueX timed out lines, unlike @⁠chazi123's runs (#851, #906 and #850 are in my stack).
  • The title then ends with 0xc0000409 (no XCL unhandled-exception line; #505 reports place this at +0x2215c35) or with the +0x23cf683 "GPU Loc Sig" tag 0x4d8bd421.
  • XCL_GPU_WAIT_RELEASE_MS=180000 made no difference once builds were short.
  • This looks like your defect (2): a WriteBufferImmediate into the coherent window that the CPU never sees.

@⁠chazi123, would you share your patch for (1) the Wait-poll-before-submit ordering and (2) the CPU-side mirror of WriteBufferImmediate into the coherent window? I'd test it on this RTX 5080 and report back here with the exact commit and counts. I'm testing a reconstruction behind an env switch, but your exact change would be a cleaner comparison.

AI use: runs, bisection and this report were driven by Claude Code (Claude Opus 5.5) on my machine. All numbers come from the run logs.

**@⁠Joshua-Lake01** on GitHub · 2026-11-24 13:47 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7133335421) Test report on the retail 1.0.2.1 world load (#505 / #646). Three findings that may save others time, plus a question for @⁠chazi123. **Setup:** RTX 5080 16 GB, Ryzen 9 7900X, 64 GB RAM, Windows 11 26200, release build. The title runs in an AppContainer job with a 32 GiB job memory limit and `XCL_NETWORK=0`. - **Base:** main `47efa2e` + #751 (`4e101fc`). - **Settings:** `XCL_PSO_WAIT_MS=50`, `XCL_PRESS_A_AT`, and a driver-blob cache harvested from earlier runs plus `xcl shaders --precompile --only cs --pipelines` (#744). - **PRs on top:** #889, #744, #820, #1046, #1044, #924, #1062, #1053, #640, #979, #1078, #993, #1109, #851, #906, #850. **1. #630 + #724 stop the load before the world starts (found by bisection).** - With both PRs, the 40 "MS in the AS slot" pipelines are no longer refused. One "pipeline from the console MS in two passes" is built. - After that, the title stays on the loading artwork at 30 fps for minutes. It never starts creating the world's shader records: the log stays around 9.7k lines and there are no world `as`/`ps` `[SHADER]` lines. - DirectStorage workers are idle, and the title's events from `+0x1ad0e0f` (set by `+0x4da42b6`) stop being set at about 53 s. - I tried the same stack in five runs (m3-01/02/03, m4, m5), varying the Bink skip, the PSO wait and the sync and DirectStorage PRs. All five stalled. - Dropping only #630 and #724 gives the normal path: about 19.9k log lines and about 6.7k world shader records by about 60 s. - The working stack still includes #640, #993 and #1109, so those are cleared. I did not test #630 and #724 separately. **2. `XCL_BIG_COMPILES` above about 2 runs NVIDIA's compiler out of memory under a 32 GiB job limit.** - With `=6`: `LLVM ERROR: out of memory` / `fatal : Memory allocation failure` three times during the world load. The title commits about 28–30 GB there, so those pipelines are never built and presents stop. - With `=2`: no OOM. If you cap your job or have a small page file, keep this low. **3. With compute pipelines no longer late, presents still stop about 30–60 s into the world load.** Worst compute PSO in that phase: 1.4–1.5 s. - Frames presented stop. - 39–52 "GPU queue.Wait … did not complete within 5000 ms … released on CPU". - Several "Write64 Signal … would close a GPU cycle (waiters=[q…]) – signalled on CPU". - **No** `Wait64BitValueX timed out` lines, unlike @⁠chazi123's runs (#851, #906 and #850 are in my stack). - The title then ends with `0xc0000409` (no XCL unhandled-exception line; #505 reports place this at `+0x2215c35`) or with the `+0x23cf683` "GPU Loc Sig" tag `0x4d8bd421`. - `XCL_GPU_WAIT_RELEASE_MS=180000` made no difference once builds were short. - This looks like your defect (2): a `WriteBufferImmediate` into the coherent window that the CPU never sees. @⁠chazi123, would you share your patch for (1) the Wait-poll-before-submit ordering and (2) the CPU-side mirror of `WriteBufferImmediate` into the coherent window? I'd test it on this RTX 5080 and report back here with the exact commit and counts. I'm testing a reconstruction behind an env switch, but your exact change would be a cleaner comparison. **AI use:** runs, bisection and this report were driven by Claude Code (Claude Opus 5.5) on my machine. All numbers come from the run logs.
Author
Owner

@⁠ClosetPie107 on GitHub · 2026-11-24 13:54 UTC · original

Linux / RDNA4 (RADV): @⁠S1m0ne1997's recipe works under Wine, but the stop does not move: every pipeline the title used gets prebuilt, and the ones it binds next are in the part xcl pipelines builds last. Plus an answer for @⁠lucsoft.

Tested

  • AMD Radeon RX 9070 16 GB (RADV GFX1201, Mesa 26.3.1), Ryzen 5 9600X, 30 GB RAM (zram); CachyOS, kernel 7.3.5; Proton Experimental's Wine, vkd3d-proton v3.1 + #257's patch + dxil-spirv 53aac418 (#775), DXC 1.9.2609.5; x86_64-pc-windows-gnu release.
  • Tree: 47efa2e + the recipe's cherry-picks, all clean: #688 0b82a3d, #744 2cc79fb 07c535d, #759's eight commits (head 788e366), #820 0488ece, #684 e56dbc3. XCL_BIG_COMPILES left at 1 (some of this title's programs take 13–16 GB in RADV, see below).
  • Retail 1.0.2.1, saved profile, XCL_PRESS_AT=30.6:A, XCL_NETWORK=0 XCL_ACTIVITY=1, no XCL_PSO_WAIT_MS. DXIL cache and RADV's cache warm from earlier runs (2 175 DXIL files; the pathological programs below already built once).

Steps

  1. Journal run: pipelines.bin 128 MB, 58 746 pipelines, 1 742 the title used. Watchdog at 110.8 s (first #101 at 81.2 s).
  2. xcl pipelines <game> under Proton's Wine (wine xcl.exe pipelines …, same environment as the title's runs), in a cgroup capped at 22 GB:
    • 6 threads, 4 driver compiles: 51 500 done in ~1 min, then 11 min without progress, 19.7 GB peak + 16.2 GB swap, exit code 3 with no summary, 7 543 left.
    • Again, with pipelines.trying deleted (otherwise its 5 pipelines are left to the title, and those are the slow ones) and XCL_PIPELINE_THREADS=2: 7242 pipelines to make (0 the title used). So all 1 742 used pipelines were done. Then 5+ min without progress; I stopped it there.
  3. Two runs, same tree and settings:
journal run (before) test run 1 test run 2
first #101 81.2 s 79.5 s 78.1 s
watchdog +0x23cf683 110.8 s 109.7 s 110.6 s
compute PSOs made from a kept blob 147 150 150
blobs refused 0 0 0
skipped draws / dispatches, GPU wait timeouts, GPU faults 0 0 0

What holds the title. Stack dumps at the stop, symbolized with the build's debug info: a title thread in bind::set_pipeline_state → pso_async::resolve_for_bind → real::go_background closure → build_compute → finish_pso → d3d12core.dll (→ winevulkan.dll). The bind builds the pipeline itself, on the title's thread, because no worker had started it; a second title thread waits for it. The DXC and PSO workers are idle.

  • Test run 1: one program of 1 409 808 B DXIL, from 80.4 s to 109.8 s on that thread: its DXIL was not cached (the run wrote one new DXIL file), then 15.4 s in the driver. Three pipelines right after it came from kept blobs in 8 ms each.
  • Test run 2: three built inside binds (0.8 s, 7.6 s, 6.7 s), the fourth still building at the stop.

The used list comes from a run that stopped at the same place, so it cannot hold what the title binds after that point. Those pipelines are queued but unused in the journal run, and they sit in the remaining 7 242, which xcl pipelines builds last. That may also be @⁠rocobalt1's case (~7 900 left there), but I cannot map single pipelines between the journal and the log, so that is a guess. @⁠sander110419's result with @⁠imnicho's Sleep rule (the title builds inside binds and runs on) fits this: on this machine the hold is a series of builds inside binds too, not a deadlock.

@⁠lucsoft – does a single program cross 16 GB on its own on RADV? Yes, and it is the driver, not dxil-spirv. A Fossilize capture of a run (Steam's layer, FOSSILIZE_DUMP_SYNC=1), replayed one compute pipeline at a time:

  • One compute pipeline (1 094 136 B DXIL → 5 077 268 B SPIR-V): 59.99 s and 15.9 GB peak on Mesa 26.3.1, 59.65 s and 15.9 GB on 26.2.6.
  • perf over the runs: the preload thread's time is in libvulkan_radeon.so and libc's allocator; d3d12core.dll (vkd3d-proton with dxil-spirv) is 0.1–2 %.
  • Three such programs so far (60 s / 15.9 GB, 51 s / 13.2 GB, 51 s / 13.3 GB; 4.6–5.1 MB of SPIR-V each). Most other ~1 MB programs build in ~5 s. Details and a workaround on #1035.

Not tested: finishing the remaining 7 242 (one at a time on RADV that looks like many hours; I may run it overnight and add the result here), XCL_BIG_COMPILES above 1, @⁠imnicho's rule on this machine, main with #744 merged (6cef69f): this tree has the PR's own commits.

AI use: T3 Code (Claude Opus 5.5) built the tree, ran the title, the journal steps and the replays, and wrote this comment from the logs and stack dumps. The runs are real, on the hardware above, and I checked the report before posting.

**@⁠ClosetPie107** on GitHub · 2026-11-24 13:54 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7133526084) **Linux / RDNA4 (RADV): @⁠S1m0ne1997's recipe works under Wine, but the stop does not move: every pipeline the title used gets prebuilt, and the ones it binds next are in the part `xcl pipelines` builds last.** Plus an answer for @⁠lucsoft. **Tested** - AMD Radeon RX 9070 16 GB (RADV GFX1201, Mesa 26.3.1), Ryzen 5 9600X, 30 GB RAM (zram); CachyOS, kernel 7.3.5; Proton Experimental's Wine, vkd3d-proton v3.1 + #257's patch + dxil-spirv `53aac418` (#775), DXC 1.9.2609.5; `x86_64-pc-windows-gnu` release. - Tree: `47efa2e` + the recipe's cherry-picks, all clean: #688 `0b82a3d`, #744 `2cc79fb` `07c535d`, #759's eight commits (head `788e366`), #820 `0488ece`, #684 `e56dbc3`. `XCL_BIG_COMPILES` left at 1 (some of this title's programs take 13–16 GB in RADV, see below). - Retail 1.0.2.1, saved profile, `XCL_PRESS_AT=30.6:A`, `XCL_NETWORK=0 XCL_ACTIVITY=1`, **no `XCL_PSO_WAIT_MS`**. DXIL cache and RADV's cache warm from earlier runs (2 175 DXIL files; the pathological programs below already built once). **Steps** 1. **Journal run:** `pipelines.bin` 128 MB, 58 746 pipelines, 1 742 the title used. Watchdog at 110.8 s (first `#101` at 81.2 s). 2. **`xcl pipelines <game>`** under Proton's Wine (`wine xcl.exe pipelines …`, same environment as the title's runs), in a cgroup capped at 22 GB: - 6 threads, 4 driver compiles: 51 500 done in ~1 min, then 11 min without progress, 19.7 GB peak + 16.2 GB swap, exit code 3 with no summary, 7 543 left. - Again, with `pipelines.trying` deleted (otherwise its 5 pipelines are left to the title, and those are the slow ones) and `XCL_PIPELINE_THREADS=2`: `7242 pipelines to make (0 the title used)`. So **all 1 742 used pipelines were done**. Then 5+ min without progress; I stopped it there. 3. **Two runs, same tree and settings:** | | journal run (before) | test run 1 | test run 2 | |---|---|---|---| | first `#101` | 81.2 s | 79.5 s | 78.1 s | | watchdog `+0x23cf683` | 110.8 s | 109.7 s | 110.6 s | | compute PSOs made from a kept blob | 147 | 150 | 150 | | blobs refused | 0 | 0 | 0 | | skipped draws / dispatches, GPU wait timeouts, GPU faults | 0 | 0 | 0 | **What holds the title.** Stack dumps at the stop, symbolized with the build's debug info: a title thread in `bind::set_pipeline_state` → `pso_async::resolve_for_bind` → `real::go_background` closure → `build_compute` → `finish_pso` → `d3d12core.dll` (→ `winevulkan.dll`). The bind builds the pipeline itself, on the title's thread, because no worker had started it; a second title thread waits for it. The DXC and PSO workers are idle. - Test run 1: one program of 1 409 808 B DXIL, from 80.4 s to 109.8 s on that thread: its DXIL was not cached (the run wrote one new DXIL file), then 15.4 s in the driver. Three pipelines right after it came from kept blobs in 8 ms each. - Test run 2: three built inside binds (0.8 s, 7.6 s, 6.7 s), the fourth still building at the stop. The used list comes from a run that stopped at the same place, so it cannot hold what the title binds after that point. Those pipelines are queued but unused in the journal run, and they sit in the remaining 7 242, which `xcl pipelines` builds last. That may also be @⁠rocobalt1's case (~7 900 left there), but I cannot map single pipelines between the journal and the log, so that is a guess. @⁠sander110419's result with @⁠imnicho's `Sleep` rule (the title builds inside binds and runs on) fits this: on this machine the hold is a series of builds inside binds too, not a deadlock. **@⁠lucsoft – does a single program cross 16 GB on its own on RADV? Yes, and it is the driver, not dxil-spirv.** A Fossilize capture of a run (Steam's layer, `FOSSILIZE_DUMP_SYNC=1`), replayed one compute pipeline at a time: - One compute pipeline (1 094 136 B DXIL → 5 077 268 B SPIR-V): 59.99 s and 15.9 GB peak on Mesa 26.3.1, 59.65 s and 15.9 GB on 26.2.6. - `perf` over the runs: the preload thread's time is in `libvulkan_radeon.so` and libc's allocator; `d3d12core.dll` (vkd3d-proton with dxil-spirv) is 0.1–2 %. - Three such programs so far (60 s / 15.9 GB, 51 s / 13.2 GB, 51 s / 13.3 GB; 4.6–5.1 MB of SPIR-V each). Most other ~1 MB programs build in ~5 s. Details and a workaround on #1035. **Not tested:** finishing the remaining 7 242 (one at a time on RADV that looks like many hours; I may run it overnight and add the result here), `XCL_BIG_COMPILES` above 1, @⁠imnicho's rule on this machine, `main` with #744 merged (`6cef69f`): this tree has the PR's own commits. **AI use:** T3 Code (Claude Opus 5.5) built the tree, ran the title, the journal steps and the replays, and wrote this comment from the logs and stack dumps. The runs are real, on the hardware above, and I checked the report before posting.
Author
Owner

@⁠oz-stanislav-zhukov on GitHub · 2026-11-24 13:57 UTC · original

Datapoint on main 930e8b4 + stacked PRs: the first story scene now plays (subtitles, grey screen, ~1 fps), then the same q4 stall ends in DEVICE_HUNG at ~181 s.

Setup

  • i7-14700KF (28 threads), 64 GB, RTX 5060 Ti 16 GB (wave32), driver 621.24, Windows 10 22H2 (19045)
  • DXC 1.8.2502.11 (SDK 10.0.26100.0), Agility SDK 1.620.2, Rust 1.88.0, release with line tables
  • main 930e8b4 + #751 + #688 + #1123 + #488 + the two CopyFromSubresource commits for #662 (d08aa26, e825a57), plus a local lock-order fix in sparse::queue() (only reached with XCL_DRED=1, see below)
  • XCL_PSO_WAIT_MS=50 XCL_ACTIVITY=1, the title 1.0.2.1

What changed against 47efa2e

  • With 47efa2e + the same PRs the run stalled at ~82–100 s and the GPU hung at ~112–115 s, never past the loading screen.
  • With 930e8b4 (#744 and "a big pipeline build the title waits for does not wait for its turn") the first scene starts: subtitles show, the picture stays grey, 0–2 presents per 2 s from ~130 s, up to 8008 dispatches per 2 s.

Where it ends (same as before)

  • From ~128 s, 32 Write64 Signal … would close a GPU cycle – signalled on CPU (q0/q1/q2/q4 ↔ q3), then 30 GPU queue.Wait … did not complete within 5000 ms.
  • #1123's chain at the release: GPU wait chain: q4 end=signal (no tracked wait in front of it: executing, or behind a wait XCL does not track); same_end=2/2, earlier_releases=0, write64_cycle_breaks=63, sparse queue fence=56662/56662. In an earlier run on 47efa2e: q3 Wait64(0x70417ff20>=0x6f6) -> q4 end=signal.
  • D3D12 device removed: 0x887a0006 at 181.6 s, then the title's own 0x80000003 at +0x2474606.
  • So the direct queue waits on compute queue q4, and q4 is not behind any tracked wait: it runs work that never finishes until TDR.

XCL_DRED=1 deadlocks at startup (separate bug)
To see q4's last operation I turned DRED on. The title then stood still within 4–6 s. Thread dump: the submit thread holds sparse::STATE (upload_dirty → begin_slot) and calls ID3D12CommandAllocator::Reset, which waits inside D3D12Core; another thread is inside D3D12Core (alloc_pool::reset_list), whose callback res_release → late_release::hold → drain_known → sparse::queue() waits for sparse::STATE. Keeping the sparse queue outside STATE removes that inversion; with it the title got past 6 s but still sat on a black screen, which I have not diagnosed yet. I will open a PR for the lock fix once it has a test.
Also with DRED the driver refuses the saved pipeline blobs and rebuilds the largest compute pipelines (0.4–2 MB DXIL) in 50–460 s each; four runs were needed to warm the cache.

Not tested: AMD; DRED breadcrumbs of the hang (not reached yet).

Written by Claude Code (Claude Opus 5.5) from runs on the hardware above; posted from oz-stanislav-zhukov.

**@⁠oz-stanislav-zhukov** on GitHub · 2026-11-24 13:57 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7133595474) Datapoint on `main` 930e8b4 + stacked PRs: the first story scene now plays (subtitles, grey screen, ~1 fps), then the same q4 stall ends in DEVICE_HUNG at ~181 s. **Setup** - i7-14700KF (28 threads), 64 GB, RTX 5060 Ti 16 GB (wave32), driver 621.24, Windows 10 22H2 (19045) - DXC 1.8.2502.11 (SDK 10.0.26100.0), Agility SDK 1.620.2, Rust 1.88.0, release with line tables - `main` 930e8b4 + #751 + #688 + #1123 + #488 + the two `CopyFromSubresource` commits for #662 (d08aa26, e825a57), plus a local lock-order fix in `sparse::queue()` (only reached with `XCL_DRED=1`, see below) - `XCL_PSO_WAIT_MS=50 XCL_ACTIVITY=1`, the title 1.0.2.1 **What changed against 47efa2e** - With 47efa2e + the same PRs the run stalled at ~82–100 s and the GPU hung at ~112–115 s, never past the loading screen. - With 930e8b4 (#744 and "a big pipeline build the title waits for does not wait for its turn") the first scene starts: subtitles show, the picture stays grey, 0–2 presents per 2 s from ~130 s, up to 8008 dispatches per 2 s. **Where it ends (same as before)** - From ~128 s, 32 `Write64 Signal … would close a GPU cycle – signalled on CPU` (q0/q1/q2/q4 ↔ q3), then 30 `GPU queue.Wait … did not complete within 5000 ms`. - #1123's chain at the release: `GPU wait chain: q4 end=signal (no tracked wait in front of it: executing, or behind a wait XCL does not track); same_end=2/2, earlier_releases=0, write64_cycle_breaks=63, sparse queue fence=56662/56662`. In an earlier run on 47efa2e: `q3 Wait64(0x70417ff20>=0x6f6) -> q4 end=signal`. - `D3D12 device removed: 0x887a0006` at 181.6 s, then the title's own `0x80000003` at `+0x2474606`. - So the direct queue waits on compute queue q4, and q4 is not behind any tracked wait: it runs work that never finishes until TDR. **`XCL_DRED=1` deadlocks at startup (separate bug)** To see q4's last operation I turned DRED on. The title then stood still within 4–6 s. Thread dump: the submit thread holds `sparse::STATE` (`upload_dirty → begin_slot`) and calls `ID3D12CommandAllocator::Reset`, which waits inside D3D12Core; another thread is inside D3D12Core (`alloc_pool::reset_list`), whose callback `res_release → late_release::hold → drain_known → sparse::queue()` waits for `sparse::STATE`. Keeping the sparse queue outside `STATE` removes that inversion; with it the title got past 6 s but still sat on a black screen, which I have not diagnosed yet. I will open a PR for the lock fix once it has a test. Also with DRED the driver refuses the saved pipeline blobs and rebuilds the largest compute pipelines (0.4–2 MB DXIL) in 50–460 s each; four runs were needed to warm the cache. **Not tested**: AMD; DRED breadcrumbs of the hang (not reached yet). Written by Claude Code (Claude Opus 5.5) from runs on the hardware above; posted from oz-stanislav-zhukov.
Author
Owner

@⁠oeirughrepuiohg on GitHub · 2026-11-24 14:02 UTC · original

Follow-up with a measurement, and it rules out the reading I agreed with above (@⁠upipibi): the 100 % phase does not come from split-wave64 meets waiting out their 2^20 polls.

  • Local diagnostic (not a PR): the meet's poll limit read from an io slot instead of the constant 1u << 20, so it can be changed per run without recompiling. Same tree as before (main 9aec53d + open PRs incl. #684 #724 #573 #900), XCL_PSO_WAIT_MS=50, warm caches, RTX 4070 Ti / Linux / vkd3d-proton.
  • Default limit (2^20): GPU at 100 % from 104 s after the 1500th frame, wait timeouts from the same second, still at 100 % after 138 s when I stopped it.
  • Limit 4096 (256x shorter, a give-up within roughly a millisecond): GPU at 100 % from 65 s after the 1500th frame, wait timeouts 3 s later, device lost 29 s after that. Same picture.

So whatever keeps the SMs busy is not a meet waiting for an absent half; the work itself runs long (consistent with @⁠IvyNotFound's runs of one CS whose first dispatch never finishes, and with it only happening when binds are skipped). One run each, so treat the timing differences as noise.

AI use: Claude Code, Claude Opus 5.5 wrote the diagnostic, ran both runs and wrote this comment.

**@⁠oeirughrepuiohg** on GitHub · 2026-11-24 14:02 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7133728909) Follow-up with a measurement, and it rules out the reading I agreed with above (@⁠upipibi): **the 100 % phase does not come from split-wave64 meets waiting out their 2^20 polls.** - Local diagnostic (not a PR): the meet's poll limit read from an `io` slot instead of the constant `1u << 20`, so it can be changed per run without recompiling. Same tree as before (`main` `9aec53d` + open PRs incl. #684 #724 #573 #900), `XCL_PSO_WAIT_MS=50`, warm caches, RTX 4070 Ti / Linux / vkd3d-proton. - Default limit (2^20): GPU at 100 % from 104 s after the 1500th frame, wait timeouts from the same second, still at 100 % after 138 s when I stopped it. - Limit 4096 (256x shorter, a give-up within roughly a millisecond): GPU at 100 % from 65 s after the 1500th frame, wait timeouts 3 s later, device lost 29 s after that. Same picture. So whatever keeps the SMs busy is not a meet waiting for an absent half; the work itself runs long (consistent with @⁠IvyNotFound's runs of one CS whose first dispatch never finishes, and with it only happening when binds are skipped). One run each, so treat the timing differences as noise. AI use: Claude Code, Claude Opus 5.5 wrote the diagnostic, ran both runs and wrote this comment.
Author
Owner

@⁠not-rex on GitHub · 2026-11-24 14:06 UTC · original

Plan, to avoid duplicate work: a fix in list_x.rs for the "Write64 Signal … would close a GPU cycle – signalled on CPU" bursts that come a few seconds before the GPU-queue stall here (@⁠IvyNotFound's 12 breaks for 0x577 on q0–q4 on #1123, @⁠oz-stanislav-zhukov's 32 between q0/q1/q2/q4 and q3, @⁠MacieGx's 32), and that keep coming during it (@⁠tiagonleal's write64_cycle_breaks 45 -> 90 over 16 chain lines on #1123). @⁠Joshua-Lake01 sees them too with compute pipelines no longer late. I think most of them are not cycles.

What changes: before a Signal, would_signal_close_cycle and break_cycles_before_title_signal count every armed wait on the cell at or below the new value as waiting for that Signal. That includes waits that a Signal already in flight satisfies. When the GPU is a frame behind, the ping-pong between the direct queue and a compute queue then reads as a cycle:

q3: Signal(D=N)  Wait(C>=N)  Signal(D=N+1)  Wait(C>=N+1)
q0: Wait(D>=N)   Signal(C=N) Wait(D>=N+1)   -> Signal(C=N+1) reported as closing a cycle

q3's Wait(C>=N) is satisfied by q0's Signal(C=N), which runs before everything after it on q0, so there is no cycle. The CPU break then sets C to N+1 at once, and q3 runs both frames' work after those waits before q0 has written C's data. The change leaves waits that a Signal in flight satisfies out of the "waits for this Signal" set. They stay in the graph as ordinary edges, so a real cycle through them is still found. One log line (first few times) when a Signal stays on the GPU that the old check would have broken.

Why: the stall itself looks like the compute queues running long dispatches on data that was never written (@⁠larelgit, @⁠IvyNotFound, @⁠oeirughrepuiohg; the chain end moves between compute queues in @⁠tiagonleal's run; only in runs with XCL_PSO_WAIT_MS). This does not fix that, and imnicho's Sleep plan and the compile-time work are the way out there. These false breaks release a whole frame of consumers early once the GPU falls behind, which is more work running on unwritten data. That is the same problem #1046 avoids for the watchdog's release. It also makes #1123's chain line exact more often (it is exact only while there are no breaks).

Tests: a unit test on hand-built graphs (the ping-pong above and a queue that waits on a cell another queue's in-flight Signal satisfies, then writes it: not cycles; the existing true-cycle cases still found), already failing on main here. A GPU test (WARP is enough): two queues in the ping-pong, one held behind a gate fence for a long dispatch. The next frame's values must stay unsignalled until the gate opens, and then everything drains. On an RTX 3080: the whole suite, two xcl-smoke blocks, and the retail title with XCL_PSO_WAIT_MS=50 on main and on the PR, counting the cycle-break lines and what follows them. If the 3080 doesn't reach the world load, I'll say so and ask someone who sees the bursts to run the pair.

Small (about 25 lines of runtime, the rest tests), not touching #1045/#1046/#850/#851's parts of the file.

AI use: Claude Code (Claude Opus 5.5) read the threads and the code, wrote the local test that shows the false cycle on main, and drafted this plan.

**@⁠not-rex** on GitHub · 2026-11-24 14:06 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7133841916) Plan, to avoid duplicate work: a fix in `list_x.rs` for the "Write64 Signal … would close a GPU cycle – signalled on CPU" bursts that come a few seconds before the GPU-queue stall here (@⁠IvyNotFound's 12 breaks for 0x577 on q0–q4 on #1123, @⁠oz-stanislav-zhukov's 32 between q0/q1/q2/q4 and q3, @⁠MacieGx's 32), and that keep coming during it (@⁠tiagonleal's `write64_cycle_breaks` 45 -> 90 over 16 chain lines on #1123). @⁠Joshua-Lake01 sees them too with compute pipelines no longer late. I think most of them are not cycles. What changes: before a Signal, `would_signal_close_cycle` and `break_cycles_before_title_signal` count every armed wait on the cell at or below the new value as waiting for that Signal. That includes waits that a Signal already in flight satisfies. When the GPU is a frame behind, the ping-pong between the direct queue and a compute queue then reads as a cycle: ``` q3: Signal(D=N) Wait(C>=N) Signal(D=N+1) Wait(C>=N+1) q0: Wait(D>=N) Signal(C=N) Wait(D>=N+1) -> Signal(C=N+1) reported as closing a cycle ``` q3's `Wait(C>=N)` is satisfied by q0's `Signal(C=N)`, which runs before everything after it on q0, so there is no cycle. The CPU break then sets C to N+1 at once, and q3 runs both frames' work after those waits before q0 has written C's data. The change leaves waits that a Signal in flight satisfies out of the "waits for this Signal" set. They stay in the graph as ordinary edges, so a real cycle through them is still found. One log line (first few times) when a Signal stays on the GPU that the old check would have broken. Why: the stall itself looks like the compute queues running long dispatches on data that was never written (@⁠larelgit, @⁠IvyNotFound, @⁠oeirughrepuiohg; the chain end moves between compute queues in @⁠tiagonleal's run; only in runs with `XCL_PSO_WAIT_MS`). This does not fix that, and imnicho's `Sleep` plan and the compile-time work are the way out there. These false breaks release a whole frame of consumers early once the GPU falls behind, which is more work running on unwritten data. That is the same problem #1046 avoids for the watchdog's release. It also makes #1123's chain line exact more often (it is exact only while there are no breaks). Tests: a unit test on hand-built graphs (the ping-pong above and a queue that waits on a cell another queue's in-flight Signal satisfies, then writes it: not cycles; the existing true-cycle cases still found), already failing on `main` here. A GPU test (WARP is enough): two queues in the ping-pong, one held behind a gate fence for a long dispatch. The next frame's values must stay unsignalled until the gate opens, and then everything drains. On an RTX 3080: the whole suite, two `xcl-smoke` blocks, and the retail title with `XCL_PSO_WAIT_MS=50` on `main` and on the PR, counting the cycle-break lines and what follows them. If the 3080 doesn't reach the world load, I'll say so and ask someone who sees the bursts to run the pair. Small (about 25 lines of runtime, the rest tests), not touching #1045/#1046/#850/#851's parts of the file. AI use: Claude Code (Claude Opus 5.5) read the threads and the code, wrote the local test that shows the false cycle on `main`, and drafted this plan.
Author
Owner

@⁠jessenic on GitHub · 2026-11-24 14:06 UTC · original

@⁠larelgit adding to your side effect: on main 47efa2e the lock also stops the frame-loop thread itself, through a path #968 does not cover, and that is what ends the heartbeat in my run.

Setup: RTX 5070 Ti (driver 610.88), Ryzen 7 9700X, 32 GB RAM, Windows 11 26300; main 47efa2e + #924 merged locally, release; XCL_NETWORK=0, XCL_PSO_WAIT_MS=50, XCL_TRACE_WAITS=1, XCL_THREAD_DUMP_AT every 6 s from 90 to 186 s; scripted input, save past the first-run menus. One run. xcl.exe frames symbolised with cdb and the build's PDB.

Timeline: first #101 79.97 s; 0 presents 99–122 s; 1 present per 2 s at 122–132 s; +0x23cf683 at 186.67 s.

99–122 s, a slowdown, not the abort: the frame-loop thread (the one that made the first #101 call) waits at +0x43c3d5d < +0x23cf4f2 < +0x23cf2d3 < +0x23cf104 on its job-ring event for 3 → 21 s in the dumps at 102–120 s. The ring workers are in pso_async::resolve_wait (bind::set_pipeline_state / bind::execute_indirect, from +0x43c4591), with a different title caller in every dump: many 50 ms waits, not one long one. The late counter went 129 → 257 → 513 at 101–111 s, while 15 xcl-pso threads compiled and 7 compute PSOs finished in 100–122 s. It lasts ~22 s, so the watchdog does not fire there.

From ~131 s: the sparse lock, as in your run A

  • 124–136 s: 32 cycle breaks signalled on the CPU, then 42 GPU queue.Wait … did not complete within 5000 ms. The sparse fence stops at 38086: five has not reached fence value warnings, 136.4–156.4 s.
  • 131–156 s: a title thread holds STATE in ID3D12Resource::Map → real::res_map → sparse::readback_now → readback_ranges → State::wait_for. The late-release, DirectStorage and activity threads queue on STATE.
  • From at least 162 s to the abort (all five dumps, 162–186 s):
    • Another title thread holds STATE inside UpdateTileMappings (win32u ← D3D12Core ← nvwgf2umx ← D3D12Core ← State::map_tiles ← sparse::committed ← kernelx::home_again), on the sparse queue that no longer progresses.
    • The frame-loop thread is in Mutex::lock_contended ← sparse::forget_buffer ← real::res_release, called from the title's per-frame Release (+0x24848c5 < +0xc9e603 < +0x1209a0).
    • The submit thread is behind the same lock (late_release::drain_known → sparse::queue(), #968's path).
    • The last burst of work ends at ~156.5 s, which is 30 ticks before the abort.

So once a GPU queue stops, the heartbeat thread blocks in XCL through forget_buffer, and STATE is held across a GPU wait (readback_now) and across a driver call that waits on the stuck queue (map_tiles). #968 frees queue(), but neither of these. This only shows up in the skip path. Without XCL_PSO_WAIT_MS (two runs of the same build without #924), the abort comes ~30 s after the last present and nothing waits on the sparse lock: the frame loop waits for the ring workers, which are in resolve_wait while their pipelines compile. Like your control and @⁠S1m0ne1997's run, that is the case @⁠imnicho's Sleep rule addresses.

I did not capture what the stuck queue runs. Your 100 % GPU reading fits it better than a parked fence.

AI use: Claude Code (Claude Opus 5.5) ran the build and run on this PC, analysed the dumps (several agents, then three independent checks against the log and the PDB) and wrote this comment. Function names, offsets, counts and times only.

**@⁠jessenic** on GitHub · 2026-11-24 14:06 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7133841574) @⁠larelgit adding to your side effect: on `main` `47efa2e` the lock also stops **the frame-loop thread itself**, through a path #968 does not cover, and that is what ends the heartbeat in my run. **Setup:** RTX 5070 Ti (driver 610.88), Ryzen 7 9700X, 32 GB RAM, Windows 11 26300; `main` `47efa2e` + #924 merged locally, release; `XCL_NETWORK=0`, `XCL_PSO_WAIT_MS=50`, `XCL_TRACE_WAITS=1`, `XCL_THREAD_DUMP_AT` every 6 s from 90 to 186 s; scripted input, save past the first-run menus. One run. xcl.exe frames symbolised with cdb and the build's PDB. **Timeline:** first `#101` 79.97 s; 0 presents 99–122 s; 1 present per 2 s at 122–132 s; `+0x23cf683` at 186.67 s. **99–122 s, a slowdown, not the abort:** the frame-loop thread (the one that made the first `#101` call) waits at `+0x43c3d5d < +0x23cf4f2 < +0x23cf2d3 < +0x23cf104` on its job-ring event for 3 → 21 s in the dumps at 102–120 s. The ring workers are in `pso_async::resolve_wait` (`bind::set_pipeline_state` / `bind::execute_indirect`, from `+0x43c4591`), with a different title caller in every dump: many 50 ms waits, not one long one. The late counter went 129 → 257 → 513 at 101–111 s, while 15 `xcl-pso` threads compiled and 7 compute PSOs finished in 100–122 s. It lasts ~22 s, so the watchdog does not fire there. **From ~131 s: the sparse lock, as in your run A** - 124–136 s: 32 cycle breaks signalled on the CPU, then 42 `GPU queue.Wait … did not complete within 5000 ms`. The sparse fence stops at 38086: five `has not reached fence value` warnings, 136.4–156.4 s. - 131–156 s: a title thread holds `STATE` in `ID3D12Resource::Map` → `real::res_map` → `sparse::readback_now` → `readback_ranges` → `State::wait_for`. The late-release, DirectStorage and activity threads queue on `STATE`. - From at least 162 s to the abort (all five dumps, 162–186 s): - Another title thread holds `STATE` inside `UpdateTileMappings` (win32u ← D3D12Core ← nvwgf2umx ← D3D12Core ← `State::map_tiles` ← `sparse::committed` ← `kernelx::home_again`), on the sparse queue that no longer progresses. - **The frame-loop thread is in `Mutex::lock_contended` ← `sparse::forget_buffer` ← `real::res_release`**, called from the title's per-frame `Release` (`+0x24848c5 < +0xc9e603 < +0x1209a0`). - The submit thread is behind the same lock (`late_release::drain_known` → `sparse::queue()`, #968's path). - The last burst of work ends at ~156.5 s, which is 30 ticks before the abort. So once a GPU queue stops, the heartbeat thread blocks in XCL through `forget_buffer`, and `STATE` is held across a GPU wait (`readback_now`) and across a driver call that waits on the stuck queue (`map_tiles`). #968 frees `queue()`, but neither of these. This only shows up in the skip path. Without `XCL_PSO_WAIT_MS` (two runs of the same build without #924), the abort comes ~30 s after the last present and nothing waits on the sparse lock: the frame loop waits for the ring workers, which are in `resolve_wait` while their pipelines compile. Like your control and @⁠S1m0ne1997's run, that is the case @⁠imnicho's `Sleep` rule addresses. I did not capture what the stuck queue runs. Your 100 % GPU reading fits it better than a parked fence. *AI use: Claude Code (Claude Opus 5.5) ran the build and run on this PC, analysed the dumps (several agents, then three independent checks against the log and the PDB) and wrote this comment. Function names, offsets, counts and times only.*
Author
Owner

@⁠chazi123 on GitHub · 2026-11-24 14:08 UTC · original

Test report on the retail 1.0.2.1 world load (#505 / #646). Three findings that may save others time, plus a question for @⁠chazi123.

Setup: RTX 5080 16 GB, Ryzen 9 7900X, 64 GB RAM, Windows 11 26200, release build. The title runs in an AppContainer job with a 32 GiB job memory limit and XCL_NETWORK=0.

1. #630 + #724 stop the load before the world starts (found by bisection).

2. XCL_BIG_COMPILES above about 2 runs NVIDIA's compiler out of memory under a 32 GiB job limit.

  • With =6: LLVM ERROR: out of memory / fatal : Memory allocation failure three times during the world load. The title commits about 28–30 GB there, so those pipelines are never built and presents stop.
  • With =2: no OOM. If you cap your job or have a small page file, keep this low.

3. With compute pipelines no longer late, presents still stop about 30–60 s into the world load. Worst compute PSO in that phase: 1.4–1.5 s.

@⁠chazi123, would you share your patch for (1) the Wait-poll-before-submit ordering and (2) the CPU-side mirror of WriteBufferImmediate into the coherent window? I'd test it on this RTX 5080 and report back here with the exact commit and counts. I'm testing a reconstruction behind an env switch, but your exact change would be a cleaner comparison.

AI use: runs, bisection and this report were driven by Claude Code (Claude Opus 5.5) on my machine. All numbers come from the run logs.

@⁠Joshua-Lake01 thanks — the #630+#724 bisection and the XCL_BIG_COMPILES OOM cap
are both valuable; we will keep big-compiles low on our 32 GB box. Patch as
requested, now rebased onto main-with-#795 (coherency mirror: write() queues a
CPU-side Write::Immediate with the known value for committed/coherent-window
targets, applied after the queue fence):
https://aka.doubaocdn.com/s/LWcjVTOmpC
The older #759-era copy (also carries the wait-ordering fix + probes) is
https://aka.doubaocdn.com/s/VpJ6z5JGTT — use whichever matches your base. On our
main-077ce40 rebase run there were zero Wait64 CPU timeouts and zero GPU
queue.Wait timeouts, consistent with your no-Wait64-timeout signature; your
GPU-queue.Wait-released-on-CPU lines point at defect (2). Your 5080 counts with
the exact commit would be a great cross-check. Thanks for offering to test.

**@⁠chazi123** on GitHub · 2026-11-24 14:08 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7133903023) > Test report on the retail 1.0.2.1 world load ([#505](https://github.com/ivall/xcl/issues/505) / [#646](https://github.com/ivall/xcl/issues/646)). Three findings that may save others time, plus a question for [@⁠chazi123](https://github.com/chazi123). > > **Setup:** RTX 5080 16 GB, Ryzen 9 7900X, 64 GB RAM, Windows 11 26200, release build. The title runs in an AppContainer job with a 32 GiB job memory limit and `XCL_NETWORK=0`. > > * **Base:** main `47efa2e` + [D3D12.X: title texture reads outside the coherent window use the safe copy #751](https://github.com/ivall/xcl/pull/751) (`4e101fc`). > * **Settings:** `XCL_PSO_WAIT_MS=50`, `XCL_PRESS_A_AT`, and a driver-blob cache harvested from earlier runs plus `xcl shaders --precompile --only cs --pipelines` ([Shaders: save offline compute pipelines to the runtime driver cache #744](https://github.com/ivall/xcl/pull/744)). > * **PRs on top:** [D3D12.X: compute pipelines are built ahead of their first bind #889](https://github.com/ivall/xcl/pull/889), [Shaders: save offline compute pipelines to the runtime driver cache #744](https://github.com/ivall/xcl/pull/744), [D3D12.X: XCL_BIG_COMPILES sets how many big compute pipelines the driver builds at once #820](https://github.com/ivall/xcl/pull/820), [D3D12.X: XCL_GPU_WAIT_RELEASE_MS sets when a stalled GPU wait is released #1046](https://github.com/ivall/xcl/pull/1046), [D3D12.X: read back sparse-window Wait64BitValueX counters during CPU waits #1044](https://github.com/ivall/xcl/pull/1044), [kernelx: XCL_TRACE_WAITS names what the title's waiting threads wait on #924](https://github.com/ivall/xcl/pull/924), [xcl run: name a title's deliberate write of a tag to address 0 in the crash line #1062](https://github.com/ivall/xcl/pull/1062), [Fast-boot: opt-in Bink intro skip, frame interval override, device type and TTS mute env vars #1053](https://github.com/ivall/xcl/pull/1053), [D3D12.X: an optional page budget evicts CPU-filled title textures LRU #640](https://github.com/ivall/xcl/pull/640), [DirectStorage: resolve GPU-view addresses to their paired CPU view #979](https://github.com/ivall/xcl/pull/979), [DirectStorage: bound BCPack record scratch memory #1078](https://github.com/ivall/xcl/pull/1078), [D3D12.X: a copy within one memory window reads through a scratch buffer (#958) #993](https://github.com/ivall/xcl/pull/993), [D3D12.X: allocator #9 takes the title's command-memory callback #1109](https://github.com/ivall/xcl/pull/1109), [D3D12.X: keep ordinary GPU work ahead of a recorded Wait64 #851](https://github.com/ivall/xcl/pull/851), [D3D12.X: refresh fence mirrors after queued rewinds #906](https://github.com/ivall/xcl/pull/906), [D3D12.X: retain deferred Write64 until the producer fence completes #850](https://github.com/ivall/xcl/pull/850). > > **1. [#630](https://github.com/ivall/xcl/pull/630) + [#724](https://github.com/ivall/xcl/pull/724) stop the load before the world starts (found by bisection).** > > * With both PRs, the 40 "MS in the AS slot" pipelines are no longer refused. One "pipeline from the console MS in two passes" is built. > * After that, the title stays on the loading artwork at 30 fps for minutes. It never starts creating the world's shader records: the log stays around 9.7k lines and there are no world `as`/`ps` `[SHADER]` lines. > * DirectStorage workers are idle, and the title's events from `+0x1ad0e0f` (set by `+0x4da42b6`) stop being set at about 53 s. > * I tried the same stack in five runs (m3-01/02/03, m4, m5), varying the Bink skip, the PSO wait and the sync and DirectStorage PRs. All five stalled. > * Dropping only [D3D12.X: a console MS at subobject 24 is the stream's MS #630](https://github.com/ivall/xcl/pull/630) and [D3D12.X: execute two-pass mesh shaders on DispatchMesh and ExecuteIndirect #724](https://github.com/ivall/xcl/pull/724) gives the normal path: about 19.9k log lines and about 6.7k world shader records by about 60 s. > * The working stack still includes [D3D12.X: an optional page budget evicts CPU-filled title textures LRU #640](https://github.com/ivall/xcl/pull/640), [D3D12.X: a copy within one memory window reads through a scratch buffer (#958) #993](https://github.com/ivall/xcl/pull/993) and [D3D12.X: allocator #9 takes the title's command-memory callback #1109](https://github.com/ivall/xcl/pull/1109), so those are cleared. I did not test [D3D12.X: a console MS at subobject 24 is the stream's MS #630](https://github.com/ivall/xcl/pull/630) and [D3D12.X: execute two-pass mesh shaders on DispatchMesh and ExecuteIndirect #724](https://github.com/ivall/xcl/pull/724) separately. > > **2. `XCL_BIG_COMPILES` above about 2 runs NVIDIA's compiler out of memory under a 32 GiB job limit.** > > * With `=6`: `LLVM ERROR: out of memory` / `fatal : Memory allocation failure` three times during the world load. The title commits about 28–30 GB there, so those pipelines are never built and presents stop. > * With `=2`: no OOM. If you cap your job or have a small page file, keep this low. > > **3. With compute pipelines no longer late, presents still stop about 30–60 s into the world load.** Worst compute PSO in that phase: 1.4–1.5 s. > > * Frames presented stop. > * 39–52 "GPU queue.Wait … did not complete within 5000 ms … released on CPU". > * Several "Write64 Signal … would close a GPU cycle (waiters=[q…]) – signalled on CPU". > * **No** `Wait64BitValueX timed out` lines, unlike [@⁠chazi123](https://github.com/chazi123)'s runs ([D3D12.X: keep ordinary GPU work ahead of a recorded Wait64 #851](https://github.com/ivall/xcl/pull/851), [D3D12.X: refresh fence mirrors after queued rewinds #906](https://github.com/ivall/xcl/pull/906) and [D3D12.X: retain deferred Write64 until the producer fence completes #850](https://github.com/ivall/xcl/pull/850) are in my stack). > * The title then ends with `0xc0000409` (no XCL unhandled-exception line; [Newer retail title (TitleID 7952987A): reaches world loading, then the title's GPU watchdog ("GPU Loc Sig") after ListX #101 stub #505](https://github.com/ivall/xcl/issues/505) reports place this at `+0x2215c35`) or with the `+0x23cf683` "GPU Loc Sig" tag `0x4d8bd421`. > * `XCL_GPU_WAIT_RELEASE_MS=180000` made no difference once builds were short. > * This looks like your defect (2): a `WriteBufferImmediate` into the coherent window that the CPU never sees. > > [@⁠chazi123](https://github.com/chazi123), would you share your patch for (1) the Wait-poll-before-submit ordering and (2) the CPU-side mirror of `WriteBufferImmediate` into the coherent window? I'd test it on this RTX 5080 and report back here with the exact commit and counts. I'm testing a reconstruction behind an env switch, but your exact change would be a cleaner comparison. > > **AI use:** runs, bisection and this report were driven by Claude Code (Claude Opus 5.5) on my machine. All numbers come from the run logs. @⁠Joshua-Lake01 thanks — the #630+#724 bisection and the XCL_BIG_COMPILES OOM cap are both valuable; we will keep big-compiles low on our 32 GB box. Patch as requested, now rebased onto main-with-#795 (coherency mirror: write() queues a CPU-side Write::Immediate with the known value for committed/coherent-window targets, applied after the queue fence): https://aka.doubaocdn.com/s/LWcjVTOmpC The older #759-era copy (also carries the wait-ordering fix + probes) is https://aka.doubaocdn.com/s/VpJ6z5JGTT — use whichever matches your base. On our main-077ce40 rebase run there were zero Wait64 CPU timeouts and zero GPU queue.Wait timeouts, consistent with your no-Wait64-timeout signature; your GPU-queue.Wait-released-on-CPU lines point at defect (2). Your 5080 counts with the exact commit would be a great cross-check. Thanks for offering to test.
Author
Owner

@⁠bstillbstill on GitHub · 2026-11-24 14:13 UTC · original

RTX 3090 Ti: where --precompile --pipelines stops (right after record 22 600) and what holds up the title's compute pipelines in the world load are the same three screen-probe programs, 13 – 29 MB of DXIL each. #1278 and #1279 (drafts) keep them from blocking everything else.

Setup: RTX 3090 Ti (driver 32.0.16.2101, 32-lane waves), i9-13900K, 32 GB RAM (commit limit 51.9 GB), Windows 11 Pro 26300, DXC 1.9.2609.5, release builds, retail 1.0.2.1. Sizes on main 47efa2e (+ #680 for the heap form); title runs on a local 6bac4b4 + #533 + #433 with diagnostic logging.

1. The programs. A local log in the precompile named every compute program of 2 MB of DXIL or more. In the pack they are three records in a row, right where the passes reported above and on #744 stop:

record program DXIL #680 heap form no wave64 split
22 616 indirect_diffuse_lighting:CS_ScreenProbes_ActivateProbes_9083c094_Wrapped 29 052 KB 28 296 KB 22 815 KB
22 617 …CS_ScreenProbes_ActivateProbesTarget_534f271f_Wrapped 28 940 KB 28 192 KB –
22 618 …CS_ScreenProbes_ActivateRays_d60186e6_Wrapped 13 774 KB 12 984 KB 13 774 KB

The other 31 CS_ScreenProbes_* programs are 3 – 480 KB. ActivateRays with one memory window: 11 700 KB. Translation and DXC took 484 s for ActivateProbesTarget.

2. Why they are that big. The console program is unrolled: ActivateProbes is 88 863 instructions, about 3 300 copies of one neighbour test (bounds check, index, buffer_load_format_x through the same descriptor, bit test, mask bit) under 9 902 s_cbranch_execz. XCL translates it structured (13 308 ifs, not the pc chain) into 31 MB of HLSL; the per-load format decode is about 19 % of it. No switch above brings it near a normal size.

3. The driver. NVIDIA alone (one thread, no title running) had not built ActivateRays after 839 s: 4.6 GB and growing about 0.2 GB a minute when I stopped it. One 25 MB variant did get a blob in an earlier title run here: DXIL written 00:05, blob 00:54.

4. In the title. A preload starts ActivateRays 4.4 – 6.5 s into the run (each of 6 runs that logged it), and it holds BIG_COMPILES (one slot) for the rest of the run. In 10 runs of 300 s, the last compute pipeline finished at 61 – 74 s, and none after it; in the 7 with preloads on, every one after 60 s took 122 ms or less (blobs from earlier runs). In thread dumps from 95 s to 170 s, all four xcl-pso-compute-* threads and xcl-pso-pre-1..3 wait at BIG_COMPILES.acquire() and xcl-pso-pre-0 is in nvgpucomp64 every time. Binds of 0.3 – 1 MB programs time out behind it (#533's 4 s), about 30 % of dispatches skipped. Turning preloads off (XCL_PSO_PRELOAD=0, 3 runs) or XCL_DXC_THREADS=4 (3 runs) did not change that: compute pipelines still stopped finishing at 63 – 74 s.

5. With the programs of 4 MB+ in a queue of their own (#1278), three runs against three without, alternating on one build: big compiles finished after 60 s in two of three (892 KB at 99 s, 1 001 KB at 146 s), against none in three. Those runs ended at 130 – 174 s when the window was closed, so they say nothing yet about how long the title lasts. The first cutscene is subtitles over a black screen either way.

6. #1279 makes the --pipelines pass build programs of 4 MB+ last, one at a time, named. On the 29 screen-probe records extracted with xcl rpf --extract CS_ScreenProbes_, the 26 others were made in 25 s, then the three were named and the first given to the driver. On the whole pack it stayed mostly at 2 – 3 GB (peak 8.9 GB) over 22 minutes but had not reached record 22 616 when I stopped it: the 0.3 – 1 MB programs before it go at about 2 a minute here (NVIDIA's heap lock, as reported above).

Not tested: AMD; how long the title runs with #1278; how long the three take to finish on this driver; #1278 together with #820 or #1007.

AI use: Claude Code (Claude Opus 5.5) ran the builds, precompiles, title runs and analysis on this machine and drafted this comment. Program names, sizes and counts only; no game data.

**@⁠bstillbstill** on GitHub · 2026-11-24 14:13 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7134027525) **RTX 3090 Ti: where `--precompile --pipelines` stops (right after record 22 600) and what holds up the title's compute pipelines in the world load are the same three screen-probe programs, 13 – 29 MB of DXIL each. #1278 and #1279 (drafts) keep them from blocking everything else.** **Setup:** RTX 3090 Ti (driver 32.0.16.2101, 32-lane waves), i9-13900K, 32 GB RAM (commit limit 51.9 GB), Windows 11 Pro 26300, DXC 1.9.2609.5, release builds, retail 1.0.2.1. Sizes on `main` `47efa2e` (+ #680 for the heap form); title runs on a local `6bac4b4` + #533 + #433 with diagnostic logging. **1. The programs.** A local log in the precompile named every compute program of 2 MB of DXIL or more. In the pack they are three records in a row, right where the passes reported above and on #744 stop: | record | program | DXIL | #680 heap form | no wave64 split | |---|---|---|---|---| | 22 616 | `indirect_diffuse_lighting:CS_ScreenProbes_ActivateProbes_9083c094_Wrapped` | 29 052 KB | 28 296 KB | 22 815 KB | | 22 617 | `…CS_ScreenProbes_ActivateProbesTarget_534f271f_Wrapped` | 28 940 KB | 28 192 KB | – | | 22 618 | `…CS_ScreenProbes_ActivateRays_d60186e6_Wrapped` | 13 774 KB | 12 984 KB | 13 774 KB | The other 31 `CS_ScreenProbes_*` programs are 3 – 480 KB. ActivateRays with one memory window: 11 700 KB. Translation and DXC took 484 s for ActivateProbesTarget. **2. Why they are that big.** The console program is unrolled: ActivateProbes is 88 863 instructions, about 3 300 copies of one neighbour test (bounds check, index, `buffer_load_format_x` through the same descriptor, bit test, mask bit) under 9 902 `s_cbranch_execz`. XCL translates it structured (13 308 `if`s, not the pc chain) into 31 MB of HLSL; the per-load format decode is about 19 % of it. No switch above brings it near a normal size. **3. The driver.** NVIDIA alone (one thread, no title running) had not built ActivateRays after 839 s: 4.6 GB and growing about 0.2 GB a minute when I stopped it. One 25 MB variant did get a blob in an earlier title run here: DXIL written 00:05, blob 00:54. **4. In the title.** A preload starts ActivateRays 4.4 – 6.5 s into the run (each of 6 runs that logged it), and it holds `BIG_COMPILES` (one slot) for the rest of the run. In 10 runs of 300 s, the last compute pipeline finished at 61 – 74 s, and none after it; in the 7 with preloads on, every one after 60 s took 122 ms or less (blobs from earlier runs). In thread dumps from 95 s to 170 s, all four `xcl-pso-compute-*` threads and `xcl-pso-pre-1..3` wait at `BIG_COMPILES.acquire()` and `xcl-pso-pre-0` is in `nvgpucomp64` every time. Binds of 0.3 – 1 MB programs time out behind it (#533's 4 s), about 30 % of dispatches skipped. Turning preloads off (`XCL_PSO_PRELOAD=0`, 3 runs) or `XCL_DXC_THREADS=4` (3 runs) did not change that: compute pipelines still stopped finishing at 63 – 74 s. **5. With the programs of 4 MB+ in a queue of their own (#1278),** three runs against three without, alternating on one build: big compiles finished after 60 s in two of three (892 KB at 99 s, 1 001 KB at 146 s), against none in three. Those runs ended at 130 – 174 s when the window was closed, so they say nothing yet about how long the title lasts. The first cutscene is subtitles over a black screen either way. **6. #1279** makes the `--pipelines` pass build programs of 4 MB+ last, one at a time, named. On the 29 screen-probe records extracted with `xcl rpf --extract CS_ScreenProbes_`, the 26 others were made in 25 s, then the three were named and the first given to the driver. On the whole pack it stayed mostly at 2 – 3 GB (peak 8.9 GB) over 22 minutes but had not reached record 22 616 when I stopped it: the 0.3 – 1 MB programs before it go at about 2 a minute here (NVIDIA's heap lock, as reported above). **Not tested:** AMD; how long the title runs with #1278; how long the three take to finish on this driver; #1278 together with #820 or #1007. **AI use:** Claude Code (Claude Opus 5.5) ran the builds, precompiles, title runs and analysis on this machine and drafted this comment. Program names, sizes and counts only; no game data.
Author
Owner

@⁠hyperland956-lgtm on GitHub · 2026-11-24 14:15 UTC · original

Quick static-analysis note on ID3D12GraphicsCommandList10::#101 (+0x50a6657 / vtable +0x328):

Inspecting the two call sites right before +0x50a6657 and +0x50a6670, the title calls [rax+0x328] with (this, edx = 2, r8d = 1) and (this, edx = 2, r8d = 0) — an enum + boolean toggle, not a GPU address or progress label. In the newer command-list layout (+2 slot shift), slot 101 corresponds to the benign driver-hint slot (older slot 99), so #101 is unlikely to be the cause of the "GPU Loc Sig" watchdog stall.

**@⁠hyperland956-lgtm** on GitHub · 2026-11-24 14:15 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7134097956) Quick static-analysis note on `ID3D12GraphicsCommandList10::#101` (`+0x50a6657` / vtable `+0x328`): Inspecting the two call sites right before `+0x50a6657` and `+0x50a6670`, the title calls `[rax+0x328]` with `(this, edx = 2, r8d = 1)` and `(this, edx = 2, r8d = 0)` — an enum + boolean toggle, not a GPU address or progress label. In the newer command-list layout (+2 slot shift), slot 101 corresponds to the benign driver-hint slot (older slot 99), so `#101` is unlikely to be the cause of the `"GPU Loc Sig"` watchdog stall.
Author
Owner

@⁠Joshua-Lake01 on GitHub · 2026-11-24 14:17 UTC · original

@⁠chazi123 thanks for the patch. Here is the RTX 5080 cross-check you asked for.

Base: main 47efa2e + #751 + the stack from my earlier report, minus #630/#724. Added a mirror equivalent to yours, behind an env switch: after the queue fence it writes coherent-window WriteBufferImmediate values from the CPU, and counts whether each one was already visible.

Defect (2) is live on Windows/NVIDIA.

  • 1024 coherent-window immediate writes were not visible to the CPU after their fence (latest 0x7d2b0000c = [fb6d2b63], memory held 0x29a5ee15).
  • Another 1024 were visible.
  • fb6d2b63 is the same value as GFX Queue: fb6d2b63 in the title's own crash context, so this looks like the location "GPU Loc Sig" watches.

The mirror alone does not move the stop for me (still around 2:31). With #1189's stall snapshot:

  • every queue reads submitted == completed;
  • the title has stopped submitting;
  • 8–16 compute PSOs read job taken and not complete, and the same keys show up in every run (e.g. 5b879e6555bda21b, 110df5460e25a829, 94aa6a7b861f8731).

So for me the producing work is late, not invisible. Big compute programs that NVIDIA's compiler barely finishes, plus XCL_PSO_WAIT_MS skips, leave the signal unwritten.

Two questions that would help:

  1. In your #759+#531+#532 config that gets furthest, does the world actually render after the intro starts, or does it present only the loading/subtitle layer?
  2. Do you see the same never-finishing compute builds? Keys from #1189's stall build: line would let me check whether it's the same handful of programs.

AI use: Claude Code (Claude Opus 5.5) drove the runs and wrote this; the numbers are from the run logs.

**@⁠Joshua-Lake01** on GitHub · 2026-11-24 14:17 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7134144311) @⁠chazi123 thanks for the patch. Here is the RTX 5080 cross-check you asked for. **Base:** main `47efa2e` + #751 + the stack from my earlier report, minus #630/#724. Added a mirror equivalent to yours, behind an env switch: after the queue fence it writes coherent-window `WriteBufferImmediate` values from the CPU, and counts whether each one was already visible. **Defect (2) is live on Windows/NVIDIA.** - `1024 coherent-window immediate writes were not visible to the CPU after their fence (latest 0x7d2b0000c = [fb6d2b63], memory held 0x29a5ee15)`. - Another 1024 were visible. - `fb6d2b63` is the same value as `GFX Queue: fb6d2b63` in the title's own crash context, so this looks like the location "GPU Loc Sig" watches. **The mirror alone does not move the stop for me (still around 2:31).** With #1189's stall snapshot: - every queue reads `submitted == completed`; - the title has stopped submitting; - 8–16 compute PSOs read `job taken and not complete`, and the same keys show up in every run (e.g. `5b879e6555bda21b`, `110df5460e25a829`, `94aa6a7b861f8731`). So for me the producing work is late, not invisible. Big compute programs that NVIDIA's compiler barely finishes, plus `XCL_PSO_WAIT_MS` skips, leave the signal unwritten. Two questions that would help: 1. In your #759+#531+#532 config that gets furthest, does the world actually render after the intro starts, or does it present only the loading/subtitle layer? 2. Do you see the same never-finishing compute builds? Keys from #1189's `stall build:` line would let me check whether it's the same handful of programs. AI use: Claude Code (Claude Opus 5.5) drove the runs and wrote this; the numbers are from the run logs.
Author
Owner

@⁠ArturoWolff on GitHub · 2026-11-24 14:17 UTC · original · edited 2026-11-24 14:18 UTC

A way to separate the Linux RTX 4060 runs from the queue-stall reports above: two retained per-title xcl.log files reach the same first null write at +0x23cf683, but neither contains the Write64 cycle-break warning or the GPU queue.Wait timeout warning before it. The crash offset alone doesn't identify the queue path.

Retail 1.0.2.1, Series X profile, Linux / patched vkd3d-proton, XCL base 47efa2ecea0a12934719ae69b81930cf02a4b1c3. These are two different configurations, not timing A/B runs:

Run First 1,024 dispatches First title fault Logged cycle breaks / queue.Wait timeouts before fault
Stock binary, advertised title memory reduced to 8,192 MiB (see #320) 0 skipped 148.270 s 0 / 0
Same base with private logging around sparse heap growth 0 skipped 144.638 s 0 / 0

I checked the literal warning text against list_x.rs at that revision (lines 1441 and 1658). Neither log contains the ListX #101 first-call marker either. The 1,024-dispatch sample is an early milestone, not a claim that no later bind was skipped. These are absent log lines, not a measurement of GPU completion or proof that no wait occurred. In particular these runs should not be counted as a reproduction of the q4 chain, or as evidence against it on systems where it was actually logged. No visible gameplay in either run.

AI use: Hermes Agent, gpt-6.2-astra, checked the archived logs against the pinned source and wrote this note. No new title launch.

Positive checkpoint for comparing loading screens: In six archived Series X runs on this base (including the reduced-budget run above), the final burst of first-seen shader records had exactly the same 10,463 (stage, hash) pairs: 5,221 PS, 5,116 AS and 126 VS. The burst started at 54.709–75.368 s across runs. I sorted records by timestamp, separated the last burst at a gap in shader records, and checked that gap cutoffs of 3, 4, 5 and 6 seconds all give the same membership. This is useful even when the picture stays on loading art: gpu::shader::capture records submitted blobs after deduplication, not completed pipeline builds or rendered draws. No claim that these are the exact shaders in the Windows report or that the world rendered.

**@⁠ArturoWolff** on GitHub · 2026-11-24 14:17 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7134127908) · edited 2026-11-24 14:18 UTC **A way to separate the Linux RTX 4060 runs from the queue-stall reports above:** two retained per-title `xcl.log` files reach the same first null write at `+0x23cf683`, but neither contains the Write64 cycle-break warning or the GPU `queue.Wait` timeout warning before it. The crash offset alone doesn't identify the queue path. Retail `1.0.2.1`, Series X profile, Linux / patched vkd3d-proton, XCL base `47efa2ecea0a12934719ae69b81930cf02a4b1c3`. These are two different configurations, not timing A/B runs: | Run | First 1,024 dispatches | First title fault | Logged cycle breaks / queue.Wait timeouts before fault | |---|---:|---:|---:| | Stock binary, advertised title memory reduced to 8,192 MiB (see #320) | 0 skipped | 148.270 s | 0 / 0 | | Same base with private logging around sparse heap growth | 0 skipped | 144.638 s | 0 / 0 | I checked the literal warning text against `list_x.rs` at that revision (lines 1441 and 1658). Neither log contains the ListX `#101` first-call marker either. The 1,024-dispatch sample is an early milestone, not a claim that no later bind was skipped. These are **absent log lines**, not a measurement of GPU completion or proof that no wait occurred. In particular these runs should not be counted as a reproduction of the q4 chain, or as evidence against it on systems where it was actually logged. No visible gameplay in either run. AI use: Hermes Agent, gpt-6.2-astra, checked the archived logs against the pinned source and wrote this note. No new title launch. **Positive checkpoint for comparing loading screens:** In six archived Series X runs on this base (including the reduced-budget run above), the final burst of first-seen shader records had exactly the same 10,463 (stage, hash) pairs: 5,221 PS, 5,116 AS and 126 VS. The burst started at 54.709–75.368 s across runs. I sorted records by timestamp, separated the last burst at a gap in shader records, and checked that gap cutoffs of 3, 4, 5 and 6 seconds all give the same membership. This is useful even when the picture stays on loading art: `gpu::shader::capture` records submitted blobs after deduplication, not completed pipeline builds or rendered draws. No claim that these are the exact shaders in the Windows report or that the world rendered.
Author
Owner

@⁠upipibi on GitHub · 2026-11-24 14:19 UTC · original

For the "loops running on unwritten data" reading: #1284 adds XCL_LOOP_BUDGET=<n>, the per-lane iteration cap of LOOP_GUARD (default 65 536, unchanged). With XCL_PSO_WAIT_MS=50 XCL_LOOP_BUDGET=4096, the 100 % phase should get about 16 times shorter if those loops are what keeps the compute queue busy. If it doesn't change, something else is. The first run with a new value recompiles the shaders it meets (translations with the variable set are not cached).

AI-assisted (Claude Code).

**@⁠upipibi** on GitHub · 2026-11-24 14:19 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7134191853) For the "loops running on unwritten data" reading: #1284 adds `XCL_LOOP_BUDGET=<n>`, the per-lane iteration cap of `LOOP_GUARD` (default 65 536, unchanged). With `XCL_PSO_WAIT_MS=50 XCL_LOOP_BUDGET=4096`, the 100 % phase should get about 16 times shorter if those loops are what keeps the compute queue busy. If it doesn't change, something else is. The first run with a new value recompiles the shaders it meets (translations with the variable set are not cached). AI-assisted (Claude Code).
Author
Owner

@⁠ushiiiro on GitHub · 2026-11-24 14:19 UTC · original

RTX 5080 reproduction on 930e8b4 — world does not render, GPU Loc Sig 7333478d

I tested GTA VI Xbox Series 1.0.2.1 (game_scarlett_master.exe, Title ID 7952987A). The title launches, but I did not see the 3D world render before the game crashed.

Setup

  • XCL 0.1.0, commit 930e8b4, release build
  • CPU: AMD Ryzen 9 9950X3D
  • NVIDIA GeForce RTX 5080 (15,977 MiB VRAM reported by XCL), driver 32.0.16.2101
  • DXC 1.9.2602.17 (21d28f72), real D3D12 backend
  • Launch command: .\target\release\xcl.exe run "<game folder>"

What the logs show

  • The log reports around 30 FPS for much of the run, dropping to 10 FPS over the last 300 presents at 162.5 seconds. The report recorded 3,614 presents in total. No frame dump was captured for this run.
  • DirectStorage recorded 2,388 BCPack requests unpacked, zero failed, and zero refusals. The rendering problem still occurred.
  • d3d12.background_pipelines was [59, 0, 58704]. The report also lists 40 translation-error entries for mesh pipelines refused because their mesh shader was in the amplification-shader slot. These are observations from the logs. The cause of the stall is still unclear.

Crash at 194.9 seconds

0xC0000005 at game_scarlett_master.exe+0x23cf683 (write at 0x0)
Stack: +0x4e4ba89, +0x2215c35, +0x71b9a20, +0x2215eca
GPU Loc Sig: 7333478d

I’ve attached report.json and xcl.log from this run. If there’s a specific commit or diagnostic flag you’d like tested on an RTX 5080, I can rerun it and post the results here.

AI assistance: ChatGPT summarized my logs and drafted this comment. The test was run on my PC.

report.json
xcl.log

**@⁠ushiiiro** on GitHub · 2026-11-24 14:19 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7134195809) ### RTX 5080 reproduction on `930e8b4` — world does not render, `GPU Loc Sig` `7333478d` I tested GTA VI Xbox Series 1.0.2.1 (`game_scarlett_master.exe`, Title ID `7952987A`). The title launches, but I did not see the 3D world render before the game crashed. **Setup** - XCL `0.1.0`, commit `930e8b4`, release build - CPU: AMD Ryzen 9 9950X3D - NVIDIA GeForce RTX 5080 (15,977 MiB VRAM reported by XCL), driver `32.0.16.2101` - DXC `1.9.2602.17` (`21d28f72`), real D3D12 backend - Launch command: `.\target\release\xcl.exe run "<game folder>"` **What the logs show** - The log reports around 30 FPS for much of the run, dropping to 10 FPS over the last 300 presents at 162.5 seconds. The report recorded 3,614 presents in total. No frame dump was captured for this run. - DirectStorage recorded **2,388 BCPack requests unpacked, zero failed, and zero refusals**. The rendering problem still occurred. - `d3d12.background_pipelines` was `[59, 0, 58704]`. The report also lists 40 translation-error entries for mesh pipelines refused because their mesh shader was in the amplification-shader slot. These are observations from the logs. The cause of the stall is still unclear. **Crash at 194.9 seconds** ```text 0xC0000005 at game_scarlett_master.exe+0x23cf683 (write at 0x0) Stack: +0x4e4ba89, +0x2215c35, +0x71b9a20, +0x2215eca GPU Loc Sig: 7333478d ``` I’ve attached `report.json` and `xcl.log` from this run. If there’s a specific commit or diagnostic flag you’d like tested on an RTX 5080, I can rerun it and post the results here. AI assistance: ChatGPT summarized my logs and drafted this comment. The test was run on my PC. [report.json](https://github.com/user-attachments/files/35335790/report.json) [xcl.log](https://github.com/user-attachments/files/35335791/xcl.log)
Author
Owner

@⁠imnicho on GitHub · 2026-11-24 11:54 UTC · original · edited 2026-11-24 14:21 UTC

Update (14:25 UTC): opened as #1288, rebased on main b8b1f49. Three rounds before / after on that main + #684: without the rule the title ended itself 31.6 to 73.6 s after its world's set-up began, in every run; with it the title was still running at the 330 s limit in every run, 0 dispatches skipped, no device removal. Thanks @⁠sander110419 for the Wine run of the plan and @⁠jessenic and @⁠S1m0ne1997 for the control runs; they are linked in the PR.


Plan: the title's Sleep does not count the time XCL holds one of its threads for a pipeline build – a way to keep the title alive without skipping dispatches and without touching its watchdog.

The stall check decoded above (@⁠13hourstilliland, @⁠tadymila) ticks with Sleep(1000) and ends the process after 30 ticks without the main thread's heartbeat. On the console that thread is never held in a bind while a driver compiles; here it is, for as long as the build takes. Proposal, two files:

  • pso_async: says whether a title thread is held in resolve_wait for a pipeline still being built;
  • kernelx: takes over the title's Sleep (it reaches XCL through api-ms-win-core-synch): it returns after ms of time in which no title thread was so held.

Nothing of the title is patched, no dispatch is skipped, and XCL_PSO_WAIT_MS stays what it is (unset: binds wait).

First measurement (RTX 5080, driver 610.47, i7-7700K, 16 GB RAM; a local stack on main 09940bb that takes this title to its world set-up – #684 among others – with the rule behind a switch; the same executable and caches, binds waiting as on main):

the title ends
rule off the null write at +0x23cf683, 32.0 s after the first #101 call
rule on not at all in the run's 900 s (764 s after the first #101 call); 0 dispatches skipped, no device removal

With the rule on the title is slow, not dead: it builds its pipelines one after another in the bind (506 compute pipelines in that run, 109 of them compiled there, 9 of those taking 30 s or more). #889, #1007 and #680 are about making that shorter; this only keeps the title alive meanwhile, with nothing left unwritten by a skipped pass (#675).

Not in it: SleepEx, waits with a timeout, and the title's clocks – the same check's other route (a scope older than 300 s) reads a clock and did not come in that run.

I will open it as a PR with tests and three rounds before / after, unless someone sees a reason not to take the title's Sleep.

AI use: Claude Code with Claude Fable 5.2 wrote the experiment and this note; the two runs are from the machine named.

**@⁠imnicho** on GitHub · 2026-11-24 11:54 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7130709574) · edited 2026-11-24 14:21 UTC **Update (14:25 UTC): opened as #1288**, rebased on `main` `b8b1f49`. Three rounds before / after on that `main` + #684: without the rule the title ended itself 31.6 to 73.6 s after its world's set-up began, in every run; with it the title was still running at the 330 s limit in every run, 0 dispatches skipped, no device removal. Thanks @⁠sander110419 for the Wine run of the plan and @⁠jessenic and @⁠S1m0ne1997 for the control runs; they are linked in the PR. --- **Plan: the title's `Sleep` does not count the time XCL holds one of its threads for a pipeline build** – a way to keep the title alive without skipping dispatches and without touching its watchdog. The stall check decoded above (@⁠13hourstilliland, @⁠tadymila) ticks with `Sleep(1000)` and ends the process after 30 ticks without the main thread's heartbeat. On the console that thread is never held in a bind while a driver compiles; here it is, for as long as the build takes. Proposal, two files: - `pso_async`: says whether a title thread is held in `resolve_wait` for a pipeline still being built; - `kernelx`: takes over the title's `Sleep` (it reaches XCL through `api-ms-win-core-synch`): it returns after `ms` of time in which no title thread was so held. Nothing of the title is patched, no dispatch is skipped, and `XCL_PSO_WAIT_MS` stays what it is (unset: binds wait). **First measurement** (RTX 5080, driver 610.47, i7-7700K, 16 GB RAM; a local stack on `main` `09940bb` that takes this title to its world set-up – #684 among others – with the rule behind a switch; the same executable and caches, binds waiting as on `main`): | | the title ends | |---|---| | rule off | the null write at `+0x23cf683`, 32.0 s after the first `#101` call | | rule on | not at all in the run's 900 s (764 s after the first `#101` call); 0 dispatches skipped, no device removal | With the rule on the title is slow, not dead: it builds its pipelines one after another in the bind (506 compute pipelines in that run, 109 of them compiled there, 9 of those taking 30 s or more). #889, #1007 and #680 are about making that shorter; this only keeps the title alive meanwhile, with nothing left unwritten by a skipped pass (#675). **Not in it:** `SleepEx`, waits with a timeout, and the title's clocks – the same check's other route (a scope older than 300 s) reads a clock and did not come in that run. I will open it as a PR with tests and three rounds before / after, unless someone sees a reason not to take the title's `Sleep`. AI use: Claude Code with Claude Fable 5.2 wrote the experiment and this note; the two runs are from the machine named.
Author
Owner

@⁠S1m0ne1997 on GitHub · 2026-11-24 14:23 UTC · original

Coordination note, to avoid duplicate runs: what I'm testing next on the RTX 4090 (Windows, driver 621.24).

Tree: main 930e8b4 (with #744 and 25c6f7e / 9a272d4) + #688 + #759 (with #757/#758) + #820 + #684, plus @⁠imnicho's #1288 and @⁠bstillbstill's #1278 on top. No XCL_PSO_WAIT_MS, so no dispatch is skipped. Pipelines prepared beforehand from the journal with xcl pipelines (all 58 752 done once on 47efa2e; the compute programs b8b1f49 changed get rebuilt now).

Why this combination, from my last run (47efa2e + the same stack, no budget, cache warm): 0 skipped binds, 0 GPU queue.Wait timeouts, hundreds of 0.5 – 2 MB compute programs from driver blobs, and still the heartbeat at +40 s after #101. A title thread waited in execute_indirect → resolve_wait for one pipeline while the four build-ahead workers were busy in the driver. 25c6f7e targets exactly that wait, and #1288 / #1278 cover what is left of it.

If someone already ran 930e8b4 with #1288, please say so and I'll compare rather than repeat. @⁠sander110419, if your local Sleep rule differs from #1288, a diff would help me test the same thing.

AI use: Claude Code with Claude Opus 5.5 wrote and posted this at my request.

**@⁠S1m0ne1997** on GitHub · 2026-11-24 14:23 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7134294483) **Coordination note, to avoid duplicate runs: what I'm testing next on the RTX 4090 (Windows, driver 621.24).** Tree: `main` `930e8b4` (with #744 and `25c6f7e` / `9a272d4`) + #688 + #759 (with #757/#758) + #820 + #684, plus @⁠imnicho's #1288 and @⁠bstillbstill's #1278 on top. No `XCL_PSO_WAIT_MS`, so no dispatch is skipped. Pipelines prepared beforehand from the journal with `xcl pipelines` (all 58 752 done once on `47efa2e`; the compute programs `b8b1f49` changed get rebuilt now). Why this combination, from my last run (`47efa2e` + the same stack, no budget, cache warm): 0 skipped binds, 0 GPU `queue.Wait` timeouts, hundreds of 0.5 – 2 MB compute programs from driver blobs, and still the heartbeat at +40 s after `#101`. A title thread waited in `execute_indirect` → `resolve_wait` for one pipeline while the four build-ahead workers were busy in the driver. `25c6f7e` targets exactly that wait, and #1288 / #1278 cover what is left of it. If someone already ran `930e8b4` with #1288, please say so and I'll compare rather than repeat. @⁠sander110419, if your local `Sleep` rule differs from #1288, a diff would help me test the same thing. *AI use: Claude Code with Claude Opus 5.5 wrote and posted this at my request.*
Author
Owner

@⁠VolenNakov on GitHub · 2026-11-24 14:34 UTC · original

Heads-up for NVIDIA runs on the latest main: with b8b1f49 the title never reached the world load here (RTX 4060 Ti) - the host's commit grew ~1 GB/s until XCL ran out of memory at ~120-150 s. Reverting only that commit brought back the world load (#101 at 112.9 s) with commit flat at ~31 GB. Details and the A/B in #1307.

Also a correction to my earlier comment here: q3 was not blocked - as @⁠larelgit and @⁠oeirughrepuiohg showed, it was spinning in the split-wave64 loop after skipped dispatches. Without XCL_PSO_WAIT_MS my runs have 0 skips and 0 queue timeouts too.

**@⁠VolenNakov** on GitHub · 2026-11-24 14:34 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7134590167) Heads-up for NVIDIA runs on the latest `main`: with b8b1f49 the title never reached the world load here (RTX 4060 Ti) - the host's commit grew ~1 GB/s until XCL ran out of memory at ~120-150 s. Reverting only that commit brought back the world load (`#101` at 112.9 s) with commit flat at ~31 GB. Details and the A/B in #1307. Also a correction to my earlier comment here: q3 was not blocked - as @⁠larelgit and @⁠oeirughrepuiohg showed, it was spinning in the split-wave64 loop after skipped dispatches. Without `XCL_PSO_WAIT_MS` my runs have 0 skips and 0 queue timeouts too.
Author
Owner

@⁠ettehn on GitHub · 2026-11-24 14:36 UTC · original

Native Windows, RTX 5070 Ti Laptop (12 GB), driver 621.24, DXC 1.8.2502.11, release 930e8b4, default bind waits. In two baseline runs the watchdog fired 28.7 s and 28.5 s after the last 2 s sample with a present. On the first run the spinner disappeared and the screen went black.

In a third run with logging around dxc::compile_cached, the last sample with a present ended at 78.046 s and the game faulted at +0x23cf683 at 108.624 s. With the matching release PDB, three threads (3692, 6980, 11592) were in execute_indirect → pso_async::resolve_wait → Condvar::wait. Two other threads were in nvgpucomp64.dll at the fault. Their last logged compute shader hashes were a74706fb8f96ade9 (thread 480, DXC/cache call returned at 101.058 s) and 44d832b4bdbd5ef8 (thread 28136, returned at 104.195 s). Both used 4 memory windows and split wave64.

a74706fb8f96ade9 matches GpuParticleUpdate:CS_UpdateParticles_cbe24474_Wrapped in the pack. Precompiling that single record with --pipelines --windows 4 --split 1 produced one GPU pipeline in 15.1 s total, zero refusals, zero driver-cache loads. We still need the pending PSO identity at the three binds to tell whether any of them waited for either shader. These hashes identify shader blobs and may differ from the stall-build keys in #1189.

AI-assisted with OpenAI Codex (GPT-6.2 Astra).

**@⁠ettehn** on GitHub · 2026-11-24 14:36 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7134663951) Native Windows, RTX 5070 Ti Laptop (12 GB), driver 621.24, DXC 1.8.2502.11, release `930e8b4`, default bind waits. In two baseline runs the watchdog fired 28.7 s and 28.5 s after the last 2 s sample with a present. On the first run the spinner disappeared and the screen went black. In a third run with logging around `dxc::compile_cached`, the last sample with a present ended at 78.046 s and the game faulted at `+0x23cf683` at 108.624 s. With the matching release PDB, three threads (3692, 6980, 11592) were in `execute_indirect → pso_async::resolve_wait → Condvar::wait`. Two other threads were in `nvgpucomp64.dll` at the fault. Their last logged compute shader hashes were `a74706fb8f96ade9` (thread 480, DXC/cache call returned at 101.058 s) and `44d832b4bdbd5ef8` (thread 28136, returned at 104.195 s). Both used 4 memory windows and split wave64. `a74706fb8f96ade9` matches `GpuParticleUpdate:CS_UpdateParticles_cbe24474_Wrapped` in the pack. Precompiling that single record with `--pipelines --windows 4 --split 1` produced one GPU pipeline in 15.1 s total, zero refusals, zero driver-cache loads. We still need the pending PSO identity at the three binds to tell whether any of them waited for either shader. These hashes identify shader blobs and may differ from the stall-build keys in #1189. AI-assisted with OpenAI Codex (GPT-6.2 Astra).
Author
Owner

@⁠CowboyBingus on GitHub · 2026-11-24 14:46 UTC · original

Following up on my comment above: the compact form is up as two stacked drafts.

  • #1315 adds the form and its GPU A/B tests against translate. Nothing calls it yet.
  • #1316 routes compute programs to it behind XCL_COMPACT_CS (default auto).

Measured on an RTX 5070 Ti (driver 621.24) for 56c0cd3b82a00c6e, with 4 memory windows, split wave64, no cached blob, from a new exe:

translate translate_compact
HLSL 31,028,146 B 723,453 B
DXIL 29,750,144 B 1,053,264 B
DXC 138.6 s (-O0) 12.5 s
CreateComputePipelineState killed at a 600 s cap 9.7 s

95cc13288a27a96e (ActivateRays) needs a 9,975-word table, which is over the form's 8,192-word cap, so it keeps translate.

Not tested: AMD, Linux / Wine, wave64 hardware.

AI use: Claude Code (Claude Opus 5.5) ran the measurements and wrote this; the runs were on my machine.

**@⁠CowboyBingus** on GitHub · 2026-11-24 14:46 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7134916061) Following up on my [comment above](https://github.com/ivall/xcl/issues/505#issuecomment-7133103125): the compact form is up as two stacked drafts. - #1315 adds the form and its GPU A/B tests against `translate`. Nothing calls it yet. - #1316 routes compute programs to it behind `XCL_COMPACT_CS` (default `auto`). Measured on an RTX 5070 Ti (driver 621.24) for `56c0cd3b82a00c6e`, with 4 memory windows, split wave64, no cached blob, from a new exe: | | `translate` | `translate_compact` | |---|---|---| | HLSL | 31,028,146 B | 723,453 B | | DXIL | 29,750,144 B | 1,053,264 B | | DXC | 138.6 s (`-O0`) | 12.5 s | | `CreateComputePipelineState` | killed at a 600 s cap | 9.7 s | `95cc13288a27a96e` (`ActivateRays`) needs a 9,975-word table, which is over the form's 8,192-word cap, so it keeps `translate`. Not tested: AMD, Linux / Wine, wave64 hardware. AI use: Claude Code (Claude Opus 5.5) ran the measurements and wrote this; the runs were on my machine.
Author
Owner

@⁠cafeoh on GitHub · 2026-11-24 14:47 UTC · original

@⁠upipibi A data point for the XCL_LOOP_BUDGET question, on 32-lane NVIDIA. I measured the time from the first two-pass ExecuteIndirect at world start to the device removal (0x887a0006), not GPU busy %.

Tree Budget World start → device removed
A 65 536 (default) 20.6 s
A 256 no removal in 77 s (then the run ended); frames flat, 27 queue.Wait timeouts
A + #1252 + #1182 65 536 17.8 s
A + #1252 + #1182 256 29.9 s

So even a budget 256 times lower only moved the stop about 1.7x later once #1252 was in. On this tree the loops are part of it, but not what keeps the queue busy. One run per row, all with XCL_PSO_WAIT_MS=50.

Setup: RTX 2080 Ti 11 GB (Turing), driver 617.14, Windows 10 19045, release. Tree A: a local stack, not main. It has #724 + #680 + #822 (XCL_UMA_WINDOWS=16) + #979 + #1053, the two-pass IO_UMA_BASE_HI line, and a local change that moves GPU-view addresses onto their CPU view.
Not tested: budget 4096; main or your tree; repeat runs. The runs with a lower budget also recompiled every shader, so their loads were longer. That's why I timed from world start.
AI use: Claude Code (Claude Opus 5.5) ran the runs and drafted this; I checked it.

**@⁠cafeoh** on GitHub · 2026-11-24 14:47 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7134956589) @⁠upipibi A data point for the `XCL_LOOP_BUDGET` question, on 32-lane NVIDIA. I measured the time from the first two-pass `ExecuteIndirect` at world start to the device removal (0x887a0006), not GPU busy %. | Tree | Budget | World start → device removed | |---|---|---| | A | 65 536 (default) | 20.6 s | | A | 256 | no removal in 77 s (then the run ended); frames flat, 27 `queue.Wait` timeouts | | A + #1252 + #1182 | 65 536 | 17.8 s | | A + #1252 + #1182 | 256 | 29.9 s | So even a budget 256 times lower only moved the stop about 1.7x later once #1252 was in. On this tree the loops are part of it, but not what keeps the queue busy. One run per row, all with `XCL_PSO_WAIT_MS=50`. **Setup:** RTX 2080 Ti 11 GB (Turing), driver 617.14, Windows 10 19045, release. Tree A: a local stack, not `main`. It has #724 + #680 + #822 (`XCL_UMA_WINDOWS=16`) + #979 + #1053, the two-pass `IO_UMA_BASE_HI` line, and a local change that moves GPU-view addresses onto their CPU view. **Not tested:** budget 4096; `main` or your tree; repeat runs. The runs with a lower budget also recompiled every shader, so their loads were longer. That's why I timed from world start. **AI use:** Claude Code (Claude Opus 5.5) ran the runs and drafted this; I checked it.
Author
Owner

@⁠lucsoft on GitHub · 2026-11-24 14:53 UTC · original

@⁠DecayingEagle, a second RDNA3 card hits your gfxhub fault at the same GPU address, 0x0000c00100000000, and with #1288 in, that fault (not the watchdog) is what ends the world load here.

Setup: RX 7800 XT, Mesa 26.3.1 RADV, kernel 7.3.5, Wine 11.21 Staging, vkd3d-proton 3.1 (relaxed, dxil-spirv 53aac418). XCL main 930e8b4 with b8b1f49 reverted (#1307), plus #871's memory commit, #684, #688, #1288 and #1279. XCL_COHERENT_MB=1024, no XCL_PSO_WAIT_MS, warm DXIL cache (full --precompile) and RADV cache.

Run:

  • Menus and intro, then loading with BCPack unpacked (BC6H included). First #101 at 491.3 s.
  • No skipped draws or dispatches. #1288 kept the watchdog away: in the run before this one it logged a Sleep(1000) has paused 322 s while a bind waits for a pipeline being built before the OOM killer ended it (30 GB RAM; RADV builds one of the screen-probe programs at ~16 GB).
  • At 15:49:12, about 20 s after #101, the kernel logs:
    amdgpu: [gfxhub] page fault (src_id:0 ring:24 vmid:6 pasid:3981)
     Process main … thread vkd3d_queue
     in page starting at address 0x0000c00100000000 from client 10
     GCVM_L2_PROTECTION_FAULT_STATUS:0x00601031
     Faulty UTCL2 client ID: TCP (0x8)   MORE_FAULTS: 0x1   PERMISSION_FAULTS: 0x3   MAPPING_ERROR: 0x0   RW: 0x0
    
    That is a shader read (TCP) of a page with no valid mapping. Then the two Wait64BitValueX timeouts on the stuck counter, ring gfx_0.0.0 timeout, and 0x887a0005 at 519.3 s.
  • XCL's window 0 buffer in this run is at VA 0xffffc00180000000, so the fault is 2 GB below it. You saw the same address on a different setup, so it looks like a fixed spot in vkd3d-proton's VA range (its first range?) rather than something sized by the windows. My guess, not verified: a descriptor pointing at a released or never-backed resource, or a buffer freed while the GPU still reads it.

Next here: a run with RADV_DEBUG=hang (bo_history / addr_binding_report should say what was bound at 0xc00100000000 and when it went, and which draw or dispatch faulted). I'll post what it shows.

AI use: Claude Code (Claude Opus 5.5) ran the analysis and wrote this comment. The runs were real, on the hardware above.

**@⁠lucsoft** on GitHub · 2026-11-24 14:53 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7135108757) @⁠DecayingEagle, a second RDNA3 card hits **your gfxhub fault at the same GPU address, `0x0000c00100000000`**, and with #1288 in, that fault (not the watchdog) is what ends the world load here. **Setup:** RX 7800 XT, Mesa 26.3.1 RADV, kernel 7.3.5, Wine 11.21 Staging, vkd3d-proton 3.1 (relaxed, dxil-spirv `53aac418`). XCL `main` `930e8b4` with `b8b1f49` reverted (#1307), plus #871's memory commit, #684, #688, #1288 and #1279. `XCL_COHERENT_MB=1024`, **no `XCL_PSO_WAIT_MS`**, warm DXIL cache (full `--precompile`) and RADV cache. **Run:** - Menus and intro, then loading with BCPack unpacked (BC6H included). First `#101` at 491.3 s. - No skipped draws or dispatches. #1288 kept the watchdog away: in the run before this one it logged `a Sleep(1000) has paused 322 s while a bind waits for a pipeline being built` before the OOM killer ended it (30 GB RAM; RADV builds one of the screen-probe programs at ~16 GB). - At 15:49:12, about 20 s after `#101`, the kernel logs: ``` amdgpu: [gfxhub] page fault (src_id:0 ring:24 vmid:6 pasid:3981) Process main … thread vkd3d_queue in page starting at address 0x0000c00100000000 from client 10 GCVM_L2_PROTECTION_FAULT_STATUS:0x00601031 Faulty UTCL2 client ID: TCP (0x8) MORE_FAULTS: 0x1 PERMISSION_FAULTS: 0x3 MAPPING_ERROR: 0x0 RW: 0x0 ``` That is a shader read (TCP) of a page with no valid mapping. Then the two `Wait64BitValueX` timeouts on the stuck counter, `ring gfx_0.0.0 timeout`, and `0x887a0005` at 519.3 s. - XCL's window 0 buffer in this run is at VA `0xffffc00180000000`, so the fault is 2 GB below it. You saw the same address on a different setup, so it looks like a fixed spot in vkd3d-proton's VA range (its first range?) rather than something sized by the windows. My guess, **not verified**: a descriptor pointing at a released or never-backed resource, or a buffer freed while the GPU still reads it. **Next here:** a run with `RADV_DEBUG=hang` (`bo_history` / `addr_binding_report` should say what was bound at `0xc00100000000` and when it went, and which draw or dispatch faulted). I'll post what it shows. AI use: Claude Code (Claude Opus 5.5) ran the analysis and wrote this comment. The runs were real, on the hardware above.
Author
Owner

@⁠Aruku448 on GitHub · 2026-11-24 14:57 UTC · original

One more data point from an RX 7800 XT (16 GB) / Ryzen 7 5700X3D / 32 GB / Windows 11 box, xcl 930e8b4 (MSVC release, DXC 1.9.2607), title 1.0.2.1 (TitleID 7952987A), XCL_NETWORK=0, A pressed through XCL_PRESS_A_AT.

The world does draw — for about one 2-second window — and then the device is removed.

Two independent configurations, same shape:

config first interval with draws draws / 2 s dispatches / 2 s then
XCL_PSO_WAIT_MS=50, XCL_PSO_PRELOAD=0, warm driver cache 128 s 1,096 7,707 0x887a0006
XCL_PSO_WAIT_MS=50, #758+#898 journal, 10 threads 140 s 1,039 7,564 0x887a0006

So "no 3D" is not the accurate description here: the draw stream is real and healthy for one interval, and the next frames kill the device. My reading is the one @⁠Sr-0w wrote for #891 — a skipped dispatch leaves its output unwritten and a later pass reads it — rather than anything about presenting.

Every XCL_PSO_WAIT_MS value I tried, same title, same machine:

XCL_PSO_WAIT_MS preload outcome
unset on title's watchdog +0x23cf683 ("GPU Loc Sig") at 132 s
unset off title's watchdog +0x23cf683 at 132 s
50 on 0x887a0006 at 143 s
50 off, warm cache 1,096 draws / 7,707 dispatches at 128 s, then 0x887a0006
150 off, warm cache stall at 124 s (0 presents / 0 draws, 10 pipelines building)
200 on soft-lock at 126 s (0 presents / 0 draws)

Two side notes that may matter for this issue:

  • Video memory is no longer the problem on current main. Local VRAM peaked at 20,415 MB with 16,176 MiB installed on 47efa2e + #640 (XCL_PAGE_BUDGET_MB=8192, page budget: 3195 textures evicted), and the device was removed with 0x887a0006 at 144 s. On 930e8b4 the same run peaks at 14,221 MB with no budget at all — the copy-scratch budget (#993 / 392dc0c) removed that growth.
  • Breakpad does try to upload a ~37 MB minidump to submit.backtrace.io; XCL_NETWORK=0 stops it (WinHttpConnect fails (no network)), which is the behaviour I want — worth stating in the README.

BCPack is confirmed not the cause here either: bcpack_refused: {} and bcpack_unpacked BC1 1284 / BC5 108 / BC7 138 / BC6H 1, 0 failed.

**@⁠Aruku448** on GitHub · 2026-11-24 14:57 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7135237496) One more data point from an RX 7800 XT (16 GB) / Ryzen 7 5700X3D / 32 GB / Windows 11 box, xcl `930e8b4` (MSVC release, DXC 1.9.2607), title 1.0.2.1 (TitleID 7952987A), `XCL_NETWORK=0`, A pressed through `XCL_PRESS_A_AT`. **The world does draw — for about one 2-second window — and then the device is removed.** Two independent configurations, same shape: | config | first interval with draws | draws / 2 s | dispatches / 2 s | then | |---|---|---|---|---| | `XCL_PSO_WAIT_MS=50`, `XCL_PSO_PRELOAD=0`, warm driver cache | 128 s | 1,096 | 7,707 | `0x887a0006` | | `XCL_PSO_WAIT_MS=50`, #758+#898 journal, 10 threads | 140 s | 1,039 | 7,564 | `0x887a0006` | So "no 3D" is not the accurate description here: the draw stream is real and healthy for one interval, and the next frames kill the device. My reading is the one @⁠Sr-0w wrote for #891 — a skipped dispatch leaves its output unwritten and a later pass reads it — rather than anything about presenting. Every `XCL_PSO_WAIT_MS` value I tried, same title, same machine: | `XCL_PSO_WAIT_MS` | preload | outcome | |---|---|---| | unset | on | title's watchdog `+0x23cf683` ("GPU Loc Sig") at 132 s | | unset | off | title's watchdog `+0x23cf683` at 132 s | | 50 | on | `0x887a0006` at 143 s | | 50 | off, warm cache | 1,096 draws / 7,707 dispatches at 128 s, then `0x887a0006` | | 150 | off, warm cache | stall at 124 s (0 presents / 0 draws, 10 pipelines building) | | 200 | on | soft-lock at 126 s (0 presents / 0 draws) | Two side notes that may matter for this issue: - **Video memory is no longer the problem on current main.** Local VRAM peaked at 20,415 MB with 16,176 MiB installed on `47efa2e` + #640 (`XCL_PAGE_BUDGET_MB=8192`, `page budget: 3195 textures evicted`), and the device was removed with `0x887a0006` at 144 s. On `930e8b4` the same run peaks at **14,221 MB** with no budget at all — the copy-scratch budget (#993 / 392dc0c) removed that growth. - Breakpad does try to upload a ~37 MB minidump to `submit.backtrace.io`; `XCL_NETWORK=0` stops it (`WinHttpConnect fails (no network)`), which is the behaviour I want — worth stating in the README. BCPack is confirmed not the cause here either: `bcpack_refused: {}` and `bcpack_unpacked` BC1 1284 / BC5 108 / BC7 138 / BC6H 1, 0 failed.
Author
Owner

@⁠itsd-effex on GitHub · 2026-11-24 15:00 UTC · original

Linux / NVIDIA 12 GB on main 930e8b4, nothing skipped: once compute builds stop blocking the title, the next stop on this card is texture placement. On the default path, the title's recording thread waits in vkd3d-proton's CreateReservedResource (via vram::place_on_pages) until the watchdog fires. With XCL_VRAM_ARENAS=1 that wait is gone and the world load starts at 61 s instead of 151 s, but GPU memory then spills into system RAM (4.3 → 15.8 GB in 14 s) until NVIDIA's kernel driver runs out of memory.

Setup

  • RTX 3080 Ti 12 GB, NVIDIA 620.73.04 (Linux), i7-11700KF, 32 GB RAM + 36 GB swap, CachyOS. Proton Experimental's Wine, vkd3d-proton master ec207194 (dxil-spirv with #371) + #257's patch. DXC 1.9.2609.5, release, x86_64-pc-windows-msvc.
  • Retail 1.0.2.1, XCL_NETWORK=0 XCL_ACTIVITY=1, scripted A presses, no XCL_PSO_WAIT_MS: 0 skipped draws and dispatches in every run below. Thread dumps symbolized with the build's PDB.
  • Tree: main 930e8b4 + #688 0b82a3d + #759 (its 8 commits, head 788e366) + #684 e56dbc3 + #1288 95299f4 + #1278 eb03e7f. Runs 4–6 also have #640 5d6fac8. Local changes:
    • #759's warm() and #1278's slot still used the slot API that 25c6f7e replaced. I moved both to big_compile_turn (#1278: big_compile_turn(compile_slots(len), …)).
    • xcl pipelines had built the journal beforehand, except the three screen-probe programs (see #1269).
    • Those programs' two keys were taken out of used-pipelines.txt, so the preload does not start them in the first seconds. On this stack they take 10+ GB a minute.
run textures #101 last present end local / non-local VRAM peak compute PSOs built (from a kept blob)
3 pages (default) – 98 s +0x23cf683 at 126.5 s 10 765 / 5 490 MB 113 (60)
4 pages, XCL_PAGE_BUDGET_MB=5000 (#640) – 84 s +0x23cf683 at 114 s 9 833 / 4 146 MB 114 (62)
5 as run 4, thread dumps every 5 s 151.0 s 188 s stopped by me at ~305 s (black screen from ~190 s) 10 365 / 4 146 MB 338 (128)
6 XCL_VRAM_ARENAS=1 61.0 s 66 s process exit 0x3 at 71 s 10 546 / 15 775 MB 212 (118)

Both crash lines (runs 3 and 4) carry GPU Loc Sig 7333478d, the same as @⁠ushiiiro's Windows run on 930e8b4.

Runs 3–5: the recording thread waits in CreateReservedResource

  • The thread that records and submits the title's lists, the one that later makes the first #101 call, is in this chain in 6 of 7 dumps of run 5 (75–105 s), and in run 3's dump at the abort:
    dev_create_srv_at_x → resource_at → device_x::create_placed_resource_x → vram::place_pages → place_on_pages → real::dev_create_reserved_resource → d3d12core (device.c → resource.c) → winevulkan
  • The title callers differ between dumps (+0x501f703, +0x4ecc65d), so this is one slow call after another, not a hang.
  • perf on the title process at 100–108 s: the title's threads have ~3 % of the samples. The rest is preload DXC and preload driver compiles. GPU ~5 % (nvidia-smi).
  • So the thread is waiting inside the driver call, not computing. I have no vkd3d-proton symbols for it (release build), only the files.
  • #640 doesn't change this. In run 4 it evicted from 77 s and local VRAM stayed under 10 GB, and the stall came at the same point.
  • Run 5 lived through 0 presents from ~65 to ~125 s, where runs 3 and 4 were ended by the watchdog. It had reused about twice as many kept driver blobs (128 against 60–62), so fewer compiles were competing at that point. That's my guess, not a measurement.

Run 6: arenas remove that wait, then run out of memory

  • #101 at 61.0 s. Then XCL's non-local video memory went 4 333 → 5 598 → 7 168 → 9 330 → 10 856 → 14 080 → 15 775 MB between 56 and 70 s, while DirectStorage moved 115–205 MB every 2 s.
  • At 14:54:57 the kernel logged NVRM: … Out of memory [NV_ERR_NO_MEMORY] … system_mem.c:555. 0.3 s later the process ended with status 0x3 from the recording thread inside d3d12core.dll (vkd3d-proton's device-lost handling).
  • On a 32 GB machine, ~16 GB of title plus ~16 GB of GPU memory in system RAM is everything there is. My cgroup cap of 25 GB RAM on the run may have made it fail a little sooner.

So on a 12 GB NVIDIA card under Linux, the pages path spends the time in reserved-resource creation, and the arenas path has no bound on memory. #640's budget only covers pages.

Not tested: Windows on this card; arenas with a cap or budget; without #1288 / #1278 on this tree; more than one run each (run 5 vs run 4 is the same build and settings, with different results).

AI use: Claude Code (Claude Opus 5.5) merged the trees, ran the builds and runs, read the dumps, perf and logs, and wrote this comment. The runs are mine, on the hardware above.

**@⁠itsd-effex** on GitHub · 2026-11-24 15:00 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7135298399) **Linux / NVIDIA 12 GB on `main` `930e8b4`, nothing skipped: once compute builds stop blocking the title, the next stop on this card is texture placement. On the default path, the title's recording thread waits in vkd3d-proton's `CreateReservedResource` (via `vram::place_on_pages`) until the watchdog fires. With `XCL_VRAM_ARENAS=1` that wait is gone and the world load starts at 61 s instead of 151 s, but GPU memory then spills into system RAM (4.3 → 15.8 GB in 14 s) until NVIDIA's kernel driver runs out of memory.** **Setup** - RTX 3080 Ti **12 GB**, NVIDIA 620.73.04 (Linux), i7-11700KF, 32 GB RAM + 36 GB swap, CachyOS. Proton Experimental's Wine, vkd3d-proton `master` `ec207194` (dxil-spirv with #371) + #257's patch. DXC 1.9.2609.5, release, `x86_64-pc-windows-msvc`. - Retail 1.0.2.1, `XCL_NETWORK=0 XCL_ACTIVITY=1`, scripted A presses, **no `XCL_PSO_WAIT_MS`**: 0 skipped draws and dispatches in every run below. Thread dumps symbolized with the build's PDB. - Tree: `main` `930e8b4` + #688 `0b82a3d` + #759 (its 8 commits, head `788e366`) + #684 `e56dbc3` + #1288 `95299f4` + #1278 `eb03e7f`. Runs 4–6 also have #640 `5d6fac8`. Local changes: - #759's `warm()` and #1278's slot still used the slot API that `25c6f7e` replaced. I moved both to `big_compile_turn` (#1278: `big_compile_turn(compile_slots(len), …)`). - `xcl pipelines` had built the journal beforehand, except the three screen-probe programs (see #1269). - Those programs' two keys were taken out of `used-pipelines.txt`, so the preload does not start them in the first seconds. On this stack they take 10+ GB a minute. | run | textures | `#101` | last present | end | local / non-local VRAM peak | compute PSOs built (from a kept blob) | |---|---|---|---|---|---|---| | 3 | pages (default) | – | 98 s | `+0x23cf683` at 126.5 s | 10 765 / 5 490 MB | 113 (60) | | 4 | pages, `XCL_PAGE_BUDGET_MB=5000` (#640) | – | 84 s | `+0x23cf683` at 114 s | 9 833 / 4 146 MB | 114 (62) | | 5 | as run 4, thread dumps every 5 s | 151.0 s | 188 s | stopped by me at ~305 s (black screen from ~190 s) | 10 365 / 4 146 MB | 338 (128) | | 6 | `XCL_VRAM_ARENAS=1` | **61.0 s** | 66 s | process exit `0x3` at 71 s | 10 546 / **15 775 MB** | 212 (118) | Both crash lines (runs 3 and 4) carry `GPU Loc Sig` `7333478d`, the same as @⁠ushiiiro's Windows run on `930e8b4`. **Runs 3–5: the recording thread waits in `CreateReservedResource`** - The thread that records and submits the title's lists, the one that later makes the first `#101` call, is in this chain in 6 of 7 dumps of run 5 (75–105 s), and in run 3's dump at the abort: `dev_create_srv_at_x → resource_at → device_x::create_placed_resource_x → vram::place_pages → place_on_pages → real::dev_create_reserved_resource → d3d12core (device.c → resource.c) → winevulkan` - The title callers differ between dumps (`+0x501f703`, `+0x4ecc65d`), so this is one slow call after another, not a hang. - `perf` on the title process at 100–108 s: the title's threads have ~3 % of the samples. The rest is preload DXC and preload driver compiles. GPU ~5 % (`nvidia-smi`). - So the thread is waiting inside the driver call, not computing. I have no vkd3d-proton symbols for it (release build), only the files. - #640 doesn't change this. In run 4 it evicted from 77 s and local VRAM stayed under 10 GB, and the stall came at the same point. - Run 5 lived through 0 presents from ~65 to ~125 s, where runs 3 and 4 were ended by the watchdog. It had reused about twice as many kept driver blobs (128 against 60–62), so fewer compiles were competing at that point. That's my guess, not a measurement. **Run 6: arenas remove that wait, then run out of memory** - `#101` at 61.0 s. Then XCL's non-local video memory went 4 333 → 5 598 → 7 168 → 9 330 → 10 856 → 14 080 → 15 775 MB between 56 and 70 s, while DirectStorage moved 115–205 MB every 2 s. - At 14:54:57 the kernel logged `NVRM: … Out of memory [NV_ERR_NO_MEMORY] … system_mem.c:555`. 0.3 s later the process ended with status `0x3` from the recording thread inside `d3d12core.dll` (vkd3d-proton's device-lost handling). - On a 32 GB machine, ~16 GB of title plus ~16 GB of GPU memory in system RAM is everything there is. My cgroup cap of 25 GB RAM on the run may have made it fail a little sooner. So on a 12 GB NVIDIA card under Linux, the pages path spends the time in reserved-resource creation, and the arenas path has no bound on memory. #640's budget only covers pages. **Not tested:** Windows on this card; arenas with a cap or budget; without #1288 / #1278 on this tree; more than one run each (run 5 vs run 4 is the same build and settings, with different results). **AI use:** Claude Code (Claude Opus 5.5) merged the trees, ran the builds and runs, read the dumps, `perf` and logs, and wrote this comment. The runs are mine, on the hardware above.
Author
Owner

@⁠leondood1298 on GitHub · 2026-11-24 15:03 UTC · original

@⁠CowboyBingus please take it, I am not working on a fix for it. Your record, instruction count and sizes match what I see here. Three numbers from this machine that may help you and #1278 / #1279 (RTX 4070 SUPER, driver 32.0.16.2124, i7-12700K; main beaa245 plus local logging of each compute build's start; a 3 h run left at the first menu, so nothing else was building):

  • The 14,104,656 B program (95cc13288a27a96e) does finish in the NVIDIA compiler: after 120.1 minutes (7,208,789 ms from the build's start to its "compute PSO" line; driver blob 15 MB, now in the cache).
  • The 29,750,152 B one started right after it (7,726 s into the run) and was not finished 51 minutes later when the run ended.
  • While the 14 MB one compiled, the process's commit in XCL's memory: lines rose by about 11.6 GB per 30 minutes (23 GB at 30 min, 58 GB at 120 min).

One more data point for the bounded waits: with a local 1 ms limit on compute binds (before #891 existed; same idea, binds go to the workers and dispatches are skipped), the run got two title frames further than with unbounded waits and then ended in D3D12 device removed: 0x887a0001 at 68.9 s, followed by the title's breakpoint at +0x2474606 – not the 0x887a0006 others report. No debug layer on this machine, so I cannot name the call.

AI use: Claude Code (Claude Mythos 5.2) ran these and wrote this; log excerpts by Claude Sonnet 5.5 subagents.

**@⁠leondood1298** on GitHub · 2026-11-24 15:03 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7135394903) @⁠CowboyBingus please take it, I am not working on a fix for it. Your record, instruction count and sizes match what I see here. Three numbers from this machine that may help you and #1278 / #1279 (RTX 4070 SUPER, driver 32.0.16.2124, i7-12700K; `main` `beaa245` plus local logging of each compute build's start; a 3 h run left at the first menu, so nothing else was building): - **The 14,104,656 B program (`95cc13288a27a96e`) does finish in the NVIDIA compiler: after 120.1 minutes** (7,208,789 ms from the build's start to its "compute PSO" line; driver blob 15 MB, now in the cache). - **The 29,750,152 B one** started right after it (7,726 s into the run) and was not finished 51 minutes later when the run ended. - While the 14 MB one compiled, the process's commit in XCL's `memory:` lines rose by about 11.6 GB per 30 minutes (23 GB at 30 min, 58 GB at 120 min). One more data point for the bounded waits: with a local 1 ms limit on compute binds (before #891 existed; same idea, binds go to the workers and dispatches are skipped), the run got two title frames further than with unbounded waits and then ended in `D3D12 device removed: 0x887a0001` at 68.9 s, followed by the title's breakpoint at `+0x2474606` – not the `0x887a0006` others report. No debug layer on this machine, so I cannot name the call. **AI use:** Claude Code (Claude Mythos 5.2) ran these and wrote this; log excerpts by Claude Sonnet 5.5 subagents.
Author
Owner

@⁠not-rex on GitHub · 2026-11-24 15:05 UTC · original

Plan, to avoid duplicate work: an opt-in XCL_LOOP_BUDGET=n that lowers the per-lane loop budget (xcl_budget, fixed at 65 536 in the prelude, spent by LOOP_GUARD). One PR of about 140 lines, tests included. Unset, the HLSL stays byte for byte as on main (DXIL cache and driver blobs keep their keys); set, only programs with a loop get a different prelude line, and the translated-shader disk cache keys include the budget so a translation made with one budget is never reused with another.

Why: @⁠upipibi measured a split wave64 loop that runs to the guard at ~15 ms per Dispatch(4,1,1) on an RTX 3070 (https://github.com/ivall/xcl/issues/505#issuecomment-7132591813), so a large dispatch of such lanes is past the 2 s TDR. Other ports use the same kind of setting: VIctory's NVIDIA world runs set a loop limit of 32-4096; on an RTX 3070, 4096 removed the world hang and the title reached player control (https://github.com/Marvisak/VIctory/issues/392#issuecomment-7125747717), while https://github.com/Marvisak/VIctory/issues/71 found its RTX 5070 Ti hang was not loops, and five-star-recomp ended its first-frame GPU hang by bounding shader loops (github.com/ThatRecompDev/five-star-recomp@a19995d7). As @⁠upipibi and @⁠oeirughrepuiohg worked out above, loops at the budget do not explain the whole 100 % phase here; this is a switch to test that part, not a fix for it. Written from scratch against main, no code from those projects (both GPL-3.0).

Tests: a GPU test with an endless loop that counts its iterations (65 536 unset, n with the option; skips without GPU/DXC), and a no-GPU test that loop-free HLSL is the same with and without it. I'll add an RTX 3080 run (main vs the PR with XCL_LOOP_BUDGET=4096, seconds in the world before 0x887a0006) before it leaves draft.

AI use: Claude Code (Claude Opus 5.5) wrote the change, the tests and this comment.

**@⁠not-rex** on GitHub · 2026-11-24 15:05 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7135430243) **Plan, to avoid duplicate work:** an opt-in `XCL_LOOP_BUDGET=n` that lowers the per-lane loop budget (`xcl_budget`, fixed at 65 536 in the prelude, spent by `LOOP_GUARD`). One PR of about 140 lines, tests included. Unset, the HLSL stays byte for byte as on `main` (DXIL cache and driver blobs keep their keys); set, only programs with a loop get a different prelude line, and the translated-shader disk cache keys include the budget so a translation made with one budget is never reused with another. Why: @⁠upipibi measured a split wave64 loop that runs to the guard at ~15 ms per `Dispatch(4,1,1)` on an RTX 3070 (https://github.com/ivall/xcl/issues/505#issuecomment-7132591813), so a large dispatch of such lanes is past the 2 s TDR. Other ports use the same kind of setting: VIctory's NVIDIA world runs set a loop limit of 32-4096; on an RTX 3070, 4096 removed the world hang and the title reached player control (https://github.com/Marvisak/VIctory/issues/392#issuecomment-7125747717), while https://github.com/Marvisak/VIctory/issues/71 found its RTX 5070 Ti hang was not loops, and five-star-recomp ended its first-frame GPU hang by bounding shader loops (https://github.com/ThatRecompDev/five-star-recomp/commit/a19995d7). As @⁠upipibi and @⁠oeirughrepuiohg worked out above, loops at the budget do not explain the whole 100 % phase here; this is a switch to test that part, not a fix for it. Written from scratch against `main`, no code from those projects (both GPL-3.0). Tests: a GPU test with an endless loop that counts its iterations (65 536 unset, n with the option; skips without GPU/DXC), and a no-GPU test that loop-free HLSL is the same with and without it. I'll add an RTX 3080 run (`main` vs the PR with `XCL_LOOP_BUDGET=4096`, seconds in the world before 0x887a0006) before it leaves draft. AI use: Claude Code (Claude Opus 5.5) wrote the change, the tests and this comment.
Author
Owner

@⁠upipibi on GitHub · 2026-11-24 15:08 UTC · original

@⁠not-rex that switch is already open as #1284 (posted above at 14:2x). Your point that the HLSL should stay byte for byte as on main while unset was right: #1284 wrote a #define into every prelude, which would have changed every DXIL cache key once. It is fixed in 3980a81: the prelude keeps 1u << 16, and only a set budget replaces that line. A translation made with the variable set is not cached in memory or on disk (cache_allowed, like XCL_WAVE64_SPIN), rather than keyed by the budget. If you'd rather key the disk cache by it, a commit on top is welcome. The RTX 3080 run you planned (main against XCL_LOOP_BUDGET=4096, time in the world before 0x887a0006) would be the most useful data for it.

AI-assisted (Claude Code).

**@⁠upipibi** on GitHub · 2026-11-24 15:08 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7135526344) @⁠not-rex that switch is already open as #1284 (posted above at 14:2x). Your point that the HLSL should stay byte for byte as on `main` while unset was right: #1284 wrote a `#define` into every prelude, which would have changed every DXIL cache key once. It is fixed in `3980a81`: the prelude keeps `1u << 16`, and only a set budget replaces that line. A translation made with the variable set is not cached in memory or on disk (`cache_allowed`, like `XCL_WAVE64_SPIN`), rather than keyed by the budget. If you'd rather key the disk cache by it, a commit on top is welcome. The RTX 3080 run you planned (`main` against `XCL_LOOP_BUDGET=4096`, time in the world before `0x887a0006`) would be the most useful data for it. AI-assisted (Claude Code).
Author
Owner

@⁠S1m0ne1997 on GitHub · 2026-11-24 15:12 UTC · original

RTX 4090 / Windows, run in progress: with #1288 + #1315/#1316 the title is alive 230 s after #101, 0 dispatches skipped, and commit stays at ~34 GB (84 GB without the compact form). It is held by one pipeline build. A second giant program does not fit the compact form.

Tree: main 930e8b4 with b8b1f49 reverted (#1307) + #688 + #759 (with #757/#758) + #820 + #684 + #1278 + #1288 + #1315/#1316 (XCL_COMPACT_CS auto). Tests on the tree: compact 22 passed (1 SKIPPED, no wave64), kernelx:: 34, real:: 23, pso_async 6. Run: no XCL_PSO_WAIT_MS, XCL_BIG_COMPILES=4, XCL_ACTIVITY=1, warm DXIL/driver caches; thread stacks taken from outside the process every 20 s (in-process XCL_THREAD_DUMP_AT crashed one earlier run in its own unwind, at 90 s).

  • Compact form: ActivateProbes (d122faa48eb0afdc, 88 863 instructions) became 723 453 B of HLSL; its PSO was ready 28 s after start in the first run and comes from the driver blob since then.
  • This run: #101 at 143.6 s, last present at 144.1 s, last 2 s sample with any GPU work at 230 s; 0 skipped binds, 0 queue.Wait timeouts; still alive at 372 s. Commit of xcl.exe flat at 33.5 – 34 GB (a run on the same tree minus #1315/#1316 reached 84 GB and the machine's commit limit by +330 s).
  • Where it waits: one title thread in bind::execute_indirect (bind.rs:238) → pso_async::resolve_wait_for (pso_async.rs:535), and three title threads in kernelx::Sleep (#1288), including the stall check. Nine threads in nvgpucomp64. GPU idle.
  • A giant the compact form does not take: on the first run with #1316 the log said compute program 15ec6daefb19a780: compact form: 19949 blocks of 11909 texts need a 9975-word table (at most 8192) – translated as before. With @⁠leondood1298's 120-minute figure for the 14 MB program, a program like this would explain an hours-long hold. I have not tied the waiting bind to it; the log only names a pipeline once it is built. @⁠CowboyBingus, this program may be the next candidate for the table limit.

I'm letting it run.

AI use: Claude Code with Claude Opus 5.5 built the tree, ran the tests and the run, read the logs and stacks and wrote and posted this at my request.

**@⁠S1m0ne1997** on GitHub · 2026-11-24 15:12 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7135636170) **RTX 4090 / Windows, run in progress: with #1288 + #1315/#1316 the title is alive 230 s after `#101`, 0 dispatches skipped, and commit stays at ~34 GB (84 GB without the compact form). It is held by one pipeline build. A second giant program does not fit the compact form.** Tree: `main` `930e8b4` with `b8b1f49` reverted (#1307) + #688 + #759 (with #757/#758) + #820 + #684 + #1278 + #1288 + #1315/#1316 (`XCL_COMPACT_CS` auto). Tests on the tree: `compact` 22 passed (1 SKIPPED, no wave64), `kernelx::` 34, `real::` 23, `pso_async` 6. Run: no `XCL_PSO_WAIT_MS`, `XCL_BIG_COMPILES=4`, `XCL_ACTIVITY=1`, warm DXIL/driver caches; thread stacks taken from outside the process every 20 s (in-process `XCL_THREAD_DUMP_AT` crashed one earlier run in its own unwind, at 90 s). - **Compact form:** `ActivateProbes` (`d122faa48eb0afdc`, 88 863 instructions) became 723 453 B of HLSL; its PSO was ready 28 s after start in the first run and comes from the driver blob since then. - **This run:** `#101` at 143.6 s, last present at 144.1 s, last 2 s sample with any GPU work at 230 s; 0 skipped binds, 0 `queue.Wait` timeouts; still alive at 372 s. Commit of `xcl.exe` flat at 33.5 – 34 GB (a run on the same tree minus #1315/#1316 reached 84 GB and the machine's commit limit by +330 s). - **Where it waits:** one title thread in `bind::execute_indirect` (`bind.rs:238`) → `pso_async::resolve_wait_for` (`pso_async.rs:535`), and three title threads in `kernelx::Sleep` (#1288), including the stall check. Nine threads in `nvgpucomp64`. GPU idle. - **A giant the compact form does not take:** on the first run with #1316 the log said `compute program 15ec6daefb19a780: compact form: 19949 blocks of 11909 texts need a 9975-word table (at most 8192) – translated as before`. With @⁠leondood1298's 120-minute figure for the 14 MB program, a program like this would explain an hours-long hold. I have **not** tied the waiting bind to it; the log only names a pipeline once it is built. @⁠CowboyBingus, this program may be the next candidate for the table limit. I'm letting it run. *AI use: Claude Code with Claude Opus 5.5 built the tree, ran the tests and the run, read the logs and stacks and wrote and posted this at my request.*
Author
Owner

@⁠CowboyBingus on GitHub · 2026-11-24 15:13 UTC · original

@⁠S1m0ne1997 15ec6daefb19a780 is the code hash of 95cc13288a27a96e (ActivateRays). Two measurements posted on #1269 say that raising the table limit on its own does not make it build:

  • Pipodi, RTX 4090, limit raised to 16,384 words: DXC took 842.6 s for 10.66 MB of DXIL, and the driver build was killed after it passed 20 GB.
  • t4l03, RTX 4070 Ti: sharing cases across branch targets takes it from 11,909 cases to 2,516 and to 2.79 MB of DXIL in 11.7 s of DXC. The driver build was still running when it was stopped at 75 s.

So it needs fewer or smaller cases, not just a larger table. #1315 / #1316 leave it on translate, the logged fallback you saw.

AI use: Claude Code (Claude Opus 5.5) wrote this reply.

**@⁠CowboyBingus** on GitHub · 2026-11-24 15:13 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7135676336) @⁠S1m0ne1997 `15ec6daefb19a780` is the code hash of `95cc13288a27a96e` (`ActivateRays`). Two measurements posted on #1269 say that raising the table limit on its own does not make it build: - [Pipodi](https://github.com/ivall/xcl/issues/1269#issuecomment-7135606782), RTX 4090, limit raised to 16,384 words: DXC took 842.6 s for 10.66 MB of DXIL, and the driver build was killed after it passed 20 GB. - [t4l03](https://github.com/ivall/xcl/issues/1269#issuecomment-7135372390), RTX 4070 Ti: sharing cases across branch targets takes it from 11,909 cases to 2,516 and to 2.79 MB of DXIL in 11.7 s of DXC. The driver build was still running when it was stopped at 75 s. So it needs fewer or smaller cases, not just a larger table. #1315 / #1316 leave it on `translate`, the logged fallback you saw. AI use: Claude Code (Claude Opus 5.5) wrote this reply.
Author
Owner

@⁠tugasky on GitHub · 2026-11-24 15:16 UTC · original

RX 9070 XT / Windows, main 930e8b4: no BCPack refusals; presentation folds as streaming ramps, and stops 29 s before the watchdog

Setup

  • AMD Radeon RX 9070 XT, 16 191 MiB (RDNA4), driver 32.0.32029.2010; Ryzen 7 9700X, 31.1 GB RAM, Windows 11 Pro build 26300.
  • MSVC release build of main 930e8b4, rustc/cargo 1.98.0; DXC 1.9.2602.17 (Windows SDK 10.0.26100.0, 21d28f72).
  • Retail 1.0.2.1 (TitleID 7952987A), XCL_ACTIVITY=1 XCL_FRAME_DUMP=1, no XCL_PSO_WAIT_MS, preload at its default (its log line is the pipelines of 18 shader sets an earlier run used are built ahead of their first use), no XCL_SAMPLE_* set, warm DXIL and driver caches, one xcl.exe at a time.
  • Scripted A presses (XCL_PRESS_AT) walk the account selector → legal notices / photo-sensitivity → loading. This is the same route as the reports above, and it ends the same way.

The run, from activity (2 s) (log order: presents, submits, draws, dispatches, DirectStorage):

t presents submits draws dispatches DirectStorage
2 s 0 0 0 0 1 863 / 116 MB, 0 failed
60 s 60 240 1 981 60 0 / 0 MB
104 s 60 240 300 60 0 / 0 MB
108 s 39 254 223 120 5 091 / 571 MB, 0 failed
112 s 21 152 105 55 8 762 / 383 MB, 0 failed
116 s 0 0 0 4 0 / 0 MB
134 s 54 283 280 166 1 963 / 262 MB, 0 failed
148 s 15 113 60 159 1 525 / 117 MB, 0 failed (last present window)
150 s 0 11 0 15 0 / 0 MB
154 s 0 0 0 0 0 / 0 MB
174 s 0 0 2 149 0 / 0 MB
178 s 0 8 8 3 0 / 0 MB

So there is no sharp stop: presentation is a steady 60 / 2 s (30 fps) up to 104 s, then folds as soon as world streaming starts — 53, 39, 40, 21, 9, 0 presents across 106–116 s while DirectStorage rises to 8 762 requests / 383 MB per 2 s — recovers in fits (54 presents at 134 s) and is gone for good after 148 s. The abort follows 29 s later:

[ 148.091] last activity window with presents
[ 177.352] unhandled exception 0xc0000005 in game_scarlett_master.exe+0x23cf683
           (write at address 0x0)
           on the stack: +0x4e4ba89, +0x2215c35, +0x71b9a20, +0x2215eca

(ID3D12GraphicsCommandList10::#101 is first called at 143.899 from game_scarlett_master.exe+0x50a6657, but the thread has settled that slot 101 is DriverHintX(feature, value) with an ignored return, so it is only a timestamp here.)

The world load on this card never hits the BCPack refusal wall. Every one of the 90 windows reports 0 failed, including the 8.7 k-request peak window, and report.json has dstorage.bcpack_refused: {} with bcpack_unpacked BC1 2 097, BC5 110, BC6H 11, BC7 196 requests, all failed: 0. Whatever stops emirduran707's and tadymila's runs at the refusals is a separate wall: with warm caches on RDNA4/Windows there is no refusal, streaming keeps delivering right up to the last present window, and then it is simply no longer asked for.

At and after the stop

  • No 0x887a0006 device removal (Aruku448's XCL_PSO_WAIT_MS=50 path) and no arena spill into system RAM (itsd-effex's XCL_VRAM_ARENAS=1); both are the defaults here.
  • Commit 28 201–29 090 MB of 31.1 GB over the last 30 s, VRAM 13 729 MB local + 4 742 MB non-local; background_pipelines [87, 0, 58 678] (built, failed, pending), dxil_cache 60 hits / 72 compilations / 0 failures, translated_pipelines 87, fallback_pipelines 0. Whatever the stop is, it is not a compile escaping with an error: no PSO failed, no pipeline fell back.
  • submits goes to 0, draws to 0, but dispatches keeps counting in bursts (11, 149, 38, 3, 18) up to the abort. If those are recordings rather than submissions that is only a naming surprise; if not, it is a stream that outlived the present loop.
  • XCL_FRAME_DUMP=1 (every 120th frame) wrote up to frame_3260.bmp (3 840×2 160, every 4th pixel sampled, all sampled pixels non-dark) before the collapse; the last ones are the dark loading screen, not an unpainted window.

Side note, same run: the legal-notices body text drops letters and mis-spaces words (the heading renders fine) — that is #1049 reproduced on RDNA4 as well.

This shape — presentation folding exactly as world streaming ramps, GPU mostly idle, no device loss — looks like what #1268 is timing (CreateReservedResource / place_on_pages on the render thread during the load; Rednaxeh could not see it on RDNA3 and zorde23 sees the compute-pipeline wait first). Whoever reads this: the numbers above are only what activity (2 s) showed; I have no thread dumps inside 106–148 s window yet.

AI use: Claude (Opus 5.5, via Cline) ran the builds and the game, read the log and wrote this comment; I checked the numbers before posting.

**@⁠tugasky** on GitHub · 2026-11-24 15:16 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7135739349) **RX 9070 XT / Windows, `main` `930e8b4`: no BCPack refusals; presentation folds as streaming ramps, and stops 29 s before the watchdog** Setup - AMD Radeon RX 9070 XT, 16 191 MiB (RDNA4), driver 32.0.32029.2010; Ryzen 7 9700X, 31.1 GB RAM, Windows 11 Pro build 26300. - MSVC release build of `main` `930e8b4`, rustc/cargo 1.98.0; DXC 1.9.2602.17 (Windows SDK 10.0.26100.0, `21d28f72`). - Retail 1.0.2.1 (TitleID 7952987A), `XCL_ACTIVITY=1 XCL_FRAME_DUMP=1`, no `XCL_PSO_WAIT_MS`, preload at its default (its log line is `the pipelines of 18 shader sets an earlier run used are built ahead of their first use`), no `XCL_SAMPLE_*` set, warm DXIL and driver caches, one `xcl.exe` at a time. - Scripted A presses (`XCL_PRESS_AT`) walk the account selector → legal notices / photo-sensitivity → loading. This is the same route as the reports above, and it ends the same way. The run, from `activity (2 s)` (log order: presents, submits, draws, dispatches, DirectStorage): | t | presents | submits | draws | dispatches | DirectStorage | |---|---|---|---|---|---| | 2 s | 0 | 0 | 0 | 0 | 1 863 / 116 MB, 0 failed | | 60 s | 60 | 240 | 1 981 | 60 | 0 / 0 MB | | 104 s | 60 | 240 | 300 | 60 | 0 / 0 MB | | 108 s | 39 | 254 | 223 | 120 | **5 091 / 571 MB, 0 failed** | | 112 s | 21 | 152 | 105 | 55 | **8 762 / 383 MB, 0 failed** | | 116 s | 0 | 0 | 0 | 4 | 0 / 0 MB | | 134 s | 54 | 283 | 280 | 166 | 1 963 / 262 MB, 0 failed | | 148 s | 15 | 113 | 60 | 159 | 1 525 / 117 MB, 0 failed (last present window) | | 150 s | 0 | 11 | 0 | 15 | 0 / 0 MB | | 154 s | 0 | 0 | 0 | 0 | 0 / 0 MB | | 174 s | 0 | 0 | 2 | 149 | 0 / 0 MB | | 178 s | 0 | 8 | 8 | 3 | 0 / 0 MB | So there is no sharp stop: presentation is a steady 60 / 2 s (30 fps) up to 104 s, then **folds as soon as world streaming starts** — 53, 39, 40, 21, 9, 0 presents across 106–116 s while DirectStorage rises to 8 762 requests / 383 MB per 2 s — recovers in fits (54 presents at 134 s) and is gone for good after 148 s. The abort follows 29 s later: ``` [ 148.091] last activity window with presents [ 177.352] unhandled exception 0xc0000005 in game_scarlett_master.exe+0x23cf683 (write at address 0x0) on the stack: +0x4e4ba89, +0x2215c35, +0x71b9a20, +0x2215eca ``` (`ID3D12GraphicsCommandList10::#101` is first called at 143.899 from `game_scarlett_master.exe+0x50a6657`, but the thread has settled that slot 101 is `DriverHintX(feature, value)` with an ignored return, so it is only a timestamp here.) **The world load on this card never hits the BCPack refusal wall.** Every one of the 90 windows reports `0 failed`, including the 8.7 k-request peak window, and `report.json` has `dstorage.bcpack_refused: {}` with `bcpack_unpacked` BC1 2 097, BC5 110, BC6H 11, BC7 196 requests, all `failed: 0`. Whatever stops emirduran707's and tadymila's runs at the refusals is a separate wall: with warm caches on RDNA4/Windows there is no refusal, streaming keeps delivering right up to the last present window, and then it is simply no longer asked for. At and after the stop - No `0x887a0006` device removal (Aruku448's `XCL_PSO_WAIT_MS=50` path) and no arena spill into system RAM (itsd-effex's `XCL_VRAM_ARENAS=1`); both are the defaults here. - Commit 28 201–29 090 MB of 31.1 GB over the last 30 s, VRAM 13 729 MB local + 4 742 MB non-local; `background_pipelines` `[87, 0, 58 678]` (built, failed, pending), `dxil_cache` 60 hits / 72 compilations / 0 failures, `translated_pipelines` 87, `fallback_pipelines` 0. Whatever the stop is, it is not a compile escaping with an error: no PSO failed, no pipeline fell back. - `submits` goes to 0, `draws` to 0, but `dispatches` keeps counting in bursts (11, 149, 38, 3, 18) up to the abort. If those are recordings rather than submissions that is only a naming surprise; if not, it is a stream that outlived the present loop. - `XCL_FRAME_DUMP=1` (every 120th frame) wrote up to `frame_3260.bmp` (3 840×2 160, every 4th pixel sampled, all sampled pixels non-dark) before the collapse; the last ones are the dark loading screen, not an unpainted window. Side note, same run: the legal-notices body text drops letters and mis-spaces words (the heading renders fine) — that is #1049 reproduced on RDNA4 as well. This shape — presentation folding exactly as world streaming ramps, GPU mostly idle, no device loss — looks like what #1268 is timing (`CreateReservedResource` / `place_on_pages` on the render thread during the load; Rednaxeh could not see it on RDNA3 and zorde23 sees the compute-pipeline wait first). Whoever reads this: the numbers above are only what `activity (2 s)` showed; I have no thread dumps inside 106–148 s window yet. AI use: Claude (Opus 5.5, via Cline) ran the builds and the game, read the log and wrote this comment; I checked the numbers before posting.
Author
Owner

@⁠S1m0ne1997 on GitHub · 2026-11-24 15:16 UTC · original

@⁠CowboyBingus thanks, that settles which program it is. I'm leaving the run going to see whether the driver finishes ActivateRays inside the title on this RTX 4090, and how long and how much commit that takes. With #1288 the title survives the wait, and the blob is kept once it is built. So far: xcl.exe steady at 34 – 35 GB, 3 – 4 GB of the machine's commit left, title held since ~230 s. I'll post the time to the "compute PSO" line for it, or where it ends if it does not get there.

AI use: Claude Code with Claude Opus 5.5 wrote and posted this at my request.

**@⁠S1m0ne1997** on GitHub · 2026-11-24 15:16 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7135749702) @⁠CowboyBingus thanks, that settles which program it is. I'm leaving the run going to see whether the driver finishes `ActivateRays` inside the title on this RTX 4090, and how long and how much commit that takes. With #1288 the title survives the wait, and the blob is kept once it is built. So far: `xcl.exe` steady at 34 – 35 GB, 3 – 4 GB of the machine's commit left, title held since ~230 s. I'll post the time to the "compute PSO" line for it, or where it ends if it does not get there. *AI use: Claude Code with Claude Opus 5.5 wrote and posted this at my request.*
Author
Owner

@⁠guinpereira on GitHub · 2026-11-24 15:19 UTC · original

RTX 5060 Ti, main 930e8b4 + #680 (heap form), with and without #1189's snapshots: no title thread waits for DXC any more, but presents still stop a few seconds after the first ListX #101 call, and the watchdog (+0x23cf683) ends the run. What the frame thread waits for is still unknown.

Two results:

  1. 383008e (main + #680): the dumps at 85 s and 93 s, after presents stopped, have no title thread waiting for DXC or for a pipeline (bind).
  2. 89ec0fe (the same + #1189, XCL_STALL_SECONDS=4): presents had already stopped while every monitored queue fence was caught up, and three title threads were waiting in binds for pipelines being built. The Wait64BitValueX bridges and the GPU wait timeouts came later.

Performance numbers for the heap form are in my #680 comment.

Tested

  • RTX 5060 Ti 16 GB, driver 617.14; Ryzen 7 5700X, 32 GB; Windows 11 Pro 26200; DXC 1.8.2502.11; release.
  • Retail 1.0.2.1, scripts/smoke.ps1 (180 s, XCL_NETWORK=0, no input), XCL_HEAP_WINDOWS=1, XCL_THREAD_DUMP_AT=75,85,93.
  • Builds (local, not pushed): 383008e = main 930e8b4 + #680 95f34c1 (contains 9a272d4 and 25c6f7e); 89ec0fe = 383008e + #1189 099d94b (one trivial conflict in q_execute_command_lists, both lines kept). XCL frames symbolized with each build's PDB.
  • Times below are from XCL's log; ListX #101 means the first call of the ID3D12GraphicsCommandList10::#101 stub (from game+0x50a6657, as in the first post), used here as a time reference only.

For comparison, #680's head 95f34c1 (without 9a272d4 / 25c6f7e): the dump at the stop had four title threads in translated_compute_pso → dxc::compile, one in set_pipeline_state → resolve_wait, and three DXC workers held in wait_for_memory.

1. 383008e

t
first ListX #101 77.1 s
frame thread bridges six Wait64BitValueX to GPU queue.Wait (prod=qSome(1), wait-before-signal) 78.8 s
last presents 78–80 s window
submits 0 (dispatches still recorded) from 82 s
watchdog 109.0 s
dump title threads in bind resolve_wait / dxc::compile DXC workers compiling / in wait_for_memory free system commit
75 s (still presenting) 0 / 0 0 / 0 5.8 GB
85 s 0 / 0 3 / 0 4.0 GB
93 s 0 / 0 3 / 0 3.8 GB

No GPU queue.Wait timed out in this run.

2. 89ec0fe with #1189

t
first ListX #101 70.3 s
last presents 70–72 s window; submits 0 at 72–76 s
first stall snapshot: all fences caught up (5/5, 2743/2743, 4/4, 4/4, 5/5), 5 pipeline jobs taken and not complete; dump: 3 title threads in resolve_wait (from draw_indexed_instanced and twice from execute_indirect) 75.06 s
frame thread bridges three Wait64BitValueX (>= 0x559, prod=qNone, wait-before-signal); 6 submits 76.66 s
snapshots: one queue stays at 2746 submitted / 2743 completed, another at 6 / 5; the pipeline jobs listed change between snapshots 79.07, 83.07 s
four GPU queue.Wait on 0x559 "did not complete within 5000 ms … recorded=0x559, submitted=0x559, completed=0x0 – released on CPU"; the queues do not move after 81.68 s
watchdog 101.0 s

Dumps at 85 s and 93 s: one title thread in resolve_wait; DXC workers 1–2 compiling, none in wait_for_memory.

The frame thread

  • In both runs, after presents stop, the thread that calls PresentX waits in the title's own code, always on the same frames: KERNELBASE+0x1427f < game+0x56a0d < +0x4e7f358 < +0x6259 < +0x2481f73 < +0x2215eca.
  • The object it waits for is still unknown. Neither run ties it to the bind waits (absent in run 1) or to the GPU waits (they came after the stop in run 2, and did not time out in run 1).

Not tested: XCL_PSO_WAIT_MS; AMD; other drivers; what #101 writes.

AI use: Claude Code (Claude Opus 5.5) ran these on this machine and wrote this report. No code changes.

**@⁠guinpereira** on GitHub · 2026-11-24 15:19 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7135836845) **RTX 5060 Ti, `main` `930e8b4` + #680 (heap form), with and without #1189's snapshots: no title thread waits for DXC any more, but presents still stop a few seconds after the first `ListX #101` call, and the watchdog (`+0x23cf683`) ends the run. What the frame thread waits for is still unknown.** Two results: 1. **`383008e` (`main` + #680):** the dumps at 85 s and 93 s, after presents stopped, have **no title thread waiting for DXC or for a pipeline** (bind). 2. **`89ec0fe` (the same + #1189, `XCL_STALL_SECONDS=4`):** presents had **already stopped while every monitored queue fence was caught up**, and **three title threads were waiting in binds** for pipelines being built. The `Wait64BitValueX` bridges and the GPU wait timeouts came **later**. Performance numbers for the heap form are in [my #680 comment](https://github.com/ivall/xcl/pull/680#issuecomment-7135507057). **Tested** - RTX 5060 Ti 16 GB, driver 617.14; Ryzen 7 5700X, 32 GB; Windows 11 Pro 26200; DXC 1.8.2502.11; release. - Retail 1.0.2.1, `scripts/smoke.ps1` (180 s, `XCL_NETWORK=0`, no input), `XCL_HEAP_WINDOWS=1`, `XCL_THREAD_DUMP_AT=75,85,93`. - Builds (local, not pushed): `383008e` = `main` `930e8b4` + #680 `95f34c1` (contains `9a272d4` and `25c6f7e`); `89ec0fe` = `383008e` + #1189 `099d94b` (one trivial conflict in `q_execute_command_lists`, both lines kept). XCL frames symbolized with each build's PDB. - Times below are from XCL's log; `ListX #101` means the first call of the `ID3D12GraphicsCommandList10::#101` stub (from `game+0x50a6657`, as in the first post), used here as a time reference only. **For comparison, #680's head `95f34c1` (without `9a272d4` / `25c6f7e`):** the dump at the stop had four title threads in `translated_compute_pso` → `dxc::compile`, one in `set_pipeline_state` → `resolve_wait`, and three DXC workers held in `wait_for_memory`. **1. `383008e`** | | t | |---|---| | first `ListX #101` | 77.1 s | | frame thread bridges six `Wait64BitValueX` to GPU `queue.Wait` (`prod=qSome(1)`, wait-before-signal) | 78.8 s | | last presents | 78–80 s window | | submits 0 (dispatches still recorded) | from 82 s | | watchdog | 109.0 s | | dump | title threads in bind `resolve_wait` / `dxc::compile` | DXC workers compiling / in `wait_for_memory` | free system commit | |---|---|---|---| | 75 s (still presenting) | 0 / 0 | 0 / 0 | 5.8 GB | | 85 s | **0 / 0** | 3 / 0 | 4.0 GB | | 93 s | **0 / 0** | 3 / 0 | 3.8 GB | No GPU `queue.Wait` timed out in this run. **2. `89ec0fe` with #1189** | | t | |---|---| | first `ListX #101` | 70.3 s | | last presents | 70–72 s window; submits 0 at 72–76 s | | first stall snapshot: **all fences caught up** (5/5, 2743/2743, 4/4, 4/4, 5/5), 5 pipeline jobs taken and not complete; dump: **3 title threads in `resolve_wait`** (from `draw_indexed_instanced` and twice from `execute_indirect`) | 75.06 s | | frame thread bridges three `Wait64BitValueX` (`>= 0x559`, `prod=qNone`, wait-before-signal); 6 submits | 76.66 s | | snapshots: one queue stays at 2746 submitted / 2743 completed, another at 6 / 5; the pipeline jobs listed change between snapshots | 79.07, 83.07 s | | four GPU `queue.Wait` on `0x559` "did not complete within 5000 ms … recorded=0x559, submitted=0x559, completed=0x0 – released on CPU"; the queues do not move after | 81.68 s | | watchdog | 101.0 s | Dumps at 85 s and 93 s: one title thread in `resolve_wait`; DXC workers 1–2 compiling, none in `wait_for_memory`. **The frame thread** - In both runs, after presents stop, the thread that calls PresentX waits in the title's own code, always on the same frames: `KERNELBASE+0x1427f < game+0x56a0d < +0x4e7f358 < +0x6259 < +0x2481f73 < +0x2215eca`. - **The object it waits for is still unknown.** Neither run ties it to the bind waits (absent in run 1) or to the GPU waits (they came after the stop in run 2, and did not time out in run 1). **Not tested:** `XCL_PSO_WAIT_MS`; AMD; other drivers; what `#101` writes. **AI use:** Claude Code (Claude Opus 5.5) ran these on this machine and wrote this report. No code changes.
Author
Owner

@⁠raphaelbleier on GitHub · 2026-11-24 15:22 UTC · original

Linux + NVIDIA data point, and a plan for a PR.

I added an opt-in XCL_NO_WATCHDOG=1 to xcl run. After the title is mapped it patches the two watchdog faults VIctory found (Marvisak/VIctory#454): a jmp over the call and fault at +0x2215c27, NOPs over the write at +0x23cf683. It applies only when all 37 expected bytes of 1.0.2.1 match; the game folder is not touched.

Setup: RTX 3060 12 GB, NVIDIA 595.99.02, Ubuntu 26.04, Proton Experimental's Wine, vkd3d-proton v3.1 + #257's patch + dxil-spirv 53aac418. XCL main 47efa2e + #775 #793 #640 #891 #889 #820 #759 #1055 #1102 #935 #1142 #1025 #1150 #684 #1043 and a few recompiler fixes.

Without it, 3 of 3 world loads ended at +0x23cf683 about 3-6 min after launch. With it, the title stays alive: 20 min so far at 0 fps on the first scene while compute pipelines build (largest 1.4 MB DXIL, 126 s; 598 compute PSOs, about 3 per minute at the end). I have not yet seen whether the scene resumes.

I'd open a small PR (one new file, two lines in host.rs/lib.rs, unit tests) with smoke runs. Is a title-specific patch like this something you'd take in XCL?

AI use: Claude Code (Claude Opus 5.5) did the runs and wrote this; I checked it.

**@⁠raphaelbleier** on GitHub · 2026-11-24 15:22 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7135909180) Linux + NVIDIA data point, and a plan for a PR. I added an opt-in `XCL_NO_WATCHDOG=1` to `xcl run`. After the title is mapped it patches the two watchdog faults VIctory found (Marvisak/VIctory#454): a `jmp` over the call and fault at `+0x2215c27`, NOPs over the write at `+0x23cf683`. It applies only when all 37 expected bytes of 1.0.2.1 match; the game folder is not touched. Setup: RTX 3060 12 GB, NVIDIA 595.99.02, Ubuntu 26.04, Proton Experimental's Wine, vkd3d-proton v3.1 + #257's patch + dxil-spirv `53aac418`. XCL `main` 47efa2e + #775 #793 #640 #891 #889 #820 #759 #1055 #1102 #935 #1142 #1025 #1150 #684 #1043 and a few recompiler fixes. Without it, 3 of 3 world loads ended at `+0x23cf683` about 3-6 min after launch. With it, the title stays alive: 20 min so far at 0 fps on the first scene while compute pipelines build (largest 1.4 MB DXIL, 126 s; 598 compute PSOs, about 3 per minute at the end). I have not yet seen whether the scene resumes. I'd open a small PR (one new file, two lines in `host.rs`/`lib.rs`, unit tests) with smoke runs. Is a title-specific patch like this something you'd take in XCL? AI use: Claude Code (Claude Opus 5.5) did the runs and wrote this; I checked it.
Author
Owner

@⁠claudetools-gh on GitHub · 2026-11-24 15:24 UTC · original

A different way to handle the stall watchdog on a PC: keep it fed only while XCL itself is holding a title thread, and turn its kill into a logged warning. Tested on the retail title 1.0.2.1; it gets a run with nothing skipped from ~190 s to 768 s.

Why. The watchdog (+0x2215a60) is the console's own hang detector: a thread that does not refresh the heartbeat at +0x71b6338 for 30 one-second ticks is taken as hung, and the report routine (+0x23cf620, "GPU Loc Sig") ends the game. On a console that is right. On a PC there is a second cause the console never has: the thread is waiting for XCL – a pipeline the driver is still compiling, a sparse readback, a GPU value wait. Bypassing the watchdog (XCL_NO_WATCHDOG-style patches) hides real hangs too; bounding the waits (XCL_PSO_WAIT_MS) skips work, and the skipped dispatches leave counters "one short" and later hang the GPU.

What we tried locally (not a PR, a proposal):

  • A – fed only while XCL holds a thread. pso_async::resolve_wait, sparse::State::wait_for and the CPU value waits in list_x take a hold guard; a small thread writes a fresh QPC value to +0x71b6338 every 0.5 s while any title thread has been held for more than 1 s, up to 600 s per hold (configurable). A thread stuck in the title's own code, with nothing held in XCL, still trips the watchdog exactly as on the console.
  • B – the kill becomes a warning. A vectored handler recognises the title's deliberate mov dword ptr [0], imm32 (+0x23cf683, tag 0x4d8bd421, and the exit path's write of 0 at +0x2215c35, followed by int3 at +0x2215c40), logs "title watchdog FIRED" with a thread dump, and steps over them. An env switch restores the console behaviour.
  • Both only arm when the bytes at +0x23cf683 are that instruction, so other titles and builds are untouched.

Measured (RTX 5070 Ti, driver 621.01, Ryzen 7 9700X, Windows 11 26300; main 47efa2e plus #744, #759, #573, #1044–#1046, #1055, #1099, #1102, #828, #898, #1007, #1315, #1316; XCL_PSO_WAIT_MS unset):

before (same tree without #1315/#1316 and A + B, waits bounded at 50 ms) with A + B, nothing skipped
draws / dispatches skipped 20,992 / 4,096 0 / 0
end of run device removed at 203 s 768 s
  • A kept the heartbeat moving for 600 s while two title threads waited in set_pipeline_state → resolve_wait for one compute pipeline that NVIDIA's compiler was still building.
  • At the 600 s cap the watchdog fired, and B logged both writes and stepped over them. The run then stopped at the int3 after the exit write, which is now stepped over too.

What it does not fix: the waits themselves. One compute pipeline held the title for over 10 minutes, so the frames stop and the intro does not render. That is the compile time #1269 is about. A + B only make sure a slow compile costs time instead of a crash, and that the work done meanwhile is not lost: builds finish and land in the driver cache for the next run.

Not tested: AMD, Wine/Proton, other builds of the title, whether the title is fully healthy after B steps over a real hang (B is meant as a diagnostic, A as the fix).

Happy to open this as a PR if the direction fits.

AI-assisted.

**@⁠claudetools-gh** on GitHub · 2026-11-24 15:24 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7135969844) A different way to handle the stall watchdog on a PC: keep it fed only while XCL itself is holding a title thread, and turn its kill into a logged warning. Tested on the retail title 1.0.2.1; it gets a run with **nothing skipped** from ~190 s to 768 s. **Why.** The watchdog (`+0x2215a60`) is the console's own hang detector: a thread that does not refresh the heartbeat at `+0x71b6338` for 30 one-second ticks is taken as hung, and the report routine (`+0x23cf620`, "GPU Loc Sig") ends the game. On a console that is right. On a PC there is a second cause the console never has: the thread is waiting for XCL – a pipeline the driver is still compiling, a sparse readback, a GPU value wait. Bypassing the watchdog (`XCL_NO_WATCHDOG`-style patches) hides real hangs too; bounding the waits (`XCL_PSO_WAIT_MS`) skips work, and the skipped dispatches leave counters "one short" and later hang the GPU. **What we tried locally (not a PR, a proposal):** - **A – fed only while XCL holds a thread.** `pso_async::resolve_wait`, `sparse::State::wait_for` and the CPU value waits in `list_x` take a hold guard; a small thread writes a fresh QPC value to `+0x71b6338` every 0.5 s while any title thread has been held for more than 1 s, up to 600 s per hold (configurable). A thread stuck in the title's own code, with nothing held in XCL, still trips the watchdog exactly as on the console. - **B – the kill becomes a warning.** A vectored handler recognises the title's deliberate `mov dword ptr [0], imm32` (`+0x23cf683`, tag `0x4d8bd421`, and the exit path's write of 0 at `+0x2215c35`, followed by `int3` at `+0x2215c40`), logs "title watchdog FIRED" with a thread dump, and steps over them. An env switch restores the console behaviour. - Both only arm when the bytes at `+0x23cf683` are that instruction, so other titles and builds are untouched. **Measured** (RTX 5070 Ti, driver 621.01, Ryzen 7 9700X, Windows 11 26300; `main` 47efa2e plus #744, #759, #573, #1044–#1046, #1055, #1099, #1102, #828, #898, #1007, #1315, #1316; `XCL_PSO_WAIT_MS` unset): | | before (same tree without #1315/#1316 and A + B, waits bounded at 50 ms) | with A + B, nothing skipped | |---|---|---| | draws / dispatches skipped | 20,992 / 4,096 | 0 / 0 | | end of run | device removed at 203 s | 768 s | - A kept the heartbeat moving for 600 s while two title threads waited in `set_pipeline_state → resolve_wait` for one compute pipeline that NVIDIA's compiler was still building. - At the 600 s cap the watchdog fired, and B logged both writes and stepped over them. The run then stopped at the `int3` after the exit write, which is now stepped over too. **What it does not fix:** the waits themselves. One compute pipeline held the title for over 10 minutes, so the frames stop and the intro does not render. That is the compile time #1269 is about. A + B only make sure a slow compile costs time instead of a crash, and that the work done meanwhile is not lost: builds finish and land in the driver cache for the next run. **Not tested:** AMD, Wine/Proton, other builds of the title, whether the title is fully healthy after B steps over a real hang (B is meant as a diagnostic, A as the fix). Happy to open this as a PR if the direction fits. AI-assisted.
Author
Owner

@⁠3L1A5-1 on GitHub · 2026-11-24 15:30 UTC · original

An 8 GB data point past the watchdog, with what the last Wait64BitValueX before the hang waits on. Retail 1.0.2.1, the same input every run (XCL_PRESS_A_AT=40,45,…,120), so the times compare.

Setup: RTX 2060 SUPER 8 GB (driver 617.14, 32-lane waves), i5-9400F (6 cores), 16 GB RAM, Windows 11 26300, release, XCL_NETWORK=0, XCL_ACTIVITY=1, XCL_PSO_WAIT_MS=50. main 930e8b4 merged locally with #1182, #759 (+ xcl pipelines --watch next to the run), #1273, #1278 and a local version of the GPU-view page change I described on #1102; for the last run also #1055 + #1102. #759 and #1278 still call BIG_COMPILES.acquire() / wait_for_commit(), which main replaced with big_compile_turn in 25c6f7e; I changed those two calls locally. None of this is pushed.

What each part did on this machine

  • Without #1273 every run ended at the watchdog (+0x23cf683, 206–226 s): the title's threads waited 50 ms in bind::execute_indirect → pso_async::resolve_wait for each of ~500 compute pipelines not built yet (the late-pipeline count went 17 → 513 within ten seconds), no submits for ~20 s. With #1273: 0 late pipelines, no watchdog in any run since.
  • Without the page change, local video memory went past 12 GB and the runs ended in CreateHeap refused (0x8007000e) or the memory guard.

On screen (by the person at the PC): without #1102, black, then a green background with the cutscene's "9 months ago" text, subtitles and audio that cut in and out. With #1102: black with audio, then grey with letterbox bars, no text, audio steadier. That matches the #759 report's grey/black scene with letterbox bars.

The stop now: one counter, in every run

run first timeout wants / memory holds, at each timeout end
without #1102 (1) 263 s 3d2 / 3d0 device hung 0x887a0006 at 267 s
without #1102 (2) 245 s 3d5 / 3d4 ran to 300 s
without #1102 (3), 600 s 268 s 3ec/3ea, 3ed/3e8, 3ed/3e8 (at …fe08), 3ef/3e6 memory guard at ~299 s: process commit 25 → 43.5 GB in ~40 s while queues waited
with #1055 + #1102 210 s 409/408, 40b/407 device hung 0x887a0006 at 253 s
  • Always Wait64BitValueX at 0xc416fe18 (once 0xc416fe08), op 7, queue_type=0, after_write64=false.
  • The value in memory goes down from one timeout to the next (3ea → 3e8 → 3e6, 408 → 407) while the wanted value goes up.
  • XCL's sync record says the wanted value was produced (sync=Some((3ec, 3ec, false, Some(2)))). The "recent Write32/64 calls" at that timeout write 0x3ec with W64B to 0xc416ff10, …ff08, …ff00 and …fef8 (types 2, 0, 2, 0), 0xF0 above the address waited on; none of them is …fe18.
  • Then GPU queue.Wait at 0xc416ff08 >= 0x3ed and at 0xc416fef8 >= 0x3ed did not complete within 5000 ms.
  • Work skipped by XCL_PSO_WAIT_MS by the end: 8,192 draws / 2,147 dispatches (run 1), 17,519 / 4,838 (run 3), 4,838 / 1,024 (with #1102).

So the counter at …fe18 is never brought to the value the title waits for, and what is there moves backwards. Skipped work may be what writes it. I have not found out which writes …fe18 on the console path: a shader, a copy, or a slot the title reuses. The log of the #1102 run is kept here if someone wants other lines from it.

Not tested: other GPUs, a run without XCL_PSO_WAIT_MS past the watchdog, more than one run of each build.

AI use: Claude Code (Claude Opus 5.5) built the local branches, ran the runs and the counts from XCL's log, and drafted this; the screen observations are from the person at the PC.

**@⁠3L1A5-1** on GitHub · 2026-11-24 15:30 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7136147156) An 8 GB data point past the watchdog, with what the last `Wait64BitValueX` before the hang waits on. Retail 1.0.2.1, the same input every run (`XCL_PRESS_A_AT=40,45,…,120`), so the times compare. **Setup:** RTX 2060 SUPER 8 GB (driver 617.14, 32-lane waves), i5-9400F (6 cores), 16 GB RAM, Windows 11 26300, release, `XCL_NETWORK=0`, `XCL_ACTIVITY=1`, `XCL_PSO_WAIT_MS=50`. `main` `930e8b4` merged locally with #1182, #759 (+ `xcl pipelines --watch` next to the run), #1273, #1278 and a local version of the GPU-view page change I described on #1102; for the last run also #1055 + #1102. #759 and #1278 still call `BIG_COMPILES.acquire()` / `wait_for_commit()`, which `main` replaced with `big_compile_turn` in 25c6f7e; I changed those two calls locally. None of this is pushed. **What each part did on this machine** - Without #1273 every run ended at the watchdog (`+0x23cf683`, 206–226 s): the title's threads waited 50 ms in `bind::execute_indirect` → `pso_async::resolve_wait` for each of ~500 compute pipelines not built yet (the late-pipeline count went 17 → 513 within ten seconds), no submits for ~20 s. With #1273: 0 late pipelines, no watchdog in any run since. - Without the page change, local video memory went past 12 GB and the runs ended in `CreateHeap` refused (`0x8007000e`) or the memory guard. **On screen** (by the person at the PC): without #1102, black, then a green background with the cutscene's "9 months ago" text, subtitles and audio that cut in and out. With #1102: black with audio, then grey with letterbox bars, no text, audio steadier. That matches the #759 report's grey/black scene with letterbox bars. **The stop now: one counter, in every run** | run | first timeout | wants / memory holds, at each timeout | end | |---|---|---|---| | without #1102 (1) | 263 s | `3d2` / `3d0` | device hung `0x887a0006` at 267 s | | without #1102 (2) | 245 s | `3d5` / `3d4` | ran to 300 s | | without #1102 (3), 600 s | 268 s | `3ec`/`3ea`, `3ed`/`3e8`, `3ed`/`3e8` (at `…fe08`), `3ef`/`3e6` | memory guard at ~299 s: process commit 25 → 43.5 GB in ~40 s while queues waited | | with #1055 + #1102 | 210 s | `409`/`408`, `40b`/`407` | device hung `0x887a0006` at 253 s | - Always `Wait64BitValueX` at `0xc416fe18` (once `0xc416fe08`), `op 7`, `queue_type=0`, `after_write64=false`. - **The value in memory goes down** from one timeout to the next (`3ea → 3e8 → 3e6`, `408 → 407`) while the wanted value goes up. - XCL's sync record says the wanted value was produced (`sync=Some((3ec, 3ec, false, Some(2)))`). The "recent Write32/64 calls" at that timeout write `0x3ec` with `W64B` to `0xc416ff10`, `…ff08`, `…ff00` and `…fef8` (types 2, 0, 2, 0), 0xF0 above the address waited on; none of them is `…fe18`. - Then `GPU queue.Wait at 0xc416ff08 >= 0x3ed` and `at 0xc416fef8 >= 0x3ed` did not complete within 5000 ms. - Work skipped by `XCL_PSO_WAIT_MS` by the end: 8,192 draws / 2,147 dispatches (run 1), 17,519 / 4,838 (run 3), 4,838 / 1,024 (with #1102). So the counter at `…fe18` is never brought to the value the title waits for, and what is there moves backwards. Skipped work may be what writes it. I have not found out which writes `…fe18` on the console path: a shader, a copy, or a slot the title reuses. The log of the #1102 run is kept here if someone wants other lines from it. **Not tested:** other GPUs, a run without `XCL_PSO_WAIT_MS` past the watchdog, more than one run of each build. AI use: Claude Code (Claude Opus 5.5) built the local branches, ran the runs and the counts from XCL's log, and drafted this; the screen observations are from the person at the PC.
Author
Owner

@⁠einfachama on GitHub · 2026-11-24 15:30 UTC · original

RTX 4060 8 GB, 32 GB: the same stop at +0x23cf683, but no single long build: title threads build first-time compute pipelines one after another inside their own binds

Setup: NVIDIA GeForce RTX 4060 8 GB (driver 621.24, 32-lane waves), Ryzen 7 5800X, 32 GB RAM, commit limit 63.9 GB, Windows 11 Pro 26300. Release build of main 47efa2e, no local changes. XCL_NETWORK=0 XCL_ACTIVITY=1, A pressed at 26 s and 30 s; the world load starts by itself at ~66 s. Three 600 s runs back to back with warm caches (DXIL, driver blobs, 161–417 shader sets preloaded from earlier runs); the third with XCL_THREAD_DUMP_AT=96,100,…,120, symbolised with the build's PDB.

How it ends: +0x23cf683 (write to address 0, the heartbeat route) at 123.8 s, 122.7 s and 120.7 s, 28.6–29.7 s after the last presents (92–94 s window). No device removal, no E_OUTOFMEMORY, no guard kill. Peak commit 28.8–29.1 GB with ≥ 25.6 GB of commit free throughout, so neither dxc::wait_for_memory nor wait_for_commit can have held anything. DirectStorage failures (0x89240009, #549's case) end by ~85 s; nothing fails in the stall.

Timeline before the stop (run 1, per 2 s; runs 2 and 3 have the same shape)

t (s) presents submits dispatches DS requests commit (MB) DXC running / done
64 60 275 180 6 453 18 847 0 / 3
70 1 4 0 4 450 22 944 0 / 3
76–92 9–40 59–207 21–120 1 942–5 933 23 744 → 27 551 0 / 3
94 14 127 601 1 785 27 995 5 / 5
96–114 0 0 0–45 0 28 265 → 28 912 1–5 / 13 → 33
116–120 0 0 345–1 750 0 28 984 → 29 063 0–4 / 35 → 51
122–124 0 0 1–3 0–1 29 143 3 / 54
123.8 +0x23cf683

DirectStorage requests drop to 0 at 96 s because the title stops asking. No frame-event wait and no Wait64… timed out.

Where the threads are (run 3: seven dumps from 96 to 120 s and one at the abort, 121.8 s; title frames as offsets)

dump waiting title thread building title thread(s) busy xcl-pso / xcl-dxc xcl-pso-pre (3) heartbeat thread
96 s resolve_wait ← bind::execute_indirect ← +0x248d19f one in dxc::compile ← … ← translated_compute_pso ← build_compute, one in nvgpucomp64 1 xcl-pso in nvgpucomp64, 1 xcl-dxc idle +0x43c3d5d
100 s same both in nvgpucomp64 1 xcl-pso (graphics: translated_graphics_pso) idle same
104–108 s same one in nvgpucomp64 1 xcl-dxc / 1 xcl-pso idle same
112 s same the same one in dxc::compile (its next pipeline) 2 xcl-dxc idle same
116–121.8 s same the same one in nvgpucomp64 1 xcl-pso or 1 xcl-dxc idle same
  • The compute pipelines the title waits for are built on the title's own threads, inside resolve_wait: the bind found the lazy pipeline with no worker on it and took the job. Each build is XCL's translation, a DXC compile, then the NVIDIA compiler (nvgpucomp64). Every compute pipeline completed during the stall in all three runs was built on an unnamed (title) thread: 43 builds on 5 threads (run 1), 36 on 4 (run 2), 6 on 2 (run 3, plus one still in the driver at the abort). None completed on an xcl-pso worker; where a dump shows the XCL frames of the one busy xcl-pso worker (2 of 4), it is building a graphics pipeline (the others are 14 frames deep in nvgpucomp64).
  • Each thread's builds are serial, and each chain fills the 30 s:
run title thread with the longest chain builds driver time longest driver compile between
1 one of five (the others similar) 9 17.5 s 4.1 s 94.1–122.0 s
2 one of four 23 12.2 s (the rest DXC) 4.5 s 94.6–123.6 s
3 one of two 3 + 1 unfinished 19.5 s 8.4 s (224 KB DXIL) 101.5–121.8 s

(driver time = the ms in compute PSO with the translated console CS (… B DXIL, … ms), which counts the driver's part only.) The DXIL sizes in the stall are 100–520 KB; the longest single driver compile was 13.7 s (517 KB, run 1).

  • The waiting title thread is on the condition variable of resolve_wait (another thread has the job) in every dump, but not at the same place: its caller steps through successive ExecuteIndirect call sites of one title function, one per dump: +0x359d625, …649, …699, …6e9, …738, …780, …7ab, …7cf (each ← +0x359dcde, under +0x248d19f; above them +0x359bfab ← +0x15b4d92 ← +0x43c4591 ← +0x43c4314 ← +0x2215eca). So it works through a fixed sequence of ExecuteIndirects with different compute pipelines and waits at each for a build another title thread is doing.
  • The heartbeat thread waits at +0x43c3d5d in all 8 dumps, the frame the RTX 4070 SUPER report found.

#634's driver blobs work on this card, but the stall's programs are new each run. Over 23 runs today: 0 blobs refused; every compute program of ≥ 16 KB DXIL whose build took ≥ 250 ms was loaded from its blob in every later run (19 of 19 eligible programs of run 1's stall in runs 2 and 3), 49–64 % of the ≥ 16 KB builds of a run came from blobs, all of them in the first ~10 s (built ahead from the earlier runs' shader sets). In the stall window it was 0 % in every run: the title gets to compute pipelines no earlier run built. The same as the RX 9060 XT and RTX 4090 reports above.

Compared with the RTX 4070 SUPER report: the same heartbeat frame (+0x43c3d5d ← +0x23cf4f2 ← +0x23cf2d3 ← +0x23cf104), the same job thread in resolve_wait ← bind::execute_indirect, the same ~30 s from the last present. There, that thread waited for a preload worker stuck on one program (DXC for ≥ 72 s, then a 29.75 MB DXIL the driver didn't finish in 8 min). Here no build is long on its own: the preload workers are idle, and the time goes into many first-time compute pipelines of 100–520 KB, each built by the title thread that binds it. The largest compute DXIL built in any of my runs is 1 022 080 B (from its blob in milliseconds); the 29.75 MB program was not requested in them.

So on this card it is the sum of a serial chain, not one build: building a list's (or a pass's) pipelines side by side, or #1288's not counting the wait, would address it; caches only help from the second run that reaches each program.

Not tested

  • What +0x43c3d5d waits on (#924's XCL_TRACE_WAITS would name it); whether the waiting thread waits for the same pipeline the building thread builds.
  • #889, #1288 or a precompiled DXIL / driver-blob cache on this machine.
  • AMD, other cards.

AI use

  • Claude Code (Claude Opus 5.5) ran the builds and runs, symbolised and summarised the thread dumps, counted the builds from the logs and wrote this comment; I checked it before posting.
**@⁠einfachama** on GitHub · 2026-11-24 15:30 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7136155704) **RTX 4060 8 GB, 32 GB: the same stop at `+0x23cf683`, but no single long build: title threads build first-time compute pipelines one after another inside their own binds** **Setup:** NVIDIA GeForce RTX 4060 8 GB (driver 621.24, 32-lane waves), Ryzen 7 5800X, 32 GB RAM, commit limit 63.9 GB, Windows 11 Pro 26300. Release build of `main` `47efa2e`, no local changes. `XCL_NETWORK=0 XCL_ACTIVITY=1`, A pressed at 26 s and 30 s; the world load starts by itself at ~66 s. Three 600 s runs back to back with warm caches (DXIL, driver blobs, 161–417 shader sets preloaded from earlier runs); the third with `XCL_THREAD_DUMP_AT=96,100,…,120`, symbolised with the build's PDB. **How it ends:** `+0x23cf683` (write to address 0, the heartbeat route) at 123.8 s, 122.7 s and 120.7 s, 28.6–29.7 s after the last presents (92–94 s window). No device removal, no `E_OUTOFMEMORY`, no guard kill. Peak commit 28.8–29.1 GB with ≥ 25.6 GB of commit free throughout, so neither `dxc::wait_for_memory` nor `wait_for_commit` can have held anything. DirectStorage failures (`0x89240009`, #549's case) end by ~85 s; nothing fails in the stall. **Timeline before the stop** (run 1, per 2 s; runs 2 and 3 have the same shape) | t (s) | presents | submits | dispatches | DS requests | commit (MB) | DXC running / done | |---:|---:|---:|---:|---:|---:|---:| | 64 | 60 | 275 | 180 | 6 453 | 18 847 | 0 / 3 | | 70 | 1 | 4 | 0 | 4 450 | 22 944 | 0 / 3 | | 76–92 | 9–40 | 59–207 | 21–120 | 1 942–5 933 | 23 744 → 27 551 | 0 / 3 | | 94 | 14 | 127 | 601 | 1 785 | 27 995 | 5 / 5 | | 96–114 | 0 | 0 | 0–45 | 0 | 28 265 → 28 912 | 1–5 / 13 → 33 | | 116–120 | 0 | 0 | 345–1 750 | 0 | 28 984 → 29 063 | 0–4 / 35 → 51 | | 122–124 | 0 | 0 | 1–3 | 0–1 | 29 143 | 3 / 54 | | 123.8 | `+0x23cf683` | | | | | | DirectStorage requests drop to 0 at 96 s because the title stops asking. No frame-event wait and no `Wait64…` timed out. **Where the threads are** (run 3: seven dumps from 96 to 120 s and one at the abort, 121.8 s; title frames as offsets) | dump | waiting title thread | building title thread(s) | busy `xcl-pso` / `xcl-dxc` | `xcl-pso-pre` (3) | heartbeat thread | |---|---|---|---|---|---| | 96 s | `resolve_wait ← bind::execute_indirect ← +0x248d19f` | one in `dxc::compile ← … ← translated_compute_pso ← build_compute`, one in `nvgpucomp64` | 1 `xcl-pso` in `nvgpucomp64`, 1 `xcl-dxc` | idle | `+0x43c3d5d` | | 100 s | same | both in `nvgpucomp64` | 1 `xcl-pso` (graphics: `translated_graphics_pso`) | idle | same | | 104–108 s | same | one in `nvgpucomp64` | 1 `xcl-dxc` / 1 `xcl-pso` | idle | same | | 112 s | same | the same one in `dxc::compile` (its next pipeline) | 2 `xcl-dxc` | idle | same | | 116–121.8 s | same | the same one in `nvgpucomp64` | 1 `xcl-pso` or 1 `xcl-dxc` | idle | same | - **The compute pipelines the title waits for are built on the title's own threads**, inside `resolve_wait`: the bind found the lazy pipeline with no worker on it and took the job. Each build is XCL's translation, a DXC compile, then the NVIDIA compiler (`nvgpucomp64`). Every compute pipeline completed during the stall in all three runs was built on an unnamed (title) thread: 43 builds on 5 threads (run 1), 36 on 4 (run 2), 6 on 2 (run 3, plus one still in the driver at the abort). None completed on an `xcl-pso` worker; where a dump shows the XCL frames of the one busy `xcl-pso` worker (2 of 4), it is building a graphics pipeline (the others are 14 frames deep in `nvgpucomp64`). - Each thread's builds are **serial**, and each chain fills the 30 s: | run | title thread with the longest chain | builds | driver time | longest driver compile | between | |---|---|---:|---:|---:|---| | 1 | one of five (the others similar) | 9 | 17.5 s | 4.1 s | 94.1–122.0 s | | 2 | one of four | 23 | 12.2 s (the rest DXC) | 4.5 s | 94.6–123.6 s | | 3 | one of two | 3 + 1 unfinished | 19.5 s | 8.4 s (224 KB DXIL) | 101.5–121.8 s | (driver time = the ms in `compute PSO with the translated console CS (… B DXIL, … ms)`, which counts the driver's part only.) The DXIL sizes in the stall are 100–520 KB; the longest single driver compile was 13.7 s (517 KB, run 1). - The waiting title thread is on the condition variable of `resolve_wait` (another thread has the job) in every dump, but not at the same place: its caller steps through successive `ExecuteIndirect` call sites of one title function, one per dump: `+0x359d625`, `…649`, `…699`, `…6e9`, `…738`, `…780`, `…7ab`, `…7cf` (each `← +0x359dcde`, under `+0x248d19f`; above them `+0x359bfab ← +0x15b4d92 ← +0x43c4591 ← +0x43c4314 ← +0x2215eca`). So it works through a fixed sequence of ExecuteIndirects with different compute pipelines and waits at each for a build another title thread is doing. - The heartbeat thread waits at `+0x43c3d5d` in all 8 dumps, the frame the RTX 4070 SUPER report found. **#634's driver blobs work on this card, but the stall's programs are new each run.** Over 23 runs today: 0 blobs refused; every compute program of ≥ 16 KB DXIL whose build took ≥ 250 ms was loaded from its blob in every later run (19 of 19 eligible programs of run 1's stall in runs 2 and 3), 49–64 % of the ≥ 16 KB builds of a run came from blobs, all of them in the first ~10 s (built ahead from the earlier runs' shader sets). In the stall window it was 0 % in every run: the title gets to compute pipelines no earlier run built. The same as the RX 9060 XT and RTX 4090 reports above. **Compared with the RTX 4070 SUPER report:** the same heartbeat frame (`+0x43c3d5d ← +0x23cf4f2 ← +0x23cf2d3 ← +0x23cf104`), the same job thread in `resolve_wait ← bind::execute_indirect`, the same ~30 s from the last present. There, that thread waited for a preload worker stuck on one program (DXC for ≥ 72 s, then a 29.75 MB DXIL the driver didn't finish in 8 min). Here no build is long on its own: the preload workers are idle, and the time goes into many first-time compute pipelines of 100–520 KB, each built by the title thread that binds it. The largest compute DXIL built in any of my runs is 1 022 080 B (from its blob in milliseconds); the 29.75 MB program was not requested in them. So on this card it is the sum of a serial chain, not one build: building a list's (or a pass's) pipelines side by side, or #1288's not counting the wait, would address it; caches only help from the second run that reaches each program. **Not tested** - What `+0x43c3d5d` waits on (#924's `XCL_TRACE_WAITS` would name it); whether the waiting thread waits for the same pipeline the building thread builds. - #889, #1288 or a precompiled DXIL / driver-blob cache on this machine. - AMD, other cards. **AI use** - Claude Code (Claude Opus 5.5) ran the builds and runs, symbolised and summarised the thread dumps, counted the builds from the logs and wrote this comment; I checked it before posting.
Author
Owner

@⁠komglebissarov on GitHub · 2026-11-24 15:41 UTC · original

Test report on AMD RDNA4 (RX 9070 XT, Windows): main 930e8b4 + #1321 (156b0de) + #1288 (95299f4)

Both diffs applied together on main 930e8b4, plus a local log-only diagnostic (it prints the compute lists submitted before a device removal and did not fire in these runs). This is not either PR's head on its own.

Tested

  • AMD Radeon RX 9070 XT 16 GB (driver 32.0.31044.16), Ryzen 9 5950X, 64 GB RAM, Windows 11 26H2 (26300.9974), rustc 1.100.0 MSVC, DXC 1.9.2609; tests in debug, title in release.
  • cargo test --workspace -- --test-threads=4 on that tree: 758 passed, 0 failed, 41 ignored; no SKIPPED GPU tests.
  • The retail title of #505 (1.0.2.1), XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_FRAME_DUMP=1 XCL_RUN_SECONDS=300, scripted A presses, no XCL_PSO_WAIT_MS. One run per row, back to back, so the caches are warmer in each:
run tree first #101 end peak commit compute blobs reused
10 main + diagnostic 96.7 s +0x23cf683 at 127.5 s 34.5 GB 188
11 main + diagnostic 93.6 s +0x23cf683 at 124.5 s; the host then stayed, ended by hand 91.7 GB at 124 s, growing about 2 GB/s from 90 s 204
12 + #1321 + #1288 104.6 s running at the 300 s limit, exit 0x0 37.4 GB 223
13 + #1321 + #1288 93.0 s running at the 300 s limit, exit 0x0 39.4 GB 261
  • All four runs: 0 draws and 0 dispatches skipped, 0 device removals.
  • Runs 12 and 13 presented nothing after the world's first batch (last presents at about 106 s and 94 s). Until the limit one title thread built compute pipelines one after another: in run 13, 14 builds of 330 – 430 KB of DXIL, 8.4 – 12.2 s each in the driver, about 15 s apart.
  • Those builds come in a repeating sequence of DXIL sizes (339724, 423444, 352852, 404008, 332644, 430604, 359908, 411296 B, then again). Two programs of one size differ in about 100 bytes of DXIL and have different console-shader hashes, so each is compiled on its own. Run 13 went on where run 12 had stopped.
  • The same day on main + the diagnostic with XCL_PSO_WAIT_MS=50: 4 of 5 runs ended in 0x887a0006 27 – 29 s after the first #101 (256 – 569 dispatches skipped). 0 of the 3 runs without the variable did.

Not tested

  • Either PR alone; plain main without the local diagnostic.
  • Runs longer than 300 s: whether the world is ever presented once its pipelines are built.
  • More than one run per configuration; the caches differ between the runs.
  • NVIDIA, Intel, Wine.

AI use

  • Claude Code with Claude Fable 5.2 built the tree, ran the tests and the runs on my machine, read the logs and wrote this report.
**@⁠komglebissarov** on GitHub · 2026-11-24 15:41 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7136454116) **Test report on AMD RDNA4 (RX 9070 XT, Windows): `main` `930e8b4` + #1321 (`156b0de`) + #1288 (`95299f4`)** Both diffs applied together on `main` `930e8b4`, plus a local log-only diagnostic (it prints the compute lists submitted before a device removal and did not fire in these runs). This is not either PR's head on its own. **Tested** - AMD Radeon RX 9070 XT 16 GB (driver 32.0.31044.16), Ryzen 9 5950X, 64 GB RAM, Windows 11 26H2 (26300.9974), rustc 1.100.0 MSVC, DXC 1.9.2609; tests in debug, title in release. - `cargo test --workspace -- --test-threads=4` on that tree: 758 passed, 0 failed, 41 ignored; no `SKIPPED` GPU tests. - The retail title of #505 (1.0.2.1), `XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_FRAME_DUMP=1 XCL_RUN_SECONDS=300`, scripted A presses, no `XCL_PSO_WAIT_MS`. One run per row, back to back, so the caches are warmer in each: | run | tree | first `#101` | end | peak commit | compute blobs reused | |---|---|---|---|---|---| | 10 | `main` + diagnostic | 96.7 s | `+0x23cf683` at 127.5 s | 34.5 GB | 188 | | 11 | `main` + diagnostic | 93.6 s | `+0x23cf683` at 124.5 s; the host then stayed, ended by hand | 91.7 GB at 124 s, growing about 2 GB/s from 90 s | 204 | | 12 | + #1321 + #1288 | 104.6 s | running at the 300 s limit, exit 0x0 | 37.4 GB | 223 | | 13 | + #1321 + #1288 | 93.0 s | running at the 300 s limit, exit 0x0 | 39.4 GB | 261 | - All four runs: 0 draws and 0 dispatches skipped, 0 device removals. - Runs 12 and 13 presented nothing after the world's first batch (last presents at about 106 s and 94 s). Until the limit one title thread built compute pipelines one after another: in run 13, 14 builds of 330 – 430 KB of DXIL, 8.4 – 12.2 s each in the driver, about 15 s apart. - Those builds come in a repeating sequence of DXIL sizes (339724, 423444, 352852, 404008, 332644, 430604, 359908, 411296 B, then again). Two programs of one size differ in about 100 bytes of DXIL and have different console-shader hashes, so each is compiled on its own. Run 13 went on where run 12 had stopped. - The same day on `main` + the diagnostic with `XCL_PSO_WAIT_MS=50`: 4 of 5 runs ended in `0x887a0006` 27 – 29 s after the first `#101` (256 – 569 dispatches skipped). 0 of the 3 runs without the variable did. **Not tested** - Either PR alone; plain `main` without the local diagnostic. - Runs longer than 300 s: whether the world is ever presented once its pipelines are built. - More than one run per configuration; the caches differ between the runs. - NVIDIA, Intel, Wine. **AI use** - Claude Code with Claude Fable 5.2 built the tree, ran the tests and the runs on my machine, read the logs and wrote this report.
Author
Owner

@⁠B0rm0t0s on GitHub · 2026-11-24 16:07 UTC · original

RTX 5080: GPU Loc Sig fires 25–30 s after a Wait64BitValueX with prod=qNone, also with a warm cache

Setup: RTX 5080 (16 GB, 32-lane waves → split wave64), Ryzen 7 7800X3D, 32 GB RAM + ~100 GB pagefile, Windows 11, recent NVIDIA driver, DXC 1.9.2609.5. Reproduced on XCL main @ 930e8b4 and again on b7aa9f3. Same retail title as the 🚧 row in the README.

Symptom: intro movie, main menu and the pre-world movie all run fine. When the screen goes black to load the open world, the title ends itself with its deliberate fatal at game_scarlett_master.exe+0x23cf683: it decodes "GPU Loc Sig", then mov dword ptr [0], 0x4d8bd421. Crash times across runs: 87 s, 134 s, 142 s, 151 s, 207 s, 354 s.

Timing: in every run I checked, the fatal comes 25–30 s after a Wait64BitValueX that XCL bridges to queue.Wait with no known producer:

run build last wait with prod=qNone fatal gap
A 930e8b4 57.607 s 87.354 s 29.7 s
B 930e8b4 106.693 s 134.453 s 27.8 s
C b7aa9f3 182.876 s 207.489 s 24.6 s

Run B:

[106.693] D3D12.X: Wait64BitValueX at 0x70417fe10 >= 0x72a bridged to GPU queue.Wait (waiter=q2/ty2, prod=qNone/tySome(0); wait-before-signal, after_write64=false)
[106.693] D3D12.X: Wait64BitValueX at 0x70417fee8 >= 0x72a bridged to GPU queue.Wait (waiter=q2/ty2, prod=qNone/tySome(0); wait-before-signal, after_write64=true)
[108.448] (last log line apart from audio)
[134.453] unhandled exception 0xc0000005 in game_scarlett_master.exe+0x23cf683 (write at address 0x0)

The waited value looks like a frame counter (0x72a ≈ the 1 800 frames presented by then). In runs A and C and one more, split command list (type 2) around mid-list Wait after Write64 (#1) came at the same moment, 28.5–29.9 s before the fatal (57.450 → 87.354 s, 121.699 → 151.478 s, 179.008 → 207.489 s).

Ruled out:

  • Pipelines / shader compiles: in the last runs nearly every compute PSO in the loading window came from the driver blob cache (the driver's blob of an earlier build, 23–170 ms). Nothing was compiling during the final ~20–25 s.
  • XCL_SPLIT_MIDLIST_WAIT=0: no split happened, same fatal (run B).
  • XCL_PSO_WAIT_MS = 1000 / 2000 / unset: same fatal.
  • The DirectStorage status-array fix in b7aa9f3: same fatal (run C).
  • DirectStorage zero destination pages: a local experiment that re-read them until found → 0 failed requests, same fatal (reverted, all runs above are clean main).
  • AS-slot mesh pipelines (dummy stand-ins, local experiment): no change (reverted).

Possibly related: called_stubs in the same runs, e.g. ID3D12CommandQueue::#31 (newer layout) ×330–348 (first caller 0x0), plus ID3D12GraphicsCommandList10::#142 / #126 / #75 and ID3D12CommandAllocator::#9 ×1 300–4 800. I looked at the call sites in the exe: CommandAllocator::#9 gets a callback that allocates command memory (harmless on PC), and #75 is a bool state toggle, called only when it changes. I have not identified queue #31. Could it be what is supposed to write the value the qNone wait is waiting for?

Side note: at the loading screen, 15 PSO workers each holding ~1.5 GB in nvgpucomp64 push the machine to 90–98% RAM. Fewer workers do not slow it down, since the driver only builds 2–3 pipelines at a time anyway.

Full xcl.log / report.json on request. No game data or dumps will be shared.

**@⁠B0rm0t0s** on GitHub · 2026-11-24 16:07 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7137152992) ### RTX 5080: GPU Loc Sig fires 25–30 s after a `Wait64BitValueX` with `prod=qNone`, also with a warm cache **Setup:** RTX 5080 (16 GB, 32-lane waves → split wave64), Ryzen 7 7800X3D, 32 GB RAM + ~100 GB pagefile, Windows 11, recent NVIDIA driver, DXC 1.9.2609.5. Reproduced on XCL `main` @ `930e8b4` and again on `b7aa9f3`. Same retail title as the 🚧 row in the README. **Symptom:** intro movie, main menu and the pre-world movie all run fine. When the screen goes black to load the open world, the title ends itself with its deliberate fatal at `game_scarlett_master.exe+0x23cf683`: it decodes "GPU Loc Sig", then `mov dword ptr [0], 0x4d8bd421`. Crash times across runs: 87 s, 134 s, 142 s, 151 s, 207 s, 354 s. **Timing:** in every run I checked, the fatal comes 25–30 s after a `Wait64BitValueX` that XCL bridges to `queue.Wait` with no known producer: | run | build | last wait with `prod=qNone` | fatal | gap | |---|---|---|---|---| | A | 930e8b4 | 57.607 s | 87.354 s | 29.7 s | | B | 930e8b4 | 106.693 s | 134.453 s | 27.8 s | | C | b7aa9f3 | 182.876 s | 207.489 s | 24.6 s | Run B: [106.693] D3D12.X: Wait64BitValueX at 0x70417fe10 >= 0x72a bridged to GPU queue.Wait (waiter=q2/ty2, prod=qNone/tySome(0); wait-before-signal, after_write64=false) [106.693] D3D12.X: Wait64BitValueX at 0x70417fee8 >= 0x72a bridged to GPU queue.Wait (waiter=q2/ty2, prod=qNone/tySome(0); wait-before-signal, after_write64=true) [108.448] (last log line apart from audio) [134.453] unhandled exception 0xc0000005 in game_scarlett_master.exe+0x23cf683 (write at address 0x0) The waited value looks like a frame counter (0x72a ≈ the 1 800 frames presented by then). In runs A and C and one more, `split command list (type 2) around mid-list Wait after Write64 (#1)` came at the same moment, 28.5–29.9 s before the fatal (57.450 → 87.354 s, 121.699 → 151.478 s, 179.008 → 207.489 s). **Ruled out:** - **Pipelines / shader compiles:** in the last runs nearly every compute PSO in the loading window came from the driver blob cache (`the driver's blob of an earlier build`, 23–170 ms). Nothing was compiling during the final ~20–25 s. - **`XCL_SPLIT_MIDLIST_WAIT=0`:** no split happened, same fatal (run B). - **`XCL_PSO_WAIT_MS` = 1000 / 2000 / unset:** same fatal. - **The DirectStorage status-array fix in `b7aa9f3`:** same fatal (run C). - **DirectStorage zero destination pages:** a local experiment that re-read them until found → 0 failed requests, same fatal (reverted, all runs above are clean `main`). - **AS-slot mesh pipelines** (dummy stand-ins, local experiment): no change (reverted). **Possibly related:** `called_stubs` in the same runs, e.g. `ID3D12CommandQueue::#31 (newer layout)` ×330–348 (first caller `0x0`), plus `ID3D12GraphicsCommandList10::#142 / #126 / #75` and `ID3D12CommandAllocator::#9` ×1 300–4 800. I looked at the call sites in the exe: `CommandAllocator::#9` gets a callback that allocates command memory (harmless on PC), and `#75` is a bool state toggle, called only when it changes. I have not identified queue `#31`. Could it be what is supposed to write the value the `qNone` wait is waiting for? **Side note:** at the loading screen, 15 PSO workers each holding ~1.5 GB in `nvgpucomp64` push the machine to 90–98% RAM. Fewer workers do not slow it down, since the driver only builds 2–3 pipelines at a time anyway. Full `xcl.log` / `report.json` on request. No game data or dumps will be shared.
Author
Owner

@⁠thetunix on GitHub · 2026-11-24 16:09 UTC · original

Reproduced the world-load stall on an RTX 5060 (8 GB, driver 32.0.16.1664), i5-12400F, 32 GB RAM, Windows 11 build 26300. Retail title 1.0.2.1, Release XCL based on 47efa2e with local changes from #889, #567, #789 and #968 plus an XInput slot selection change. XCL_NETWORK=0, XCL_DXC_THREADS=4, DRED off. This run used the local build above, so it does not establish behavior on current main.

  • 605.162 s: first call to ID3D12GraphicsCommandList10::#101 from title +0x50a6657.
  • 605.445 s: XCL split a type-2 command list around a mid-list wait after Write64.
  • 608.193–634.210 s: every 2 s sample recorded zero presents and zero submits, although DirectStorage was still processing requests.
  • 634.866 s: 0xc0000005 writing to 0x0 at title +0x23cf683. Stack: +0x4e4ba89, +0x2215c35, +0x71b9a20, +0x2215eca.

The report counted 16,565 presents, 2,154 translated pipelines and 0 failed pipelines. The latest log did not record a GPU Loc Sig value. The trace establishes the ordering above but does not identify the blocked command or establish that slot #101 is responsible.

AI use: Codex (GPT-6) summarized the local run logs.

**@⁠thetunix** on GitHub · 2026-11-24 16:09 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7137211190) Reproduced the world-load stall on an RTX 5060 (8 GB, driver `32.0.16.1664`), i5-12400F, 32 GB RAM, Windows 11 build 26300. Retail title 1.0.2.1, Release XCL based on `47efa2e` with local changes from #889, #567, #789 and #968 plus an XInput slot selection change. `XCL_NETWORK=0`, `XCL_DXC_THREADS=4`, DRED off. This run used the local build above, so it does not establish behavior on current main. - **605.162 s:** first call to `ID3D12GraphicsCommandList10::#101` from title `+0x50a6657`. - **605.445 s:** XCL split a type-2 command list around a mid-list wait after `Write64`. - **608.193–634.210 s:** every 2 s sample recorded zero presents and zero submits, although DirectStorage was still processing requests. - **634.866 s:** `0xc0000005` writing to `0x0` at title `+0x23cf683`. Stack: `+0x4e4ba89`, `+0x2215c35`, `+0x71b9a20`, `+0x2215eca`. The report counted 16,565 presents, 2,154 translated pipelines and 0 failed pipelines. The latest log did not record a `GPU Loc Sig` value. The trace establishes the ordering above but does not identify the blocked command or establish that slot #101 is responsible. AI use: Codex (GPT-6) summarized the local run logs.
Author
Owner

@⁠3L1A5-1 on GitHub · 2026-11-24 16:11 UTC · original

Follow-up to my comment above: what makes the counter at 0xc416fe18 go down. XCL's deferred CPU writes (cpu_writes) re-apply an old value each time the title submits a list again.

Same machine and local build as above (RTX 2060 SUPER 8 GB, retail 1.0.2.1, automatic input, XCL_PSO_WAIT_MS=50), plus a local diagnostic (not for a PR). It logs:

  • every write recorded for 0xc416fe00–ff40;
  • every submission carrying such a write (list, queue, value);
  • each write the cpu_writes worker does there;
  • the values at …fe08 / …fe18, read every 20 ms.

These counters are XCL's CPU writes. They are Write64BitValueBottomOfPipeX into memory outside unified memory, which cpu_writes does after the queue's fence. The title writes each counter from lists on two queues (lists of type 0 and 2).

#562 (one worker per queue) does not stop the drops. With it merged locally, every write lands on time (queue fence == wanted). The same queue's worker still writes 0x41f and then 0x41e.

What brings the old value back: one list, recorded once, submitted many times.

list 0x13c9c0420
  209.041  recorded W64B fe40 = 0x3ee
  209.279  submit → queue …bc50
  209.815  recorded W64B fe18 = 0x3ee        (the last Write64 recorded on this list)
  211.164  submit → queue …e450   fe18=3ee
  212.107  submit → queue …e950   fe18=3ee
  221.103  submit → queue …bc50   fe18=3ee
  222.759  submit → queue …bc50   fe18=3ee
  234.747  (other lists on queue …e450 write fe18 = 0x3ef; the worker writes it at 234.759)
  234.783  submit → queue …e950   fe18=3ee   → 234.842: fe18 0x3ef → 0x3ee
  245.371  submit → queue …bc50   fe18=3ee   → 245.33: fe08 0x3f0 → 0x3ef (its twin list below)
  251.307  submit → queue …bc50   fe18=3ee
  • In 300 s: 12 submissions of 0x13c9c0420, each carrying fe18 = 0x3ee.
  • Its twin, 0x3aa766320, did the same for fe08 (11 submissions).
  • Four other lists were submitted 6–10 times each.
  • 24 drops in the run. Whether a Wait64BitValueX times out depends on whether a newer write lands before the 2 s are up: this run had none and reached 300 s, the earlier ones ended in 0x887a0006.

Where it happens:

  • list_x::cpu_writes_after clones s.cpu_writes for every submission of a list. The clone keeps the values from recording time, until the list's next reset.
  • So a closed list submitted again re-applies its old values, on the CPU, after the queue's fence.

I could not tell which of two cases it is:

  1. The title re-executes the list (allowed in D3D12). On the console the GPU's own write would land in the GPU's order; XCL's CPU write lands when the worker gets to it.
  2. The title records the list again in a way XCL does not see, so XCL keeps the old value.

No Write64 call is recorded on these lists after 209.8 s, and they keep being submitted. Someone who knows how the title builds these lists can probably tell which one it is.

AI use: Claude Code (Claude Opus 5.5) wrote the diagnostic, ran the runs and drafted this from the logs.

**@⁠3L1A5-1** on GitHub · 2026-11-24 16:11 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7137264118) Follow-up to my comment above: what makes the counter at `0xc416fe18` go down. **XCL's deferred CPU writes (`cpu_writes`) re-apply an old value each time the title submits a list again.** Same machine and local build as above (RTX 2060 SUPER 8 GB, retail 1.0.2.1, automatic input, `XCL_PSO_WAIT_MS=50`), plus a local diagnostic (not for a PR). It logs: - every write recorded for `0xc416fe00–ff40`; - every submission carrying such a write (list, queue, value); - each write the `cpu_writes` worker does there; - the values at `…fe08` / `…fe18`, read every 20 ms. **These counters are XCL's CPU writes.** They are `Write64BitValueBottomOfPipeX` into memory outside unified memory, which `cpu_writes` does after the queue's fence. The title writes each counter from lists on two queues (lists of type 0 and 2). **#562 (one worker per queue) does not stop the drops.** With it merged locally, every write lands on time (`queue fence == wanted`). The same queue's worker still writes `0x41f` and then `0x41e`. **What brings the old value back: one list, recorded once, submitted many times.** ``` list 0x13c9c0420 209.041 recorded W64B fe40 = 0x3ee 209.279 submit → queue …bc50 209.815 recorded W64B fe18 = 0x3ee (the last Write64 recorded on this list) 211.164 submit → queue …e450 fe18=3ee 212.107 submit → queue …e950 fe18=3ee 221.103 submit → queue …bc50 fe18=3ee 222.759 submit → queue …bc50 fe18=3ee 234.747 (other lists on queue …e450 write fe18 = 0x3ef; the worker writes it at 234.759) 234.783 submit → queue …e950 fe18=3ee → 234.842: fe18 0x3ef → 0x3ee 245.371 submit → queue …bc50 fe18=3ee → 245.33: fe08 0x3f0 → 0x3ef (its twin list below) 251.307 submit → queue …bc50 fe18=3ee ``` - In 300 s: 12 submissions of `0x13c9c0420`, each carrying `fe18 = 0x3ee`. - Its twin, `0x3aa766320`, did the same for `fe08` (11 submissions). - Four other lists were submitted 6–10 times each. - 24 drops in the run. Whether a `Wait64BitValueX` times out depends on whether a newer write lands before the 2 s are up: this run had none and reached 300 s, the earlier ones ended in `0x887a0006`. **Where it happens:** - `list_x::cpu_writes_after` clones `s.cpu_writes` for every submission of a list. The clone keeps the values from recording time, until the list's next reset. - So a closed list submitted again re-applies its old values, on the CPU, after the queue's fence. I could not tell which of two cases it is: 1. **The title re-executes the list** (allowed in D3D12). On the console the GPU's own write would land in the GPU's order; XCL's CPU write lands when the worker gets to it. 2. **The title records the list again in a way XCL does not see**, so XCL keeps the old value. No `Write64` call is recorded on these lists after 209.8 s, and they keep being submitted. Someone who knows how the title builds these lists can probably tell which one it is. AI use: Claude Code (Claude Opus 5.5) wrote the diagnostic, ran the runs and drafted this from the logs.
Author
Owner

@⁠B0rm0t0s on GitHub · 2026-11-24 16:18 UTC · original

Follow-up, comparing with @⁠emirduran707's dump: in my run B (warm cache, fatal at 134.453 s) the thread dump at the fatal has no title thread blocked inside XCL. None of the 48 title threads is in Dispatch / pso_async::resolve_wait; the only xcl.exe frame on a title thread is its thread entry. Only one PSO thread was inside nvgpucomp64 at that moment, and it was a low-priority preload worker (xcl-pso-pre-0), not a pipeline a title thread was waiting for.

So there may be two paths to the same fatal: (1) a title thread stuck in an unbounded compute-pipeline wait (cold cache, as in emirduran707's dump), and (2) with a warm cache, nothing waiting on the CPU side, but the GPU stalled behind the Wait64BitValueX ... prod=qNone wait ~25–30 s before the fatal (my table above).

**@⁠B0rm0t0s** on GitHub · 2026-11-24 16:18 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7137453480) Follow-up, comparing with @⁠emirduran707's dump: in my run B (warm cache, fatal at 134.453 s) the thread dump at the fatal has **no title thread blocked inside XCL**. None of the 48 title threads is in `Dispatch` / `pso_async::resolve_wait`; the only `xcl.exe` frame on a title thread is its thread entry. Only one PSO thread was inside `nvgpucomp64` at that moment, and it was a low-priority preload worker (`xcl-pso-pre-0`), not a pipeline a title thread was waiting for. So there may be two paths to the same fatal: (1) a title thread stuck in an unbounded compute-pipeline wait (cold cache, as in emirduran707's dump), and (2) with a warm cache, nothing waiting on the CPU side, but the GPU stalled behind the `Wait64BitValueX ... prod=qNone` wait ~25–30 s before the fatal (my table above).
Author
Owner

@⁠B0rm0t0s on GitHub · 2026-11-24 16:34 UTC · original

Correction to my table above: prod=qNone is not the common factor. In a new run on b7aa9f3 (fatal at 276.492 s) the last waits before the fatal had a known producer (prod=qSome(2)). What repeats in all 5 runs is the first same-list "Wait after Write64" when the world loads (the split command list (type 2) around mid-list Wait after Write64 (#1) line, or the after_write64=true wait when splitting is off), 27.8–29.9 s before the fatal: 57.45 → 87.35, 106.69 → 134.45 (split off), 121.70 → 151.48, 179.01 → 207.49, 247.46 → 276.49. XCL's own 5 s GPU-wait watchdog (released on CPU to prevent GPU hang) never fired in any of these runs. After the fatal in the last run the process stayed alive at 0% CPU and had to be killed, same as requiemsnkrp's report.

**@⁠B0rm0t0s** on GitHub · 2026-11-24 16:34 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7137885821) Correction to my table above: `prod=qNone` is not the common factor. In a new run on `b7aa9f3` (fatal at 276.492 s) the last waits before the fatal had a known producer (`prod=qSome(2)`). What repeats in all 5 runs is the first same-list "Wait after Write64" when the world loads (the `split command list (type 2) around mid-list Wait after Write64 (#1)` line, or the `after_write64=true` wait when splitting is off), 27.8–29.9 s before the fatal: 57.45 → 87.35, 106.69 → 134.45 (split off), 121.70 → 151.48, 179.01 → 207.49, 247.46 → 276.49. XCL's own 5 s GPU-wait watchdog (`released on CPU to prevent GPU hang`) never fired in any of these runs. After the fatal in the last run the process stayed alive at 0% CPU and had to be killed, same as requiemsnkrp's report.
Author
Owner

@⁠Eterst on GitHub · 2026-11-24 16:28 UTC · original · edited 2026-11-24 16:36 UTC

RTX 4070 SUPER: thread dumps while the world load stands still (no crash this time), and what the stuck threads wait on

Correction (second run, same build): the stand-still is not a deadlock. I missed two title threads that were inside XCL. One is a title thread in real::translated_compute_pso → pso::console_to_dxil_in → dxc::compile, waiting for DXC. The other is in bind::set_pipeline_state → pso_async::resolve_wait. They build first-time compute pipelines one after another, 15–20 s each (DXC, then the driver: 337–436 KB DXIL at 8.4–15.3 s in the driver alone), and the frame loop waits on them. So this is the compile-throughput case from #1269. The prod=qNone waits are not involved: with logging on every Write64/Wait64 in 0x70417fe00..0x704180000, every waited value was recorded, submitted and completed within 0.3 s (fence = memory = 0x7e6, nothing armed). The table below is still what those threads show. The paragraph on the timer and the 128-entry pool describes what the title waits for, not a cause.

Setup: RTX 4070 SUPER 12 GB (driver 616.92, 32-lane waves), Ryzen 7 5700X, 32 GB RAM, Windows 10 22H2 (19045). Release build of main b7aa9f3 plus #684 (e56dbc3), #549 (1870880, conflict in enqueue_numbered resolved by hand), #1288 (95299f4), #1273 (be8d052) and two local patches (a sparse-state lock change and a recompiler change), so this is not main. Retail 1.0.2.1. XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_TRACE_FAULTS=1 XCL_RUN_SECONDS=300 XCL_THREAD_DUMP_AT=60,80,95,105,115,140,200, A pressed by a script at 15–60 s.

What happened: menus, intro and loading ran with 0 failed DirectStorage requests and 0 failed BCPack unpacks. Then, the same sequence as the RTX 5080 report:

[ 82.602] [STUB] ID3D12GraphicsCommandList12::#101 first called from +0x50a6657
[ 83.159] split command list (type 2) around mid-list Wait after Write64 (#1)
[ 83.427] Wait64BitValueX at 0x70417fe58 >= 0x773 bridged to GPU queue.Wait (waiter=q0/ty2, prod=qNone/tySome(0); wait-before-signal)
[ 83.434] Wait64BitValueX at 0x70417fe10 >= 0x773 ... (waiter=q1/ty2, prod=qNone/tySome(0))
[ 83.434] Wait64BitValueX at 0x70417fee8 >= 0x773 ... (waiter=q1/ty2, prod=qNone/tySome(0))

After that: 0 presents and 0 submits in every 2 s sample to 300 s (1 903 frames in all). XCL's GPU-wait watchdog never logged a release. Only the PSO workers kept going (compute PSOs of 150–260 KB DXIL at 3–9 s each until ~150 s, then idle). No +0x23cf683 this time: the run reached XCL_RUN_SECONDS standing still. I think one of the pipeline PRs (#1288 changes how Sleep counts time) keeps the title's timer from firing rather than fixing anything, but I have not checked that.

Thread dumps (same in every dump from 95 s to 200 s):

thread waits at what it is
title main thread WaitForSingleObject(INFINITE) via +0x56a0d ← +0x23cf735 ← +0x8126a7 ← … ← +0x56a1e5a at 80 s it was still in the Sleep(1) poll loop at +0x23cf716..729 of the same function
one title thread (entry chain +0x23cf104 ← +0x2215eca) WaitForSingleObject(INFINITE) at +0x43c3d58, ← +0x23cf4f2 ← +0x23cf2d3 ← +0x23cf104 at 80 s it was inside nvwgf2umx.dll; it is the thread that called #101 and logged the compute PSO at 82.97 s
frame/present thread semaphore-style wait +0x2481f6e → +0x6259 → +0x4e7f358 → +0x56a0d
15 job threads idle at +0x221c3c2

Main +0x8126a7, +0x53ec040, +0x53ebf3a, +0x661f0, +0x1d109c9, +0x5a91c0d are the rest of the main thread's stack.

What the function the main thread is in does (from reading the code around those addresses, not from a debugger):

  • +0x23cf6a0 arms a timer through +0x22161f0 with +0x23cf620 as its callback. That callback decodes "GPU Loc Sig" and writes to address 0 at +0x23cf683. So the fatal is a timeout on this function, not a check on a GPU value.
  • It then waits for the object at [+0xa210cf8]. The object is made through +0x1ad0ef0 with entry +0x23cefb0: the thread in the second row. First it polls (+0x23cb280, Sleep(1)), then it waits with no timeout (+0x23ceeb0). It disarms the timer afterwards.
  • That thread waits on the event at +0x9c3be78. It is the first of an array of 128 entries of 0x30 bytes at +0x9c3be60, each with a handle at +0x18. The release side is +0x4deb5a0 and +0x50bb3f0, which hand back packed byte counters with cmpxchg. It looks like a pool of command-list contexts whose counters are returned when work retires.

So the abort is the title noticing that its submission thread has not come back. In this run that thread stops at the same moment as the prod=qNone waits, a second after the first #101 call.

Not tested: main alone in this exact setup; which of the patches removes the abort; who should write >= 0x773 (next run, with more Wait64 logging).

AI use: Claude Code (Claude Opus 5.5) ran the build and the run, read the log and dumps, disassembled the addresses above, and wrote this comment.

**@⁠Eterst** on GitHub · 2026-11-24 16:28 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7137734390) · edited 2026-11-24 16:36 UTC **RTX 4070 SUPER: thread dumps while the world load stands still (no crash this time), and what the stuck threads wait on** > **Correction (second run, same build):** the stand-still is not a deadlock. I missed two title threads that were inside XCL. One is a title thread in `real::translated_compute_pso` → `pso::console_to_dxil_in` → `dxc::compile`, waiting for DXC. The other is in `bind::set_pipeline_state` → `pso_async::resolve_wait`. They build first-time compute pipelines one after another, 15–20 s each (DXC, then the driver: 337–436 KB DXIL at 8.4–15.3 s in the driver alone), and the frame loop waits on them. So this is the compile-throughput case from #1269. The `prod=qNone` waits are not involved: with logging on every `Write64`/`Wait64` in `0x70417fe00..0x704180000`, every waited value was recorded, submitted and completed within 0.3 s (fence = memory = `0x7e6`, nothing armed). The table below is still what those threads show. The paragraph on the timer and the 128-entry pool describes what the title waits *for*, not a cause. **Setup:** RTX 4070 SUPER 12 GB (driver 616.92, 32-lane waves), Ryzen 7 5700X, 32 GB RAM, Windows 10 22H2 (19045). Release build of `main` `b7aa9f3` plus #684 (`e56dbc3`), #549 (`1870880`, conflict in `enqueue_numbered` resolved by hand), #1288 (`95299f4`), #1273 (`be8d052`) and two local patches (a sparse-state lock change and a recompiler change), so this is not `main`. Retail 1.0.2.1. `XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_TRACE_FAULTS=1 XCL_RUN_SECONDS=300 XCL_THREAD_DUMP_AT=60,80,95,105,115,140,200`, A pressed by a script at 15–60 s. **What happened:** menus, intro and loading ran with 0 failed DirectStorage requests and 0 failed BCPack unpacks. Then, the same sequence as the [RTX 5080 report](https://github.com/ivall/xcl/issues/505#issuecomment-7137152992): [ 82.602] [STUB] ID3D12GraphicsCommandList12::#101 first called from +0x50a6657 [ 83.159] split command list (type 2) around mid-list Wait after Write64 (#1) [ 83.427] Wait64BitValueX at 0x70417fe58 >= 0x773 bridged to GPU queue.Wait (waiter=q0/ty2, prod=qNone/tySome(0); wait-before-signal) [ 83.434] Wait64BitValueX at 0x70417fe10 >= 0x773 ... (waiter=q1/ty2, prod=qNone/tySome(0)) [ 83.434] Wait64BitValueX at 0x70417fee8 >= 0x773 ... (waiter=q1/ty2, prod=qNone/tySome(0)) After that: 0 presents and 0 submits in every 2 s sample to 300 s (1 903 frames in all). XCL's GPU-wait watchdog never logged a release. Only the PSO workers kept going (compute PSOs of 150–260 KB DXIL at 3–9 s each until ~150 s, then idle). **No `+0x23cf683` this time**: the run reached `XCL_RUN_SECONDS` standing still. I think one of the pipeline PRs (#1288 changes how `Sleep` counts time) keeps the title's timer from firing rather than fixing anything, but I have not checked that. **Thread dumps (same in every dump from 95 s to 200 s):** | thread | waits at | what it is | |---|---|---| | title main thread | `WaitForSingleObject(INFINITE)` via `+0x56a0d` ← `+0x23cf735` ← `+0x8126a7` ← … ← `+0x56a1e5a` | at 80 s it was still in the `Sleep(1)` poll loop at `+0x23cf716..729` of the same function | | one title thread (entry chain `+0x23cf104` ← `+0x2215eca`) | `WaitForSingleObject(INFINITE)` at `+0x43c3d58`, ← `+0x23cf4f2` ← `+0x23cf2d3` ← `+0x23cf104` | at 80 s it was inside `nvwgf2umx.dll`; it is the thread that called #101 and logged the compute PSO at 82.97 s | | frame/present thread | semaphore-style wait `+0x2481f6e` → `+0x6259` → `+0x4e7f358` → `+0x56a0d` | | | 15 job threads | idle at `+0x221c3c2` | | Main `+0x8126a7`, `+0x53ec040`, `+0x53ebf3a`, `+0x661f0`, `+0x1d109c9`, `+0x5a91c0d` are the rest of the main thread's stack. **What the function the main thread is in does** (from reading the code around those addresses, not from a debugger): - `+0x23cf6a0` arms a timer through `+0x22161f0` with `+0x23cf620` as its callback. That callback decodes "GPU Loc Sig" and writes to address 0 at `+0x23cf683`. So the fatal is a timeout on this function, not a check on a GPU value. - It then waits for the object at `[+0xa210cf8]`. The object is made through `+0x1ad0ef0` with entry `+0x23cefb0`: the thread in the second row. First it polls (`+0x23cb280`, `Sleep(1)`), then it waits with no timeout (`+0x23ceeb0`). It disarms the timer afterwards. - That thread waits on the event at `+0x9c3be78`. It is the first of an array of 128 entries of 0x30 bytes at `+0x9c3be60`, each with a handle at +0x18. The release side is `+0x4deb5a0` and `+0x50bb3f0`, which hand back packed byte counters with `cmpxchg`. It looks like a pool of command-list contexts whose counters are returned when work retires. So the abort is the title noticing that its submission thread has not come back. In this run that thread stops at the same moment as the `prod=qNone` waits, a second after the first #101 call. **Not tested:** `main` alone in this exact setup; which of the patches removes the abort; who should write `>= 0x773` (next run, with more `Wait64` logging). AI use: Claude Code (Claude Opus 5.5) ran the build and the run, read the log and dumps, disassembled the addresses above, and wrote this comment.
Author
Owner

@⁠not-rex on GitHub · 2026-11-24 17:33 UTC · original

Withdrawing my XCL_LOOP_BUDGET plan above: @⁠upipibi's #1284 already does this, and it was opened before my plan, so I missed it. I'll drop mine and run #1284 on an RTX 3080 in the world instead (4096 against the default, with XCL_PSO_WAIT_MS=50), and post that on #1284.

One small note for #1284 from our version: values above 65 536 are accepted there and raise the budget. If that's not meant to be possible, capping at 65 536 would match "lowers".

AI use: Claude Code (Claude Opus 5.5) compared the two changes and wrote this.

**@⁠not-rex** on GitHub · 2026-11-24 17:33 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7139369771) Withdrawing my `XCL_LOOP_BUDGET` plan above: @⁠upipibi's #1284 already does this, and it was opened before my plan, so I missed it. I'll drop mine and run #1284 on an RTX 3080 in the world instead (4096 against the default, with `XCL_PSO_WAIT_MS=50`), and post that on #1284. One small note for #1284 from our version: values above 65 536 are accepted there and raise the budget. If that's not meant to be possible, capping at 65 536 would match "lowers". AI use: Claude Code (Claude Opus 5.5) compared the two changes and wrote this.
Author
Owner

@⁠Ariorh1337 on GitHub · 2026-11-24 17:38 UTC · original

RTX 5090: with every shader stage prebuilt in the heap form, the world loads (Game Running, FBK_STRY000_INTRO in Prestream) with nothing skipped. What ends it now is cross-queue GPU waits that never complete, then device removal.

Setup: RTX 5090 (driver 32.0.16.1692, 32-lane waves), Ryzen 7 9800X3D, 64 GB, Windows 11 Pro 26300, rustc 1.99.0, release, DXC 1.9.2609.5, retail 1.0.2.1. XCL_HEAP_WINDOWS=1 XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_THREAD_DUMP_AT=…. No XCL_PSO_WAIT_MS, so binds wait; no skipped draws or dispatches in any run below.

Tree: main 930e8b4 with b8b1f49 reverted (#1307), plus #1288 95299f4, #680 95f34c1, #688 0b82a3d, #751 1a480bc, #1316 5e312d5 with @⁠psuedo-tty's shared-branch-target diff for compact.rs (now #1448). Local, not for upstream: a name filter, a shard switch and per-program timing in xcl shaders --precompile, and a hand merge of #1316 with #680 in recomp/mod.rs. cargo test --release -p xcl --lib -- compact heap_window memory_windows on that tree: 30 passed, 0 failed, 1 SKIPPED (no wave64).

Caches before the runs, all in the heap form, built offline in parallel processes:

  • Every compute program with --pipelines: 1 682 ordinary programs, 1 004 CS_RaytracingResolve, and the 3 CS_ScreenProbes_Activate* programs through the compact form. Those three built in 20.6 s, 31.2 s and 66.8 s (852 KB, 780 KB and 2 500 KB of DXIL). 4 programs fell back to the switch form (E_OUTOFMEMORY in the heap form).
  • DXIL for every VS / PS / MS record (--precompile without --only): 25 377 compiled, 19 errors.

Run A (compute only prebuilt, graphics not): the stop is a graphics pipeline.

  • First #101 at 60.2 s, then 8 816 dispatches in the next 2 s.
  • From 64 s: 0 presents, 0 submits, 0 DirectStorage requests per 2 s window.
  • Thread dumps at 120 s and 180 s show the same thing. One title job thread is in bind::execute_indirect → pso_async::resolve_wait, waiting for a graphics pipeline that an xcl-pso worker builds through translated_graphics_pso → console_to_dxil → dxc::compile, then the driver.
  • The heap form changes the HLSL of VS / PS / MS too, so prebuilding only compute is not enough with XCL_HEAP_WINDOWS=1.

Run B (all stages prebuilt): the world loads.

  • First #101 at 53.3 s. Presents continue to ~70 s.
  • 47 compute PSOs after #101: 44 from kept blobs, 6.2 s of driver time in all, the longest 0.7 s.
  • At 105 s: 15224 draws with translated pipelines (0 skipped, 0 with PC pipelines), 16384 dispatches (0 skipped).
  • The title's own crash context, written at the end:
    Game Running Time: 0h:1m:2s
    Game State: Game Running
    Frame: 954
    Current SRL Name: fbk_stry000_FBK_STRY000_INTRO
    Current SRL State: Prestream
    Peds: 77/600 (real: 51, dummy: 26), mission: 24; vehicles: mission: 31
    
  • What ends it: 81 GPU queue.Wait … did not complete within 5000 ms – released on CPU, from 73.6 s.
    • The first batch (73.6 s) waits on 0x70417fe58/fe68/fe10/fee8 >= 0x5c2, prod=qSome(1), with submitted=0x5c2, completed=0x0.
    • The second batch (84.1–84.4 s) is on q0 / q2 / q3 / q4 for >= 0x5c3, prod=qSome(1), with submitted=0x5c3, completed=0x5c2.
    • So the producer list on q1 was submitted, but the GPU never finished it.
    • In between, the 2 s windows show bursts of 1 645–2 319 dispatches and a few submits, with no presents.
    • At 111.7 s: D3D12 device removed: 0x887a0005. Then the title's own int3 at game_scarlett_master.exe+0x2474606, the same instruction @⁠PhotographyFlow reached on RDNA4 in #1269 with the largest programs refused.
  • No would close a GPU cycle line in this run.

Run C (run B's tree + #1429 3ea5ef4, same caches): same end.

  • cargo test --release -p xcl --lib -- list_x on that tree: 28 passed, 0 failed.
  • First #101 at 60.4 s; presents stopped 4 s later.
  • #1429 caught 4 rewinds (Write64 fence rewound from 0x4f4 to 0x4f3 – restoring on CPU, 67.5–73.3 s).
  • The waits still did not complete: 32 GPU queue.Wait … did not complete within 5000 ms in the run.
  • D3D12 device removed: 0x887a0005 at 89.3 s, then the same int3 at +0x2474606. The title's context was Game Running, frame 860, FBK_STRY000_INTRO in Prestream, 69 peds.
  • So on native Windows the rewinds happen, but repairing them is not enough here: the producer list on q1 itself does not finish.

This looks like the cross-queue stop described above (@⁠S1m0ne1997's removal after ~3.5 min, @⁠3L1A5-1's cpu_writes regression, the q3/q4 stall in #675) and the 0x887a0005 after compute-queue waits in #1452. Here it is reached with every pipeline ready and nothing skipped, so pipeline compiles are no longer part of it. It is also where @⁠yeistark's run A above (same b8b1f49 revert + #1316 + #1288, compute DXIL only) would get to once the compute pipelines and the graphics stages are prebuilt too: their title waited on 8–37 s driver builds from ~90 s, ours took 6.2 s of driver time in all after #101.

Not tested: AMD; main without these PRs; a run with #680 off (graphics in the switch form); XCL_LOOP_BUDGET (#1284); the other open sync PRs on top of this tree; DRED (XCL_DRED=1) to name the faulting list.

AI use: Claude Code (Claude Opus 5.5) ran the builds, the precompiles and the runs on the machine above, read the logs and thread dumps, and wrote this comment. I checked it before posting.

**@⁠Ariorh1337** on GitHub · 2026-11-24 17:38 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7139492946) **RTX 5090: with every shader stage prebuilt in the heap form, the world loads (`Game Running`, `FBK_STRY000_INTRO` in Prestream) with nothing skipped. What ends it now is cross-queue GPU waits that never complete, then device removal.** **Setup:** RTX 5090 (driver 32.0.16.1692, 32-lane waves), Ryzen 7 9800X3D, 64 GB, Windows 11 Pro 26300, rustc 1.99.0, release, DXC 1.9.2609.5, retail 1.0.2.1. `XCL_HEAP_WINDOWS=1 XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_THREAD_DUMP_AT=…`. No `XCL_PSO_WAIT_MS`, so binds wait; no skipped draws or dispatches in any run below. **Tree:** `main` `930e8b4` with `b8b1f49` reverted (#1307), plus #1288 `95299f4`, #680 `95f34c1`, #688 `0b82a3d`, #751 `1a480bc`, #1316 `5e312d5` with @⁠psuedo-tty's shared-branch-target diff for `compact.rs` (now #1448). Local, not for upstream: a name filter, a shard switch and per-program timing in `xcl shaders --precompile`, and a hand merge of #1316 with #680 in `recomp/mod.rs`. `cargo test --release -p xcl --lib -- compact heap_window memory_windows` on that tree: 30 passed, 0 failed, 1 SKIPPED (no wave64). **Caches before the runs**, all in the heap form, built offline in parallel processes: - Every compute program with `--pipelines`: 1 682 ordinary programs, 1 004 `CS_RaytracingResolve`, and the 3 `CS_ScreenProbes_Activate*` programs through the compact form. Those three built in 20.6 s, 31.2 s and 66.8 s (852 KB, 780 KB and 2 500 KB of DXIL). 4 programs fell back to the switch form (`E_OUTOFMEMORY` in the heap form). - DXIL for every VS / PS / MS record (`--precompile` without `--only`): 25 377 compiled, 19 errors. **Run A (compute only prebuilt, graphics not): the stop is a graphics pipeline.** - First `#101` at 60.2 s, then 8 816 dispatches in the next 2 s. - From 64 s: 0 presents, 0 submits, 0 DirectStorage requests per 2 s window. - Thread dumps at 120 s and 180 s show the same thing. One title job thread is in `bind::execute_indirect` → `pso_async::resolve_wait`, waiting for a *graphics* pipeline that an `xcl-pso` worker builds through `translated_graphics_pso` → `console_to_dxil` → `dxc::compile`, then the driver. - The heap form changes the HLSL of VS / PS / MS too, so prebuilding only compute is not enough with `XCL_HEAP_WINDOWS=1`. **Run B (all stages prebuilt): the world loads.** - First `#101` at 53.3 s. Presents continue to ~70 s. - 47 compute PSOs after `#101`: 44 from kept blobs, 6.2 s of driver time in all, the longest 0.7 s. - At 105 s: `15224 draws with translated pipelines (0 skipped, 0 with PC pipelines), 16384 dispatches (0 skipped)`. - The title's own crash context, written at the end: ``` Game Running Time: 0h:1m:2s Game State: Game Running Frame: 954 Current SRL Name: fbk_stry000_FBK_STRY000_INTRO Current SRL State: Prestream Peds: 77/600 (real: 51, dummy: 26), mission: 24; vehicles: mission: 31 ``` - **What ends it:** 81 `GPU queue.Wait … did not complete within 5000 ms – released on CPU`, from 73.6 s. - The first batch (73.6 s) waits on `0x70417fe58`/`fe68`/`fe10`/`fee8 >= 0x5c2`, `prod=qSome(1)`, with `submitted=0x5c2, completed=0x0`. - The second batch (84.1–84.4 s) is on q0 / q2 / q3 / q4 for `>= 0x5c3`, `prod=qSome(1)`, with `submitted=0x5c3, completed=0x5c2`. - So the producer list on q1 was submitted, but the GPU never finished it. - In between, the 2 s windows show bursts of 1 645–2 319 dispatches and a few submits, with no presents. - At 111.7 s: `D3D12 device removed: 0x887a0005`. Then the title's own `int3` at `game_scarlett_master.exe+0x2474606`, the same instruction @⁠PhotographyFlow reached on RDNA4 in #1269 with the largest programs refused. - No `would close a GPU cycle` line in this run. **Run C (run B's tree + #1429 `3ea5ef4`, same caches): same end.** - `cargo test --release -p xcl --lib -- list_x` on that tree: 28 passed, 0 failed. - First `#101` at 60.4 s; presents stopped 4 s later. - #1429 caught 4 rewinds (`Write64 fence rewound from 0x4f4 to 0x4f3 – restoring on CPU`, 67.5–73.3 s). - The waits still did not complete: 32 `GPU queue.Wait … did not complete within 5000 ms` in the run. - `D3D12 device removed: 0x887a0005` at 89.3 s, then the same `int3` at `+0x2474606`. The title's context was `Game Running`, frame 860, `FBK_STRY000_INTRO` in Prestream, 69 peds. - So on native Windows the rewinds happen, but repairing them is not enough here: the producer list on q1 itself does not finish. This looks like the cross-queue stop described above (@⁠S1m0ne1997's removal after ~3.5 min, @⁠3L1A5-1's `cpu_writes` regression, the q3/q4 stall in #675) and the `0x887a0005` after compute-queue waits in #1452. Here it is reached with every pipeline ready and nothing skipped, so pipeline compiles are no longer part of it. It is also where @⁠yeistark's run A above (same `b8b1f49` revert + #1316 + #1288, compute DXIL only) would get to once the compute *pipelines* and the graphics stages are prebuilt too: their title waited on 8–37 s driver builds from ~90 s, ours took 6.2 s of driver time in all after `#101`. **Not tested:** AMD; `main` without these PRs; a run with #680 off (graphics in the switch form); `XCL_LOOP_BUDGET` (#1284); the other open sync PRs on top of this tree; DRED (`XCL_DRED=1`) to name the faulting list. **AI use:** Claude Code (Claude Opus 5.5) ran the builds, the precompiles and the runs on the machine above, read the logs and thread dumps, and wrote this comment. I checked it before posting.
Author
Owner

@⁠not-rex on GitHub · 2026-11-24 17:41 UTC · original

@⁠3L1A5-1 Your re-applied cpu_writes look like #929's bug. GTA VI resets pooled lists through
the newer layout's #139. After a mid-list Wait64 split, the title_list wrapper forwards #139
to the continuation segment only (title_list.rs vtable overrides 0/1/2/9/10). So the primary
PC list is never reset again. It stays closed with its last Write64 (your fe18 = 0x3ee), and
push_segments submits it again with every later submission of that list. That fits "no Write64
recorded on these lists after 209.8 s, and they keep being submitted", and the drops starting at
world load, where the first splits are logged. #929 routes #139 through title_list::reset, which
clears the primary's cpu_writes. A run with #929 merged on your setup should show whether the
drops at …fe18 / …fe08 go away.

AI use: Claude Code (Claude Opus 5.5) read the code and drafted this.

**@⁠not-rex** on GitHub · 2026-11-24 17:41 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7139564049) @⁠3L1A5-1 Your re-applied `cpu_writes` look like #929's bug. GTA VI resets pooled lists through the newer layout's #139. After a mid-list Wait64 split, the `title_list` wrapper forwards #139 to the continuation segment only (`title_list.rs` vtable overrides 0/1/2/9/10). So the primary PC list is never reset again. It stays closed with its last `Write64` (your `fe18 = 0x3ee`), and `push_segments` submits it again with every later submission of that list. That fits "no Write64 recorded on these lists after 209.8 s, and they keep being submitted", and the drops starting at world load, where the first splits are logged. #929 routes #139 through `title_list::reset`, which clears the primary's `cpu_writes`. A run with #929 merged on your setup should show whether the drops at `…fe18` / `…fe08` go away. AI use: Claude Code (Claude Opus 5.5) read the code and drafted this.
Author
Owner

@⁠yeistark on GitHub · 2026-11-24 17:31 UTC · original · edited 2026-11-24 18:01 UTC

RTX A2000 12 GB / 16 GB RAM, main b7aa9f3 + #1307 revert + #1316 + #1288 + #640: no +0x23cf683 stop in 1030 s after #101; the title stops presenting at ~90 s and waits on compute pipeline builds. With XCL_PSO_WAIT_MS=2000 it waits on Wait64BitValueX values with no producer instead (#1452).

Tree: cf90938 (local, no uncommitted changes) = main b7aa9f3 + revert of b8b1f49 + #1316 (ee904f1, with #1315) + #1288 (9cdae10) + #640 (5d6fac8).

Setup: NVIDIA RTX A2000 12 GB (wave32), driver 621.14; Ryzen 7 5700; 16 GB RAM, commit limit 51.8 GB; Windows 11 26200; rustc 1.100.0 MSVC release; DXC 1.9.2609.5. Retail 1.0.2.1, Series X profile. XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_DXC_THREADS=6 XCL_PAGE_BUDGET_MB=6144 (without the budget this machine stops at #333's +0x193e00f at 93 s, see my report on #640). Compute DXIL precompiled with xcl shaders --precompile --only cs.

cargo test --workspace -- --test-threads=4 on cf90938: 799 passed, 0 failed, 41 ignored; 3 SKIPPED (no wave64).

Baseline: main 930e8b4 + #1307 revert only, same machine: world load from ~150 s, #101 at 182 s, +0x23cf683 at 234.9 s (the crash reporter's 31.6 MB minidump upload was refused by XCL_NETWORK=0).

Run A (no pipeline wait limit):

  • #101 at 87.7 s. Last present at 90.2 s; 0 presents from then on.
  • Alive when I stopped it at 1120 s: no +0x23cf683, no device removal, commit 26–29.5 GB, local VRAM flat at 10.9 GB.
  • 325 compute PSOs built, 0 dispatches skipped. Builds of 200–420 KB DXIL took 8–21 s each in the driver; the longest was 36.8 s (1 053 272 B DXIL). From ~250 s on, the title issued a draw or dispatch only now and then between builds.
  • 3 Wait64BitValueX … prod=qNone … wait-before-signal lines.

Run B (XCL_PSO_WAIT_MS=2000, driver blobs from run A):

  • #101 at 103.2 s; last present at 106.0 s.
  • 307 dispatches and 64 draws skipped by the wait limit; 170 of 401 PSOs came from driver blobs. Longest build 101.9 s (1 022 080 B DXIL).
  • At 137.1 s, five Wait64BitValueX bridged to GPU queue.Wait with prod=qNone/tySome(0); wait-before-signal (q0 ×3, q1 ×2, >= 0x89c). From ~200 s: 0 presents, 0 draws, 0 dispatches per 2 s.
  • No GPU queue.Wait … did not complete within 5000 ms … released on CPU line was ever logged, so either those waits completed or the sync watchdog did not release them; I could not tell which from the log. #1429's second point (the watchdog going back to sleep) may be relevant; not tested here.
  • Stopped by me at 284 s, alive.

Not tested: #1429; XCL_PSO_WAIT_MS values other than 2000; thread stacks during the stall; whether ActivateRays was among the builds (I did not map hashes to names). Logs and report.json of both runs available on request.

AI use: Claude Code (Claude Opus 5.5) built the tree, ran the tests and the title on this machine, and drafted this report; I checked it before posting.

Update (same machine): where the title is held after #101, from thread dumps. The NVIDIA compiler runs ~2 of XCL's 6 pipeline workers at a time; the other 4 wait on a lock inside nvgpucomp64.dll.

Tree: aa1f1e4 (local, no uncommitted changes) = main 9e3831e + revert of b8b1f49 + #1316 (c3d119c) + #1288 (9cdae10) + #640 (5d6fac8) + #1429 (3ea5ef4). cargo test --workspace -- --test-threads=4: 807 passed, 0 failed, 41 ignored; SKIPPED: 3× no wave64, heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).

Settings as before plus XCL_PSO_WAIT_MS=2000 XCL_THREAD_DUMP_AT=150,240 XCL_RUN_SECONDS=260.

With #1429: #101 at 86.4 s; at 88.9–89.1 s three Wait64BitValueX … prod=qNone/tySome(0); wait-before-signal (q0, q1 ×2). Still no … released on CPU line in the whole run, and 0 submits per 2 s from ~88 s, so the title's CPU side is what stops, not only the GPU queues.

Thread dumps (xcl.exe frames resolved with its PDB; line numbers are of aa1f1e4):

  • Main thread (240 s): +0x56a0d < +0x23cf735 < +0x8126a7 … – the semaphore wait the "GPU Loc Sig" callback is registered around (as ExMoha traced above).
  • Partner thread (150 s and 240 s): +0x43c3d5d < +0x23cf4f2 < +0x23cf2d3 < +0x23cf104, waiting on a job's event.
  • Two job threads (from +0x43c4591), in both dumps: bind::set_pipeline_state (bind.rs:710) → pso_async::resolve_for_bind (606) → resolve_wait (535) → Condvar::wait_timeout_while in resolve_within, i.e. the 2 s wait for a compute pipeline's first bind. One of them is under a different title caller at 240 s than at 150 s, so they move on, slowly: 23 dispatches from 150 to 260 s, between 128 and 255 pipelines late.
  • At 240 s all six xcl-pso-* workers and xcl-pso-pre-1 are inside nvgpucomp64.dll. Four of the six (xcl-pso-0, -1, -2, -4) are in ntdll waits under nvgpucomp64.dll+0x624960 / +0x6249c4; two are compiling. Process CPU during the stall was ~3 threads. Driver 621.14.

So on this driver more pipeline workers do not buy throughput: builds of 200 KB–1 MB DXIL take 8–40 s each and about two run at once. Not checked: whether the lock is per device (a second D3D12 device in another process would tell) or what it protects. Possibly related to #156 / #214.

**@⁠yeistark** on GitHub · 2026-11-24 17:31 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7139311094) · edited 2026-11-24 18:01 UTC **RTX A2000 12 GB / 16 GB RAM, `main` `b7aa9f3` + #1307 revert + #1316 + #1288 + #640: no `+0x23cf683` stop in 1030 s after `#101`; the title stops presenting at ~90 s and waits on compute pipeline builds. With `XCL_PSO_WAIT_MS=2000` it waits on `Wait64BitValueX` values with no producer instead (#1452).** **Tree:** `cf90938` (local, no uncommitted changes) = `main` `b7aa9f3` + revert of `b8b1f49` + #1316 (`ee904f1`, with #1315) + #1288 (`9cdae10`) + #640 (`5d6fac8`). **Setup:** NVIDIA RTX A2000 12 GB (wave32), driver 621.14; Ryzen 7 5700; 16 GB RAM, commit limit 51.8 GB; Windows 11 26200; rustc 1.100.0 MSVC release; DXC 1.9.2609.5. Retail 1.0.2.1, Series X profile. `XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_DXC_THREADS=6 XCL_PAGE_BUDGET_MB=6144` (without the budget this machine stops at #333's `+0x193e00f` at 93 s, see my report on #640). Compute DXIL precompiled with `xcl shaders --precompile --only cs`. `cargo test --workspace -- --test-threads=4` on `cf90938`: 799 passed, 0 failed, 41 ignored; 3 SKIPPED (no wave64). **Baseline:** `main` `930e8b4` + #1307 revert only, same machine: world load from ~150 s, `#101` at 182 s, `+0x23cf683` at 234.9 s (the crash reporter's 31.6 MB minidump upload was refused by `XCL_NETWORK=0`). **Run A (no pipeline wait limit):** - `#101` at 87.7 s. Last present at 90.2 s; 0 presents from then on. - Alive when I stopped it at 1120 s: no `+0x23cf683`, no device removal, commit 26–29.5 GB, local VRAM flat at 10.9 GB. - 325 compute PSOs built, 0 dispatches skipped. Builds of 200–420 KB DXIL took 8–21 s each in the driver; the longest was 36.8 s (1 053 272 B DXIL). From ~250 s on, the title issued a draw or dispatch only now and then between builds. - 3 `Wait64BitValueX … prod=qNone … wait-before-signal` lines. **Run B (`XCL_PSO_WAIT_MS=2000`, driver blobs from run A):** - `#101` at 103.2 s; last present at 106.0 s. - 307 dispatches and 64 draws skipped by the wait limit; 170 of 401 PSOs came from driver blobs. Longest build 101.9 s (1 022 080 B DXIL). - At 137.1 s, five `Wait64BitValueX` bridged to GPU `queue.Wait` with `prod=qNone/tySome(0); wait-before-signal` (q0 ×3, q1 ×2, `>= 0x89c`). From ~200 s: 0 presents, 0 draws, 0 dispatches per 2 s. - **No `GPU queue.Wait … did not complete within 5000 ms … released on CPU` line was ever logged**, so either those waits completed or the sync watchdog did not release them; I could not tell which from the log. #1429's second point (the watchdog going back to sleep) may be relevant; not tested here. - Stopped by me at 284 s, alive. **Not tested:** #1429; `XCL_PSO_WAIT_MS` values other than 2000; thread stacks during the stall; whether `ActivateRays` was among the builds (I did not map hashes to names). Logs and `report.json` of both runs available on request. **AI use:** Claude Code (Claude Opus 5.5) built the tree, ran the tests and the title on this machine, and drafted this report; I checked it before posting. **Update (same machine): where the title is held after `#101`, from thread dumps. The NVIDIA compiler runs ~2 of XCL's 6 pipeline workers at a time; the other 4 wait on a lock inside `nvgpucomp64.dll`.** **Tree:** `aa1f1e4` (local, no uncommitted changes) = `main` `9e3831e` + revert of `b8b1f49` + #1316 (`c3d119c`) + #1288 (`9cdae10`) + #640 (`5d6fac8`) + #1429 (`3ea5ef4`). `cargo test --workspace -- --test-threads=4`: 807 passed, 0 failed, 41 ignored; SKIPPED: 3× no wave64, `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). Settings as before plus `XCL_PSO_WAIT_MS=2000 XCL_THREAD_DUMP_AT=150,240 XCL_RUN_SECONDS=260`. **With #1429:** `#101` at 86.4 s; at 88.9–89.1 s three `Wait64BitValueX … prod=qNone/tySome(0); wait-before-signal` (q0, q1 ×2). Still no `… released on CPU` line in the whole run, and 0 submits per 2 s from ~88 s, so the title's CPU side is what stops, not only the GPU queues. **Thread dumps** (xcl.exe frames resolved with its PDB; line numbers are of `aa1f1e4`): - Main thread (240 s): `+0x56a0d < +0x23cf735 < +0x8126a7 …` – the semaphore wait the "GPU Loc Sig" callback is registered around (as ExMoha traced above). - Partner thread (150 s and 240 s): `+0x43c3d5d < +0x23cf4f2 < +0x23cf2d3 < +0x23cf104`, waiting on a job's event. - Two job threads (from `+0x43c4591`), in both dumps: `bind::set_pipeline_state` (bind.rs:710) → `pso_async::resolve_for_bind` (606) → `resolve_wait` (535) → `Condvar::wait_timeout_while` in `resolve_within`, i.e. the 2 s wait for a compute pipeline's first bind. One of them is under a different title caller at 240 s than at 150 s, so they move on, slowly: 23 dispatches from 150 to 260 s, between 128 and 255 pipelines late. - At 240 s all six `xcl-pso-*` workers and `xcl-pso-pre-1` are inside `nvgpucomp64.dll`. **Four of the six (`xcl-pso-0, -1, -2, -4`) are in `ntdll` waits under `nvgpucomp64.dll+0x624960` / `+0x6249c4`**; two are compiling. Process CPU during the stall was ~3 threads. Driver 621.14. So on this driver more pipeline workers do not buy throughput: builds of 200 KB–1 MB DXIL take 8–40 s each and about two run at once. Not checked: whether the lock is per device (a second D3D12 device in another process would tell) or what it protects. Possibly related to #156 / #214.
Author
Owner

@⁠ClosetPie107 on GitHub · 2026-11-24 18:22 UTC · original

@⁠lucsoft @⁠DecayingEagle The TCP fault at 0x0000c00100000000 is at the start of a region whose size follows XCL_COHERENT_MB: XCL's coherent-window buffer comes right after it. RDNA4 data, with the kernel's devcoredump of the fault. This also corrects my "beyond anything allocated here" on #610.

Setup: RX 9070 16 GB (RADV GFX1201, Mesa 26.3.1), Ryzen 5 9600X, 30 GB RAM, CachyOS, kernel 7.3.5; Proton Experimental's Wine, vkd3d-proton v3.1 + #257's patch, dxil-spirv 53aac418. XCL main 930e8b4 with b8b1f49 reverted (#1307), + #1288 9cdae10, in some runs + #1315/#1316 ee904f1. XCL_COHERENT_MB=512, XCL_NETWORK=0, no XCL_PSO_WAIT_MS, scripted A presses, warm caches.

Where the fault is.

  • XCL logs window 0 buffer at VA … at startup. Window 0 is the coherent window: open_uma imports it with OpenExistingHeapFromAddress (index 0; the sparse windows come after it), and XCL's import check passes (UMA import check: ok), so it is a real host-memory import (VK_EXT_external_memory_host, a userptr in amdgpu).

  • Its VA moves with the window's size, while the faulting page stays the same:

    XCL_COHERENT_MB window 0 buffer above 0xc00100000000 fault seen at
    512 (here) 0xffffc00140000000 1 GB 0x0000c00100000000 (2 runs below)
    768 (here, a short check run, no fault) 0xffffc00150000000 1.25 GB –
    1024 (@⁠lucsoft's run) 0xffffc00180000000 2 GB 0x0000c00100000000

    (XCL keeps the window at 512 MB or more, so 256 MB gives 512 MB.) So something starts at 0xc00100000000, has a size that grows with the coherent window, and comes right before window 0's buffer; the faults hit its first ~100 KB (pages …0000, …c000, …d000, …18000). In vkd3d-proton the import gets a heap with its own global buffer over the imported memory, so my guess, not verified, is that this is the coherent window's memory seen through another buffer, and the faults are reads of its first pages. I could not tell from vkd3d-proton's code alone what is allocated there.

The fault (2 of 8 runs on this tree):

run tree first #101 fault kernel log
run 3 + #1316, with preload 72.9 s ~77 s 10 faults: 7 on page 0x0000c00100000000, 2 on …c000, 1 on …d000; status 0x00301031
nopre-1 + #1316, XCL_PSO_PRELOAD=0 60.5 s ~74 s 10 faults, all on page 0x0000c00100000000; status 0x00601031
  • Both times: Faulty UTCL2 client ID: TCP (0x8), PERMISSION_FAULTS 0x3, MAPPING_ERROR 0x0, RW 0x0 (a read of a page with no valid mapping), process main, thread vkd3d_queue, ring:24. Then ring gfx_0.0.0 timeout, Ring gfx_0.0.0 reset succeeded, "device wedged, but no recovery needed". RADV prints "This context is innocent". No GPU work was submitted after it.
  • Right before the fault, the same burst both times: the 2 s activity sample just before it reads 8 submits, 0 draws, 20 dispatches, and after it nothing more is submitted. None of the 6 runs without the fault has a sample like that.
  • The other 6 runs (#1288 alone or with #1316) ended in a RAM guard of mine at 90–277 s with no fault. Earlier today: plain main 47efa2e without XCL_PSO_WAIT_MS (1 of 4 runs) and 384f7f7 + #610 with XCL_PSO_WAIT_MS=50 (#610 comment). So it comes on four trees, 4–30 s after #101, with and without the preload and skipped work.
  • Not memory pressure: in nopre-1 the machine had 12.5 GB available and the host process 0 MB in swap at the fault (run 3: 10.2 GB and 224 MB).

The kernel's devcoredump (nopre-1, saved with a udev rule; text, 321 KB): process_name: main … thread: vkd3d_queue, Ring timed out details: gfx_0.0.0, [gfxhub] Page fault observed, Faulty page starting at address: 0x0000c00100018000, status 0x601031, then the GFX12 IP register dump (gfx IB1 0x800467248000, IB2 0x800100025000). It has no wave state and no IB contents, so it doesn't say which draw or dispatch read the page. I can share the register dump if it helps; it holds no game data.

A possible mechanism (@⁠lucsoft's userptr guess on #175, not verified for this): the imported window is a userptr BO in amdgpu, and the kernel invalidates a userptr's GPU mapping when the CPU pages change (write-protect for Wine's write-watch, page migration) until a later submission revalidates it. amdgpu normally waits for the BO's work in flight first, so this would also need the BO to be missing from the faulting submission's fences (I have not checked how vkd3d-proton / RADV list imported host memory). Memory pressure is not needed for that, which would fit nopre-1.

Not done yet: a fault run with another window size (it comes in ~1 of 4 runs). @⁠lucsoft, did your RADV_DEBUG=hang run show what is bound at that address?

AI use: T3 Code (Claude Opus 5.5) built the trees, ran the title, read the kernel log and the devcoredump, and wrote this comment. The runs are real, on the hardware above.

**@⁠ClosetPie107** on GitHub · 2026-11-24 18:22 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7140554472) @⁠lucsoft @⁠DecayingEagle **The `TCP` fault at `0x0000c00100000000` is at the start of a region whose size follows `XCL_COHERENT_MB`: XCL's coherent-window buffer comes right after it. RDNA4 data, with the kernel's devcoredump of the fault.** This also corrects my "beyond anything allocated here" on #610. **Setup:** RX 9070 16 GB (RADV GFX1201, Mesa 26.3.1), Ryzen 5 9600X, 30 GB RAM, CachyOS, kernel 7.3.5; Proton Experimental's Wine, vkd3d-proton v3.1 + #257's patch, dxil-spirv `53aac418`. XCL `main` `930e8b4` with `b8b1f49` reverted (#1307), + #1288 `9cdae10`, in some runs + #1315/#1316 `ee904f1`. `XCL_COHERENT_MB=512`, `XCL_NETWORK=0`, no `XCL_PSO_WAIT_MS`, scripted A presses, warm caches. **Where the fault is.** - XCL logs `window 0 buffer at VA …` at startup. Window 0 is the coherent window: `open_uma` imports it with `OpenExistingHeapFromAddress` (index 0; the sparse windows come after it), and XCL's import check passes (`UMA import check: ok`), so it is a real host-memory import (`VK_EXT_external_memory_host`, a userptr in amdgpu). - Its VA moves with the window's size, while the faulting page stays the same: | `XCL_COHERENT_MB` | window 0 buffer | above `0xc00100000000` | fault seen at | |---|---|---|---| | 512 (here) | `0xffffc00140000000` | 1 GB | `0x0000c00100000000` (2 runs below) | | 768 (here, a short check run, no fault) | `0xffffc00150000000` | 1.25 GB | – | | 1024 (@⁠lucsoft's run) | `0xffffc00180000000` | 2 GB | `0x0000c00100000000` | (XCL keeps the window at 512 MB or more, so 256 MB gives 512 MB.) So something starts at `0xc00100000000`, has a size that grows with the coherent window, and comes right before window 0's buffer; the faults hit its first ~100 KB (pages `…0000`, `…c000`, `…d000`, `…18000`). In vkd3d-proton the import gets a heap with its own global buffer over the imported memory, so my guess, **not verified**, is that this is the coherent window's memory seen through another buffer, and the faults are reads of its first pages. I could not tell from vkd3d-proton's code alone what is allocated there. **The fault (2 of 8 runs on this tree):** | run | tree | first `#101` | fault | kernel log | |---|---|---|---|---| | run 3 | + #1316, with preload | 72.9 s | ~77 s | 10 faults: 7 on page `0x0000c00100000000`, 2 on `…c000`, 1 on `…d000`; status `0x00301031` | | nopre-1 | + #1316, `XCL_PSO_PRELOAD=0` | 60.5 s | ~74 s | 10 faults, all on page `0x0000c00100000000`; status `0x00601031` | - Both times: `Faulty UTCL2 client ID: TCP (0x8)`, `PERMISSION_FAULTS 0x3`, `MAPPING_ERROR 0x0`, `RW 0x0` (a read of a page with no valid mapping), process `main`, thread `vkd3d_queue`, `ring:24`. Then `ring gfx_0.0.0 timeout`, `Ring gfx_0.0.0 reset succeeded`, "device wedged, but no recovery needed". RADV prints "This context is innocent". No GPU work was submitted after it. - **Right before the fault, the same burst both times:** the 2 s activity sample just before it reads `8 submits, 0 draws, 20 dispatches`, and after it nothing more is submitted. None of the 6 runs without the fault has a sample like that. - The other 6 runs (#1288 alone or with #1316) ended in a RAM guard of mine at 90–277 s with no fault. Earlier today: plain `main` `47efa2e` without `XCL_PSO_WAIT_MS` (1 of 4 runs) and `384f7f7` + #610 with `XCL_PSO_WAIT_MS=50` (#610 comment). So it comes on four trees, 4–30 s after `#101`, with and without the preload and skipped work. - **Not memory pressure:** in nopre-1 the machine had 12.5 GB available and the host process 0 MB in swap at the fault (run 3: 10.2 GB and 224 MB). **The kernel's devcoredump** (nopre-1, saved with a udev rule; text, 321 KB): `process_name: main … thread: vkd3d_queue`, `Ring timed out details: gfx_0.0.0`, `[gfxhub] Page fault observed`, `Faulty page starting at address: 0x0000c00100018000`, status `0x601031`, then the GFX12 IP register dump (gfx IB1 `0x800467248000`, IB2 `0x800100025000`). It has no wave state and no IB contents, so it doesn't say which draw or dispatch read the page. I can share the register dump if it helps; it holds no game data. **A possible mechanism (@⁠lucsoft's userptr guess on #175, not verified for this):** the imported window is a userptr BO in amdgpu, and the kernel invalidates a userptr's GPU mapping when the CPU pages change (write-protect for Wine's write-watch, page migration) until a later submission revalidates it. amdgpu normally waits for the BO's work in flight first, so this would also need the BO to be missing from the faulting submission's fences (I have not checked how vkd3d-proton / RADV list imported host memory). Memory pressure is not needed for that, which would fit nopre-1. **Not done yet:** a fault run with another window size (it comes in ~1 of 4 runs). @⁠lucsoft, did your `RADV_DEBUG=hang` run show what is bound at that address? **AI use:** T3 Code (Claude Opus 5.5) built the trees, ran the title, read the kernel log and the devcoredump, and wrote this comment. The runs are real, on the hardware above.
Author
Owner

@⁠ettehn on GitHub · 2026-11-24 14:43 UTC · original · edited 2026-11-24 18:23 UTC

Follow-up to the RTX 5070 Ti Laptop run and the three RTX 5080 keys in the earlier report. I added matching begin/end records at resolve_wait_for and at compute build execution on 930e8b4. Each record includes the stand-in pointer, pipeline key and Windows thread ID.

The last sample with a present ended at 68.028 s. At 70.759 s thread 4364 entered the bind for key cc7336941854ace7 and took the build itself. Its shader blob was dd51cdeedc76d3a7 (4,066,941 bytes of generated HLSL, 4 windows, split wave64). The DXC/cache call ran from 70.824 to 84.294 s. At the first title fault at 98.548 s the same thread was in nvgpucomp64.dll, with neither the build nor the bind logged complete. That is 27.8 s inside this bind. Two other binds were building 3f41769bf6f4dc59 (ray binning) and bb9b57ae3aa53185 (TAA resolve) on their own caller threads at the fault. A fourth outstanding bind was marked graphics. This run establishes which builds those threads were doing. Which thread owed the heartbeat is still open.

For comparison, scanning the retail shader pack using XCL’s single-blob shaders_key calculation gives the following matches for the three 5080 keys. They differ from the outstanding keys in this 5070 Ti Laptop run.

5080 pipeline key Shader blob Record
5b879e6555bda21b 7a5fce939850275b hair_bvh_resolve:CS_RaytracingResolve_bfd1648e_Wrapped
110df5460e25a829 34207613d17f8b96 ped_skinning_cs:CS_PedStandardSkinning_5_15f19d85_Wrapped
94aa6a7b861f8731 6da1f38b06d6c735 InstanceCulling:CS_Slod_BatchCull_c47eb2b0_Wrapped

AI-assisted with OpenAI Codex (GPT-6.2 Astra).

Follow-up on native Windows: the PresentX thread’s semaphore was released during the stall

RTX 5070 Ti Laptop 12 GB, driver 621.24, release 9e3831e with local tracing, XCL_HEAP_WINDOWS=1, scripted input. The five prebuilt InstanceCulling PSOs were seeded in the starting cache. This is the PresentX thread with the stack +0x56a0d ← +0x4e7f358 ← +0x6259 ← +0x2481f73 reported above.

  • Its post-stall snapshots show an infinite wait on semaphore 0x1008. The last two-second window with a Present ended at 102.043 s. Three distinct worker threads then successfully called ReleaseSemaphore(0x1008, 1) from title +0x6380 at 111.621, 115.023 and 126.404 s. No new Present was recorded.
  • At 115.023 s the same worker that released the semaphore also successfully called SetEvent(0x1ab0) from +0x43c431d. The coordinator passed that job slot, then reached another one (0x1b0c). That worker was still building CS_BatchCullMeshlets_ParaboloidShadows when the title watchdog fired at 131.947 s. Handle values are specific to this run.

The trace shows successful releases and job completion. The wait snapshots do not establish which thread consumed each semaphore permit or whether the PresentX thread woke and waited again.

AI use for this update: OpenAI Codex (GPT-6.2 Sol) assisted with tracing, verification, and reporting.

**@⁠ettehn** on GitHub · 2026-11-24 14:43 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7134838719) · edited 2026-11-24 18:23 UTC Follow-up to the RTX 5070 Ti Laptop run and the three RTX 5080 keys in [the earlier report](https://github.com/ivall/xcl/issues/505#issuecomment-7134144311). I added matching begin/end records at `resolve_wait_for` and at compute build execution on `930e8b4`. Each record includes the stand-in pointer, pipeline key and Windows thread ID. The last sample with a present ended at 68.028 s. At 70.759 s thread 4364 entered the bind for key `cc7336941854ace7` and took the build itself. Its shader blob was `dd51cdeedc76d3a7` (4,066,941 bytes of generated HLSL, 4 windows, split wave64). The DXC/cache call ran from 70.824 to 84.294 s. At the first title fault at 98.548 s the same thread was in `nvgpucomp64.dll`, with neither the build nor the bind logged complete. That is 27.8 s inside this bind. Two other binds were building `3f41769bf6f4dc59` (ray binning) and `bb9b57ae3aa53185` (TAA resolve) on their own caller threads at the fault. A fourth outstanding bind was marked graphics. This run establishes which builds those threads were doing. Which thread owed the heartbeat is still open. For comparison, scanning the retail shader pack using XCL’s single-blob `shaders_key` calculation gives the following matches for the three **5080** keys. They differ from the outstanding keys in this **5070 Ti Laptop** run. | 5080 pipeline key | Shader blob | Record | |---|---|---| | `5b879e6555bda21b` | `7a5fce939850275b` | `hair_bvh_resolve:CS_RaytracingResolve_bfd1648e_Wrapped` | | `110df5460e25a829` | `34207613d17f8b96` | `ped_skinning_cs:CS_PedStandardSkinning_5_15f19d85_Wrapped` | | `94aa6a7b861f8731` | `6da1f38b06d6c735` | `InstanceCulling:CS_Slod_BatchCull_c47eb2b0_Wrapped` | AI-assisted with OpenAI Codex (GPT-6.2 Astra). **Follow-up on native Windows: the PresentX thread’s semaphore was released during the stall** RTX 5070 Ti Laptop 12 GB, driver 621.24, release `9e3831e` with local tracing, `XCL_HEAP_WINDOWS=1`, scripted input. The five prebuilt InstanceCulling PSOs were seeded in the starting cache. This is the PresentX thread with the stack `+0x56a0d ← +0x4e7f358 ← +0x6259 ← +0x2481f73` reported [above](https://git.gtahub.st/github/xcl-dev--xcl/issues/505). - Its post-stall snapshots show an infinite wait on semaphore `0x1008`. The last two-second window with a Present ended at 102.043 s. Three distinct worker threads then successfully called `ReleaseSemaphore(0x1008, 1)` from title `+0x6380` at 111.621, 115.023 and 126.404 s. No new Present was recorded. - At 115.023 s the same worker that released the semaphore also successfully called `SetEvent(0x1ab0)` from `+0x43c431d`. The coordinator passed that job slot, then reached another one (`0x1b0c`). That worker was still building `CS_BatchCullMeshlets_ParaboloidShadows` when the title watchdog fired at 131.947 s. Handle values are specific to this run. The trace shows successful releases and job completion. The wait snapshots do not establish which thread consumed each semaphore permit or whether the PresentX thread woke and waited again. AI use for this update: OpenAI Codex (GPT-6.2 Sol) assisted with tracing, verification, and reporting.
Author
Owner

@⁠ExMoha on GitHub · 2026-11-24 15:03 UTC · original · edited 2026-11-24 19:05 UTC

RX 9070 / Windows, main 930e8b4: the +0x23cf683 stop traced from the watchdog down to one DXC compile, the 30 MB program @⁠CowboyBingus is working on

Setup: AMD Radeon RX 9070 16 GB, Ryzen 7 7800X3D, 31 GB RAM, Windows 11 Pro 26300; release build of main 930e8b4, DXC 1.8.2502.11; retail 1.0.2.1, XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PRESS_A_AT=14,17,21, warm DXIL and driver caches, no XCL_PSO_WAIT_MS.

On this tree the title reaches its loading screen, goes black at ~72 s and ends at +0x23cf683 at ~100 s, every run. With temporary logging (local only, not a PR) in kernelx wrappers for WaitForSingleObject / ReleaseSemaphore / SetEvent / CreateEvent* / CreateSemaphoreExW / CreateThread and around dxc::compile, the chain at the stop is:

  1. Main thread: +0x23cf6f7 registers +0x23cf620 (the "GPU Loc Sig" abort) as a callback, then +0x23ceeb0 → +0x569f0 does WaitForSingleObject(sem, INFINITE) on a semaphore from a block of five the title makes at startup (CreateSemaphoreExW, globals +0xa210ce0..+0xa210d00). The callback fires while this wait is open.
  2. Its partner thread (the one that waits on the previous semaphore of that block and releases this one; +0x23cf2d3 / +0x23cf4f2) is in a loop at +0x43c3d58 that waits INFINITE on one event per job it handed out (33 events, created by that thread at +0x43c39e1). Each is set by a job thread at +0x43c431d, except the last one.
  3. The job thread that owes it asked XCL for a compute pipeline at ~72 s, and dxc::compile was asked for a 30,257 KB HLSL cs_6_6 program (fnv64 of the HLSL 9677afef75c237d2). That compile had not finished when the abort fired at ~100 s. Every other compile in the run took under 3 s.

So on this machine, the stop is the title's frame-sync thread waiting for a job blocked on this one translation, not a GPU wait: the Wait64BitValueX waits logged at ~68 s were not released by the 5 s CPU release, and no title thread was waiting in XCL's queue code. With XCL_PSO_WAIT_MS=2000 the job thread no longer waits, but the same compile then takes RAM to 95 % at ~76 s and my memory guard stops the run.

Compiling it outside the title, on 31 GB: I took indirect_diffuse_lighting:CS_ScreenProbes_ActivateProbes_9083c094_Wrapped out of shaders.rpf (21,140 B, fnv64 56c0cd3b82a00c6e, the record from your comment) and ran xcl shaders <folder with only that record> --precompile --pipelines with nothing else running:

  • DXC: ~1.5 min, 4.0 GB private peak, 23,363,552 B of DXIL into the cache.
  • CreateComputePipelineState (AMD driver 32.0.32029.2010): still building after 14 min; the process grew slowly to ~9 GB, then to 20 GB within seconds, and my guard stopped it at 97 % system RAM. No driver blob was written.

The next title run with that DXIL cached: the pipeline preload (#690) started its driver build at once and took the machine to 99.9 % RAM within 20 s. With XCL_PSO_PRELOAD=0 the title again stopped at +0x23cf683 at ~100 s, now with two title threads in amdxc64.dll and none in dxcompiler.dll (in the earlier run a title thread was in dxc::compile). So a DXIL precompile alone does not get this title past the stop on a 31 GB / RDNA4 machine; the driver build of this program has to become much cheaper too.

What I did not capture: the job thread's own stack at the stop in the logging run (XCL's crash handler hung under my extra logging, so the thread dump was not written), and a hash of the HLSL the title asked for set against the precompiled translation. That the title's 30.3 MB HLSL compile is this record's translation is an inference from the size and from the move from dxcompiler.dll to amdxc64.dll once its DXIL was cached.

AI use: Claude Code (Claude Opus 5.5) traced this, wrote the temporary logging, and wrote this report at my request; the runs were on my machine.


Update (RX 9070, heap form): with every shader prebuilt as DXIL, the black screen at ~76 s remains. The title waits on AMD's driver building ActivateProbes, which does not fit in 31 GB. XCL_PSO_WAIT_MS=1 removes the device.

Setup: RX 9070 16 GB (driver 32.0.32029.2010, wave64), Ryzen 7 7800X3D, 31 GB RAM, Windows 11 Pro 26300, release build. main 9e3831e for the runs and c160d86 for the offline builds, with no uncommitted changes apart from local log lines (not in any PR). Env: XCL_HEAP_WINDOWS=1 XCL_NETWORK=0 XCL_PSO_PRELOAD=0, with a memory guard that stops xcl at 94% RAM.

1. DXIL prebuilt (--precompile, heap form, every stage) does not get past the black screen: the title waits on AMD's driver building ActivateProbes. With a local log line at the driver call, a game thread starts the build of CS 56c0cd3b82a00c6e (22,097 KB DXIL, DXIL from the disk cache) at 74.76 s. Presents drop to 0 by 76 s, and RAM climbs until the guard stops it at ~77 s (95.7%). The only other driver build over 400 KB before it was a 658 KB program at 72.9 s.

2. AMD driver times in heap form (--precompile --only cs --pipelines, 4 threads; 126 pipelines over 3 s timed, 26 of them ≥ 10 s):

program DXIL driver
hair_bvh_resolve:CS_RaytracingResolve_bfd1648e 830 KB 28.3 s
cutout_hard_inst:CS_RaytracingResolve_ae7b7f3c 784 KB 27.4 s
horse_standard_hair:CS_RaytracingResolve_ae7b7f3c 868 KB 26.2 s
default_spec_inst:CS_RaytracingResolve_ae7b7f3c 777 KB 23.7 s

indirect_light_probes:CS_Primary_Shade_e186f854 (895 KB) and CS_Primary_ShadeVerify_3ee50cd0 (904 KB) were in the driver together when RAM went from 1.5 to 18.9 GB in ~30 s and the guard stopped it. I could not time them alone.

3. #22616/#22617 (ActivateProbes/Target): 22.1 / 22.0 MB DXIL in heap form here, which matches the no-split column of bstillbstill's table. DXC built them in under 2 min each. Building both in the driver took RAM to 96% at 3.5 min on 31 GB, so even an offline prebuild does not fit on this machine.

4. XCL_PSO_WAIT_MS=1 (stand-ins, dispatches skipped) on RDNA4: with XCL_DXC_THREADS=2 the device was removed (0x887a0006) at 76.5 s and the AMD driver crashed. Without the thread cap, RAM reached 95% at ~78 s first. Skipping these dispatches is not safe on this card. This is like the RX 7800 XT report above.

Not tested: #1316 / #1278 / #1279 on this tree; CS_Primary_Shade alone; driver builds of #22616/#22617 with more RAM; direct DXIL (#1426), which refuses heap-window programs.

AI use: Claude Code (Claude Opus 5.5) ran the tests and the analysis and wrote this update.

**@⁠ExMoha** on GitHub · 2026-11-24 15:03 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7135374850) · edited 2026-11-24 19:05 UTC **RX 9070 / Windows, `main` `930e8b4`: the `+0x23cf683` stop traced from the watchdog down to one DXC compile, the 30 MB program @⁠CowboyBingus is working on** **Setup:** AMD Radeon RX 9070 16 GB, Ryzen 7 7800X3D, 31 GB RAM, Windows 11 Pro 26300; release build of `main` `930e8b4`, DXC 1.8.2502.11; retail 1.0.2.1, `XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PRESS_A_AT=14,17,21`, warm DXIL and driver caches, no `XCL_PSO_WAIT_MS`. On this tree the title reaches its loading screen, goes black at ~72 s and ends at `+0x23cf683` at ~100 s, every run. With temporary logging (local only, not a PR) in `kernelx` wrappers for `WaitForSingleObject` / `ReleaseSemaphore` / `SetEvent` / `CreateEvent*` / `CreateSemaphoreExW` / `CreateThread` and around `dxc::compile`, the chain at the stop is: 1. **Main thread:** `+0x23cf6f7` registers `+0x23cf620` (the "GPU Loc Sig" abort) as a callback, then `+0x23ceeb0` → `+0x569f0` does `WaitForSingleObject(sem, INFINITE)` on a semaphore from a block of five the title makes at startup (`CreateSemaphoreExW`, globals `+0xa210ce0`..`+0xa210d00`). The callback fires while this wait is open. 2. **Its partner thread** (the one that waits on the previous semaphore of that block and releases this one; `+0x23cf2d3` / `+0x23cf4f2`) is in a loop at `+0x43c3d58` that waits `INFINITE` on one event per job it handed out (33 events, created by that thread at `+0x43c39e1`). Each is set by a job thread at `+0x43c431d`, except the last one. 3. **The job thread that owes it** asked XCL for a compute pipeline at ~72 s, and `dxc::compile` was asked for a **30,257 KB HLSL `cs_6_6` program** (fnv64 of the HLSL `9677afef75c237d2`). That compile had not finished when the abort fired at ~100 s. Every other compile in the run took under 3 s. So on this machine, the stop is the title's frame-sync thread waiting for a job blocked on this one translation, not a GPU wait: the `Wait64BitValueX` waits logged at ~68 s were not released by the 5 s CPU release, and no title thread was waiting in XCL's queue code. With `XCL_PSO_WAIT_MS=2000` the job thread no longer waits, but the same compile then takes RAM to 95 % at ~76 s and my memory guard stops the run. **Compiling it outside the title, on 31 GB:** I took `indirect_diffuse_lighting:CS_ScreenProbes_ActivateProbes_9083c094_Wrapped` out of `shaders.rpf` (21,140 B, fnv64 `56c0cd3b82a00c6e`, the record from your comment) and ran `xcl shaders <folder with only that record> --precompile --pipelines` with nothing else running: - DXC: ~1.5 min, 4.0 GB private peak, 23,363,552 B of DXIL into the cache. - `CreateComputePipelineState` (AMD driver 32.0.32029.2010): still building after 14 min; the process grew slowly to ~9 GB, then to 20 GB within seconds, and my guard stopped it at 97 % system RAM. No driver blob was written. The next title run with that DXIL cached: the pipeline preload (#690) started its driver build at once and took the machine to 99.9 % RAM within 20 s. With `XCL_PSO_PRELOAD=0` the title again stopped at `+0x23cf683` at ~100 s, now with two title threads in `amdxc64.dll` and none in `dxcompiler.dll` (in the earlier run a title thread was in `dxc::compile`). So a DXIL precompile alone does not get this title past the stop on a 31 GB / RDNA4 machine; the driver build of this program has to become much cheaper too. What I did not capture: the job thread's own stack at the stop in the logging run (XCL's crash handler hung under my extra logging, so the thread dump was not written), and a hash of the HLSL the title asked for set against the precompiled translation. That the title's 30.3 MB HLSL compile is this record's translation is an inference from the size and from the move from `dxcompiler.dll` to `amdxc64.dll` once its DXIL was cached. *AI use: Claude Code (Claude Opus 5.5) traced this, wrote the temporary logging, and wrote this report at my request; the runs were on my machine.* --- **Update (RX 9070, heap form):** with every shader prebuilt as DXIL, the black screen at ~76 s remains. The title waits on AMD's driver building ActivateProbes, which does not fit in 31 GB. `XCL_PSO_WAIT_MS=1` removes the device. **Setup:** RX 9070 16 GB (driver 32.0.32029.2010, wave64), Ryzen 7 7800X3D, 31 GB RAM, Windows 11 Pro 26300, release build. `main` `9e3831e` for the runs and `c160d86` for the offline builds, with no uncommitted changes apart from local log lines (not in any PR). Env: `XCL_HEAP_WINDOWS=1 XCL_NETWORK=0 XCL_PSO_PRELOAD=0`, with a memory guard that stops xcl at 94% RAM. **1. DXIL prebuilt (`--precompile`, heap form, every stage) does not get past the black screen: the title waits on AMD's driver building ActivateProbes.** With a local log line at the driver call, a game thread starts the build of `CS 56c0cd3b82a00c6e` (22,097 KB DXIL, DXIL from the disk cache) at 74.76 s. Presents drop to 0 by 76 s, and RAM climbs until the guard stops it at ~77 s (95.7%). The only other driver build over 400 KB before it was a 658 KB program at 72.9 s. **2. AMD driver times in heap form** (`--precompile --only cs --pipelines`, 4 threads; 126 pipelines over 3 s timed, 26 of them ≥ 10 s): | program | DXIL | driver | |---|---|---| | `hair_bvh_resolve:CS_RaytracingResolve_bfd1648e` | 830 KB | 28.3 s | | `cutout_hard_inst:CS_RaytracingResolve_ae7b7f3c` | 784 KB | 27.4 s | | `horse_standard_hair:CS_RaytracingResolve_ae7b7f3c` | 868 KB | 26.2 s | | `default_spec_inst:CS_RaytracingResolve_ae7b7f3c` | 777 KB | 23.7 s | `indirect_light_probes:CS_Primary_Shade_e186f854` (895 KB) and `CS_Primary_ShadeVerify_3ee50cd0` (904 KB) were in the driver together when RAM went from 1.5 to 18.9 GB in ~30 s and the guard stopped it. I could not time them alone. **3. #22616/#22617 (ActivateProbes/Target):** 22.1 / 22.0 MB DXIL in heap form here, which matches the no-split column of bstillbstill's table. DXC built them in under 2 min each. Building both in the driver took RAM to 96% at 3.5 min on 31 GB, so even an offline prebuild does not fit on this machine. **4. `XCL_PSO_WAIT_MS=1` (stand-ins, dispatches skipped) on RDNA4:** with `XCL_DXC_THREADS=2` the device was removed (`0x887a0006`) at 76.5 s and the AMD driver crashed. Without the thread cap, RAM reached 95% at ~78 s first. Skipping these dispatches is not safe on this card. This is like the RX 7800 XT report above. **Not tested:** #1316 / #1278 / #1279 on this tree; `CS_Primary_Shade` alone; driver builds of #22616/#22617 with more RAM; direct DXIL (#1426), which refuses heap-window programs. *AI use: Claude Code (Claude Opus 5.5) ran the tests and the analysis and wrote this update.*
Author
Owner

@⁠freemanovec on GitHub · 2026-11-24 19:34 UTC · original

@⁠lucsoft @⁠DecayingEagle @⁠ClosetPie107, about the RADV gfxhub fault (RDNA3 here, RDNA4 in your runs) at 0x0000c00100000000: the faulting reads are window reads that cross a 4 GiB boundary of the GPU address space and land 4 GiB lower. Placing the sparse windows at 4 GiB-aligned GPU addresses made the fault go away in one run. The run then went on until it hit my 30 GiB memory cap at 553 s.

Setup: RX 7900 XTX, Mesa 26.3.1 RADV, kernel 7.3.5, Wine 11.22, vkd3d-proton 3.1 (+ #257's patch, dxil-spirv 53aac41). Retail 1.0.2.1, XCL_NETWORK=0 XCL_PSO_PRELOAD=0, no XCL_PSO_WAIT_MS, VKD3D_CONFIG=ignore_shared_fence,breadcrumbs,fault, 512 MB coherent window. XCL main 930e8b4 + #867 + #871 + #684 + #433 + #1288 + local logging. Runs in a 30 GiB memory cgroup.

What the faults have in common:

  • Window 0 is at 0xffffc00140000000 in my runs. The fault pages are 0xffffc00100000000 (run 1) and 0xffffc001000bc000 (run 2), which are w0 + 0xC0000000 and w0 + 0xC00BC000, each minus 4 GiB. In other words, reads past 0xffffc002_00000000 came out 4 GiB too low.
  • Your run fits the same rule: w0 at 0xffffc00180000000 puts the boundary at w0 + 0x80000000, and the same absolute fault address follows.
  • The pages 4 GiB higher are inside window 0, bound, and hold title data (run 2: the 64 MiB bind 0xffffc001fc200000..0xffffc00200200000).
  • With RADV_DEBUG=bo_history, no buffer of any kind was ever placed in [0xffffc00100000000, w0) during the run. It is not a freed resource, so the resource-lifetime changes (#1070, #968, XCL_LATE_RELEASE) do not apply.
  • It is not one shader. With RADV_DEBUG=hang (exact breadcrumbs), the faulting dispatch in run 2 was console CS cc047f458010c5d2 (vkd3d hash d4a57a9f7e941f1b). In my earlier report it was a region of 4585e350d1b864e3. Both read only io and the four window UAVs.

@⁠ClosetPie107's table fits the same rule: the window 0 base moves with XCL_COHERENT_MB, but the boundary 0xffffc002_00000000 does not, so the first page below it minus 4 GiB stays at 0x0000c00100000000 (your devcoredump's …c00100018000 is in the same range). On my tree (with #871) the window 0 buffer at VA line names the first 4 GiB sparse window, not the coherent one: the local logging shows w0 sparse at GPU 0xffffc00140000000..0xffffc00240000000 and the 512 MB coherent window at 0xffff800120000000. Since no buffer was ever placed at the fault pages (bo_history above) and their +4 GiB twins are bound sparse pages, I don't think a userptr invalidation of the coherent window explains it, but I have not tested that on a tree without #871.

Which layer: not settled. Offline, dxil-spirv 53aac41's SPIR-V for both shaders does every window access as a 64-bit add with carry (OpIAddCarry, no sign extension). The RADV ISA I compiled from it natively has every carry produced and consumed. XCL's host-side address math is 64-bit. I could not get the ISA of the pipeline vkd3d-proton actually built at run time (the RADV_DEBUG=hang dump was not written). So it is either that runtime code, or something below the ISA (page tables for a bind that straddles the boundary, or the hardware). A small Vulkan program that reads through a buffer address across a …_00000000 boundary would separate the two; I have not written it yet.

Workaround tried (local, not a PR): a switch that starts each sparse window on a 4 GiB-aligned GPU address (w0 0xffffc00200000000, w1 0xffffc00300000000, w2 0xffffc00400000000), so no window access can cross a boundary.

run windows first #101 end
1 as before 166.3 s gfxhub fault 220.7 s, device removed
2 (RADV_DEBUG=hang) as before 178.5 s gfxhub fault 215–217 s
3 4 GiB-aligned 154.6 s no fault; the 5 bridged Wait64BitValueX waits that came about 2 s before each fault (188 s) completed; 7866 dispatches after 150 s; ended at 553 s by my 30 GiB cgroup cap during two DXC compiles

That is one run with the workaround, so it is not proof that the fault is gone. In all three runs the screen stayed on the dimmed loading artwork with no presents after about 181 s. From about 190 s the title waits for the build of compute program 56c0cd3b82a00c6e (23.4 MB of DXIL), which did not finish in more than 5 minutes.

On main b7aa9f3: three more runs without the workaround (b7aa9f3 + #867 + #871 + #684 + #433 + #1288 + #1321, one also + #1385) ended in the same fault at 170–224 s, all with fault pages below w0. With #968 merged and #867's rebased head, XCL_LATE_RELEASE=1 no longer exits at about 7 s; that run reached 170 s and ended in the same fault. #1321 leaves 56c0cd3b82a00c6e at 23.4 MB.

Not tested: Windows, NVIDIA, other AMD generations, more than one run with the workaround.

AI use: Claude Code (Claude Opus 5.5) ran the tests and the analysis and wrote this comment. The runs were real, on the hardware above.

**@⁠freemanovec** on GitHub · 2026-11-24 19:34 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7142283567) @⁠lucsoft @⁠DecayingEagle @⁠ClosetPie107, about the RADV gfxhub fault (RDNA3 here, RDNA4 in your runs) at `0x0000c00100000000`: the faulting reads are window reads that cross a 4 GiB boundary of the GPU address space and land 4 GiB lower. Placing the sparse windows at 4 GiB-aligned GPU addresses made the fault go away in one run. The run then went on until it hit my 30 GiB memory cap at 553 s. **Setup:** RX 7900 XTX, Mesa 26.3.1 RADV, kernel 7.3.5, Wine 11.22, vkd3d-proton 3.1 (+ #257's patch, dxil-spirv `53aac41`). Retail 1.0.2.1, `XCL_NETWORK=0 XCL_PSO_PRELOAD=0`, no `XCL_PSO_WAIT_MS`, `VKD3D_CONFIG=ignore_shared_fence,breadcrumbs,fault`, 512 MB coherent window. XCL `main` `930e8b4` + #867 + #871 + #684 + #433 + #1288 + local logging. Runs in a 30 GiB memory cgroup. **What the faults have in common:** - Window 0 is at `0xffffc00140000000` in my runs. The fault pages are `0xffffc00100000000` (run 1) and `0xffffc001000bc000` (run 2), which are w0 + `0xC0000000` and w0 + `0xC00BC000`, each minus 4 GiB. In other words, reads past `0xffffc002_00000000` came out 4 GiB too low. - Your run fits the same rule: w0 at `0xffffc00180000000` puts the boundary at w0 + `0x80000000`, and the same absolute fault address follows. - The pages 4 GiB higher are inside window 0, bound, and hold title data (run 2: the 64 MiB bind `0xffffc001fc200000`..`0xffffc00200200000`). - With `RADV_DEBUG=bo_history`, no buffer of any kind was ever placed in `[0xffffc00100000000, w0)` during the run. It is not a freed resource, so the resource-lifetime changes (#1070, #968, `XCL_LATE_RELEASE`) do not apply. - It is not one shader. With `RADV_DEBUG=hang` (exact breadcrumbs), the faulting dispatch in run 2 was console CS `cc047f458010c5d2` (vkd3d hash `d4a57a9f7e941f1b`). In my earlier report it was a region of `4585e350d1b864e3`. Both read only `io` and the four window UAVs. **@⁠ClosetPie107's table fits the same rule:** the window 0 base moves with `XCL_COHERENT_MB`, but the boundary `0xffffc002_00000000` does not, so the first page below it minus 4 GiB stays at `0x0000c00100000000` (your devcoredump's `…c00100018000` is in the same range). On my tree (with #871) the `window 0 buffer at VA` line names the first 4 GiB sparse window, not the coherent one: the local logging shows w0 sparse at GPU `0xffffc00140000000..0xffffc00240000000` and the 512 MB coherent window at `0xffff800120000000`. Since no buffer was ever placed at the fault pages (`bo_history` above) and their +4 GiB twins are bound sparse pages, I don't think a userptr invalidation of the coherent window explains it, but I have not tested that on a tree without #871. **Which layer:** not settled. Offline, dxil-spirv `53aac41`'s SPIR-V for both shaders does every window access as a 64-bit add with carry (`OpIAddCarry`, no sign extension). The RADV ISA I compiled from it natively has every carry produced and consumed. XCL's host-side address math is 64-bit. I could not get the ISA of the pipeline vkd3d-proton actually built at run time (the `RADV_DEBUG=hang` dump was not written). So it is either that runtime code, or something below the ISA (page tables for a bind that straddles the boundary, or the hardware). A small Vulkan program that reads through a buffer address across a `…_00000000` boundary would separate the two; I have not written it yet. **Workaround tried (local, not a PR):** a switch that starts each sparse window on a 4 GiB-aligned GPU address (w0 `0xffffc00200000000`, w1 `0xffffc00300000000`, w2 `0xffffc00400000000`), so no window access can cross a boundary. | run | windows | first `#101` | end | |---|---|---|---| | 1 | as before | 166.3 s | gfxhub fault 220.7 s, device removed | | 2 (`RADV_DEBUG=hang`) | as before | 178.5 s | gfxhub fault 215–217 s | | 3 | 4 GiB-aligned | 154.6 s | no fault; the 5 bridged `Wait64BitValueX` waits that came about 2 s before each fault (188 s) completed; 7866 dispatches after 150 s; ended at 553 s by my 30 GiB cgroup cap during two DXC compiles | That is one run with the workaround, so it is not proof that the fault is gone. In all three runs the screen stayed on the dimmed loading artwork with no presents after about 181 s. From about 190 s the title waits for the build of compute program `56c0cd3b82a00c6e` (23.4 MB of DXIL), which did not finish in more than 5 minutes. **On `main` `b7aa9f3`:** three more runs without the workaround (b7aa9f3 + #867 + #871 + #684 + #433 + #1288 + #1321, one also + #1385) ended in the same fault at 170–224 s, all with fault pages below w0. With #968 merged and #867's rebased head, `XCL_LATE_RELEASE=1` no longer exits at about 7 s; that run reached 170 s and ended in the same fault. #1321 leaves `56c0cd3b82a00c6e` at 23.4 MB. **Not tested:** Windows, NVIDIA, other AMD generations, more than one run with the workaround. AI use: Claude Code (Claude Opus 5.5) ran the tests and the analysis and wrote this comment. The runs were real, on the hardware above.
Author
Owner

@⁠not-rex on GitHub · 2026-11-24 19:27 UTC · original · edited 2026-11-24 19:35 UTC

RTX 3080 (10 GB, driver 610.88): with the 192 split-wave64 compute/mesh programs the title reaches in the world refused, the GPU-queue stall is gone: 0 GPU-wait timeouts, 0 cycle breaks, no device removal, ~160 s in the world. The title then faults at +0x4e8b302, next to the +0x4e8b4be fault that #1284's loop budget leads to.

Tree: main 930e8b4 + #1123 + #1254 (diagnostics), release, warm DXIL cache and save, XCL_PSO_WAIT_MS=50, A at 30 and 40 s, 400 s, GPU sampled every 2 s. "Refused" is a local diagnostic switch: on a GPU without 64-lane waves, a wave64 compute or mesh program that would take the split form is not translated, so its dispatches and draws are dropped like an untranslatable program's.

as main split wave64 refused #1284, XCL_LOOP_BUDGET=4096
first ListX #101 90.3 s 87.5 s 88.6 s
after #101 12 presents, last at 124.1 s ~1 present per 2 s for ~160 s 35 presents, last at 238.2 s
GPU queue.Wait … did not complete within 5000 ms 18 0 93
"would close a GPU cycle" 5 0 32
GPU 100 % from ~122 s until the hang short bursts only 100 % bursts of 6-12 s, idle gaps
end 0x887A0006 at 168.5 s 0xC0000005 at +0x4e8b302 at 247.6 s 0xC0000005 at +0x4e8b4be at 241.3 s
peak commit 31.9 GB 33.3 GB 32.7 GB

Without XCL_PSO_WAIT_MS (and without #1288) the refused run ends in the title's watchdog at 119.4 s instead, with 0 timeouts as well.

My reading: on this card the queue stall is the split-wave64 programs running long (the loops on data a skipped dispatch never wrote that @⁠larelgit, @⁠oeirughrepuiohg and @⁠VolenNakov describe); capping their loops (#1284) or dropping them both stop the hang. The next stop is in the title, around +0x4e8b300 (corrected: an earlier version of this comment said it read "an index of -1" from data those programs didn't produce; the disassembly in the follow-up below shows otherwise).

Plan, to avoid duplicate work: the switch as a diagnostic PR, XCL_WAVE64_REFUSE=1 (off by default, HLSL and caches unchanged when off; ~60 lines with a unit test), so others can check whether their stall is the split form. Not a fix. If someone is already on the +0x4e8b300 function, say so.

AI use: Claude Code (Claude Opus 5.5) wrote the local switch, ran the runs on my machine and wrote this.

**@⁠not-rex** on GitHub · 2026-11-24 19:27 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7142113187) · edited 2026-11-24 19:35 UTC **RTX 3080 (10 GB, driver 610.88): with the 192 split-wave64 compute/mesh programs the title reaches in the world refused, the GPU-queue stall is gone: 0 GPU-wait timeouts, 0 cycle breaks, no device removal, ~160 s in the world. The title then faults at `+0x4e8b302`, next to the `+0x4e8b4be` fault that #1284's loop budget leads to.** Tree: `main` `930e8b4` + #1123 + #1254 (diagnostics), release, warm DXIL cache and save, `XCL_PSO_WAIT_MS=50`, A at 30 and 40 s, 400 s, GPU sampled every 2 s. "Refused" is a local diagnostic switch: on a GPU without 64-lane waves, a wave64 compute or mesh program that would take the split form is not translated, so its dispatches and draws are dropped like an untranslatable program's. | | as `main` | split wave64 refused | #1284, `XCL_LOOP_BUDGET=4096` | |---|---|---|---| | first `ListX #101` | 90.3 s | 87.5 s | 88.6 s | | after `#101` | 12 presents, last at 124.1 s | ~1 present per 2 s for ~160 s | 35 presents, last at 238.2 s | | `GPU queue.Wait … did not complete within 5000 ms` | 18 | **0** | 93 | | "would close a GPU cycle" | 5 | **0** | 32 | | GPU | 100 % from ~122 s until the hang | short bursts only | 100 % bursts of 6-12 s, idle gaps | | end | `0x887A0006` at 168.5 s | `0xC0000005` at `+0x4e8b302` at 247.6 s | `0xC0000005` at `+0x4e8b4be` at 241.3 s | | peak commit | 31.9 GB | 33.3 GB | 32.7 GB | Without `XCL_PSO_WAIT_MS` (and without #1288) the refused run ends in the title's watchdog at 119.4 s instead, with 0 timeouts as well. My reading: on this card the queue stall is the split-wave64 programs running long (the loops on data a skipped dispatch never wrote that @⁠larelgit, @⁠oeirughrepuiohg and @⁠VolenNakov describe); capping their loops (#1284) or dropping them both stop the hang. The next stop is in the title, around `+0x4e8b300` (**corrected:** an earlier version of this comment said it read "an index of -1" from data those programs didn't produce; the disassembly in the follow-up below shows otherwise). **Plan, to avoid duplicate work:** the switch as a diagnostic PR, `XCL_WAVE64_REFUSE=1` (off by default, HLSL and caches unchanged when off; ~60 lines with a unit test), so others can check whether their stall is the split form. Not a fix. If someone is already on the `+0x4e8b300` function, say so. AI use: Claude Code (Claude Opus 5.5) wrote the local switch, ran the runs on my machine and wrote this.
Author
Owner

@⁠not-rex on GitHub · 2026-11-24 19:36 UTC · original

Follow-up on the two title faults in my comment above (+0x4e8b302, +0x4e8b4be), from the 1.0.2.1 executable's bytes (static disassembly only):

  • Both are in the title's map-types store (the store for .ytyp archetype files; its global object is at +0x7c21ac8, and its constructor passes that name).
  • +0x4e8b302: in a vtable method (+0x4e8b270–+0x4e8b363, vtable entry at +0x61ceeb8). It asks a builder (+0x465c20 / +0x9dfd80) to fill a zeroed local with the ytyp's contents; the builder left it null, so movzx ebx, word [rax+0x20] reads address 0x20. No table index is involved.
  • +0x4e8b4be: a small type check (mov rax,[rcx]; mov rax,[rax+8], called from +0x4e8b37c, +0x52479f6 and +0x555c86c). The "vtable" pointer differs per faulting thread and is garbage, so rax+8 is non-canonical and Windows reports the read at 0xffffffffffffffff. That's where my "-1" came from: it's not a value read from GPU output. All eight faulting threads were checking archetype objects packed within 24 KB that belong to one ytyp still live in the store, so that ytyp's memory looks overwritten while referenced.
  • The corrupted objects are outside XCL's GPU-visible title memory (0x400000000–0x7ffffffff), so a GPU write is not the likely direct cause.

Candidates, low confidence on which: a ytyp placed from a failed read (every run here has failed DirectStorage requests, 0x89240009: 433 in the budget run, 849 in the refuse run, and XCL logs only the first failure per queue); a title-side lifetime race that only shows now that the world runs longer; or an indirect effect of culling output a dropped or capped dispatch never wrote. To separate the first from the others I'll run the same setup with #816 (it traces DirectStorage access failures) and with #1405 / #1464 / #1625, which each fix a kind of failed or short request, and report whether the failures and the fault go away together.

AI use: Claude Code (Claude Opus 5.5) disassembled the bytes, read our run logs and wrote this.

**@⁠not-rex** on GitHub · 2026-11-24 19:36 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7142333417) Follow-up on the two title faults in my comment above (`+0x4e8b302`, `+0x4e8b4be`), from the 1.0.2.1 executable's bytes (static disassembly only): - Both are in the title's **map-types store** (the store for `.ytyp` archetype files; its global object is at `+0x7c21ac8`, and its constructor passes that name). - `+0x4e8b302`: in a vtable method (`+0x4e8b270`–`+0x4e8b363`, vtable entry at `+0x61ceeb8`). It asks a builder (`+0x465c20` / `+0x9dfd80`) to fill a zeroed local with the ytyp's contents; the builder left it null, so `movzx ebx, word [rax+0x20]` reads address `0x20`. No table index is involved. - `+0x4e8b4be`: a small type check (`mov rax,[rcx]; mov rax,[rax+8]`, called from `+0x4e8b37c`, `+0x52479f6` and `+0x555c86c`). The "vtable" pointer differs per faulting thread and is garbage, so `rax+8` is non-canonical and Windows reports the read at `0xffffffffffffffff`. That's where my "-1" came from: it's not a value read from GPU output. All eight faulting threads were checking archetype objects packed within 24 KB that belong to one ytyp still live in the store, so that ytyp's memory looks overwritten while referenced. - The corrupted objects are outside XCL's GPU-visible title memory (`0x400000000`–`0x7ffffffff`), so a GPU write is not the likely direct cause. Candidates, low confidence on which: a ytyp placed from a failed read (every run here has failed DirectStorage requests, `0x89240009`: 433 in the budget run, 849 in the refuse run, and XCL logs only the first failure per queue); a title-side lifetime race that only shows now that the world runs longer; or an indirect effect of culling output a dropped or capped dispatch never wrote. To separate the first from the others I'll run the same setup with #816 (it traces DirectStorage access failures) and with #1405 / #1464 / #1625, which each fix a kind of failed or short request, and report whether the failures and the fault go away together. AI use: Claude Code (Claude Opus 5.5) disassembled the bytes, read our run logs and wrote this.
Author
Owner

@⁠not-rex on GitHub · 2026-11-24 19:42 UTC · original

Result for my plan above (false GPU-cycle breaks, comment 7133841916): the change works as described but doesn't help on an RTX 3080, so I'm not opening the PR.

Same 3080 world setup as my earlier tables (main 930e8b4 + #1123 + #1254, warm caches, XCL_PSO_WAIT_MS=50, A at 30/40 s, 400 s), with and without the change (977cc85), one run each:

without with
"would close a GPU cycle" 5 0
"stays on the GPU" – 16 (the log is capped at 16)
GPU queue.Wait … 5000 ms timeouts (first, after #101) 18 (+34.8 s) 57 (+41.0 s)
GPU at 100 % after presents stop ~46 s, then 0x887A0006 at 168.5 s ~50 s, then 0x887A0006 at 166.7 s

Every former false break stays on the GPU, but the outcome is the same hang, and the kept signals add timeouts because they now wait on the stalled GPU instead of being signalled on the CPU. With the split-wave64 programs refused (my comment above) there are no cycle breaks at all, so on this card the breaks are a symptom of the GPU falling behind, not a cause. The branch stays on my fork (false-cycle-breaks) with its tests if the false-cycle detection is ever wanted for its own sake.

AI use: Claude Code (Claude Opus 5.5) ran the runs on my machine and wrote this.

**@⁠not-rex** on GitHub · 2026-11-24 19:42 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7142475874) Result for my plan above (false GPU-cycle breaks, comment 7133841916): **the change works as described but doesn't help on an RTX 3080, so I'm not opening the PR.** Same 3080 world setup as my earlier tables (`main` `930e8b4` + #1123 + #1254, warm caches, `XCL_PSO_WAIT_MS=50`, A at 30/40 s, 400 s), with and without the change (`977cc85`), one run each: | | without | with | |---|---|---| | "would close a GPU cycle" | 5 | 0 | | "stays on the GPU" | – | 16 (the log is capped at 16) | | `GPU queue.Wait … 5000 ms` timeouts (first, after `#101`) | 18 (+34.8 s) | 57 (+41.0 s) | | GPU at 100 % after presents stop | ~46 s, then `0x887A0006` at 168.5 s | ~50 s, then `0x887A0006` at 166.7 s | Every former false break stays on the GPU, but the outcome is the same hang, and the kept signals add timeouts because they now wait on the stalled GPU instead of being signalled on the CPU. With the split-wave64 programs refused (my comment above) there are no cycle breaks at all, so on this card the breaks are a symptom of the GPU falling behind, not a cause. The branch stays on my fork (`false-cycle-breaks`) with its tests if the false-cycle detection is ever wanted for its own sake. AI use: Claude Code (Claude Opus 5.5) ran the runs on my machine and wrote this.
Author
Owner

@⁠dkdknight on GitHub · 2026-11-24 20:10 UTC · original

RTX 5080 / Windows: with every compute pipeline precompiled and no bind waiting, the title reaches the first frame of its world in ~96 s, then the GPU is removed. XCL_GPU_CULPRIT (#1323) names two atmosphere ray-march compute programs that do not finish (50625695d2e6cbe7, then 206ed63b96be21a1). A lower loop budget, group barriers instead of spin meets, and skipping no work at all each leave the stop where it is.

Setup

  • NVIDIA GeForce RTX 5080 16 GB, driver 621.14 (32.0.16.2114); Intel Core i9-13900KF; 64 GB RAM; Windows 11 Home 26200; rustc 1.100.0 MSVC; DXC 1.8.2502.11; release builds.
  • Retail 1.0.2.1. scripts/smoke.ps1 (XCL_NETWORK=0, XCL_ACTIVITY=1), XCL_PRESS_A_AT=30, XCL_HEAP_WINDOWS=1, no XCL_PSO_WAIT_MS (binds wait).
  • Tree: main 930e8b4 + #684 (e56dbc3) + #1288 (95299f4) + #1279 (d2eb1b4) + #1315/#1316 (stack at 5e312d5) + #680 (95f34c1) + #899 + #1323, merged locally. One conflict: #680's normalisation of HEAP_WINDOWS in translate moved into #1315's prepare(), so the compact backend gets it too.
  • Plus four local changes (listed at the end; not PRs yet) and three local diagnostic switches used only for the experiments below.

1. Getting past the pipeline waits

  • xcl shaders shaders.rpf --precompile --only cs --pipelines, heap form, run as 4 processes (a local XCL_PRECOMPILE_SHARD=k/n; one process used 7 of 32 logical cores, four used ~23): 2,689 compute programs compiled, 0 errors; 2,688 pipelines made, 1 refused; ~63 min.
  • #1316's compact form: d122faa48eb0afdc and 79dc576c52b3dc23 go compact (718 KB / 660 KB HLSL). 15ec6daefb19a780 did not: 19949 blocks of 11909 texts need a 9975-word table (at most 8192). In the normal form its build took the title process to 126 GB of commit (smoke peak commit: 126202 MB). With MAX_TABLE_WORDS at 12,288 (the size the comment at MAX_TABLE_WORDS in #1315 says built on a 5070 Ti; 15,360 failed) it goes compact (5.2 MB HLSL) and builds.
  • 95cc13288a27a96e in the compact form is still 10,334,168 B of DXIL: 424 s in the driver, once; from the blob afterwards.
  • After that, binds held the title on graphics pipelines: graphics_bound and execute_indirect use resolve_wait for every pipeline. At 86 s: 64 graphics waits, 18.0 s in all (longest 1.5 s), one thread, one after another; one later wait 24.2 s. With draws and indirect draws not waiting for a graphics pipeline still being built (skipped, as resolve_for_bind already does at SetPipelineState): 0.8 s of graphics waits in a run.
  • With #1288 the title's sound stops while a bind is held (xapu stops decoding with the hold). Its stall check is Sleep(1000) (+0x2215b01, through api-ms-win-core-synch), and it resets its count when a tick takes over 2.0 s (+0x2215b29). Holding only sleeps of 100 ms or more keeps the audio going, and the stall check still never fires.

2. Where it stops now (5 runs, all with the warm cache)

run skipped last presents GPU waits not completing device removed title
draws skip a graphics pipeline being built 256 draws, 0 dispatches ~96 s (fade to black before the world) from ~98 s, completed=0x0 109.8 s 0x80000003 at +0x2474606
same, again 256 draws, 0 dispatches ~98 s from ~97 s 108.7 s same
draws wait (local XCL_GRAPHICS_WAIT=1): nothing skipped 0 / 0 ~92 s from ~83 s 95.1 s same

Pipeline waits in these runs: 2 compute waits, 211 ms in all. So the stop does not come from skipped work or from pipelines.

3. What the GPU is running (XCL_GPU_CULPRIT=1)

  • At the first release, 1 of 91 lists had a dispatch started and not done: #2757: cs 50625695d2e6cbe7, groups 32x32x2. Device removed 10 s later.
  • 50625695d2e6cbe7 (7,252 B container, 64 threads, 4x4x4) and 206ed63b96be21a1 (64 threads, 8x8x1, 64x64x1 groups) have the same shape: an outer loop whose count is read from a constant buffer; a middle loop that ends when three transmittance values fall under a threshold or after 10,000 steps (s_cmpk_gt_i32 …, 0x270f); a per-lane inner loop. An atmosphere / sky LUT ray march, by its constants. Both run split wave64 with spin meets (XCL_X_SPIN 1, one console wave a group). Their exits go through xcl_x_ballot, i.e. the exchanged masks.
  • The other "not done" dispatches named at the same releases (0a0e9b56c528015a 2 groups, 6d0877bf70275285 18–54 groups, 73ffa0b705ae2cc0 1 group) have no backward branch or only short counted loops (an LDS bitonic sort, a bounds update): they wait behind the two above.

4. Ruled out by measurement (local switches, only these two programs changed; everything else from the cache)

experiment 50625695… 206ed63b… device removed
loop budget 4,096 for both (prelude xcl_budget) open at 87.1 s, done later open at 91.3 s 96.2 s
loop budget 256 for both open at 84.0 s, done later open at 88.4 s 93.3 s
group barriers instead of spin meets (no XCL_X_SPIN) open at 97.8 s, done later open at 102.5 s 103.5 s

At 256 iterations a lane, a dispatch of 4,096 groups still takes well over 4 s. So the time is not in the iteration count (a ray march on zero / NaN data), and not in the spin meets. Not checked: what the two programs read; whether their accesses go to the coherent window, which is in non-local memory here (video memory … 4,901 MB non-local, coherent 3998/4095 MB).

5. Same machine, VIctory (for comparison; Marvisak/VIctory ffe310e): world loading with sound, then host GPU device removed (0x887A0006) after ~3 min at the same point. Its translate on this pack: compute 1,441 emitted of 2,582, vertex/pixel 12,231 of 14,027, mesh 8,214 of 8,713.

Local changes (on the tree above; to be opened as separate PRs once checked against the open ones)

  • hle/kernelx.rs: #1288's Sleep holds only sleeps of 100 ms or more (XCL_SLEEP_HOLD_MIN_MS). Test only_a_long_sleep_is_held.
  • hle/d3d12x/bind.rs: draws (draw_pso) and ExecuteIndirect (indirect_pso) do not wait for a graphics pipeline still being built: the draw is skipped and the build goes to the workers; compute is waited for as before. Tests a_draw_is_skipped_while_its_pipeline_is_built, execute_indirect_waits_for_a_compute_pipeline_only (both fail without the change).
  • gpu/recomp/compact.rs: MAX_TABLE_WORDS 8,192 → 12,288.
  • shaders.rs: XCL_PRECOMPILE_SHARD=k/n for --precompile.

Tested

  • Areas touched, debug, on this tree: cargo test -p xcl --lib filters gpu::recomp 218 passed / 0 failed / 18 ignored (SKIPPED: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, gpu_compact_native_wave64_form – no wave64); hle::d3d12x hle::kernelx 173 / 0 / 2; integration e2e 3/0, gpu_pso_e2e 7/0, gpu_compute_e2e 4/0 (with XCL_HEAP_WINDOWS=1, incl. heap_window_out_of_memory_falls_back_to_the_switch_form), predication_e2e 1/0.

Not tested

  • The whole workspace suite on this tree (only the areas above).
  • AMD / native wave64; the two programs on their own outside the title; DRED.
  • What the two programs read in these runs (constant buffer values, textures).

AI use

  • Claude Code, Claude Opus 5.5: merged the tree, wrote the local changes, tests and switches, ran the builds, the precompile and the title runs on the machine above, read the logs and dumps, and wrote this report. Shader hashes, offsets and counts only; nothing from the game's files is attached.
**@⁠dkdknight** on GitHub · 2026-11-24 20:10 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7143155314) **RTX 5080 / Windows: with every compute pipeline precompiled and no bind waiting, the title reaches the first frame of its world in ~96 s, then the GPU is removed. `XCL_GPU_CULPRIT` (#1323) names two atmosphere ray-march compute programs that do not finish (`50625695d2e6cbe7`, then `206ed63b96be21a1`). A lower loop budget, group barriers instead of spin meets, and skipping no work at all each leave the stop where it is.** **Setup** - NVIDIA GeForce RTX 5080 16 GB, driver 621.14 (32.0.16.2114); Intel Core i9-13900KF; 64 GB RAM; Windows 11 Home 26200; rustc 1.100.0 MSVC; DXC 1.8.2502.11; release builds. - Retail 1.0.2.1. `scripts/smoke.ps1` (`XCL_NETWORK=0`, `XCL_ACTIVITY=1`), `XCL_PRESS_A_AT=30`, `XCL_HEAP_WINDOWS=1`, no `XCL_PSO_WAIT_MS` (binds wait). - Tree: `main` `930e8b4` + #684 (`e56dbc3`) + #1288 (`95299f4`) + #1279 (`d2eb1b4`) + #1315/#1316 (stack at `5e312d5`) + #680 (`95f34c1`) + #899 + #1323, merged locally. One conflict: #680's normalisation of `HEAP_WINDOWS` in `translate` moved into #1315's `prepare()`, so the compact backend gets it too. - Plus four local changes (listed at the end; not PRs yet) and three local diagnostic switches used only for the experiments below. **1. Getting past the pipeline waits** - `xcl shaders shaders.rpf --precompile --only cs --pipelines`, heap form, run as 4 processes (a local `XCL_PRECOMPILE_SHARD=k/n`; one process used 7 of 32 logical cores, four used ~23): **2,689 compute programs compiled, 0 errors; 2,688 pipelines made, 1 refused**; ~63 min. - #1316's compact form: `d122faa48eb0afdc` and `79dc576c52b3dc23` go compact (718 KB / 660 KB HLSL). `15ec6daefb19a780` did not: *19949 blocks of 11909 texts need a 9975-word table (at most 8192)*. In the normal form its build took the title process to **126 GB of commit** (smoke `peak commit: 126202 MB`). With `MAX_TABLE_WORDS` at 12,288 (the size the comment at `MAX_TABLE_WORDS` in #1315 says built on a 5070 Ti; 15,360 failed) it goes compact (5.2 MB HLSL) and builds. - `95cc13288a27a96e` in the compact form is still 10,334,168 B of DXIL: **424 s** in the driver, once; from the blob afterwards. - After that, binds held the title on **graphics** pipelines: `graphics_bound` and `execute_indirect` use `resolve_wait` for every pipeline. At 86 s: 64 graphics waits, 18.0 s in all (longest 1.5 s), one thread, one after another; one later wait 24.2 s. With draws and indirect draws not waiting for a graphics pipeline still being built (skipped, as `resolve_for_bind` already does at `SetPipelineState`): 0.8 s of graphics waits in a run. - With #1288 the title's sound stops while a bind is held (xapu stops decoding with the hold). Its stall check is `Sleep(1000)` (`+0x2215b01`, through `api-ms-win-core-synch`), and it resets its count when a tick takes over 2.0 s (`+0x2215b29`). Holding only sleeps of 100 ms or more keeps the audio going, and the stall check still never fires. **2. Where it stops now** (5 runs, all with the warm cache) | run | skipped | last presents | GPU waits not completing | device removed | title | |---|---|---|---|---|---| | draws skip a graphics pipeline being built | 256 draws, 0 dispatches | ~96 s (fade to black before the world) | from ~98 s, `completed=0x0` | 109.8 s | `0x80000003` at `+0x2474606` | | same, again | 256 draws, 0 dispatches | ~98 s | from ~97 s | 108.7 s | same | | **draws wait (local `XCL_GRAPHICS_WAIT=1`): nothing skipped** | **0 / 0** | ~92 s | from ~83 s | **95.1 s** | same | Pipeline waits in these runs: 2 compute waits, 211 ms in all. So the stop does not come from skipped work or from pipelines. **3. What the GPU is running** (`XCL_GPU_CULPRIT=1`) - At the first release, 1 of 91 lists had a dispatch started and not done: `#2757: cs 50625695d2e6cbe7, groups 32x32x2`. Device removed 10 s later. - `50625695d2e6cbe7` (7,252 B container, 64 threads, 4x4x4) and `206ed63b96be21a1` (64 threads, 8x8x1, 64x64x1 groups) have the same shape: an outer loop whose count is read from a constant buffer; a middle loop that ends when three transmittance values fall under a threshold or after 10,000 steps (`s_cmpk_gt_i32 …, 0x270f`); a per-lane inner loop. An atmosphere / sky LUT ray march, by its constants. Both run split wave64 with spin meets (`XCL_X_SPIN 1`, one console wave a group). Their exits go through `xcl_x_ballot`, i.e. the exchanged masks. - The other "not done" dispatches named at the same releases (`0a0e9b56c528015a` 2 groups, `6d0877bf70275285` 18–54 groups, `73ffa0b705ae2cc0` 1 group) have no backward branch or only short counted loops (an LDS bitonic sort, a bounds update): they wait behind the two above. **4. Ruled out by measurement** (local switches, only these two programs changed; everything else from the cache) | experiment | `50625695…` | `206ed63b…` | device removed | |---|---|---|---| | loop budget 4,096 for both (prelude `xcl_budget`) | open at 87.1 s, done later | open at 91.3 s | 96.2 s | | loop budget **256** for both | open at 84.0 s, done later | open at 88.4 s | 93.3 s | | group barriers instead of spin meets (no `XCL_X_SPIN`) | open at 97.8 s, done later | open at 102.5 s | 103.5 s | At 256 iterations a lane, a dispatch of 4,096 groups still takes well over 4 s. So the time is not in the iteration count (a ray march on zero / NaN data), and not in the spin meets. Not checked: what the two programs read; whether their accesses go to the coherent window, which is in non-local memory here (`video memory … 4,901 MB non-local`, coherent 3998/4095 MB). **5. Same machine, VIctory** (for comparison; `Marvisak/VIctory` `ffe310e`): world loading with sound, then *host GPU device removed* (`0x887A0006`) after ~3 min at the same point. Its `translate` on this pack: compute 1,441 emitted of 2,582, vertex/pixel 12,231 of 14,027, mesh 8,214 of 8,713. **Local changes** (on the tree above; to be opened as separate PRs once checked against the open ones) - `hle/kernelx.rs`: #1288's `Sleep` holds only sleeps of 100 ms or more (`XCL_SLEEP_HOLD_MIN_MS`). Test `only_a_long_sleep_is_held`. - `hle/d3d12x/bind.rs`: draws (`draw_pso`) and ExecuteIndirect (`indirect_pso`) do not wait for a graphics pipeline still being built: the draw is skipped and the build goes to the workers; compute is waited for as before. Tests `a_draw_is_skipped_while_its_pipeline_is_built`, `execute_indirect_waits_for_a_compute_pipeline_only` (both fail without the change). - `gpu/recomp/compact.rs`: `MAX_TABLE_WORDS` 8,192 → 12,288. - `shaders.rs`: `XCL_PRECOMPILE_SHARD=k/n` for `--precompile`. **Tested** - Areas touched, debug, on this tree: `cargo test -p xcl --lib` filters `gpu::recomp` 218 passed / 0 failed / 18 ignored (SKIPPED: `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`, `gpu_compact_native_wave64_form` – no wave64); `hle::d3d12x hle::kernelx` 173 / 0 / 2; integration `e2e` 3/0, `gpu_pso_e2e` 7/0, `gpu_compute_e2e` 4/0 (with `XCL_HEAP_WINDOWS=1`, incl. `heap_window_out_of_memory_falls_back_to_the_switch_form`), `predication_e2e` 1/0. **Not tested** - The whole workspace suite on this tree (only the areas above). - AMD / native wave64; the two programs on their own outside the title; DRED. - What the two programs read in these runs (constant buffer values, textures). **AI use** - Claude Code, Claude Opus 5.5: merged the tree, wrote the local changes, tests and switches, ran the builds, the precompile and the title runs on the machine above, read the logs and dumps, and wrote this report. Shader hashes, offsets and counts only; nothing from the game's files is attached.
Author
Owner

@⁠Ariorh1337 on GitHub · 2026-11-24 20:12 UTC · original

RTX 5090, every pipeline prebuilt, no stand-ins: dropping the dispatches of all split-wave64 compute programs does not stop the device removal here. It ends the queue.Wait timeouts, but the removal comes sooner: 10.8 s after the first #101. This adds to @⁠not-rex's RTX 3080 table and @⁠maephisto666's 18567a5f… runs above. Our tree and switch are not the same as theirs; see the differences below.

Setup: RTX 5090 32 GB (driver 32.0.16.1692, 32-lane waves), Ryzen 7 9800X3D, 64 GB, Windows 11 Pro 26300, release, DXC 1.9.2609.5, retail 1.0.2.1. XCL_NETWORK=0 XCL_HEAP_WINDOWS=1 XCL_ACTIVITY=1, warm caches. No XCL_PSO_WAIT_MS: binds wait, so every run below has 0 skipped draws and dispatches apart from the ones the switch drops. nvidia-smi sampled once a second.

Tree: the one from my earlier comment (main 930e8b4, b8b1f49 reverted, #1288, #680, #688, #751, #1316 with the #1448 change, #1429), plus #929, #1464 and #979. With the last two, DirectStorage reported 0 failed requests in every run.

Switch (local, not for upstream): XCL_SKIP_CS. For a hash list it drops the dispatches of those compute programs. With split it drops every compute program that wave32_only plus detect_wave64 would put in the split form. It applies in bind::dispatch / execute_indirect after resolve_wait, so the program is still translated and built; only its dispatches are dropped.

base #1284 XCL_LOOP_BUDGET=4096 (compute only) skip 18567a5f0145bde9 skip all split-wave64 compute
first #101 72.4 s 58.0 s 67.1 s 59.7 s
GPU at 100 % after #101 51 s 28 s 28 s 9 s, then 0–3 %
GPU queue.Wait … did not complete within 5000 ms 97 63 41 0
"would close a GPU cycle" 1 1 0 2
fence rewinds repaired (#1429) 1 1 0 2
dispatches dropped 0 0 64 ≥ 8 192 (396 programs)
0x887a0005 after #101 +53.6 s +46.4 s +29.2 s +10.8 s
end int3 at +0x2474606 same same same
  • Run with everything split skipped: the GPU went to 100 % within a second of #101, the same as before. It stayed there for 9 s, then dropped to 3 % and 0 % for ~2 s, and then the device was removed. Submits had already stopped: 0 in the 66–68 s window, while DirectStorage kept going. No queue.Wait timed out, but the removal came before a 5 s wait would have expired anyway.
  • One program skipped (18567a5f…, 64 dispatches dropped): the same pattern as @⁠maephisto666's point 4. The timeouts drop from 97 to 41, but the GPU stays at 100 % and the device is still removed.
  • Loop budget 4096: halves the 100 % window but doesn't remove it. On the 3080 the same budget ended in a title fault rather than a removal.

How this differs from @⁠not-rex's run, any of which could explain it:

  • Only compute programs are covered. Split-wave64 mesh programs still ran; their switch refuses those too.
  • The dispatches are dropped after the build, not refused at translation.
  • The heap form (#680), and no XCL_PSO_WAIT_MS.
  • 396 programs here against their 192. The dispatches the title had made before #101 were dropped too: 8 192 in all. So the later indirect draws and dispatches read culling output that was never written, which may be long work in itself.

On this card, with this tree, the split compute programs are not the whole 100 % phase. Mesh programs are the next thing I can check. If @⁠not-rex's XCL_WAVE64_REFUSE lands as a PR, I'll run it on this tree instead of my switch.

Not tested: split-wave64 mesh programs refused; XCL_WAVE64_REFUSE; XCL_PSO_WAIT_MS=50 with the switch; DRED to name the list that was running at the removal; AMD.

AI use: Claude Code (Claude Opus 5.5) wrote the local switch, ran the runs and the counters on the machine above, and wrote this comment.

**@⁠Ariorh1337** on GitHub · 2026-11-24 20:12 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7143186600) **RTX 5090, every pipeline prebuilt, no stand-ins: dropping the dispatches of all split-wave64 *compute* programs does not stop the device removal here. It ends the queue.Wait timeouts, but the removal comes sooner: 10.8 s after the first `#101`.** This adds to @⁠not-rex's RTX 3080 table and @⁠maephisto666's `18567a5f…` runs above. Our tree and switch are not the same as theirs; see the differences below. **Setup:** RTX 5090 32 GB (driver 32.0.16.1692, 32-lane waves), Ryzen 7 9800X3D, 64 GB, Windows 11 Pro 26300, release, DXC 1.9.2609.5, retail 1.0.2.1. `XCL_NETWORK=0 XCL_HEAP_WINDOWS=1 XCL_ACTIVITY=1`, warm caches. **No `XCL_PSO_WAIT_MS`:** binds wait, so every run below has 0 skipped draws and dispatches apart from the ones the switch drops. `nvidia-smi` sampled once a second. **Tree:** the one from my earlier comment (`main` `930e8b4`, `b8b1f49` reverted, #1288, #680, #688, #751, #1316 with the #1448 change, #1429), plus #929, #1464 and #979. With the last two, DirectStorage reported 0 failed requests in every run. **Switch (local, not for upstream):** `XCL_SKIP_CS`. For a hash list it drops the dispatches of those compute programs. With `split` it drops every compute program that `wave32_only` plus `detect_wave64` would put in the split form. It applies in `bind::dispatch` / `execute_indirect` after `resolve_wait`, so the program is still translated and built; only its dispatches are dropped. | | base | #1284 `XCL_LOOP_BUDGET=4096` (compute only) | skip `18567a5f0145bde9` | skip all split-wave64 compute | |---|---|---|---|---| | first `#101` | 72.4 s | 58.0 s | 67.1 s | 59.7 s | | GPU at 100 % after `#101` | 51 s | 28 s | 28 s | **9 s**, then 0–3 % | | `GPU queue.Wait … did not complete within 5000 ms` | 97 | 63 | 41 | **0** | | "would close a GPU cycle" | 1 | 1 | 0 | 2 | | fence rewinds repaired (#1429) | 1 | 1 | 0 | 2 | | dispatches dropped | 0 | 0 | 64 | ≥ 8 192 (396 programs) | | `0x887a0005` after `#101` | +53.6 s | +46.4 s | +29.2 s | **+10.8 s** | | end | `int3` at `+0x2474606` | same | same | same | - **Run with everything split skipped:** the GPU went to 100 % within a second of `#101`, the same as before. It stayed there for 9 s, then dropped to 3 % and 0 % for ~2 s, and then the device was removed. Submits had already stopped: 0 in the 66–68 s window, while DirectStorage kept going. No queue.Wait timed out, but the removal came before a 5 s wait would have expired anyway. - **One program skipped** (`18567a5f…`, 64 dispatches dropped): the same pattern as @⁠maephisto666's point 4. The timeouts drop from 97 to 41, but the GPU stays at 100 % and the device is still removed. - **Loop budget 4096:** halves the 100 % window but doesn't remove it. On the 3080 the same budget ended in a title fault rather than a removal. **How this differs from @⁠not-rex's run, any of which could explain it:** - Only compute programs are covered. Split-wave64 **mesh** programs still ran; their switch refuses those too. - The dispatches are dropped after the build, not refused at translation. - The heap form (#680), and no `XCL_PSO_WAIT_MS`. - 396 programs here against their 192. The dispatches the title had made before `#101` were dropped too: 8 192 in all. So the later indirect draws and dispatches read culling output that was never written, which may be long work in itself. On this card, with this tree, the split compute programs are not the whole 100 % phase. Mesh programs are the next thing I can check. If @⁠not-rex's `XCL_WAVE64_REFUSE` lands as a PR, I'll run it on this tree instead of my switch. **Not tested:** split-wave64 mesh programs refused; `XCL_WAVE64_REFUSE`; `XCL_PSO_WAIT_MS=50` with the switch; DRED to name the list that was running at the removal; AMD. **AI use:** Claude Code (Claude Opus 5.5) wrote the local switch, ran the runs and the counters on the machine above, and wrote this comment.
Author
Owner

@⁠3L1A5-1 on GitHub · 2026-11-24 20:15 UTC · original

@⁠not-rex Thanks, that was it. With #929 merged into my 8 GB tree, the false would close a GPU cycle signals (32 → 0) and the 0x887a0006 removal at ~200 s are gone in 3 of 3 runs, which then reach 262–364 s and end on later stops (xboxbvhbuilder.dll access violation, #1164's +0x4da6315, the +0x23cf683 watchdog). Details: #929

That fits your 3080 result that the cycle breaks are a symptom: on this tree they go away with #929, so here they seem to come from the re-submitted segments. I couldn't see the stale counter values themselves in these runs (no writes in my watched range on this tree), so that part is still indirect.

AI use: Claude Code (Claude Opus 5.5) wrote this.

**@⁠3L1A5-1** on GitHub · 2026-11-24 20:15 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7143266286) @⁠not-rex Thanks, that was it. With #929 merged into my 8 GB tree, the false `would close a GPU cycle` signals (32 → 0) and the `0x887a0006` removal at ~200 s are gone in 3 of 3 runs, which then reach 262–364 s and end on later stops (`xboxbvhbuilder.dll` access violation, #1164's `+0x4da6315`, the `+0x23cf683` watchdog). Details: https://git.gtahub.st/github/xcl-dev--xcl/pulls/929 That fits your 3080 result that the cycle breaks are a symptom: on this tree they go away with #929, so here they seem to come from the re-submitted segments. I couldn't see the stale counter values themselves in these runs (no writes in my watched range on this tree), so that part is still indirect. AI use: Claude Code (Claude Opus 5.5) wrote this.
Author
Owner

@⁠frenziedcoder on GitHub · 2026-11-24 20:17 UTC · original

RTX 5080, frontier setup without #1288: the same stop, ended by the title's watchdog instead of a removal. Neither #929 nor #1643 moves it, and with XCL_RAYTRACING=off the BVH builder's LoadTriangles drops out of the open dispatches while the stop stays. Small additions to @⁠dkdknight's and @⁠Ariorh1337's runs above.

Setup: RTX 5080 16 GB (driver 617.14, 32-lane waves), Ryzen 7 9800X3D, 64 GB, Windows 11 Pro 25H2 (26200.9974), rustc 1.100.0 MSVC, release, DXC 1.8.2502.11. Retail 1.0.2.1. Tree: main 9e3831e (with #680), b8b1f49 reverted, + #688 760f742, #751 1a480bc, #1448 4cbb6b6 (contains #1316). Not #1288. Full heap-form precompile (XCL_HEAP_WINDOWS=1 xcl shaders shaders.rpf --precompile --pipelines): 24,944 compiled, 19 errors (MS validation), 2,685 compute pipelines + 600 from the driver cache, 4 refused, 4,417 s; RAM stayed under 6.2 GB with the revert. Every run: XCL_HEAP_WINDOWS=1 XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PRESS_A_AT=20,22,25,30,35,40,50,60, no XCL_PSO_WAIT_MS. One run per row.

run first #101 skipped first queue.Wait release (prod) end
F0: tree as above 68.8 s 0 / 0 74.6 s, q1 direct, submitted=0x5d0, completed=0x0 title watchdog +0x23cf683 at 99.8 s
F1: + #929 696e37c 66.5 s 0 / 0 72.5 s, q1 direct, completed=0x0 0x887a0006 at 82.7 s
F2: + #1643 (its one commit) 64.0 s 0 / 0 70.2 s, q3 direct, completed=0x0 0x887a0006 at 83.8 s
F3: + #1323 XCL_GPU_CULPRIT=1 65.7 s 0 / 0 71.7 s, q3 direct, completed=0x0 0x887a0006 at 78.0 s
F4: F3 + XCL_RAYTRACING=off 65.6 s 0 / 0 71.3 s, q3 direct, completed=0x0 0x887a0006 at 77.0 s
  • Without #1288 the stop is the same (this tree predates #1288's merge). The producer is always a direct queue whose bridged fence has not completed once since the world began, with the GPU at 100 % from ~75 s. F0 shows the title's own watchdog ending it 25 s after the producer stops, before any removal. So #1288 changes how these runs end, not where they stop.
  • #929 and #1643 (per-queue cpu_writes workers) leave the signature unchanged, one run each. For #929 this contrasts with @⁠3L1A5-1's 8 GB runs: there it took the false would close a GPU cycle signals from 32 to 0 and removed the 0x887a0006 at ~200 s, but that was with XCL_PSO_WAIT_MS=50. Here, with nothing skipped, F0 has 0 cycle signals and F1 (with #929) has 10, and the stop stays where it is. So #929 fixes that skip-path removal, not this stop.
  • F3 culprit: 2 of 173 lists open: 50625695d2e6cbe7 32x32x2 (CS_CloudMultiScatteringCache, as @⁠dkdknight found), and 36 1-D dispatches of d22f746890686a68 (groups 1–165) after the list's last marker out. That is the game's own XboxBvhBuilder LoadTriangles (the blob's ILDN debug name), with loops and 24 fmin / fmax atomics.
  • F4: with XCL_RAYTRACING=off, no LoadTriangles dispatch is open (1 of 171 lists: only 50625695d2e6cbe7), and the stop is unchanged. So the BVH builder is a bystander, not part of the stop.
  • RAM at the removal: in F1 free RAM fell from 28.8 GB to 2.4 GB within ~5 s of 0x887a0006, with 15.75 GB of local video memory in use. F2 went down to 5.8 GB. F0, which ended at the watchdog, stayed above 28 GB. On a 32 GB machine a removal here may page heavily.

Not tested: #1288 on this tree; more than one run per row; AMD; DRED (on this card it bypasses the driver cache, as @⁠IvyNotFound wrote on #1592).

AI use: Claude Code (Claude Opus 5.5) built the trees, ran the runs on my machine, read the logs and wrote this; I checked it.

**@⁠frenziedcoder** on GitHub · 2026-11-24 20:17 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7143304305) **RTX 5080, frontier setup without #1288: the same stop, ended by the title's watchdog instead of a removal. Neither #929 nor #1643 moves it, and with `XCL_RAYTRACING=off` the BVH builder's `LoadTriangles` drops out of the open dispatches while the stop stays.** Small additions to @⁠dkdknight's and @⁠Ariorh1337's runs above. **Setup:** RTX 5080 16 GB (driver 617.14, 32-lane waves), Ryzen 7 9800X3D, 64 GB, Windows 11 Pro 25H2 (26200.9974), rustc 1.100.0 MSVC, release, DXC 1.8.2502.11. Retail 1.0.2.1. Tree: `main` `9e3831e` (with #680), `b8b1f49` reverted, + #688 `760f742`, #751 `1a480bc`, #1448 `4cbb6b6` (contains #1316). **Not #1288.** Full heap-form precompile (`XCL_HEAP_WINDOWS=1 xcl shaders shaders.rpf --precompile --pipelines`): 24,944 compiled, 19 errors (MS validation), 2,685 compute pipelines + 600 from the driver cache, 4 refused, 4,417 s; RAM stayed under 6.2 GB with the revert. Every run: `XCL_HEAP_WINDOWS=1 XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PRESS_A_AT=20,22,25,30,35,40,50,60`, no `XCL_PSO_WAIT_MS`. One run per row. | run | first `#101` | skipped | first `queue.Wait` release (prod) | end | |---|---|---|---|---| | F0: tree as above | 68.8 s | 0 / 0 | 74.6 s, q1 direct, `submitted=0x5d0, completed=0x0` | title watchdog `+0x23cf683` at 99.8 s | | F1: + #929 `696e37c` | 66.5 s | 0 / 0 | 72.5 s, q1 direct, `completed=0x0` | `0x887a0006` at 82.7 s | | F2: + #1643 (its one commit) | 64.0 s | 0 / 0 | 70.2 s, q3 direct, `completed=0x0` | `0x887a0006` at 83.8 s | | F3: + #1323 `XCL_GPU_CULPRIT=1` | 65.7 s | 0 / 0 | 71.7 s, q3 direct, `completed=0x0` | `0x887a0006` at 78.0 s | | F4: F3 + `XCL_RAYTRACING=off` | 65.6 s | 0 / 0 | 71.3 s, q3 direct, `completed=0x0` | `0x887a0006` at 77.0 s | - **Without #1288 the stop is the same** (this tree predates #1288's merge). The producer is always a direct queue whose bridged fence has not completed once since the world began, with the GPU at 100 % from ~75 s. F0 shows the title's own watchdog ending it 25 s after the producer stops, before any removal. So #1288 changes how these runs end, not where they stop. - **#929 and #1643** (per-queue `cpu_writes` workers) leave the signature unchanged, one run each. For #929 this contrasts with @⁠3L1A5-1's 8 GB runs: there it took the false `would close a GPU cycle` signals from 32 to 0 and removed the `0x887a0006` at ~200 s, but that was with `XCL_PSO_WAIT_MS=50`. Here, with nothing skipped, F0 has 0 cycle signals and F1 (with #929) has 10, and the stop stays where it is. So #929 fixes that skip-path removal, not this stop. - **F3 culprit:** 2 of 173 lists open: `50625695d2e6cbe7` 32x32x2 (`CS_CloudMultiScatteringCache`, as @⁠dkdknight found), and **36 1-D dispatches of `d22f746890686a68`** (groups 1–165) after the list's last marker out. That is the game's own **XboxBvhBuilder `LoadTriangles`** (the blob's ILDN debug name), with loops and 24 `fmin` / `fmax` atomics. - **F4:** with `XCL_RAYTRACING=off`, no `LoadTriangles` dispatch is open (1 of 171 lists: only `50625695d2e6cbe7`), and the stop is unchanged. So the BVH builder is a bystander, not part of the stop. - **RAM at the removal:** in F1 free RAM fell from 28.8 GB to 2.4 GB within ~5 s of `0x887a0006`, with 15.75 GB of local video memory in use. F2 went down to 5.8 GB. F0, which ended at the watchdog, stayed above 28 GB. On a 32 GB machine a removal here may page heavily. **Not tested:** #1288 on this tree; more than one run per row; AMD; DRED (on this card it bypasses the driver cache, as @⁠IvyNotFound wrote on #1592). *AI use: Claude Code (Claude Opus 5.5) built the trees, ran the runs on my machine, read the logs and wrote this; I checked it.*
Author
Owner

@⁠cafeoh on GitHub · 2026-11-24 20:20 UTC · original

RTX 2080 Ti (Turing, 32-lane), Windows 10: the same result as @⁠not-rex's 3080 above. With every split-wave64 compute/mesh program refused, the GPU stall is gone (0 GPU-wait timeouts, no removal), and the run ends at the known +0x23cf683 null write at ~345 s.

Setup: RTX 2080 Ti 11 GB, driver 617.14, Windows 10 19045, release. main 037aecd + ~25 open PRs incl. #917, #929, #1428, #1323. Retail 1.0.2.1, XCL_HEAP_WINDOWS=1 XCL_UMA_WINDOWS=16, warm caches. "Refused" is a local switch like the one described above. One run each.

Refused:

no XCL_PSO_WAIT_MS XCL_PSO_WAIT_MS=50
GPU-wait timeouts 0 0
after #101 2 s of frames, then stuck on the loading screen (stopped after 120 s without a frame) the world in flat colors at ~1 frame per 30 s (the 3080 had ~1 per 2 s)
end stopped by me at 216 s 0xC0000005, write at 0, +0x23cf683, ~345 s

Not refused, the dispatch XCL_GPU_CULPRIT names as started and not done (culprit report also on device removal, as in qcdaark's patch on #675):

setting dispatch
as above, before #917 was added (2 runs) cs 50625695d2e6cbe7 (32x32x2), wave64 split
XCL_WAVE64_SPIN=0 a9f2cd53943d5dc4
50625695's dispatches skipped 206ed63b96be21a1 + 59a13b47b558d32a
the 558 programs VIctory refuses skipped the same two (VIctory translates both)
XCL_LOOP_BUDGET=4096 50625695 still
+ #917 (3297633) none (0 of 85), but the same list never completes

Not tested: repeat runs, #1252, #917 alone.

AI use: Claude Code (Claude Opus 5.5) ran the tests, read the logs and wrote this.

**@⁠cafeoh** on GitHub · 2026-11-24 20:20 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7143385834) **RTX 2080 Ti (Turing, 32-lane), Windows 10: the same result as @⁠not-rex's 3080 above. With every split-wave64 compute/mesh program refused, the GPU stall is gone (0 GPU-wait timeouts, no removal), and the run ends at the known `+0x23cf683` null write at ~345 s.** **Setup:** RTX 2080 Ti 11 GB, driver 617.14, Windows 10 19045, release. `main` `037aecd` + ~25 open PRs incl. #917, #929, #1428, #1323. Retail 1.0.2.1, `XCL_HEAP_WINDOWS=1 XCL_UMA_WINDOWS=16`, warm caches. "Refused" is a local switch like the one described above. One run each. **Refused:** | | no `XCL_PSO_WAIT_MS` | `XCL_PSO_WAIT_MS=50` | |---|---|---| | GPU-wait timeouts | 0 | 0 | | after `#101` | 2 s of frames, then stuck on the loading screen (stopped after 120 s without a frame) | the world in flat colors at ~1 frame per 30 s (the 3080 had ~1 per 2 s) | | end | stopped by me at 216 s | `0xC0000005`, write at 0, `+0x23cf683`, ~345 s | **Not refused**, the dispatch `XCL_GPU_CULPRIT` names as started and not done (culprit report also on device removal, as in qcdaark's patch on #675): | setting | dispatch | |---|---| | as above, before #917 was added (2 runs) | `cs 50625695d2e6cbe7` (32x32x2), wave64 split | | `XCL_WAVE64_SPIN=0` | `a9f2cd53943d5dc4` | | `50625695`'s dispatches skipped | `206ed63b96be21a1` + `59a13b47b558d32a` | | the 558 programs VIctory refuses skipped | the same two (VIctory translates both) | | `XCL_LOOP_BUDGET=4096` | `50625695` still | | + #917 (`3297633`) | none (`0 of 85`), but the same list never completes | **Not tested:** repeat runs, #1252, #917 alone. **AI use:** Claude Code (Claude Opus 5.5) ran the tests, read the logs and wrote this.
Author
Owner

@⁠simonbronk on GitHub · 2026-11-24 20:22 UTC · original

RTX 5070 12 GB: the same cs 50625695d2e6cbe7 (32x32x2) is the open dispatch in 3 of 3 runs, including one with 0 skipped draws/dispatches. XCL_LOOP_BUDGET=256 (lower than the 4096 above) does not remove it; XCL_WAVE64_SPIN=0 moves it to 206ed63b96be21a1 (64x64x1). Adds one more GPU to @⁠dkdknight's and @⁠cafeoh's tables.

Setup: RTX 5070 12 GB (driver 32.0.16.2124, 32-lane waves), Ryzen 7 9800X3D, 32 GB RAM, Windows 11 Pro 26300, rustc 1.100.0 MSVC, release. Retail 1.0.2.1 Series X. Tree 52fd278 = main 9e3831e (with #680) + #1580 + #1323 (a79d09d, 0fff825) + #1284 (3980a81), merged locally. Compute pipelines from xcl pipelines (#759) and a precompile, warm caches. Every run: XCL_HEAP_WINDOWS=1 XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PSO_PRELOAD=0 XCL_GPU_CULPRIT=1, A presses from 20 s. One run per row.

run XCL_PSO_WAIT_MS other open dispatch at the first queue.Wait release end
14 50 – 71.8 s: cs 50625695d2e6cbe7 32x32x2 (1 of 81 lists) 0 lists open at 93.9 s; stopped at 100 s
16 unset (binds wait; last count at 67.6 s: 0 skipped draws, 0 skipped dispatches) – 72.8 s: cs 50625695d2e6cbe7 32x32x2 (1 of 73) title watchdog, null write at +0x23cf683, 97.4 s
17 50 XCL_LOOP_BUDGET=4096 102.7 s: cs 50625695d2e6cbe7, then a mip chain of 4703d558e39d8f4b stopped at 180 s; 1 present every ~10 s after 96 s; commit 59 GB
18 50 XCL_LOOP_BUDGET=256 cs 50625695d2e6cbe7 again stopped at 180 s; same trickle of presents
19 50 XCL_WAVE64_SPIN=0 cs 206ed63b96be21a1 64x64x1 stopped at 150 s; presents stop at ~70 s as before
  • In every run the presents stop at ~70 s (world loading starts at ~48 s). q0/q1 (compute) wait on q2 (direct), which has its signals queued and never completes them.
  • 50625695d2e6cbe7 is numthreads(4,4,4) (one wave64, split on this GPU). In its disassembly the inner loop count is int(max(4, sqrt(max3(...)) * 4 * k)); another loop has a 10 000-iteration bound in the console code (s_cmpk_gt_i32 s86, 0x270f); the outer bound is read from the constant buffer (+0x900). All four of its HLSL loops carry LOOP_GUARD, so at a budget of 256 per lane, 2048 groups of 64 lanes should finish in milliseconds. That points away from a long loop and towards something in the split-wave64 form, consistent with @⁠cafeoh's and @⁠not-rex's "refused" runs.
  • About the budget runs: the translation cache is off for XCL_LOOP_BUDGET (no new files in dxil/translated during run 18) and DXC wrote 852 new DXIL files. 206 compute PSOs still reused a driver blob, presumably programs whose DXIL does not change with the budget (no loops). I did not confirm that the culprit's DXIL is a new one.
  • The process commit keeps growing during the stall (~1.5 GB/s), here and on main with the preload off.

Not tested: a split-wave64 refuse switch (I have none locally), AMD.

AI use: runs, log analysis and this comment by Claude Code (Claude Opus 5.5); the numbers are from the runs above on this machine.

**@⁠simonbronk** on GitHub · 2026-11-24 20:22 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7143447474) **RTX 5070 12 GB: the same `cs 50625695d2e6cbe7` (32x32x2) is the open dispatch in 3 of 3 runs, including one with 0 skipped draws/dispatches. `XCL_LOOP_BUDGET=256` (lower than the 4096 above) does not remove it; `XCL_WAVE64_SPIN=0` moves it to `206ed63b96be21a1` (64x64x1).** Adds one more GPU to @⁠dkdknight's and @⁠cafeoh's tables. **Setup:** RTX 5070 12 GB (driver 32.0.16.2124, 32-lane waves), Ryzen 7 9800X3D, 32 GB RAM, Windows 11 Pro 26300, rustc 1.100.0 MSVC, release. Retail 1.0.2.1 Series X. Tree `52fd278` = `main` `9e3831e` (with #680) + #1580 + #1323 (`a79d09d`, `0fff825`) + #1284 (`3980a81`), merged locally. Compute pipelines from `xcl pipelines` (#759) and a precompile, warm caches. Every run: `XCL_HEAP_WINDOWS=1 XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PSO_PRELOAD=0 XCL_GPU_CULPRIT=1`, A presses from 20 s. One run per row. | run | `XCL_PSO_WAIT_MS` | other | open dispatch at the first `queue.Wait` release | end | |---|---|---|---|---| | 14 | 50 | – | 71.8 s: `cs 50625695d2e6cbe7` 32x32x2 (1 of 81 lists) | 0 lists open at 93.9 s; stopped at 100 s | | 16 | unset (binds wait; last count at 67.6 s: 0 skipped draws, 0 skipped dispatches) | – | 72.8 s: `cs 50625695d2e6cbe7` 32x32x2 (1 of 73) | title watchdog, null write at `+0x23cf683`, 97.4 s | | 17 | 50 | `XCL_LOOP_BUDGET=4096` | 102.7 s: `cs 50625695d2e6cbe7`, then a mip chain of `4703d558e39d8f4b` | stopped at 180 s; 1 present every ~10 s after 96 s; commit 59 GB | | 18 | 50 | `XCL_LOOP_BUDGET=256` | `cs 50625695d2e6cbe7` again | stopped at 180 s; same trickle of presents | | 19 | 50 | `XCL_WAVE64_SPIN=0` | `cs 206ed63b96be21a1` 64x64x1 | stopped at 150 s; presents stop at ~70 s as before | - In every run the presents stop at ~70 s (world loading starts at ~48 s). q0/q1 (compute) wait on q2 (direct), which has its signals queued and never completes them. - `50625695d2e6cbe7` is `numthreads(4,4,4)` (one wave64, split on this GPU). In its disassembly the inner loop count is `int(max(4, sqrt(max3(...)) * 4 * k))`; another loop has a 10 000-iteration bound in the console code (`s_cmpk_gt_i32 s86, 0x270f`); the outer bound is read from the constant buffer (`+0x900`). All four of its HLSL loops carry `LOOP_GUARD`, so at a budget of 256 per lane, 2048 groups of 64 lanes should finish in milliseconds. That points away from a long loop and towards something in the split-wave64 form, consistent with @⁠cafeoh's and @⁠not-rex's "refused" runs. - About the budget runs: the translation cache is off for `XCL_LOOP_BUDGET` (no new files in `dxil/translated` during run 18) and DXC wrote 852 new DXIL files. 206 compute PSOs still reused a driver blob, presumably programs whose DXIL does not change with the budget (no loops). I did not confirm that the culprit's DXIL is a new one. - The process commit keeps growing during the stall (~1.5 GB/s), here and on `main` with the preload off. **Not tested:** a split-wave64 refuse switch (I have none locally), AMD. **AI use:** runs, log analysis and this comment by Claude Code (Claude Opus 5.5); the numbers are from the runs above on this machine.
Author
Owner

@⁠oz-stanislav-zhukov on GitHub · 2026-11-24 20:55 UTC · original

RTX 5060 Ti, with #1766's XCL_GPU_PROFILE: the dispatches named in this thread run for 1–5 s each on the GPU, and two of the four are wave32, not split wave64. The run ended with a GPU hang (0x887a0006) at 156 s. #1791 is in the tree but its shader 18567a5f0145bde9 was never dispatched, so this run says nothing about it.

Setup: RTX 5060 Ti 16 GB (32-lane waves), driver 621.24, i7-14700KF, 64 GB, Windows 10 22H2 (19045), Rust 1.88.0, release (line tables), DXC 1.8.2502.11, Agility SDK 1.620.2. Retail 1.0.2.1. One run.

Tree: main 4178e88 merged into a local stack: #751, #688, #1123, #488, #789 (ported by hand), #1428 (cf6cc59), #1323, #1405, #1321, #1429, #1464, #1526, #1315, #1316, #929, plus two local xg CopyFromSubresource fixes. On top: #1766 (c433edb) and #1791 (9486494). The cherry-picks conflicted with #1323's culprit markers in bind.rs / console_list.rs; I kept both, so each dispatch is wrapped in the culprit marker, then the profile timestamps, then #1791's transitions. Local diagnostics, none of them changing the GPU work: a register memory dump at a crash, a thread dump on a commit jump, a cap of 2 concurrent driver compiles.

Env: XCL_GPU_PROFILE=1 XCL_HEAP_WINDOWS=1 XCL_GPU_CULPRIT=1 XCL_ACTIVITY=1 XCL_PSO_WAIT_MS=50. Warm DXIL and driver caches from earlier runs.

Timeline:

  • 0–60 s: 27–30 presents per 2 s.
  • Up to ~100 s: the heaviest op in a 2 s window is 3–10 ms.
  • From ~75 s: 0 presents per 2 s; one present at 133 s.
  • 81 s: first GPU-wait timeouts. #1323 names cs 50625695d2e6cbe7 (32x32x2) as the open dispatch.
  • 109 s: #1323 names cs 4097cf4856634349 (indirect).
  • 151 s: 19 GPU-wait timeouts in all.
  • 156 s: D3D12 device removed: 0x887a0006, then the title's 0x80000003 at +0x2474606.

Longest single calls (#1766's "longest" over the 2 s windows):

console CS threads / form groups longest call
50625695d2e6cbe7 4x4x4, wave64 split in halves, 110 KB DXIL 32x32x2 2097 ms (6 calls in one window, 12.0 s in total)
206ed63b96be21a1 8x8x1, wave64 split in halves, 87 KB DXIL 64x64x1 4587 ms
4097cf4856634349 8x4x1, wave32, 159 KB DXIL, ExecuteIndirect GPU's counts 4004 ms (3987 ms just before the removal)
79d178afa02abd49 8x8x1, wave32, 61 KB DXIL 320x180x1 1436 ms

Others above 300 ms in one call, all in the world:

console CS form longest call
ac2d75787806c6e0 ExecuteIndirect, wave32 665 ms
266c35043a231d1a ExecuteIndirect, wave32 548 ms
ffe81a9ab980b657 2x2x8, wave32 522 ms
facc2a585fba55c2 8x8x1, split 390 ms
7a96f07f5d609fff ExecuteIndirect, wave32 381 ms
a95decd369f307c2 ExecuteIndirect, wave32 616 ms

What this suggests:

  • These dispatches do finish; they are slow, not stuck.
  • Half of the slowest are wave32 programs, so the split-wave64 exchange cannot be the whole story on NVIDIA. #1766's description says its author found the cause for 79d178afa02abd49 in a separate change. That change would be worth testing against the others in this list.

Not tested:

  • More than one run;
  • without XCL_HEAP_WINDOWS / XCL_PSO_WAIT_MS;
  • main alone;
  • the ExecuteIndirect group counts, which #1766 does not log.

AI use: run, log analysis and this report by Claude Code (Claude Opus 5.5); posted at the request of the person running the tests.

**@⁠oz-stanislav-zhukov** on GitHub · 2026-11-24 20:55 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7144230188) **RTX 5060 Ti, with #1766's `XCL_GPU_PROFILE`: the dispatches named in this thread run for 1–5 s each on the GPU, and two of the four are wave32, not split wave64. The run ended with a GPU hang (`0x887a0006`) at 156 s. #1791 is in the tree but its shader `18567a5f0145bde9` was never dispatched, so this run says nothing about it.** **Setup:** RTX 5060 Ti 16 GB (32-lane waves), driver 621.24, i7-14700KF, 64 GB, Windows 10 22H2 (19045), Rust 1.88.0, release (line tables), DXC 1.8.2502.11, Agility SDK 1.620.2. Retail 1.0.2.1. One run. **Tree:** `main` `4178e88` merged into a local stack: #751, #688, #1123, #488, #789 (ported by hand), #1428 (`cf6cc59`), #1323, #1405, #1321, #1429, #1464, #1526, #1315, #1316, #929, plus two local `xg` CopyFromSubresource fixes. On top: #1766 (`c433edb`) and #1791 (`9486494`). The cherry-picks conflicted with #1323's culprit markers in `bind.rs` / `console_list.rs`; I kept both, so each dispatch is wrapped in the culprit marker, then the profile timestamps, then #1791's transitions. Local diagnostics, none of them changing the GPU work: a register memory dump at a crash, a thread dump on a commit jump, a cap of 2 concurrent driver compiles. **Env:** `XCL_GPU_PROFILE=1 XCL_HEAP_WINDOWS=1 XCL_GPU_CULPRIT=1 XCL_ACTIVITY=1 XCL_PSO_WAIT_MS=50`. Warm DXIL and driver caches from earlier runs. **Timeline:** - 0–60 s: 27–30 presents per 2 s. - Up to ~100 s: the heaviest op in a 2 s window is 3–10 ms. - From ~75 s: 0 presents per 2 s; one present at 133 s. - 81 s: first GPU-wait timeouts. #1323 names `cs 50625695d2e6cbe7` (32x32x2) as the open dispatch. - 109 s: #1323 names `cs 4097cf4856634349` (indirect). - 151 s: 19 GPU-wait timeouts in all. - 156 s: `D3D12 device removed: 0x887a0006`, then the title's `0x80000003` at `+0x2474606`. **Longest single calls** (#1766's "longest" over the 2 s windows): | console CS | threads / form | groups | longest call | |---|---|---|---| | `50625695d2e6cbe7` | 4x4x4, wave64 split in halves, 110 KB DXIL | 32x32x2 | 2097 ms (6 calls in one window, 12.0 s in total) | | `206ed63b96be21a1` | 8x8x1, wave64 split in halves, 87 KB DXIL | 64x64x1 | 4587 ms | | `4097cf4856634349` | 8x4x1, **wave32**, 159 KB DXIL, ExecuteIndirect | GPU's counts | 4004 ms (3987 ms just before the removal) | | `79d178afa02abd49` | 8x8x1, **wave32**, 61 KB DXIL | 320x180x1 | 1436 ms | Others above 300 ms in one call, all in the world: | console CS | form | longest call | |---|---|---| | `ac2d75787806c6e0` | ExecuteIndirect, wave32 | 665 ms | | `266c35043a231d1a` | ExecuteIndirect, wave32 | 548 ms | | `ffe81a9ab980b657` | 2x2x8, wave32 | 522 ms | | `facc2a585fba55c2` | 8x8x1, split | 390 ms | | `7a96f07f5d609fff` | ExecuteIndirect, wave32 | 381 ms | | `a95decd369f307c2` | ExecuteIndirect, wave32 | 616 ms | **What this suggests:** - These dispatches do finish; they are slow, not stuck. - Half of the slowest are wave32 programs, so the split-wave64 exchange cannot be the whole story on NVIDIA. #1766's description says its author found the cause for `79d178afa02abd49` in a separate change. That change would be worth testing against the others in this list. **Not tested:** - More than one run; - without `XCL_HEAP_WINDOWS` / `XCL_PSO_WAIT_MS`; - `main` alone; - the ExecuteIndirect group counts, which #1766 does not log. **AI use:** run, log analysis and this report by Claude Code (Claude Opus 5.5); posted at the request of the person running the tests.
Author
Owner

@⁠cafeoh on GitHub · 2026-11-24 21:13 UTC · original

RTX 2080 Ti (Turing), #1766's XCL_GPU_PROFILE: cs a9f2cd53943d5dc4 finishes, but takes 3.1 s per call (16x16x16 groups). After world entry, 11 of the 16 programs with the most GPU time are 4x4x4 split-wave64 programs like it, at 0.1–0.6 s per call. Adds timings to @⁠joeypercia's reading of a9f2cd53 above and @⁠oz-stanislav-zhukov's 5060 Ti table.

Setup: RTX 2080 Ti 11 GB (32-lane waves), driver 617.14, Windows 10 19045, release. The local stack from my earlier comment (main 037aecd + open PRs incl. #917, #1252 at 2473e2f, #1323) + #1766 (c433edb). Retail 1.0.2.1, XCL_HEAP_WINDOWS=1 XCL_UMA_WINDOWS=16 XCL_GPU_PROFILE=1 XCL_GPU_CULPRIT=1, no XCL_PSO_WAIT_MS. One run: #101 at 87 s, last frame at ~88 s, stopped by my memory guard at 188 s.

GPU time from 86 s on, summed over #1766's 2 s windows:

console CS threads / form code groups calls longest total
a9f2cd53943d5dc4 4x4x4, split 9876 B 16x16x16 2 3091 ms 6183 ms
ca4f2fbc5d8928f8 4x4x4, split 1628 B 16x16x16 8 605 ms 3455 ms
777348c43857fdd2 4x4x4, split 9832 B 16x16x16 4 415 ms 1282 ms
a542b07e605c8fd7 4x4x4, split 5828 B 16x16x16 2 516 ms 1032 ms
65b1064efc2e311e 4x4x4, split 608 B 16x16x16 2 256 ms 512 ms
63812305c798a235 4x4x4, split 3940 B 16x16x8 2 255 ms 509 ms
d73cd18c6b8a6fa9 4x4x4, split 3524 B 16x16x8 2 238 ms 477 ms
af09673fed046bad 8x8x1, wave32 3052 B 48x96x1 1 403 ms 403 ms
01bc1b6cc1e21a0a 4x4x4, wave32 2196 B 20x12x16 1 190 ms 190 ms
  • Even the 608 B one, 65b1064e (an outer loop over items read from a constant buffer, per-lane math in it), takes 256 ms for 4096 groups.
  • Other 4x4x4 split programs in the same windows take 0.1 ms (b1a01ac73a80651e, 668 B, 16x16x8).
  • Earlier on this card, with every split-wave64 compute program refused there were 0 GPU-wait timeouts, and with only the split mesh programs refused the stall stayed (one run each).

Not tested: repeat runs, XCL_WAVE64_SPIN=0 with the profile, the HLSL of the 4x4x4 programs other than reading 65b1064e's disassembly.

AI use: Claude Code (Claude Opus 5.5) ran the tests, read the logs and wrote this.

**@⁠cafeoh** on GitHub · 2026-11-24 21:13 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7144654781) **RTX 2080 Ti (Turing), #1766's `XCL_GPU_PROFILE`: `cs a9f2cd53943d5dc4` finishes, but takes 3.1 s per call (16x16x16 groups). After world entry, 11 of the 16 programs with the most GPU time are 4x4x4 split-wave64 programs like it, at 0.1–0.6 s per call.** Adds timings to @⁠joeypercia's reading of `a9f2cd53` above and @⁠oz-stanislav-zhukov's 5060 Ti table. **Setup:** RTX 2080 Ti 11 GB (32-lane waves), driver 617.14, Windows 10 19045, release. The local stack from my earlier comment (`main` `037aecd` + open PRs incl. #917, #1252 at `2473e2f`, #1323) + #1766 (`c433edb`). Retail 1.0.2.1, `XCL_HEAP_WINDOWS=1 XCL_UMA_WINDOWS=16 XCL_GPU_PROFILE=1 XCL_GPU_CULPRIT=1`, no `XCL_PSO_WAIT_MS`. One run: `#101` at 87 s, last frame at ~88 s, stopped by my memory guard at 188 s. GPU time from 86 s on, summed over #1766's 2 s windows: | console CS | threads / form | code | groups | calls | longest | total | |---|---|---|---|---|---|---| | `a9f2cd53943d5dc4` | 4x4x4, split | 9876 B | 16x16x16 | 2 | 3091 ms | 6183 ms | | `ca4f2fbc5d8928f8` | 4x4x4, split | 1628 B | 16x16x16 | 8 | 605 ms | 3455 ms | | `777348c43857fdd2` | 4x4x4, split | 9832 B | 16x16x16 | 4 | 415 ms | 1282 ms | | `a542b07e605c8fd7` | 4x4x4, split | 5828 B | 16x16x16 | 2 | 516 ms | 1032 ms | | `65b1064efc2e311e` | 4x4x4, split | 608 B | 16x16x16 | 2 | 256 ms | 512 ms | | `63812305c798a235` | 4x4x4, split | 3940 B | 16x16x8 | 2 | 255 ms | 509 ms | | `d73cd18c6b8a6fa9` | 4x4x4, split | 3524 B | 16x16x8 | 2 | 238 ms | 477 ms | | `af09673fed046bad` | 8x8x1, wave32 | 3052 B | 48x96x1 | 1 | 403 ms | 403 ms | | `01bc1b6cc1e21a0a` | 4x4x4, wave32 | 2196 B | 20x12x16 | 1 | 190 ms | 190 ms | - Even the 608 B one, `65b1064e` (an outer loop over items read from a constant buffer, per-lane math in it), takes 256 ms for 4096 groups. - Other 4x4x4 split programs in the same windows take 0.1 ms (`b1a01ac73a80651e`, 668 B, 16x16x8). - Earlier on this card, with every split-wave64 compute program refused there were 0 GPU-wait timeouts, and with only the split mesh programs refused the stall stayed (one run each). **Not tested:** repeat runs, `XCL_WAVE64_SPIN=0` with the profile, the HLSL of the 4x4x4 programs other than reading `65b1064e`'s disassembly. **AI use:** Claude Code (Claude Opus 5.5) ran the tests, read the logs and wrote this.
Author
Owner

@⁠maephisto666 on GitHub · 2026-11-24 19:45 UTC · original · edited 2026-11-24 21:16 UTC

Update (second edit): see #1791. It explains this: on NVIDIA an ExecuteIndirect fetches its arguments without waiting for the UAV barrier after the dispatch that wrote them. So the correction below is itself wrong on one point. The [0, 1, 1] and [6636, 1, 1] I logged came from a CopyBufferRegion, and a copy does wait for the barrier: they are what the ExecuteIndirect should have read, not what it fetched. With #1791 on the same tree (2 runs), the GPU no longer stays pinned at 100 %, and the compute queues no longer stall at 18567a5f. The watchdog came at 319.8 s in one run; the other ended in a title crash at 239.1 s. Frames still fall from ~140 s. Details in my test report on #1791: #1791

Correction (edited after one more run): the headline I first wrote here, that this 6636-group dispatch is what keeps the GPU busy, was too strong.

In a later run with the same tree and diagnostics, the four async-compute queues were stuck at the same point. CS_BatchCullBatchCSMeshlets again showed MARKER_IN and no MARKER_OUT, but the GPU read [0, 1, 1] as its arguments. A zero-group dispatch cannot be what keeps the GPU at 100 %. So something else holds the compute queues at that point: starvation, or a dependency XCL does not track. I have not found which. The GPU was again at 100 % from ~180 s, and the watchdog fired at 231 s.

The direct queue was never stuck, in that run or in the marker run below. It completed about one submission per second, each 5–9 s after it was submitted, with a backlog of 10–70. The dispatch it was busy with varied: 0d9220db…, 79d178af…, and bca2f01e… with GPU arguments [58320, 1, 1].

So the better reading is that the compute queues stop at this meshlet-culling ExecuteIndirect whatever its size, while the GPU is saturated by slow work on the direct queue. That fits section 4 below (GPU busy with no stuck submission) and @⁠IvyNotFound's "not the same shader from run to run". Sections 1–5 below are unchanged; read 2 with this in mind.

Also tried since:

  • No XCL_PSO_WAIT_MS, so nothing skipped: frames stop at ~130 s while the title waits for pipeline builds, the GPU is at 2–4 %, and the watchdog fires at 161 s. It never reaches the 100 % phase, so this does not separate the skipped-pass idea.
  • The title's own pls\settings\settings.xml seeded in a fresh data folder with asyncComputeEnabled=false and rtDynamicShadows=false: the title rewrote both to true and still used its four compute queues.

RTX 5090: before the +0x23cf683 stop, the four async-compute queues stop at one ExecuteIndirect of meshlet_culling:CS_BatchCullBatchCSMeshlets (CS 18567a5f0145bde9). In this run the GPU read 6636 groups for it. Run alone on zeroed memory, the same translation finishes in milliseconds. This adds to @⁠IvyNotFound's marker runs above (their run B had an open ExecuteIndirect of the same CS).

Setup: RTX 5090 (driver 32.0.16.2124, 32-lane waves, so wave64 runs split), Ryzen 9 9950X3D, 64 GB, Windows 11 26100, Rust 1.100.0, release. Retail 1.0.2.1, offline, fresh title data. Tree: main cbea872 (with #968) + #433, #1321, #789 (rebased), #751, a DirectStorage page-array fix of mine (not yet a PR), and local diagnostics. XCL_PSO_WAIT_MS=50. 2048 dispatches and 12 249 draws had been skipped by 174 s.

1. GPU load from outside the game (nvidia-smi once a second, four runs). Load sits at 4–23 % until world entry. From 155–185 s it is at 100 % without a break until the process ends, with the memory controller at 0–1 % and the power at 110–270 W. This card draws up to ~575 W. The +0x23cf683 stop comes 30–50 s later. A busy GPU with no memory traffic points at a few waves that keep running.

2. Which dispatch. This is a local diagnostic, the same idea as IvyNotFound's XCL_GPU_CULPRIT. Each title ExecuteCommandLists gets its own fence value. WriteBufferImmediate writes MARKER_IN before and MARKER_OUT after every translated compute dispatch, into a readback buffer. Right before every ExecuteIndirect, a CopyBufferRegion copies its argument words, so the log shows what the GPU reads.

  • In four runs with the diagnostic, the submissions that never finished on the async-compute queues (type 2) were this kind of list. It was on all four queues in three runs, and on two of the four in the other run. The list is a run of meshlet_culling programs:
    • CS_ClearCulledMeshletOffsets (b0c0fed0…)
    • CS_InitBatchCullDispatchArgs (a5135087…), which writes [0, 1, 1]
    • CS_AllocBatchCSCullOutput (45a2f192…), which uses atomics
    • CS_BatchCullBatchCSMeshlets (18567a5f…), an ExecuteIndirect
    • CS_PackInstances (04d23de9…)
  • In the run with the markers, one queue had reached the indirect dispatch. Every dispatch before it was done. 18567a5f… showed MARKER_IN and no MARKER_OUT at 3, 10, 20 s… until the watchdog. The GPU read [6636, 1, 1] as its arguments, while the CPU view of the same words still read [0, 0, 0]. The other three queues had not started any of their dispatches.
  • The direct queue kept completing its submissions, but each one took 5–8 s.

3. The program itself has no loop.

  • The console code is 9708 bytes. All 57 branches go forward, with no backward branch at all. It has 2 buffer_atomic_add, no LDS and no s_barrier. One wave64 per group (v_lshl_add_u32 v0, s7, 6, v0).
  • XCL's wave64 translation has no loop either.
  • The split translation (what runs on this card) has ~81 xcl_x_ballot exchange sites. Its only loop is the bounded exchange spin in xcl_x_meet (2^20 polls, then xcl_x_dead). xcl_budget is declared but never used.
  • XCL_WAVE64_SPIN=0 (group barriers instead of the spin) did not change it. The same list was stuck on all four compute queues, the GPU was at 100 % (242 W), and the watchdog fired at 214 s.

4. Skipping it. With a local switch that skips every dispatch of 18567a5f…, there were 129 skips by 176 s. No submission then ran longer than 3 s and no queue.Wait timed out. The GPU still went to 78–99 % from ~155 s, though, and the title crashed at 188.7 s at +0x46967c (read of 0xffff…). That crash is most likely from the skipped culling output, and it ended the run before it showed much.

5. Run alone. The program was translated exactly as the runtime does it (split, its static samplers, the ABI root signature) and run with runner::dispatch_on.

Memory 1 group 64 groups 6636 groups
all zeros finishes, ~35 ms wall finishes, ~35 ms wall finishes, ~35 ms wall (including a 16 MB upload/readback)
pseudo-random removes the device (0x887a0006) not run not run
  • On zeroed memory the exchange spin polled about 24 times per group.
  • The device removal with random memory happens with the spin bound cut to 2^10 as well. I do not count it as evidence of a hang: random descriptors give out-of-range addresses through the runner's root UAV, which has no bounds. So the translation is not slow in itself, and the game's case depends on its data.

What I think this means (not proven): a loop-free program with 6636 groups should take milliseconds. Either the data it reads makes the translation do something very long, or the 6636 is itself wrong. I have not found which. It may tie in with IvyNotFound's point that skipped passes (XCL_PSO_WAIT_MS=50) leave inputs that later programs run on: CS_InitBatchCullDispatchArgs writes 0 and CS_AllocBatchCSCullOutput adds to it. Also related:

  • @⁠chazi123's defect (2): GPU writes into the coherent window are not visible to the CPU on NVIDIA. That matches the [0, 0, 0] CPU view here.
  • @⁠cafeoh's finding that a 256x lower XCL_LOOP_BUDGET only moves the stop.

Not tested

  • AMD / native wave64: I could not check whether the same list finishes there.
  • A run without XCL_PSO_WAIT_MS, so without skipped dispatches. That is the next thing to rule out.
  • What the 6636 groups read at the time: no capture of the dispatch's inputs.
  • Repeat runs of the marker diagnostic: one run with the GPU argument copy. The list was the same in the three runs before it.

AI use: Claude Code (Claude Opus 5.5) wrote the diagnostics, ran the builds and the runs, read the logs and wrote this comment. The numbers come from those runs.

**@⁠maephisto666** on GitHub · 2026-11-24 19:45 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7142547354) · edited 2026-11-24 21:16 UTC > **Update (second edit): see #1791.** It explains this: on NVIDIA an ExecuteIndirect fetches its arguments without waiting for the UAV barrier after the dispatch that wrote them. So the correction below is itself wrong on one point. The `[0, 1, 1]` and `[6636, 1, 1]` I logged came from a `CopyBufferRegion`, and a copy does wait for the barrier: they are what the ExecuteIndirect *should* have read, not what it fetched. With #1791 on the same tree (2 runs), the GPU no longer stays pinned at 100 %, and the compute queues no longer stall at `18567a5f`. The watchdog came at 319.8 s in one run; the other ended in a title crash at 239.1 s. Frames still fall from ~140 s. Details in my test report on #1791: https://git.gtahub.st/github/xcl-dev--xcl/pulls/1791 > > **Correction (edited after one more run):** the headline I first wrote here, that this 6636-group dispatch is what keeps the GPU busy, was too strong. > > In a later run with the same tree and diagnostics, the four async-compute queues were stuck at the same point. `CS_BatchCullBatchCSMeshlets` again showed MARKER_IN and no MARKER_OUT, but the GPU read **`[0, 1, 1]`** as its arguments. A zero-group dispatch cannot be what keeps the GPU at 100 %. So something else holds the compute queues at that point: starvation, or a dependency XCL does not track. I have not found which. The GPU was again at 100 % from ~180 s, and the watchdog fired at 231 s. > > The direct queue was never stuck, in that run or in the marker run below. It completed about one submission per second, each 5–9 s after it was submitted, with a backlog of 10–70. The dispatch it was busy with varied: `0d9220db…`, `79d178af…`, and `bca2f01e…` with GPU arguments `[58320, 1, 1]`. > > So the better reading is that the compute queues stop at this meshlet-culling ExecuteIndirect whatever its size, while the GPU is saturated by slow work on the direct queue. That fits section 4 below (GPU busy with no stuck submission) and @⁠IvyNotFound's "not the same shader from run to run". Sections 1–5 below are unchanged; read 2 with this in mind. > > Also tried since: > - **No `XCL_PSO_WAIT_MS`, so nothing skipped:** frames stop at ~130 s while the title waits for pipeline builds, the GPU is at 2–4 %, and the watchdog fires at 161 s. It never reaches the 100 % phase, so this does not separate the skipped-pass idea. > - **The title's own `pls\settings\settings.xml` seeded in a fresh data folder** with `asyncComputeEnabled=false` and `rtDynamicShadows=false`: the title rewrote both to `true` and still used its four compute queues. **RTX 5090: before the `+0x23cf683` stop, the four async-compute queues stop at one ExecuteIndirect of `meshlet_culling:CS_BatchCullBatchCSMeshlets` (CS `18567a5f0145bde9`). In this run the GPU read 6636 groups for it. Run alone on zeroed memory, the same translation finishes in milliseconds.** This adds to @⁠IvyNotFound's marker runs above (their run B had an open ExecuteIndirect of the same CS). **Setup:** RTX 5090 (driver 32.0.16.2124, 32-lane waves, so wave64 runs split), Ryzen 9 9950X3D, 64 GB, Windows 11 26100, Rust 1.100.0, release. Retail 1.0.2.1, offline, fresh title data. Tree: `main` `cbea872` (with #968) + #433, #1321, #789 (rebased), #751, a DirectStorage page-array fix of mine (not yet a PR), and local diagnostics. `XCL_PSO_WAIT_MS=50`. 2048 dispatches and 12 249 draws had been skipped by 174 s. **1. GPU load from outside the game** (`nvidia-smi` once a second, four runs). Load sits at 4–23 % until world entry. From 155–185 s it is at **100 % without a break until the process ends**, with the memory controller at **0–1 %** and the power at 110–270 W. This card draws up to ~575 W. The `+0x23cf683` stop comes 30–50 s later. A busy GPU with no memory traffic points at a few waves that keep running. **2. Which dispatch.** This is a local diagnostic, the same idea as IvyNotFound's `XCL_GPU_CULPRIT`. Each title `ExecuteCommandLists` gets its own fence value. `WriteBufferImmediate` writes MARKER_IN before and MARKER_OUT after every translated compute dispatch, into a readback buffer. Right before every ExecuteIndirect, a `CopyBufferRegion` copies its argument words, so the log shows what the GPU reads. - In four runs with the diagnostic, the submissions that never finished on the async-compute queues (type 2) were this kind of list. It was on all four queues in three runs, and on two of the four in the other run. The list is a run of `meshlet_culling` programs: - `CS_ClearCulledMeshletOffsets` (`b0c0fed0…`) - `CS_InitBatchCullDispatchArgs` (`a5135087…`), which writes `[0, 1, 1]` - `CS_AllocBatchCSCullOutput` (`45a2f192…`), which uses atomics - **`CS_BatchCullBatchCSMeshlets` (`18567a5f…`)**, an ExecuteIndirect - `CS_PackInstances` (`04d23de9…`) - In the run with the markers, one queue had reached the indirect dispatch. Every dispatch before it was done. `18567a5f…` showed MARKER_IN and no MARKER_OUT at 3, 10, 20 s… until the watchdog. **The GPU read `[6636, 1, 1]`** as its arguments, while the CPU view of the same words still read `[0, 0, 0]`. The other three queues had not started any of their dispatches. - The direct queue kept completing its submissions, but each one took 5–8 s. **3. The program itself has no loop.** - The console code is 9708 bytes. All 57 branches go forward, with no backward branch at all. It has 2 `buffer_atomic_add`, no LDS and no `s_barrier`. One wave64 per group (`v_lshl_add_u32 v0, s7, 6, v0`). - XCL's wave64 translation has no loop either. - The split translation (what runs on this card) has ~81 `xcl_x_ballot` exchange sites. Its only loop is the bounded exchange spin in `xcl_x_meet` (2^20 polls, then `xcl_x_dead`). `xcl_budget` is declared but never used. - `XCL_WAVE64_SPIN=0` (group barriers instead of the spin) did not change it. The same list was stuck on all four compute queues, the GPU was at 100 % (242 W), and the watchdog fired at 214 s. **4. Skipping it.** With a local switch that skips every dispatch of `18567a5f…`, there were 129 skips by 176 s. No submission then ran longer than 3 s and no `queue.Wait` timed out. The GPU still went to 78–99 % from ~155 s, though, and the title crashed at 188.7 s at `+0x46967c` (read of `0xffff…`). That crash is most likely from the skipped culling output, and it ended the run before it showed much. **5. Run alone.** The program was translated exactly as the runtime does it (split, its static samplers, the ABI root signature) and run with `runner::dispatch_on`. | Memory | 1 group | 64 groups | 6636 groups | |---|---|---|---| | all zeros | finishes, ~35 ms wall | finishes, ~35 ms wall | finishes, ~35 ms wall (including a 16 MB upload/readback) | | pseudo-random | removes the device (`0x887a0006`) | not run | not run | - On zeroed memory the exchange spin polled about 24 times per group. - The device removal with random memory happens with the spin bound cut to 2^10 as well. I do not count it as evidence of a hang: random descriptors give out-of-range addresses through the runner's root UAV, which has no bounds. So the translation is not slow in itself, and the game's case depends on its data. **What I think this means (not proven):** a loop-free program with 6636 groups should take milliseconds. Either the data it reads makes the translation do something very long, or the 6636 is itself wrong. I have not found which. It may tie in with IvyNotFound's point that skipped passes (`XCL_PSO_WAIT_MS=50`) leave inputs that later programs run on: `CS_InitBatchCullDispatchArgs` writes 0 and `CS_AllocBatchCSCullOutput` adds to it. Also related: - @⁠chazi123's defect (2): GPU writes into the coherent window are not visible to the CPU on NVIDIA. That matches the `[0, 0, 0]` CPU view here. - @⁠cafeoh's finding that a 256x lower `XCL_LOOP_BUDGET` only moves the stop. **Not tested** - AMD / native wave64: I could not check whether the same list finishes there. - A run without `XCL_PSO_WAIT_MS`, so without skipped dispatches. That is the next thing to rule out. - What the 6636 groups read at the time: no capture of the dispatch's inputs. - Repeat runs of the marker diagnostic: one run with the GPU argument copy. The list was the same in the three runs before it. **AI use:** Claude Code (Claude Opus 5.5) wrote the diagnostics, ran the builds and the runs, read the logs and wrote this comment. The numbers come from those runs.
Author
Owner

@⁠Ariorh1337 on GitHub · 2026-11-24 21:19 UTC · original

RTX 5090, every pipeline prebuilt, no XCL_PSO_WAIT_MS: refusing the split-wave64 compute programs at translation removes the GPU-queue stall here as well (0 timeouts, no removal). Refusing only the mesh programs does not. This follows my comment above, where dropping the compute dispatches after the build did not help, and agrees with @⁠not-rex's 3080 and @⁠cafeoh's 2080 Ti.

Setup: RTX 5090 32 GB (driver 32.0.16.1692, 32-lane waves), Ryzen 7 9800X3D, 64 GB, Windows 11 Pro 26300, release, DXC 1.9.2609.5. Retail 1.0.2.1, XCL_NETWORK=0 XCL_HEAP_WINDOWS=1 XCL_ACTIVITY=1, warm caches, A pressed by hand. One run per row.

Tree: main b9b6ea6 with b8b1f49 reverted, plus #1316 f207df1 + #1448's top commit, #688 760f742, #751, #1429, #929, #1464, #979. Runs 34–36 also have #1791's commit 9486494; my report there shows it does not change the stall on this tree (run 31 below is without it).

Switch (local): XCL_WAVE64_REFUSE=cs|ms|cs,ms, checked in recomp::prepare. A wave64 compute (or mesh) program that would take the split form is not translated, so its pipeline has no translation and its dispatches or draws are dropped. That is the same as @⁠not-rex's switch. It was run with XCL_TRANSLATED_CACHE=0, so translations already kept on disk could not bypass it.

run refused #101 queue.Wait timeouts "would close a GPU cycle" dispatches skipped end
31 nothing 175.1 s 56 (prod=qSome(1)) 0 0 0x887a0005 at +43.8 s, then int3 at +0x2474606
35 split mesh (40 MS) 47.0 s 42 (prod=qSome(1)) 0 0 0x887a0005 at +44.8 s, same int3
36 split compute 64.9 s 0 16 22 081 0xC0000005 read of 0xffff…ffff at +0x4e8b4be (8 threads) at +47.5 s
34 both 46.1 s 0 32 65 536 int3 at +0x4da6315 at +144.0 s
  • Run 34, both refused:
    • No removal. The title kept running for 144 s after #101, at about one present per 2–4 s, with DirectStorage loading throughout.
    • On screen: the intro cutscene's music and subtitles over a black picture.
    • The GPU still sat at ≥ 95 % in 115 of 202 one-second samples, but no queue stopped.
    • The end at +0x4da6315 is the stop @⁠3L1A5-1 listed from #1164.
  • Run 36, compute alone refused: 0 timeouts and no removal. It ends in the title's own read of -1 at +0x4e8b4be, the fault @⁠not-rex got with #1284's loop budget. That fits data the refused programs never wrote.
  • Run 35, mesh alone refused: the same stall as no refusal.
  • So on this card the split-wave64 compute programs hold q1. The 40 split mesh programs do not, at least not alone.
  • My earlier XCL_SKIP_CS=split run (comment above: compute dispatches dropped after the build, on 930e8b4 without #1195 / #1791) still had a removal 10.8 s after #101. I don't know yet why dropping at the bind differs from refusing at translation. One difference: a refused program has no translated pipeline, so its ExecuteIndirects go through #1195's path for untranslated compute.

Next on my side: #1252 (the halves meet before each LDS access) with nothing refused, after precompiling the programs whose HLSL it changes.

Not tested: repeat runs; XCL_PSO_WAIT_MS=50; which of the refused compute programs is enough; #1252.

AI use: Claude Code (Claude Opus 5.5) wrote the local switch, ran the runs on the machine above and wrote this comment. I checked it before posting.

**@⁠Ariorh1337** on GitHub · 2026-11-24 21:19 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7144782844) **RTX 5090, every pipeline prebuilt, no `XCL_PSO_WAIT_MS`: refusing the split-wave64 *compute* programs at translation removes the GPU-queue stall here as well (0 timeouts, no removal). Refusing only the mesh programs does not.** This follows my comment above, where dropping the compute dispatches after the build did not help, and agrees with @⁠not-rex's 3080 and @⁠cafeoh's 2080 Ti. **Setup:** RTX 5090 32 GB (driver 32.0.16.1692, 32-lane waves), Ryzen 7 9800X3D, 64 GB, Windows 11 Pro 26300, release, DXC 1.9.2609.5. Retail 1.0.2.1, `XCL_NETWORK=0 XCL_HEAP_WINDOWS=1 XCL_ACTIVITY=1`, warm caches, A pressed by hand. One run per row. **Tree:** `main` `b9b6ea6` with `b8b1f49` reverted, plus #1316 `f207df1` + #1448's top commit, #688 `760f742`, #751, #1429, #929, #1464, #979. Runs 34–36 also have #1791's commit `9486494`; my report there shows it does not change the stall on this tree (run 31 below is without it). **Switch (local):** `XCL_WAVE64_REFUSE=cs|ms|cs,ms`, checked in `recomp::prepare`. A wave64 compute (or mesh) program that would take the split form is not translated, so its pipeline has no translation and its dispatches or draws are dropped. That is the same as @⁠not-rex's switch. It was run with `XCL_TRANSLATED_CACHE=0`, so translations already kept on disk could not bypass it. | run | refused | `#101` | `queue.Wait` timeouts | "would close a GPU cycle" | dispatches skipped | end | |---|---|---|---|---|---|---| | 31 | nothing | 175.1 s | 56 (`prod=qSome(1)`) | 0 | 0 | `0x887a0005` at +43.8 s, then `int3` at `+0x2474606` | | 35 | split mesh (40 MS) | 47.0 s | 42 (`prod=qSome(1)`) | 0 | 0 | `0x887a0005` at +44.8 s, same `int3` | | 36 | split compute | 64.9 s | **0** | 16 | 22 081 | `0xC0000005` read of `0xffff…ffff` at `+0x4e8b4be` (8 threads) at +47.5 s | | 34 | both | 46.1 s | **0** | 32 | 65 536 | `int3` at `+0x4da6315` at +144.0 s | - **Run 34, both refused:** - No removal. The title kept running for 144 s after `#101`, at about one present per 2–4 s, with DirectStorage loading throughout. - On screen: the intro cutscene's **music and subtitles over a black picture**. - The GPU still sat at ≥ 95 % in 115 of 202 one-second samples, but no queue stopped. - The end at `+0x4da6315` is the stop @⁠3L1A5-1 listed from #1164. - **Run 36, compute alone refused:** 0 timeouts and no removal. It ends in the title's own read of `-1` at `+0x4e8b4be`, the fault @⁠not-rex got with #1284's loop budget. That fits data the refused programs never wrote. - **Run 35, mesh alone refused:** the same stall as no refusal. - So on this card the split-wave64 **compute** programs hold q1. The 40 split mesh programs do not, at least not alone. - My earlier `XCL_SKIP_CS=split` run (comment above: compute dispatches dropped after the build, on `930e8b4` without #1195 / #1791) still had a removal 10.8 s after `#101`. I don't know yet why dropping at the bind differs from refusing at translation. One difference: a refused program has no translated pipeline, so its ExecuteIndirects go through #1195's path for untranslated compute. **Next on my side:** #1252 (the halves meet before each LDS access) with nothing refused, after precompiling the programs whose HLSL it changes. **Not tested:** repeat runs; `XCL_PSO_WAIT_MS=50`; which of the refused compute programs is enough; #1252. **AI use:** Claude Code (Claude Opus 5.5) wrote the local switch, ran the runs on the machine above and wrote this comment. I checked it before posting.
Author
Owner

@⁠Krashgamer on GitHub · 2026-11-24 21:22 UTC · original

@⁠treybertram06 thanks. Since then I've withdrawn the root-cause claim on #1452 in favour of #1791, so here is what I have, on the same card (RTX 3080 10 GB, driver 610.88):

  • With #1791 (9486494), none of the bridged GPU waits timed out in the first 240 s, in 2 runs out of 2. Without it, 26 to 47 did, in 4 runs out of 4. Both builds are main 4178e88 + the same set of PRs (details).
  • #1580's graph without #1791 matches your rounds: all waiters on one value N, producers one short. It also showed something about the direct queue q3 the others waited on: it had no tracked wait ahead of those signals, and had not completed XCL's own per-submission fence signals queued before them. XCL's sparse upload fence and page-mapping fence were complete at every timeout. So on my runs q3 was still executing work, not idle on a fence.

That disagrees with your reading of the empty DRED list, which would mean an idle GPU. I can't tell which holds on your run without #1791 in it. A run of your tree with 9486494 would show whether the rounds go away there too. If they don't, #1580's graph at the first timeout would show whether the producers are queued behind waits or still busy.

AI use: Claude Code (Claude Opus 5.5).

**@⁠Krashgamer** on GitHub · 2026-11-24 21:22 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7144852715) @⁠treybertram06 thanks. Since then I've withdrawn the root-cause claim on #1452 in favour of #1791, so here is what I have, on the same card (RTX 3080 10 GB, driver 610.88): - With #1791 (`9486494`), none of the bridged GPU waits timed out in the first 240 s, in 2 runs out of 2. Without it, 26 to 47 did, in 4 runs out of 4. Both builds are `main` `4178e88` + the same set of PRs ([details](https://git.gtahub.st/github/xcl-dev--xcl/pulls/1791)). - #1580's graph without #1791 matches your rounds: all waiters on one value N, producers one short. It also showed something about the direct queue q3 the others waited on: it had no tracked wait ahead of those signals, and had not completed XCL's own per-submission fence signals queued before them. XCL's sparse upload fence and page-mapping fence were complete at every timeout. So on my runs q3 was still executing work, not idle on a fence. That disagrees with your reading of the empty DRED list, which would mean an idle GPU. I can't tell which holds on your run without #1791 in it. A run of your tree with `9486494` would show whether the rounds go away there too. If they don't, #1580's graph at the first timeout would show whether the producers are queued behind waits or still busy. AI use: Claude Code (Claude Opus 5.5).
Author
Owner

@⁠treybertram06 on GitHub · 2026-11-24 21:19 UTC · original · edited 2026-11-24 21:23 UTC

@⁠Krashgamer, for your root-cause work in #1452: the same removal on plain current main with XCL_DRED=1 working, two items from your Not tested. Counts and log lines only.

Setup: RTX 3080 10 GB, driver 621.01, Ryzen 9 5900X, 64 GB, Windows 11 Pro 26300, release. Tree: main b9b6ea6 with #1478 merged on top, because without it XCL_DRED=1 deadlocks in the first seconds: reset_x → D3D12 Release → sparse::forget_buffer waits for STATE, while the present thread holds STATE in begin_slot and waits inside D3D12Core. XCL_HEAP_WINDOWS=1, XCL_DRED=1, warm caches. No XCL_PSO_WAIT_MS. Two local changes: a cap that refuses programs over 8 MB of HLSL, and a log line for the DXGI budget and DRED's breadcrumb count. The cap refused two programs (31 MB and 154 MB of HLSL), and 4 dispatches were skipped as untranslated, two of them 0.6 s before one of the removals. So this is not a run without skips.

Three runs: 0x887a0005 at 2356 s (cold driver cache), 123.7 s, and 831.4 s. Each was followed by the title's assert at +0x2474606. No nvlddmkm event in the System log for any of them.

The 831 s run. It never drew another frame after the stall began. It went in rounds of 5 s:

  • every waiter on all five queues waits for the same value N. The waiters are q0–q4 of type 2 and q1 of type 0. In one round 50 waits were released at once;
  • the producer side is one short in every line: recorded=N, submitted=N, completed=N-1, with producers q0–q4;
  • the CPU release frees them all within about 50 ms, and the next round is the same one value higher: 0x602 → 0x603 (released at 262.6–262.9 s) → 0x604 (313.8–314.1 s).

So the values advance only through the CPU release. That fits a wait cycle through the waits XCL submitted, with every producer queued behind a wait for N itself, more than one slow producer.

DRED at the removal (#1478 in):

  • DRED page fault at GPU VA 0x0; allocations there: [], so no page fault was recorded;
  • the auto-breadcrumb list was empty: 0 lists tracked. I logged the node count, because log_device_removed prints nothing in that case. As I understand DRED, it keeps only lists that have not completed. If that is right, no command list was outstanding on any queue when the device went: the GPU was idle and waiting on fences. I have no positive control for DRED on this machine, so treat that as an interpretation.

Video memory, recorded in case it matters: the DXGI local budget was 8.6–9.3 GB. Local CurrentUsage passed it at about 50–60 s and stayed between 14.0 and 14.8 GB until the removal. I have not shown that this causes anything. The same removal is reported on 24–32 GB cards.

Not tested: 9486494 (an ExecuteIndirect reads the arguments written before it), which landed after this tree; a run without the HLSL cap (with the 31 MB and 154 MB programs built); XCL_HEAP_WINDOWS=0 up to the same point (the switch form takes much longer to get there on this card); #1580's sync graph, which is yours; a DRED positive control.

AI use: Claude Code (Claude Opus 5.5) ran the runs, symbolized the thread dumps, and wrote this comment.

Edit: the same on main c4d37be, which includes 9486494 and #1747, with #1478 merged on top: 0x887a0005 at 171.2 s. DRED again tracked 0 lists, and 53 waits were released on the CPU before it, in the same form (submitted=0x54e, completed=0x54d). One run.

**@⁠treybertram06** on GitHub · 2026-11-24 21:19 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7144767955) · edited 2026-11-24 21:23 UTC @⁠Krashgamer, for your root-cause work in #1452: the same removal on plain current `main` with `XCL_DRED=1` working, two items from your **Not tested**. Counts and log lines only. **Setup:** RTX 3080 10 GB, driver 621.01, Ryzen 9 5900X, 64 GB, Windows 11 Pro 26300, release. Tree: `main` `b9b6ea6` with #1478 merged on top, because without it `XCL_DRED=1` deadlocks in the first seconds: `reset_x` → D3D12 `Release` → `sparse::forget_buffer` waits for `STATE`, while the present thread holds `STATE` in `begin_slot` and waits inside `D3D12Core`. `XCL_HEAP_WINDOWS=1`, `XCL_DRED=1`, warm caches. No `XCL_PSO_WAIT_MS`. Two local changes: a cap that refuses programs over 8 MB of HLSL, and a log line for the DXGI budget and DRED's breadcrumb count. The cap refused two programs (31 MB and 154 MB of HLSL), and 4 dispatches were skipped as untranslated, two of them 0.6 s before one of the removals. So this is not a run without skips. **Three runs:** `0x887a0005` at 2356 s (cold driver cache), 123.7 s, and 831.4 s. Each was followed by the title's assert at `+0x2474606`. No `nvlddmkm` event in the System log for any of them. **The 831 s run.** It never drew another frame after the stall began. It went in rounds of 5 s: - every waiter on all five queues waits for the same value N. The waiters are `q0`–`q4` of type 2 and `q1` of type 0. In one round 50 waits were released at once; - the producer side is one short in every line: `recorded=N, submitted=N, completed=N-1`, with producers `q0`–`q4`; - the CPU release frees them all within about 50 ms, and the next round is the same one value higher: `0x602` → `0x603` (released at 262.6–262.9 s) → `0x604` (313.8–314.1 s). So the values advance only through the CPU release. That fits a wait cycle through the waits XCL submitted, with every producer queued behind a wait for N itself, more than one slow producer. **DRED at the removal** (#1478 in): - `DRED page fault at GPU VA 0x0; allocations there: []`, so no page fault was recorded; - the auto-breadcrumb list was **empty: 0 lists tracked**. I logged the node count, because `log_device_removed` prints nothing in that case. As I understand DRED, it keeps only lists that have not completed. If that is right, no command list was outstanding on any queue when the device went: the GPU was idle and waiting on fences. I have no positive control for DRED on this machine, so treat that as an interpretation. **Video memory**, recorded in case it matters: the DXGI local budget was 8.6–9.3 GB. Local `CurrentUsage` passed it at about 50–60 s and stayed between 14.0 and 14.8 GB until the removal. I have not shown that this causes anything. The same removal is reported on 24–32 GB cards. **Not tested:** `9486494` (an ExecuteIndirect reads the arguments written before it), which landed after this tree; a run without the HLSL cap (with the 31 MB and 154 MB programs built); `XCL_HEAP_WINDOWS=0` up to the same point (the switch form takes much longer to get there on this card); #1580's sync graph, which is yours; a DRED positive control. AI use: Claude Code (Claude Opus 5.5) ran the runs, symbolized the thread dumps, and wrote this comment. **Edit:** the same on `main` `c4d37be`, which includes `9486494` and #1747, with #1478 merged on top: `0x887a0005` at 171.2 s. DRED again tracked 0 lists, and 53 waits were released on the CPU before it, in the same form (`submitted=0x54e, completed=0x54d`). One run.
Author
Owner

@⁠notdxbi on GitHub · 2026-11-24 22:02 UTC · original

RTX 5060 8 GB / Linux (Wine): XCL_GPU_CULPRIT (#1323) names cs 18567a5f0145bde9 in the stop; with #1791 added, 2 of 4 runs reach the 450 s limit with no removal and no title fault, presenting to 431 / 448 s. The screen is still the loading slide. This answers @⁠oz-stanislav-zhukov's "#1791 … its shader was never dispatched": here it is dispatched and stalls without #1791. Counts and timings only.

Setup: RTX 5060 8 GB (32-lane waves), NVIDIA Linux driver 595.112.07, Ryzen 7 5700X, 32 GB RAM, Nobara (Fedora 44), kernel 7.3.4, Wine 11.22 Staging with vkd3d-proton (relaxed build, dxil-spirv with @⁠0naku's / @⁠Royalflamejlh's patches). Release, cross-built for x86_64-pc-windows-gnu. Retail 1.0.2.1. Tree: try-next + #1284 (loop budget), with #1323 a79d09d and #1791 9486494 cherry-picked (one conflict in bind.rs's ExecuteIndirect: I kept the culprit markers around fresh_indirect_arguments). Warm caches. XCL_PSO_WAIT_MS=50 XCL_LOOP_BUDGET=4096 XCL_TARGET_PAGES_MB=2048 XCL_COHERENT_MB=4095 XCL_DXC_THREADS=2, A pressed from 40 s, 450 s per run, one run per row.

run tree #101 last present queue.Wait timeouts dispatches end
88 without #1323/#1791 187 s 302 s 36 27.6k removal 0x887a0005 329 s
91 + #1323 236 s 278 s 43 17.0k +0x23cf683 null write 307 s
92 + #1323 + #1791 150 s 236 s 49 44.1k +0x308f3b read at 0xffffffffffffffff, 233 s (not seen again)
93 same 155 s 189 s 0 14.4k removal 0x887a0005 218 s, then +0x23cf683
94 same 200 s 431 s 114 81.3k alive at 450 s
95 same 369 s 448 s 56 33.4k alive at 450 s
  • Run 91 culprit (the only dump with open work): list … marker in #15538, last marker out #15537: cs 18567a5f0145bde9, indirect, up to 1 dispatches, and a second list stuck on cs 5aea4798e916dd17 (41x1x1) with no marker out at all.
  • With #1791 (runs 92, 94, 95): 0 lists with work started and not done in 18 of 20 dumps; the other 2 were single in-flight dispatches (7f064e5f059f4c92 800x1x1, e0654264d8ad6489 497x1x1) that were done by the next dump. The remaining timeouts are wait-before-signal with prod=qNone, so no GPU work behind them.
  • Run 93 ended in a removal with no watchdog release, so #1323 logged nothing. I added a local dump on device removal (not a PR) for runs 94–95; it did not fire because neither run had a removal.
  • Runs 94/95: the loading slide (dark, grey bars) to the end. Presents fall from ~1.4k/min before 240 s to 6/min by 420 s, so the title is alive but its loading is slow.
  • #929 alone on the run-88 tree (run 90): 0 cycle breaks and 0 timeouts, but removal at 225 s, the same as @⁠Ariorh1337 saw. Refusing split-wave64 programs (run 89, a local switch like @⁠not-rex's): no removal, +0x23cf683 at 284 s, last present 254 s.

Not tested: #1791 without #1323, #1791 + #929, runs longer than 450 s (32 GB RAM limits them), Windows.

AI use: Claude Code (Claude Opus 5.5) ran the builds and the runs, read the logs and wrote this report.

**@⁠notdxbi** on GitHub · 2026-11-24 22:02 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7145715460) **RTX 5060 8 GB / Linux (Wine): `XCL_GPU_CULPRIT` (#1323) names `cs 18567a5f0145bde9` in the stop; with #1791 added, 2 of 4 runs reach the 450 s limit with no removal and no title fault, presenting to 431 / 448 s. The screen is still the loading slide.** This answers @⁠oz-stanislav-zhukov's "#1791 … its shader was never dispatched": here it is dispatched and stalls without #1791. Counts and timings only. **Setup:** RTX 5060 8 GB (32-lane waves), NVIDIA Linux driver 595.112.07, Ryzen 7 5700X, 32 GB RAM, Nobara (Fedora 44), kernel 7.3.4, Wine 11.22 Staging with vkd3d-proton (relaxed build, dxil-spirv with @⁠0naku's / @⁠Royalflamejlh's patches). Release, cross-built for `x86_64-pc-windows-gnu`. Retail 1.0.2.1. Tree: `try-next` + #1284 (loop budget), with #1323 `a79d09d` and #1791 `9486494` cherry-picked (one conflict in `bind.rs`'s ExecuteIndirect: I kept the culprit markers around `fresh_indirect_arguments`). Warm caches. `XCL_PSO_WAIT_MS=50 XCL_LOOP_BUDGET=4096 XCL_TARGET_PAGES_MB=2048 XCL_COHERENT_MB=4095 XCL_DXC_THREADS=2`, A pressed from 40 s, 450 s per run, one run per row. | run | tree | `#101` | last present | `queue.Wait` timeouts | dispatches | end | |---|---|---|---|---|---|---| | 88 | without #1323/#1791 | 187 s | 302 s | 36 | 27.6k | removal `0x887a0005` 329 s | | 91 | + #1323 | 236 s | 278 s | 43 | 17.0k | `+0x23cf683` null write 307 s | | 92 | + #1323 + #1791 | 150 s | 236 s | 49 | 44.1k | `+0x308f3b` read at `0xffffffffffffffff`, 233 s (not seen again) | | 93 | same | 155 s | 189 s | 0 | 14.4k | removal `0x887a0005` 218 s, then `+0x23cf683` | | 94 | same | 200 s | 431 s | 114 | 81.3k | **alive at 450 s** | | 95 | same | 369 s | 448 s | 56 | 33.4k | **alive at 450 s** | - Run 91 culprit (the only dump with open work): `list … marker in #15538, last marker out #15537: cs 18567a5f0145bde9, indirect, up to 1 dispatches`, and a second list stuck on `cs 5aea4798e916dd17` (41x1x1) with no marker out at all. - With #1791 (runs 92, 94, 95): 0 lists with work started and not done in 18 of 20 dumps; the other 2 were single in-flight dispatches (`7f064e5f059f4c92` 800x1x1, `e0654264d8ad6489` 497x1x1) that were done by the next dump. The remaining timeouts are `wait-before-signal` with `prod=qNone`, so no GPU work behind them. - Run 93 ended in a removal with no watchdog release, so #1323 logged nothing. I added a local dump on device removal (not a PR) for runs 94–95; it did not fire because neither run had a removal. - Runs 94/95: the loading slide (dark, grey bars) to the end. Presents fall from ~1.4k/min before 240 s to 6/min by 420 s, so the title is alive but its loading is slow. - #929 alone on the run-88 tree (run 90): 0 cycle breaks and 0 timeouts, but removal at 225 s, the same as @⁠Ariorh1337 saw. Refusing split-wave64 programs (run 89, a local switch like @⁠not-rex's): no removal, `+0x23cf683` at 284 s, last present 254 s. Not tested: #1791 without #1323, #1791 + #929, runs longer than 450 s (32 GB RAM limits them), Windows. AI use: Claude Code (Claude Opus 5.5) ran the builds and the runs, read the logs and wrote this report.
Author
Owner

@⁠Ariorh1337 on GitHub · 2026-11-24 21:53 UTC · original · edited 2026-11-24 22:18 UTC

RTX 5090: GPU writes into a heap over process memory (OpenExistingHeapFromAddress, how XCL opens the coherent window) run at 0.1 GB/s when the lanes of one store do not cover memory contiguously. That is 500× slower than a contiguous store to the same heap. With the title's GPU heaps kept out of the coherent window, the passes this thread lists get 10–200× faster and the queue stall goes away. This adds a cause to @⁠cafeoh's and @⁠oz-stanislav-zhukov's profile tables: their slow programs include wave32 ones too.

Setup: RTX 5090 32 GB (driver 32.0.16.1692, 32-lane waves), Ryzen 7 9800X3D, 64 GB, Windows 11 Pro 26300, PCIe 5.0 x16, release. Tree: main b9b6ea6 + the stack from my earlier comments, + #1791, #1252, #1323, #1766.

1. Micro-benchmark (local test, not a PR). One compute pass over 16 MB, [numthreads(64,1,1)], a root UAV, GPU timestamps, best of 3. Three placements of the buffer:

  • VRAM: a committed DEFAULT buffer.
  • Process heap: VirtualAlloc committed memory (with and without MEM_WRITE_WATCH, which makes no difference), OpenExistingHeapFromAddress, and a placed buffer with ALLOW_CROSS_ADAPTER, as in real::open_uma.
  • GPU upload heap: D3D12_HEAP_TYPE_GPU_UPLOAD; GPUUploadHeapSupported is true here.
pass VRAM process heap GPU upload heap
read 16 B per lane 3567 GB/s 52 GB/s 3567 GB/s
read 4 B per lane 2913 GB/s 47 GB/s –
write 4 B per lane (lane i → dword i) 1846 GB/s 50 GB/s 1840 GB/s
write 16 B per lane (Store4, lane stride 16 B) 1880 GB/s 0.1 GB/s 1833 GB/s
write 8 B per lane (Store2) 2533 GB/s 0.1 GB/s –
write 16 B per lane as four Stores at +0/4/8/12 1742 GB/s 0.1 GB/s –
write 16 B per lane as four Stores, lane i → dword i of each 256 B row 2731 GB/s 52 GB/s –
read + write 16 B per lane 3705 GB/s 0.2 GB/s 3438 GB/s
  • Reads and lane-contiguous writes run at PCIe speed.
  • A store instruction whose lanes leave gaps in memory (the shape of a per-lane buffer_store_dwordx2/x4, or of image writes to texels that do not fill whole lines) drops to 0.1 GB/s, whatever the store width.
  • A GPU upload heap is at VRAM speed for every shape.

2. In the title (XCL_GPU_PROFILE + XCL_GPU_CULPRIT, one run each).

  • Run 40, default:
    • The coherent window is full (coherent 3998/4095 MB: the title's GPU heaps, kernelx.rs, XCL_COHERENT_HEAPS).
    • 1.5–4.4 s of GPU time per 2 s after #101, at 1–2.6 k ops per window.
    • Then the usual queue.Wait timeouts and 0x887a0005.
  • Run 41, XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512:
    • coherent 64/512 MB.
    • 0 queue.Wait timeouts.
    • 1–4 presents every 2 s with 8–14 k dispatches per window.
    • 224 #101 calls against 26 in run 40.
    • It still ended in 0x887a0005, 33 s after #101, with no timeout before it.
    • On screen (the same in run 44, where only the 1172 and 2199 MB heaps were kept out): the intro plays on. Its title cards and UI are drawn, the world shots between them are black, and music and sound go on.
    • Some programs (50625695, 206ed63b) never ran in it. As the comment in kernelx.rs says, with the heaps outside the window the shaders read other data, so this run is a speed measurement, not a fix.

Longest call per program after #101:

program form run 40 run 41
80f65d1925a2df48 64x1x1, split 1906 ms 108 ms
79d178afa02abd49 8x8x1, wave32 819 ms 40 ms
facc2a585fba55c2 8x8x1, split 547 ms 2.9 ms
2e7b19ebe687ea83 8x8x1, split 404 ms 7.9 ms
1b5466f261a70cde 8x8x1, split 403 ms 19 ms
8797f3d417593aa7 8x8x1, wave32 216 ms 22 ms
  • Profile caveat: the per-op times include waits behind other queues. In run 40 a 1-thread, 68-byte program (a51350876cf12f94) shows 450 ms. So the table shows the trend, not exact costs.
  • Split form: these results do not clear it. Refusing the split compute programs also removed the stall in my earlier runs, and those programs are most of the heavy writers.

Reading: on NVIDIA the title's GPU heaps sit in system memory: 1172, 2199, 563 and 596 MB, all committed right after UMA opened. The passes that write into them through gapped store instructions are where the GPU time goes.

Edit, moving the heaps:

  • Into the sparse VRAM windows (local XCL_COHERENT_HEAPS=sparse[:N] → d3d12x::sparse::alloc). This moves the cost to the CPU. The title writes these heaps from the CPU all the time: 48–90 s of write-watch in the first ~2 min, 5.7–7.6 GB uploaded. With the fences in the moved heaps, every submit waited in sparse::readback_after_execute. With only the ≥ 1 GB heaps moved, submits blocked in D3D12 behind UpdateTileMappings. Both runs ended at the title watchdog +0x23cf683.
  • Into a GPU_UPLOAD heap. This is not a switch. A shader picks its window from the address ((address >> 32) - xcl_uma_base), so the windows sit at fixed 4 GiB-aligned places, while a GPU_UPLOAD mapping is wherever Map puts it. It would also take the coherent window's slot of the 4 and make the CPU's fence polling uncached.
  • Next I'm trying the GPU-written resources only (render targets and UAV textures placed in these heaps), in video memory.

Not tested: AMD (whether its writes to process memory have the same cliff); PCIe 4.0 boards; a run with only the written heaps moved; repeat runs.

AI use: Claude Code (Claude Opus 5.5) wrote the local benchmark, ran it and the title runs on the machine above, and wrote this comment. I checked it before posting.

**@⁠Ariorh1337** on GitHub · 2026-11-24 21:53 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7145531726) · edited 2026-11-24 22:18 UTC **RTX 5090: GPU writes into a heap over process memory (`OpenExistingHeapFromAddress`, how XCL opens the coherent window) run at 0.1 GB/s when the lanes of one store do not cover memory contiguously. That is 500× slower than a contiguous store to the same heap. With the title's GPU heaps kept out of the coherent window, the passes this thread lists get 10–200× faster and the queue stall goes away.** This adds a cause to @⁠cafeoh's and @⁠oz-stanislav-zhukov's profile tables: their slow programs include wave32 ones too. **Setup:** RTX 5090 32 GB (driver 32.0.16.1692, 32-lane waves), Ryzen 7 9800X3D, 64 GB, Windows 11 Pro 26300, PCIe 5.0 x16, release. Tree: `main` `b9b6ea6` + the stack from my earlier comments, + #1791, #1252, #1323, #1766. **1. Micro-benchmark** (local test, not a PR). One compute pass over 16 MB, `[numthreads(64,1,1)]`, a root UAV, GPU timestamps, best of 3. Three placements of the buffer: - **VRAM:** a committed `DEFAULT` buffer. - **Process heap:** `VirtualAlloc` committed memory (with and without `MEM_WRITE_WATCH`, which makes no difference), `OpenExistingHeapFromAddress`, and a placed buffer with `ALLOW_CROSS_ADAPTER`, as in `real::open_uma`. - **GPU upload heap:** `D3D12_HEAP_TYPE_GPU_UPLOAD`; `GPUUploadHeapSupported` is true here. | pass | VRAM | process heap | GPU upload heap | |---|---|---|---| | read 16 B per lane | 3567 GB/s | 52 GB/s | 3567 GB/s | | read 4 B per lane | 2913 GB/s | 47 GB/s | – | | write 4 B per lane (lane i → dword i) | 1846 GB/s | 50 GB/s | 1840 GB/s | | write 16 B per lane (`Store4`, lane stride 16 B) | 1880 GB/s | **0.1 GB/s** | 1833 GB/s | | write 8 B per lane (`Store2`) | 2533 GB/s | **0.1 GB/s** | – | | write 16 B per lane as four `Store`s at +0/4/8/12 | 1742 GB/s | **0.1 GB/s** | – | | write 16 B per lane as four `Store`s, lane i → dword i of each 256 B row | 2731 GB/s | 52 GB/s | – | | read + write 16 B per lane | 3705 GB/s | **0.2 GB/s** | 3438 GB/s | - Reads and lane-contiguous writes run at PCIe speed. - A store instruction whose lanes leave gaps in memory (the shape of a per-lane `buffer_store_dwordx2/x4`, or of image writes to texels that do not fill whole lines) drops to 0.1 GB/s, whatever the store width. - A GPU upload heap is at VRAM speed for every shape. **2. In the title** (`XCL_GPU_PROFILE` + `XCL_GPU_CULPRIT`, one run each). - **Run 40, default:** - The coherent window is full (`coherent 3998/4095 MB`: the title's GPU heaps, `kernelx.rs`, `XCL_COHERENT_HEAPS`). - 1.5–4.4 s of GPU time per 2 s after `#101`, at 1–2.6 k ops per window. - Then the usual queue.Wait timeouts and `0x887a0005`. - **Run 41, `XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512`:** - `coherent 64/512 MB`. - **0 queue.Wait timeouts.** - 1–4 presents every 2 s with 8–14 k dispatches per window. - 224 `#101` calls against 26 in run 40. - It still ended in `0x887a0005`, 33 s after `#101`, with no timeout before it. - On screen (the same in run 44, where only the 1172 and 2199 MB heaps were kept out): the intro plays on. Its title cards and UI are drawn, the world shots between them are black, and music and sound go on. - Some programs (`50625695`, `206ed63b`) never ran in it. As the comment in `kernelx.rs` says, with the heaps outside the window the shaders read other data, so this run is a speed measurement, not a fix. Longest call per program after `#101`: | program | form | run 40 | run 41 | |---|---|---|---| | `80f65d1925a2df48` | 64x1x1, split | 1906 ms | 108 ms | | `79d178afa02abd49` | 8x8x1, wave32 | 819 ms | 40 ms | | `facc2a585fba55c2` | 8x8x1, split | 547 ms | 2.9 ms | | `2e7b19ebe687ea83` | 8x8x1, split | 404 ms | 7.9 ms | | `1b5466f261a70cde` | 8x8x1, split | 403 ms | 19 ms | | `8797f3d417593aa7` | 8x8x1, wave32 | 216 ms | 22 ms | - **Profile caveat:** the per-op times include waits behind other queues. In run 40 a 1-thread, 68-byte program (`a51350876cf12f94`) shows 450 ms. So the table shows the trend, not exact costs. - **Split form:** these results do not clear it. Refusing the split compute programs also removed the stall in my earlier runs, and those programs are most of the heavy writers. **Reading:** on NVIDIA the title's GPU heaps sit in system memory: 1172, 2199, 563 and 596 MB, all committed right after `UMA opened`. The passes that write into them through gapped store instructions are where the GPU time goes. **Edit, moving the heaps:** - **Into the sparse VRAM windows** (local `XCL_COHERENT_HEAPS=sparse[:N]` → `d3d12x::sparse::alloc`). This moves the cost to the CPU. The title writes these heaps from the CPU all the time: 48–90 s of write-watch in the first ~2 min, 5.7–7.6 GB uploaded. With the fences in the moved heaps, every submit waited in `sparse::readback_after_execute`. With only the ≥ 1 GB heaps moved, submits blocked in D3D12 behind `UpdateTileMappings`. Both runs ended at the title watchdog `+0x23cf683`. - **Into a `GPU_UPLOAD` heap.** This is not a switch. A shader picks its window from the address (`(address >> 32) - xcl_uma_base`), so the windows sit at fixed 4 GiB-aligned places, while a `GPU_UPLOAD` mapping is wherever `Map` puts it. It would also take the coherent window's slot of the 4 and make the CPU's fence polling uncached. - **Next I'm trying the GPU-*written* resources only** (render targets and UAV textures placed in these heaps), in video memory. **Not tested:** AMD (whether its writes to process memory have the same cliff); PCIe 4.0 boards; a run with only the written heaps moved; repeat runs. **AI use:** Claude Code (Claude Opus 5.5) wrote the local benchmark, ran it and the title runs on the machine above, and wrote this comment. I checked it before posting.
Author
Owner

@⁠CiccioBelloo on GitHub · 2026-11-24 22:27 UTC · original · edited 2026-11-24 22:33 UTC

Edit: after reading XCL's recompiler more closely, points 1 and 2 are already covered in XCL. xcl_s_barrier counts live warps and gives up after a bounded spin, and LOOP_GUARD caps loops. They are listed below as what fixed the hangs in the VIctory translator, not as gaps in XCL. Points 3–5 are the ones that may be new here.

Field notes from an RTX 3080 (10 GB, Windows 11, recent driver), GTA VI 1.0.2.1. These come from a private VIctory branch, not XCL, but the failure looks the same as here: the device is removed or hangs while the world loads, around frame 1100–1500. Current XCL main (689f2db) hits it on this machine too, at about frame 1300 (0x887A0007).

What made the world load stay up on NVIDIA there:

  1. (already handled in XCL by xcl_s_barrier) s_barrier in a block only some lanes reach. On the console s_barrier is a wave instruction: it runs whatever EXEC holds. Lowered per lane, a barrier inside an EXEC-guarded block becomes a group barrier that some threads never reach, and NVIDIA waits forever. VIctory now leaves out barriers in blocks that are not uniform across the group.
  2. (XCL has LOOP_GUARD) Per-loop iteration caps multiply. A cap of 4096 per loop entry gives 4096^n with nested loops. 256 per entry stopped a compute list (~23 programs, one with 19 back-edges) that never finished.
  3. Synchronisation between lists of one ExecuteCommandLists. There is no implicit UAV sync between them. Submitting each title list on its own, plus a global UAV barrier after every draw and dispatch, removed a timing-dependent removal that GPU-based validation could not reproduce (it slows everything enough to hide the race).
  4. Window capture caused resets. A PrintWindow(..., PW_RENDERFULLCONTENT) screenshot of the game window every 15 s gave 0x887A0007 "caused by another application" removals with no nvlddmkm event. Capturing the desktop area instead (CopyFromScreen) stopped them. Worth checking if any test harness screenshots the window.
  5. The NVIDIA shader cache file %LOCALAPPDATA%\NVIDIA\DXCache\*.nvph regrows to 1–2 GB after many recompiles. Mapped low, it starved the title's 32-bit XMemVirtualAlloc, so the title hit its own NO_MEMORY assert at start. Deleting the big .nvph files before each launch fixed it.

With these the title reaches gameplay ("Muoviti / Muovi la telecamera" prompt), with 2000–3600 draws per frame and characters visible in the G-buffer. The screen is still black because the lighting and composite passes use pointer-based memory access that translator doesn't cover yet. Hope some of this helps with #505.

**@⁠CiccioBelloo** on GitHub · 2026-11-24 22:27 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7146246551) · edited 2026-11-24 22:33 UTC **Edit:** after reading XCL's recompiler more closely, points 1 and 2 are already covered in XCL. `xcl_s_barrier` counts live warps and gives up after a bounded spin, and `LOOP_GUARD` caps loops. They are listed below as what fixed the hangs in the VIctory translator, not as gaps in XCL. Points 3–5 are the ones that may be new here. Field notes from an RTX 3080 (10 GB, Windows 11, recent driver), GTA VI 1.0.2.1. These come from a private VIctory branch, not XCL, but the failure looks the same as here: the device is removed or hangs while the world loads, around frame 1100–1500. Current XCL `main` (689f2db) hits it on this machine too, at about frame 1300 (0x887A0007). What made the world load stay up on NVIDIA there: 1. *(already handled in XCL by `xcl_s_barrier`)* **`s_barrier` in a block only some lanes reach.** On the console `s_barrier` is a wave instruction: it runs whatever EXEC holds. Lowered per lane, a barrier inside an EXEC-guarded block becomes a group barrier that some threads never reach, and NVIDIA waits forever. VIctory now leaves out barriers in blocks that are not uniform across the group. 2. *(XCL has `LOOP_GUARD`)* **Per-loop iteration caps multiply.** A cap of 4096 per loop entry gives 4096^n with nested loops. 256 per entry stopped a compute list (~23 programs, one with 19 back-edges) that never finished. 3. **Synchronisation between lists of one ExecuteCommandLists.** There is no implicit UAV sync between them. Submitting each title list on its own, plus a global UAV barrier after every draw and dispatch, removed a timing-dependent removal that GPU-based validation could not reproduce (it slows everything enough to hide the race). 4. **Window capture caused resets.** A `PrintWindow(..., PW_RENDERFULLCONTENT)` screenshot of the game window every 15 s gave 0x887A0007 "caused by another application" removals with no `nvlddmkm` event. Capturing the desktop area instead (`CopyFromScreen`) stopped them. Worth checking if any test harness screenshots the window. 5. **The NVIDIA shader cache file `%LOCALAPPDATA%\NVIDIA\DXCache\*.nvph`** regrows to 1–2 GB after many recompiles. Mapped low, it starved the title's 32-bit `XMemVirtualAlloc`, so the title hit its own NO_MEMORY assert at start. Deleting the big `.nvph` files before each launch fixed it. With these the title reaches gameplay ("Muoviti / Muovi la telecamera" prompt), with 2000–3600 draws per frame and characters visible in the G-buffer. The screen is still black because the lighting and composite passes use pointer-based memory access that translator doesn't cover yet. Hope some of this helps with #505.
Author
Owner

@⁠lucsoft on GitHub · 2026-11-24 22:35 UTC · original

Linux / RDNA3 (RADV): @⁠Ariorh1337's coherent-heap finding reproduces here. With XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512 the title reaches #101 at 192 s instead of 400–560 s, at 30 fps in its menus. In that mode the title's BVH builder then throws 2 s after #101. With the heaps in the window, the queue-wait stop after #101 is unchanged by #1791, #1398 and #610. Also: an SQC (data) fault (#575) here ended in a full GPU reset that took the desktop session with it.

Setup: RX 7800 XT 16 GB (RDNA3, Mesa 26.3.1 RADV), Ryzen 7 7800X3D, 30 GB RAM, NixOS, kernel 7.3.5, Wine 11.21 Staging, vkd3d-proton 3.1 (relaxed, dxil-spirv 53aac418). XCL main 1d027e5 (with #1791, #1288, #1693, #1321) + #1398, #610, #871's memory commit, #684, #688, #1279, b8b1f49 reverted. XCL_HEAP_WINDOWS=1 XCL_SPARSE_WAIT_MS=100 (the latter a local bound on the sparse readback wait, from my earlier comment). Retail 1.0.2.1. One run per row.

run coherent window first #101 after #101
heap windows, heaps in the window (4178e88 + #1398, no #1791 / #610) 1024 MB, 646–679 MB used 404.2 s first queue.Wait timeout at +5 s (submitted=0x12ef, completed=0x0). The counter then moves one step per ~20 s, 0.7 fps for minutes (crawling, not stopped). Ended at 873 s in the fault below
same, 1d027e5 + #1398 + #610 1024 MB 561.3 s (with ~330 cold recompiles: #610 changes the HLSL) timeouts from +13 s, as before
XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512, 1d027e5 + #1398 + #610 512 MB, 64 MB used 192.2 s 0xe06d7363 (a C++ throw) in xboxbvhbuilder.dll at 193.2 s; the process ended at 194.6 s
  • Before #101, in the XCL_COHERENT_HEAPS=0 run:
    • 30.0 fps over 300 frames at 54 s, against 14–17 fps with the heaps in the window.
    • 8 192 draws at 56 s, against 171 s.
    • 29 526 draws at 141 s, against 22 292 at 348 s.
  • My guess for the throw, not verified: with the heaps outside the window their GPU addresses are vkd3d-proton's own, above 2^40, which the title's BVH builder refuses (#585). As @⁠Ariorh1337 wrote, this mode is a speed measurement, not a fix. A GPU_UPLOAD heap for the window would have to keep them below 2^40 too.
  • #575 here: [gfxhub] page fault … in page starting at address 0x000080008c44f000 … Faulty UTCL2 client ID: SQC (data), PERMISSION_FAULTS 0x3.
    • That is past the end of the shared view heap, as in #575. It happened on a tree without #610.
    • Then ring gfx_0.0.0 timeout, MES failed to respond to msg=RESET, failed to reset legacy queue, a mode1 reset ("VRAM is lost"). gnome-shell, Discord and PipeWire then dumped core and the session ended.
    • So on RDNA3 one of these faults can cost more than the title.
  • @⁠freemanovec's 4 GiB fault (0x0000c00100000000, TCP) did not come in any of the 4 heap-window runs here. Before heap windows it came in most. I can't tell whether that is the heap form or the title not reaching the same work.

Not tested: XCL_COHERENT_HEAPS=0 with the BVH builder's addresses kept below 2^40; a GPU_UPLOAD heap; @⁠freemanovec's aligned windows.

AI use: Claude Code (Claude Opus 5.5) analyzed the logs and wrote this comment. The runs were real, on the hardware above.

**@⁠lucsoft** on GitHub · 2026-11-24 22:35 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7146417344) **Linux / RDNA3 (RADV): @⁠Ariorh1337's coherent-heap finding reproduces here. With `XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512` the title reaches `#101` at 192 s instead of 400–560 s, at 30 fps in its menus. In that mode the title's BVH builder then throws 2 s after `#101`.** With the heaps in the window, the queue-wait stop after `#101` is unchanged by #1791, #1398 and #610. Also: an `SQC (data)` fault (#575) here ended in a full GPU reset that took the desktop session with it. **Setup:** RX 7800 XT 16 GB (RDNA3, Mesa 26.3.1 RADV), Ryzen 7 7800X3D, 30 GB RAM, NixOS, kernel 7.3.5, Wine 11.21 Staging, vkd3d-proton 3.1 (relaxed, dxil-spirv `53aac418`). XCL `main` `1d027e5` (with #1791, #1288, #1693, #1321) + #1398, #610, #871's memory commit, #684, #688, #1279, `b8b1f49` reverted. `XCL_HEAP_WINDOWS=1 XCL_SPARSE_WAIT_MS=100` (the latter a local bound on the sparse readback wait, from my earlier comment). Retail 1.0.2.1. One run per row. | run | coherent window | first `#101` | after `#101` | |---|---|---|---| | heap windows, heaps in the window (`4178e88` + #1398, no #1791 / #610) | 1024 MB, 646–679 MB used | 404.2 s | first queue.Wait timeout at +5 s (`submitted=0x12ef, completed=0x0`). The counter then moves one step per ~20 s, 0.7 fps for minutes (crawling, not stopped). Ended at 873 s in the fault below | | same, `1d027e5` + #1398 + #610 | 1024 MB | 561.3 s (with ~330 cold recompiles: #610 changes the HLSL) | timeouts from +13 s, as before | | `XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512`, `1d027e5` + #1398 + #610 | 512 MB, 64 MB used | **192.2 s** | `0xe06d7363` (a C++ throw) in `xboxbvhbuilder.dll` at 193.2 s; the process ended at 194.6 s | - **Before `#101`, in the `XCL_COHERENT_HEAPS=0` run:** - 30.0 fps over 300 frames at 54 s, against 14–17 fps with the heaps in the window. - 8 192 draws at 56 s, against 171 s. - 29 526 draws at 141 s, against 22 292 at 348 s. - **My guess for the throw, not verified:** with the heaps outside the window their GPU addresses are vkd3d-proton's own, above 2^40, which the title's BVH builder refuses (#585). As @⁠Ariorh1337 wrote, this mode is a speed measurement, not a fix. A `GPU_UPLOAD` heap for the window would have to keep them below 2^40 too. - **#575 here:** `[gfxhub] page fault … in page starting at address 0x000080008c44f000 … Faulty UTCL2 client ID: SQC (data)`, `PERMISSION_FAULTS 0x3`. - That is past the end of the shared view heap, as in #575. It happened on a tree without #610. - Then `ring gfx_0.0.0 timeout`, `MES failed to respond to msg=RESET`, `failed to reset legacy queue`, a **mode1 reset ("VRAM is lost")**. gnome-shell, Discord and PipeWire then dumped core and the session ended. - So on RDNA3 one of these faults can cost more than the title. - **@⁠freemanovec's 4 GiB fault** (`0x0000c00100000000`, `TCP`) did not come in any of the 4 heap-window runs here. Before heap windows it came in most. I can't tell whether that is the heap form or the title not reaching the same work. **Not tested:** `XCL_COHERENT_HEAPS=0` with the BVH builder's addresses kept below 2^40; a `GPU_UPLOAD` heap; @⁠freemanovec's aligned windows. AI use: Claude Code (Claude Opus 5.5) analyzed the logs and wrote this comment. The runs were real, on the hardware above.
Author
Owner

@⁠wondercrash on GitHub · 2026-11-24 22:42 UTC · original

RTX 5090: the intro cutscene's 3D shots are one flat grey here too, with 0 draws skipped and 21–23 of 65 536 dispatches skipped (one program, skipped on purpose), and no pipeline bound before it was built. @⁠MacieGx counted 69 852 dispatches / 52 364 draws skipped as "why it is grey", and @⁠IvyNotFound wrote that skipped draws are probably not the whole story. On this tree, skipped draws and late pipelines do not explain the grey. One skipped program is not ruled out.

Setup: RTX 5090 32 GB, NVIDIA driver 621.14, Ryzen 7 9800X3D, 62 GB RAM, Windows 11 23H2 (10.0.22631), release build, retail 1.0.2.1. The tree is our integration branch wondercrash/xcl: upstream main plus other open upstream PRs plus our own changes, not plain main. Runs 31–34 are on 78b48bb..72d2386, and all of them include #1791's fix. Env: XCL_NETWORK=0 XCL_TITLE_WATCHDOG=0 XCL_SKIP_SHADERS=95cc13288a27a96e,c6fac408daf28dae XCL_PSO_SKIP_HUGE=8M XCL_DRED=1 XCL_GPU_BREADCRUMBS=1 XCL_GPU_PROFILE=1, plus XCL_FRAME_DUMP every 2 s (960x540). XCL_PSO_WAIT_MS was not set. The cutscene's pipelines were prebuilt. Runs 33–34 also ran with the D3D12 debug layer, and run 34 with a 3 GB VRAM ballast.

95cc13288a27a96e is an RT shadow-trace compute program. The NVIDIA driver never finished compiling its 9.8 MB of DXIL (it was still compiling after 131 s), so its dispatches are skipped. c6fac408daf28dae is never reached before these points: no log line says it is skipped.

Frame dumps: after the first title card, the frames are letterboxed. The picture area (rows 30–509) is one grey: mean RGB 49/52/57, every pixel in 45–60. All four runs show the same mean:

run grey frames work counters at the grey frames
31 85.0–96.1 s 24 518 draws (0 skipped), 65 536 dispatches (23 skipped), run31.log:23417
32 69.2–71.6 s 19 569 draws (0 skipped), 65 536 dispatches (21 skipped), run32.log:23303
33 70.3–77.8 s (frames 1349→1355) 20 367 draws (0 skipped), 65 536 dispatches (22 skipped), run33.log:23353
34 71.4–83.1 s 20 824 draws (0 skipped), 65 536 dispatches (22 skipped), run34.log:23407
  • The only shader the logs report as skipped is 95cc (… is skipped from here on, run32.log:23094, run33.log:23136). None of runs 31–34 has a still being built line.
  • The title's heaps sit in the coherent window here (coherent 4048/4095 MB, run33.log:23353). @⁠Ariorh1337's run 41 kept them out of the window, and there the world shots were black rather than grey.
  • Each run ends in 0x887a0005 0.8–4.6 s after its last grey frame (run32.log:23304). Runs 35–36 ended during the title card, before the grey shots.

Not ruled out: that the ~22 skipped 95cc dispatches are what makes the shots grey. Our tree also differs from main in ways that touch the picture: our compute coherence rule (ea00030+2c20324, the same idea as #1850), d0f8383 (equivalent to #929), d4d4a57 (port of #765) and #751's texture path.

Not tested: plain main; running 95cc (it never compiles here); #1827's XCL_DEBUG_SKIP_SHADERS and frame trace to find the pass that writes the grey; AMD; other NVIDIA cards.

AI use: omp with Claude Opus 5.5 read the logs and frame dumps and wrote this; the runs are ours on the machine above.

**@⁠wondercrash** on GitHub · 2026-11-24 22:42 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7146542649) **RTX 5090: the intro cutscene's 3D shots are one flat grey here too, with 0 draws skipped and 21–23 of 65 536 dispatches skipped (one program, skipped on purpose), and no pipeline bound before it was built.** @⁠MacieGx counted 69 852 dispatches / 52 364 draws skipped as "why it is grey", and @⁠IvyNotFound wrote that skipped draws are probably not the whole story. On this tree, skipped draws and late pipelines do not explain the grey. One skipped program is not ruled out. **Setup:** RTX 5090 32 GB, NVIDIA driver 621.14, Ryzen 7 9800X3D, 62 GB RAM, Windows 11 23H2 (10.0.22631), release build, retail 1.0.2.1. The tree is our integration branch `wondercrash/xcl`: upstream `main` plus other open upstream PRs plus our own changes, not plain `main`. Runs 31–34 are on `78b48bb`..`72d2386`, and all of them include #1791's fix. Env: `XCL_NETWORK=0 XCL_TITLE_WATCHDOG=0 XCL_SKIP_SHADERS=95cc13288a27a96e,c6fac408daf28dae XCL_PSO_SKIP_HUGE=8M XCL_DRED=1 XCL_GPU_BREADCRUMBS=1 XCL_GPU_PROFILE=1`, plus `XCL_FRAME_DUMP` every 2 s (960x540). `XCL_PSO_WAIT_MS` was not set. The cutscene's pipelines were prebuilt. Runs 33–34 also ran with the D3D12 debug layer, and run 34 with a 3 GB VRAM ballast. `95cc13288a27a96e` is an RT shadow-trace compute program. The NVIDIA driver never finished compiling its 9.8 MB of DXIL (it was still compiling after 131 s), so its dispatches are skipped. `c6fac408daf28dae` is never reached before these points: no log line says it is skipped. **Frame dumps:** after the first title card, the frames are letterboxed. The picture area (rows 30–509) is one grey: mean RGB 49/52/57, every pixel in 45–60. All four runs show the same mean: | run | grey frames | work counters at the grey frames | |---|---|---| | 31 | 85.0–96.1 s | 24 518 draws (0 skipped), 65 536 dispatches (23 skipped), `run31.log:23417` | | 32 | 69.2–71.6 s | 19 569 draws (0 skipped), 65 536 dispatches (21 skipped), `run32.log:23303` | | 33 | 70.3–77.8 s (frames 1349→1355) | 20 367 draws (0 skipped), 65 536 dispatches (22 skipped), `run33.log:23353` | | 34 | 71.4–83.1 s | 20 824 draws (0 skipped), 65 536 dispatches (22 skipped), `run34.log:23407` | - The only shader the logs report as skipped is 95cc (`… is skipped from here on`, `run32.log:23094`, `run33.log:23136`). None of runs 31–34 has a `still being built` line. - The title's heaps sit in the coherent window here (`coherent 4048/4095 MB`, `run33.log:23353`). @⁠Ariorh1337's run 41 kept them out of the window, and there the world shots were black rather than grey. - Each run ends in `0x887a0005` 0.8–4.6 s after its last grey frame (`run32.log:23304`). Runs 35–36 ended during the title card, before the grey shots. **Not ruled out:** that the ~22 skipped 95cc dispatches are what makes the shots grey. Our tree also differs from `main` in ways that touch the picture: our compute coherence rule (`ea00030`+`2c20324`, the same idea as #1850), `d0f8383` (equivalent to #929), `d4d4a57` (port of #765) and #751's texture path. **Not tested:** plain `main`; running 95cc (it never compiles here); #1827's `XCL_DEBUG_SKIP_SHADERS` and frame trace to find the pass that writes the grey; AMD; other NVIDIA cards. AI use: omp with Claude Opus 5.5 read the logs and frame dumps and wrote this; the runs are ours on the machine above.
Author
Owner

@⁠milesah3ad on GitHub · 2026-11-24 22:54 UTC · original

A GPU_UPLOAD heap as the coherent window, measured on an RTX 5080 (no game files): it fixes the GPU write speed but makes CPU reads of that memory about 3,400× slower, removes the write watch, and puts title addresses where the driver maps them. A shader-side change, a wave-transposed Store4, gets the same write speed in the existing window (118× on this machine) with none of those costs. This follows @⁠Ariorh1337's micro-benchmark above, and @⁠lucsoft's reproduction on RDNA3.

Setup: RTX 5080 16 GB, driver 621.24, BAR1 16384 MiB (Resizable BAR on), GPUUploadHeapSupported = true. Ryzen 7 9800X3D, 64 GB, Windows 11 Pro 26300, DXC 1.9.2609.5 (cs_6_6 -O3). The card trains at PCIe 5.0 x4 here (x16 max, checked under load), so contiguous traffic over the link stops at about 10–14 GB/s, against 52 GB/s on @⁠Ariorh1337's x16. A standalone probe (not XCL code) mirrors real::open_uma: committed VirtualAlloc with MEM_WRITE_WATCH, OpenExistingHeapFromAddress, and one placed buffer with ALLOW_UNORDERED_ACCESS | ALLOW_CROSS_ADAPTER. 64 threads per group, a grid-stride loop, GPU timestamps, best of 3–5.

The answers

  1. GPU writes: GPU_UPLOAD runs at VRAM speed for every shape (256 MB table). The process heap reproduces the drop on Blackwell: Store2, Store4, four Stores at +0/4/8/12 and read+write all fall to 0.10–0.29 GB/s, the same as on the 5090 at x16. So the cost is per gapped store, not the link's bandwidth.
  2. CPU reads of a GPU_UPLOAD mapping: Map gives write-combined memory (VirtualQuery Protect 0x404). Plain sequential loads run at 0.01 GB/s, a random 4 B read takes 740 ns and a random 64 B line 4.8 µs, against 34 GB/s / 2.9 ns / 13.5 ns for the current window. MOVNTDQA streaming loads reach 0.65 GB/s. Any title CPU read of its GPU heaps would pay this, and GetWriteWatch fails on the mapping, so title_textures::refresh would lose the CPU-write detection it uses on the window.
  3. Addresses: every GPU VA here is below 2^40, GPU_UPLOAD included (highest 0x35fc00000 with 512 placed buffers). But the CPU mapping lands where the driver puts it (0x1e9_22d3_0000 in my run, above 2^40), and D3D12 gives no way to choose it. The window layout (title address = CPU address at base + k · 4 GiB, (addr >> 32) & 3) can't hold there, and title addresses from the mapping would be above 2^40, which #585's BVH builder refuses.
  4. Size: one GPU_UPLOAD heap of 4095 MB creates (exactly 4 GB is refused, like the process heap), and twelve 1 GB heaps were held at once (my ceiling).

So GPU_UPLOAD can't replace the window as it stands. Two ways keep the memory where it is:

Shader-side: transpose Store4 within the wave. The slow case is a single store instruction whose lanes leave gaps. When a wave's 16 B lane elements form one contiguous run, the lanes can swap values so that each of four one-dword Stores covers a contiguous run of lanes. The probe's version checks that at run time (WaveActiveAllTrue(a == first + 16 * lane) with all lanes active) and otherwise falls back to Store4:

uint a0 = WaveReadLaneFirst(a), lane = WaveGetLaneIndex(), cnt = WaveGetLaneCount();
if (WaveActiveAllTrue(a == a0 + 16u * lane) && WaveActiveCountBits(true) == cnt) {
  [unroll] for (uint k = 0; k < 4; k++) {
    uint j = k * cnt + lane, src = j >> 2, c = j & 3;
    uint4 s = uint4(WaveReadLaneAt(v.x, src), WaveReadLaneAt(v.y, src), WaveReadLaneAt(v.z, src), WaveReadLaneAt(v.w, src));
    buf.Store(a0 + j * 4, c == 0 ? s.x : c == 1 ? s.y : c == 2 ? s.z : s.w);
  }
} else buf.Store4(a, v);

Over 32 MB in the process heap: 333 ms → 2.82 ms (118×), all 2,097,152 elements correct (checked on the CPU after the pass). In VRAM it took 0.016 ms against 0.031 ms for the plain Store4, so it costs nothing there. It only helps stores that are contiguous across the wave. A scatter, or a wave with inactive lanes in this version, takes the fallback. How much of the retail programs' slow traffic is that shape is the open question: XCL_GPU_PROFILE's slow programs could be checked for buffer_store_dwordx2/x4 / global_store_dwordx4 with per-lane-linear addresses.

Staging through VRAM: Store4 into a VRAM buffer plus one CopyBufferRegion into the process heap took 2.74 ms in total (the copy at 12–14 GB/s, x4-bound). #1329's XCL_UMA_SHADOW=1 (a VRAM copy of the committed window, kept in step) is the complete form of that and already forces on Windows. A title run with it against the default would measure the whole-window version.

Tables

GPU, 32 MB, GB/s. The VRAM column fits in the 5080's L2, so compare VRAM with GPU_UPLOAD in the 256 MB table:

pass VRAM process heap (window) GPU_UPLOAD
read 16 B per lane 3591 9.53 3603
read 4 B per lane 2450 10 1589
write 4 B, lane i → dword i 2185 10 1866
write 8 B per lane (Store2) 1997 0.11 1613
write 16 B per lane (Store4) 1073 0.10 913
four Stores at +0/4/8/12 1074 0.10 867
four Stores, lane i → dword i of each 256 B row 2175 9.52 1771
read + write 16 B (both counted) 1999 0.29 2422

GPU, 256 MB, GB/s:

pass VRAM GPU_UPLOAD
read 16 B / 4 B per lane 916 / 841 886 / 647
write 4 B / Store2 / Store4 938 / 866 / 826 807 / 868 / 829
four Stores +0/4/8/12 / four rows 832 / 853 809 / 881
read + write 16 B 809 807

CPU, 256 MB:

memory seq write GB/s seq read GB/s random 4 B read random 64 B line
VirtualAlloc 29.4 40.1 2.5 ns 11.2 ns
VirtualAlloc + MEM_WRITE_WATCH, opened as a heap (window) 27.7 34.4 2.9 ns 13.5 ns
GPU_UPLOAD Map pointer 10.7 0.01 740 ns 4.8 µs

Typed texture writes (RWTexture2D<float4>, 64 MB): VRAM 1794 GB/s and GPU_UPLOAD (optimal layout) 1433 GB/s. A texture can't be placed in the process heap on this GPU (CrossAdapterRowMajorTextureSupported = false, E_INVALIDARG), so the image-write shape couldn't be measured there.

Not tested

  • Any title run (no game files). How much of the retail slow traffic is lane-contiguous Store2 / Store4, and how much the title's CPU reads its GPU heaps.
  • One GPU, one driver, Windows only, at PCIe x4. AMD and Intel.
  • The transposed store inside divergent control flow, with a partial wave, or with wave64 split onto two 32-lane halves. The check falls back there, so it doesn't speed them up, but I didn't measure them.
  • #1329 / XCL_UMA_SHADOW=1 itself.

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.
**@⁠milesah3ad** on GitHub · 2026-11-24 22:54 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7146775185) **A GPU_UPLOAD heap as the coherent window, measured on an RTX 5080 (no game files): it fixes the GPU write speed but makes CPU reads of that memory about 3,400× slower, removes the write watch, and puts title addresses where the driver maps them. A shader-side change, a wave-transposed `Store4`, gets the same write speed in the existing window (118× on this machine) with none of those costs.** This follows @⁠Ariorh1337's micro-benchmark above, and @⁠lucsoft's reproduction on RDNA3. **Setup:** RTX 5080 16 GB, driver 621.24, BAR1 16384 MiB (Resizable BAR on), `GPUUploadHeapSupported` = true. Ryzen 7 9800X3D, 64 GB, Windows 11 Pro 26300, DXC 1.9.2609.5 (`cs_6_6 -O3`). The card trains at **PCIe 5.0 x4** here (x16 max, checked under load), so contiguous traffic over the link stops at about 10–14 GB/s, against 52 GB/s on @⁠Ariorh1337's x16. A standalone probe (not XCL code) mirrors `real::open_uma`: committed `VirtualAlloc` with `MEM_WRITE_WATCH`, `OpenExistingHeapFromAddress`, and one placed buffer with `ALLOW_UNORDERED_ACCESS | ALLOW_CROSS_ADAPTER`. 64 threads per group, a grid-stride loop, GPU timestamps, best of 3–5. **The answers** 1. **GPU writes:** GPU_UPLOAD runs at VRAM speed for every shape (256 MB table). The process heap reproduces the drop on Blackwell: Store2, Store4, four `Store`s at +0/4/8/12 and read+write all fall to **0.10–0.29 GB/s**, the same as on the 5090 at x16. So the cost is per gapped store, not the link's bandwidth. 2. **CPU reads of a GPU_UPLOAD mapping:** `Map` gives write-combined memory (`VirtualQuery` Protect `0x404`). Plain sequential loads run at **0.01 GB/s**, a random 4 B read takes **740 ns** and a random 64 B line **4.8 µs**, against 34 GB/s / 2.9 ns / 13.5 ns for the current window. `MOVNTDQA` streaming loads reach 0.65 GB/s. Any title CPU read of its GPU heaps would pay this, and `GetWriteWatch` fails on the mapping, so `title_textures::refresh` would lose the CPU-write detection it uses on the window. 3. **Addresses:** every GPU VA here is below 2^40, GPU_UPLOAD included (highest `0x35fc00000` with 512 placed buffers). But the **CPU** mapping lands where the driver puts it (`0x1e9_22d3_0000` in my run, above 2^40), and D3D12 gives no way to choose it. The window layout (title address = CPU address at `base + k · 4 GiB`, `(addr >> 32) & 3`) can't hold there, and title addresses from the mapping would be above 2^40, which #585's BVH builder refuses. 4. **Size:** one GPU_UPLOAD heap of 4095 MB creates (exactly 4 GB is refused, like the process heap), and twelve 1 GB heaps were held at once (my ceiling). So GPU_UPLOAD can't replace the window as it stands. Two ways keep the memory where it is: **Shader-side: transpose `Store4` within the wave.** The slow case is a single store instruction whose lanes leave gaps. When a wave's 16 B lane elements form one contiguous run, the lanes can swap values so that each of four one-dword `Store`s covers a contiguous run of lanes. The probe's version checks that at run time (`WaveActiveAllTrue(a == first + 16 * lane)` with all lanes active) and otherwise falls back to `Store4`: ```hlsl uint a0 = WaveReadLaneFirst(a), lane = WaveGetLaneIndex(), cnt = WaveGetLaneCount(); if (WaveActiveAllTrue(a == a0 + 16u * lane) && WaveActiveCountBits(true) == cnt) { [unroll] for (uint k = 0; k < 4; k++) { uint j = k * cnt + lane, src = j >> 2, c = j & 3; uint4 s = uint4(WaveReadLaneAt(v.x, src), WaveReadLaneAt(v.y, src), WaveReadLaneAt(v.z, src), WaveReadLaneAt(v.w, src)); buf.Store(a0 + j * 4, c == 0 ? s.x : c == 1 ? s.y : c == 2 ? s.z : s.w); } } else buf.Store4(a, v); ``` Over 32 MB in the process heap: **333 ms → 2.82 ms (118×), all 2,097,152 elements correct** (checked on the CPU after the pass). In VRAM it took 0.016 ms against 0.031 ms for the plain `Store4`, so it costs nothing there. It only helps stores that are contiguous across the wave. A scatter, or a wave with inactive lanes in this version, takes the fallback. How much of the retail programs' slow traffic is that shape is the open question: `XCL_GPU_PROFILE`'s slow programs could be checked for `buffer_store_dwordx2/x4` / `global_store_dwordx4` with per-lane-linear addresses. **Staging through VRAM:** `Store4` into a VRAM buffer plus one `CopyBufferRegion` into the process heap took **2.74 ms** in total (the copy at 12–14 GB/s, x4-bound). #1329's `XCL_UMA_SHADOW=1` (a VRAM copy of the committed window, kept in step) is the complete form of that and already forces on Windows. A title run with it against the default would measure the whole-window version. **Tables** GPU, 32 MB, GB/s. The VRAM column fits in the 5080's L2, so compare VRAM with GPU_UPLOAD in the 256 MB table: | pass | VRAM | process heap (window) | GPU_UPLOAD | |---|---:|---:|---:| | read 16 B per lane | 3591 | 9.53 | 3603 | | read 4 B per lane | 2450 | 10 | 1589 | | write 4 B, lane i → dword i | 2185 | 10 | 1866 | | write 8 B per lane (`Store2`) | 1997 | **0.11** | 1613 | | write 16 B per lane (`Store4`) | 1073 | **0.10** | 913 | | four `Store`s at +0/4/8/12 | 1074 | **0.10** | 867 | | four `Store`s, lane i → dword i of each 256 B row | 2175 | 9.52 | 1771 | | read + write 16 B (both counted) | 1999 | **0.29** | 2422 | GPU, 256 MB, GB/s: | pass | VRAM | GPU_UPLOAD | |---|---:|---:| | read 16 B / 4 B per lane | 916 / 841 | 886 / 647 | | write 4 B / `Store2` / `Store4` | 938 / 866 / 826 | 807 / 868 / 829 | | four `Store`s +0/4/8/12 / four rows | 832 / 853 | 809 / 881 | | read + write 16 B | 809 | 807 | CPU, 256 MB: | memory | seq write GB/s | seq read GB/s | random 4 B read | random 64 B line | |---|---:|---:|---:|---:| | `VirtualAlloc` | 29.4 | 40.1 | 2.5 ns | 11.2 ns | | `VirtualAlloc` + `MEM_WRITE_WATCH`, opened as a heap (window) | 27.7 | 34.4 | 2.9 ns | 13.5 ns | | GPU_UPLOAD `Map` pointer | 10.7 | **0.01** | **740 ns** | **4.8 µs** | Typed texture writes (`RWTexture2D<float4>`, 64 MB): VRAM 1794 GB/s and GPU_UPLOAD (optimal layout) 1433 GB/s. A texture can't be placed in the process heap on this GPU (`CrossAdapterRowMajorTextureSupported` = false, `E_INVALIDARG`), so the image-write shape couldn't be measured there. **Not tested** - Any title run (no game files). How much of the retail slow traffic is lane-contiguous `Store2` / `Store4`, and how much the title's CPU reads its GPU heaps. - One GPU, one driver, Windows only, at PCIe x4. AMD and Intel. - The transposed store inside divergent control flow, with a partial wave, or with wave64 split onto two 32-lane halves. The check falls back there, so it doesn't speed them up, but I didn't measure them. - #1329 / `XCL_UMA_SHADOW=1` itself. **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.
Author
Owner

@⁠milesah3ad on GitHub · 2026-11-24 23:05 UTC · original

Plan, before any code: wave-transposed stores for wide per-lane stores. This follows up the 118× result in my report above, and @⁠kanade333 and @⁠Ariorh1337 have shown in title runs that this cliff is behind the stall. If someone is already on this, say so and I'll test theirs instead.

What it changes. A buffer_store_dwordx2/x3/x4 / global_store_dwordx* is translated per lane today, as mem.Store at +0 / +4 / +8 / +12 (emit.rs, the vector-store paths). In the direct DXIL backend the same happens in lower_mem.rs / lower_window.rs. Each of those store instructions leaves gaps across its lanes, which is the 0.10 GB/s shape in the coherent window. The new form runs one check per store in the wave: are all active lanes writing one contiguous run (addr == first_addr + stride * rank, full exec or a contiguous active range, same window)? If so, the lanes exchange components with WaveReadLaneAt so that store k writes dword k * W + lane of the run, and each instruction covers memory without gaps. If not, the per-lane stores run as today. Atomics, partial-exec gaps, d16 and format stores are left alone. On 32-lane GPUs this works per hardware wave, so it composes with split wave64.

Plan, one PR per step as CONTRIBUTING asks:

  1. HLSL backend, behind XCL_STORE_TRANSPOSE (off by default), with GPU tests: byte-exact results against the per-lane form for x2 / x3 / x4, full and partial exec, misaligned and non-contiguous addresses (the fallback), both windows, wave32 and split wave64. Plus a probe that times the store shapes in the coherent window and in VRAM.
  2. The same in the direct DXIL backend.
  3. On by default, if title smoke pairs (with and without XCL_COHERENT_HEAPS) show it helps. I'll need someone with the title for those.

Open question for anyone with a profile: how much of the slow traffic after #101 is this contiguous wide-store shape, and how much is image writes or truly scattered stores, which this doesn't touch? @⁠Ariorh1337's XCL_GPU_CULPRIT programs (80f65d19…, facc2a58…) would show it. A disassembly of their store instructions would tell us whether step 1 alone moves the title.

AI use: Claude Code (Claude Opus 5.5) drafted this from the measurements above.

**@⁠milesah3ad** on GitHub · 2026-11-24 23:05 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7146998037) **Plan, before any code: wave-transposed stores for wide per-lane stores.** This follows up the 118× result in my report above, and @⁠kanade333 and @⁠Ariorh1337 have shown in title runs that this cliff is behind the stall. If someone is already on this, say so and I'll test theirs instead. **What it changes.** A `buffer_store_dwordx2/x3/x4` / `global_store_dwordx*` is translated per lane today, as `mem.Store` at +0 / +4 / +8 / +12 (`emit.rs`, the vector-store paths). In the direct DXIL backend the same happens in `lower_mem.rs` / `lower_window.rs`. Each of those store instructions leaves gaps across its lanes, which is the 0.10 GB/s shape in the coherent window. The new form runs one check per store in the wave: are all active lanes writing one contiguous run (`addr == first_addr + stride * rank`, full exec or a contiguous active range, same window)? If so, the lanes exchange components with `WaveReadLaneAt` so that store `k` writes dword `k * W + lane` of the run, and each instruction covers memory without gaps. If not, the per-lane stores run as today. Atomics, partial-exec gaps, d16 and format stores are left alone. On 32-lane GPUs this works per hardware wave, so it composes with split wave64. **Plan, one PR per step as CONTRIBUTING asks:** 1. HLSL backend, behind `XCL_STORE_TRANSPOSE` (off by default), with GPU tests: byte-exact results against the per-lane form for x2 / x3 / x4, full and partial exec, misaligned and non-contiguous addresses (the fallback), both windows, wave32 and split wave64. Plus a probe that times the store shapes in the coherent window and in VRAM. 2. The same in the direct DXIL backend. 3. On by default, if title smoke pairs (with and without `XCL_COHERENT_HEAPS`) show it helps. I'll need someone with the title for those. **Open question for anyone with a profile:** how much of the slow traffic after `#101` is this contiguous wide-store shape, and how much is image writes or truly scattered stores, which this doesn't touch? @⁠Ariorh1337's `XCL_GPU_CULPRIT` programs (`80f65d19…`, `facc2a58…`) would show it. A disassembly of their store instructions would tell us whether step 1 alone moves the title. AI use: Claude Code (Claude Opus 5.5) drafted this from the measurements above.
Author
Owner

@⁠Ariorh1337 on GitHub · 2026-11-24 23:13 UTC · original

@⁠milesah3ad I had a local version of step 1 running in the title, so here is your open question answered. On this RTX 5090 the transposed stores are correct but do not move the stall: the slowest programs after #101 write images, and what makes them slow in the coherent window is reading it.

The change (local, HLSL backend, emit.rs). buffer_store_dwordx2/x3/x4, global_store_dwordx2/x3/x4, and 8- and 16-byte buffer_store_format_* take the transposed form when:

  • every lane of the hardware wave is active and in range;
  • the address is first + rank * 4n;
  • all lanes use one window.

Otherwise they fall back to the per-lane form. The check is your probe's. cargo test -p xcl --lib -- gpu::recomp: 230 passed, 0 failed, 3 SKIPPED (no wave64). The existing global_store_dwordx4 GPU test (lane-linear addresses, all lanes) goes through the fast path and checks every thread. Across the pack's 2 682 compute programs the changed sites are 1 944 x2/x3/x4 stores in 394 programs, plus the format stores in about 1 000. 1 004 CS_RaytracingResolve pipelines had to be rebuilt.

Title run 45 (heaps in the window, XCL_GPU_PROFILE), against run 40 without the change. Longest call per program:

program stores in it run 40 run 45
206ed63b96be21a1 1 image_store 2 730 ms 2 845 ms
50625695d2e6cbe7 4 image_store 1 217 ms 1 218 ms
c062dc1951d7dd69 3 image_store 430 ms 508 ms
1b5466f261a70cde 9 image_store, 1 buffer_store_format_xyzw, 1 atomic 403 ms 383 ms
56446569eccb04f0 1 buffer_store_format_xyzw, 1 atomic 232 ms 255 ms

Same stall: queue.Wait timeouts from 6 s after #101, then 0x887a0006. The images are PC textures in video memory (title_textures), so these programs' writes never reach the window.

What they do hit: dependent reads. I added a pass to the micro-benchmark: each lane does 256 dependent Loads inside a 4 KB block, like a ray march reading its constants.

memory time
VRAM 0.02 ms
GPU_UPLOAD 0.02 ms
process heap (window) 0.61 ms
process heap, PAGE_WRITECOMBINE 0.64 ms

That is about 2.4 µs per load, so these reads are not served from L2 and pay a PCIe round trip each. 50625695 and 206ed63b read the title's heaps in every loop iteration. PAGE_WRITECOMBINE on the heap memory also leaves the gapped-write cliff where it is (0.1 GB/s).

And the copy in video memory.

  • #1329 (XCL_UMA_SHADOW=1, applied on top) and my local XCL_COHERENT_HEAPS=sparse both make the GPU side fast, and both end at the title watchdog +0x23cf683.
  • The thread dumps show the title's submitting thread inside D3D12 (title_textures::refresh → upload_all, or try_gpu_wait → CreateFence). At the same moment another thread is in the NVIDIA driver in sparse::…UpdateTileMappings, mapping tiles for pages the title commits while the world streams in.
  • On top of that comes the write watch: 12 s of it in the first 40 s with #1329.

So step 1 is still worth having for titles that write buffers that way. For this one, the next thing is the CPU side of keeping the heaps in video memory: tile-mapping calls blocking submits, and the write-watch scan. I'm measuring UpdateTileMappings next. The emit.rs part is below if it saves you time on step 1. It applies to main b9b6ea6 as is: cargo test -p xcl --lib -- gpu::recomp there gives 197 passed, 0 failed. It has no switch, so it would need your XCL_STORE_TRANSPOSE gate, and it covers the HLSL backend only.

emit.rs diff (transposed stores, HLSL backend)
--- a/crates/xcl/src/gpu/recomp/emit.rs
+++ b/crates/xcl/src/gpu/recomp/emit.rs
@@ -1666,4 +1701,32 @@ impl Em {
     }
 
+    /// LOCAL ONLY (prototype): a store of `regs.len()` dwords per lane. NVIDIA's GPU writes to a
+    /// heap over process memory (the coherent window) at ~0.1 GB/s when one store instruction
+    /// leaves gaps between its lanes' dwords – the per-lane `mem.Store` at +0/+4/+8/+12 of a
+    /// dwordx4 – and at ~50 GB/s when its lanes write consecutive dwords. When every lane of the
+    /// hardware wave is active and in range, in one window, and lane `l` writes `base + l * n * 4`,
+    /// the wave writes the same bytes with consecutive dwords per store (`WaveReadLaneAt` picks
+    /// the value); otherwise `per_lane` as before.
+    fn transposed_store(&mut self, t: &str, act: &str, all_ok: &str, addr: &str, regs: &[String], per_lane: &str) {
+        let n = regs.len();
+        let one_window = if self.opt.mem_windows > 1 { "WaveActiveAllEqual(xcl_w)" } else { "true" };
+        self.line(&format!("uint {t}_tb = WaveReadLaneFirst({addr});"));
+        self.line(&format!(
+            "bool {t}_tr = WaveActiveCountBits(true) == WaveGetLaneCount() && WaveActiveAllTrue(and(and({act}, {all_ok}), {addr} == {t}_tb + WaveGetLaneIndex() * {}u)) && {one_window};",
+            4 * n
+        ));
+        self.line(&format!("if ({t}_tr) {{"));
+        self.line(&format!("    uint {t}_tn = WaveGetLaneCount(); uint {t}_tl = WaveGetLaneIndex();"));
+        for k in 0..n {
+            self.line(&format!("    {{ uint {t}_d = {k}u * {t}_tn + {t}_tl; uint {t}_s = {t}_d / {n}u; uint {t}_c = {t}_d % {n}u;"));
+            let mut pick = format!("WaveReadLaneAt({}, {t}_s)", regs[n - 1]);
+            for c in (0..n - 1).rev() {
+                pick = format!("select({t}_c == {c}u, WaveReadLaneAt({}, {t}_s), {pick})", regs[c]);
+            }
+            self.line(&format!("      mem.Store({t}_tb + {t}_d * 4u, {pick}); }}"));
+        }
+        self.line(&format!("}} else {{ {per_lane} }}"));
+    }
+
     /// MUBUF / MTBUF: raw loads and stores, typed (format) loads.
     fn mubuf(&mut self, d: &Decoded, name: &str) -> Result<(), &'static str> {
@@ -1773,5 +1836,12 @@ impl Em {
                     st.push(format!("if ({ok}) mem.Store(({t}_a + {}u) & ~3u, {v});", 4 * i));
                 }
-                self.line(&format!("if ({act}) {{ {} }}", st.join(" ")));
+                let per_lane = format!("if ({act}) {{ {} }}", st.join(" "));
+                if count > 1 {
+                    let regs: Vec<String> = (0..count).map(|i| self.vreg(vdata + i)).collect();
+                    let all_ok = in_range(format!("{}u", 4 * count));
+                    self.transposed_store(&t, &act, &all_ok, &format!("({t}_a & ~3u)"), &regs, &per_lane);
+                } else {
+                    self.line(&per_lane);
+                }
             }
             BufKind::FormatLoad => {
@@ -1829,5 +1899,16 @@ impl Em {
                 }
                 let vals: Vec<String> = (0..4).map(|i| if i < count { self.vreg(vdata + i) } else { "0u".into() }).collect();
-                self.line(&format!("if (and({act}, {t}_ok)) st_bytes({t}_a, fmt_pack(uint4({}), {t}_info), fmt_bytes({t}_info));", vals.join(", ")));
+                // LOCAL ONLY (prototype): 8- and 16-byte formats as `transposed_store`
+                self.line(&format!("uint4 {t}_pk = fmt_pack(uint4({}), {t}_info); uint {t}_nb = fmt_bytes({t}_info);", vals.join(", ")));
+                let per_lane = format!("if (and({act}, {t}_ok)) st_bytes({t}_a, {t}_pk, {t}_nb);");
+                let lane_ok = format!("and({act}, {t}_ok)");
+                let aligned = format!("(({t}_a & 3u) == 0u)");
+                self.line(&format!("if (WaveActiveAllEqual({t}_nb) && {t}_nb == 16u) {{"));
+                let regs4: Vec<String> = ["x", "y", "z", "w"].iter().map(|c| format!("{t}_pk.{c}")).collect();
+                self.transposed_store(&format!("{t}q"), &lane_ok, &aligned, &format!("{t}_a"), &regs4, &per_lane);
+                self.line(&format!("}} else if (WaveActiveAllEqual({t}_nb) && {t}_nb == 8u) {{"));
+                let regs2: Vec<String> = ["x", "y"].iter().map(|c| format!("{t}_pk.{c}")).collect();
+                self.transposed_store(&format!("{t}h"), &lane_ok, &aligned, &format!("{t}_a"), &regs2, &per_lane);
+                self.line(&format!("}} else {{ {per_lane} }}"));
             }
         }
@@ -3838,5 +3922,11 @@ impl Em {
             }
         }
-        self.line(&format!("if ({act}) {{ {} }}", st.join(" ")));
+        let per_lane = format!("if ({act}) {{ {} }}", st.join(" "));
+        if store && count > 1 {
+            let regs: Vec<String> = (0..count).map(|i| self.vreg(f("DATA") + i)).collect();
+            self.transposed_store(&t, &act, "true", &format!("({t}_a & ~3u)"), &regs, &per_lane);
+        } else {
+            self.line(&per_lane);
+        }
         Ok(())
     }

Not tested: the direct DXIL backend; AMD; repeat runs.

AI use: Claude Code (Claude Opus 5.5) wrote the change, the benchmark passes and this comment, and ran the runs on my machine. I checked it before posting.

**@⁠Ariorh1337** on GitHub · 2026-11-24 23:13 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7147165525) @⁠milesah3ad I had a local version of step 1 running in the title, so here is your open question answered. **On this RTX 5090 the transposed stores are correct but do not move the stall: the slowest programs after `#101` write images, and what makes them slow in the coherent window is reading it.** **The change (local, HLSL backend, `emit.rs`).** `buffer_store_dwordx2/x3/x4`, `global_store_dwordx2/x3/x4`, and 8- and 16-byte `buffer_store_format_*` take the transposed form when: - every lane of the hardware wave is active and in range; - the address is `first + rank * 4n`; - all lanes use one window. Otherwise they fall back to the per-lane form. The check is your probe's. `cargo test -p xcl --lib -- gpu::recomp`: 230 passed, 0 failed, 3 SKIPPED (no wave64). The existing `global_store_dwordx4` GPU test (lane-linear addresses, all lanes) goes through the fast path and checks every thread. Across the pack's 2 682 compute programs the changed sites are 1 944 x2/x3/x4 stores in 394 programs, plus the format stores in about 1 000. 1 004 `CS_RaytracingResolve` pipelines had to be rebuilt. **Title run 45** (heaps in the window, `XCL_GPU_PROFILE`), against run 40 without the change. Longest call per program: | program | stores in it | run 40 | run 45 | |---|---|---|---| | `206ed63b96be21a1` | 1 `image_store` | 2 730 ms | 2 845 ms | | `50625695d2e6cbe7` | 4 `image_store` | 1 217 ms | 1 218 ms | | `c062dc1951d7dd69` | 3 `image_store` | 430 ms | 508 ms | | `1b5466f261a70cde` | 9 `image_store`, 1 `buffer_store_format_xyzw`, 1 atomic | 403 ms | 383 ms | | `56446569eccb04f0` | 1 `buffer_store_format_xyzw`, 1 atomic | 232 ms | 255 ms | Same stall: queue.Wait timeouts from 6 s after `#101`, then `0x887a0006`. The images are PC textures in video memory (`title_textures`), so these programs' writes never reach the window. **What they do hit: dependent reads.** I added a pass to the micro-benchmark: each lane does 256 dependent `Load`s inside a 4 KB block, like a ray march reading its constants. | memory | time | |---|---| | VRAM | 0.02 ms | | `GPU_UPLOAD` | 0.02 ms | | process heap (window) | 0.61 ms | | process heap, `PAGE_WRITECOMBINE` | 0.64 ms | That is about 2.4 µs per load, so these reads are not served from L2 and pay a PCIe round trip each. `50625695` and `206ed63b` read the title's heaps in every loop iteration. `PAGE_WRITECOMBINE` on the heap memory also leaves the gapped-write cliff where it is (0.1 GB/s). **And the copy in video memory.** - #1329 (`XCL_UMA_SHADOW=1`, applied on top) and my local `XCL_COHERENT_HEAPS=sparse` both make the GPU side fast, and both end at the title watchdog `+0x23cf683`. - The thread dumps show the title's submitting thread inside D3D12 (`title_textures::refresh` → `upload_all`, or `try_gpu_wait` → `CreateFence`). At the same moment another thread is in the NVIDIA driver in `sparse::…UpdateTileMappings`, mapping tiles for pages the title commits while the world streams in. - On top of that comes the write watch: 12 s of it in the first 40 s with #1329. So step 1 is still worth having for titles that write buffers that way. For this one, the next thing is the CPU side of keeping the heaps in video memory: tile-mapping calls blocking submits, and the write-watch scan. I'm measuring `UpdateTileMappings` next. The `emit.rs` part is below if it saves you time on step 1. It applies to `main` `b9b6ea6` as is: `cargo test -p xcl --lib -- gpu::recomp` there gives 197 passed, 0 failed. It has no switch, so it would need your `XCL_STORE_TRANSPOSE` gate, and it covers the HLSL backend only. <details><summary>emit.rs diff (transposed stores, HLSL backend)</summary> ```diff --- a/crates/xcl/src/gpu/recomp/emit.rs +++ b/crates/xcl/src/gpu/recomp/emit.rs @@ -1666,4 +1701,32 @@ impl Em { } + /// LOCAL ONLY (prototype): a store of `regs.len()` dwords per lane. NVIDIA's GPU writes to a + /// heap over process memory (the coherent window) at ~0.1 GB/s when one store instruction + /// leaves gaps between its lanes' dwords – the per-lane `mem.Store` at +0/+4/+8/+12 of a + /// dwordx4 – and at ~50 GB/s when its lanes write consecutive dwords. When every lane of the + /// hardware wave is active and in range, in one window, and lane `l` writes `base + l * n * 4`, + /// the wave writes the same bytes with consecutive dwords per store (`WaveReadLaneAt` picks + /// the value); otherwise `per_lane` as before. + fn transposed_store(&mut self, t: &str, act: &str, all_ok: &str, addr: &str, regs: &[String], per_lane: &str) { + let n = regs.len(); + let one_window = if self.opt.mem_windows > 1 { "WaveActiveAllEqual(xcl_w)" } else { "true" }; + self.line(&format!("uint {t}_tb = WaveReadLaneFirst({addr});")); + self.line(&format!( + "bool {t}_tr = WaveActiveCountBits(true) == WaveGetLaneCount() && WaveActiveAllTrue(and(and({act}, {all_ok}), {addr} == {t}_tb + WaveGetLaneIndex() * {}u)) && {one_window};", + 4 * n + )); + self.line(&format!("if ({t}_tr) {{")); + self.line(&format!(" uint {t}_tn = WaveGetLaneCount(); uint {t}_tl = WaveGetLaneIndex();")); + for k in 0..n { + self.line(&format!(" {{ uint {t}_d = {k}u * {t}_tn + {t}_tl; uint {t}_s = {t}_d / {n}u; uint {t}_c = {t}_d % {n}u;")); + let mut pick = format!("WaveReadLaneAt({}, {t}_s)", regs[n - 1]); + for c in (0..n - 1).rev() { + pick = format!("select({t}_c == {c}u, WaveReadLaneAt({}, {t}_s), {pick})", regs[c]); + } + self.line(&format!(" mem.Store({t}_tb + {t}_d * 4u, {pick}); }}")); + } + self.line(&format!("}} else {{ {per_lane} }}")); + } + /// MUBUF / MTBUF: raw loads and stores, typed (format) loads. fn mubuf(&mut self, d: &Decoded, name: &str) -> Result<(), &'static str> { @@ -1773,5 +1836,12 @@ impl Em { st.push(format!("if ({ok}) mem.Store(({t}_a + {}u) & ~3u, {v});", 4 * i)); } - self.line(&format!("if ({act}) {{ {} }}", st.join(" "))); + let per_lane = format!("if ({act}) {{ {} }}", st.join(" ")); + if count > 1 { + let regs: Vec<String> = (0..count).map(|i| self.vreg(vdata + i)).collect(); + let all_ok = in_range(format!("{}u", 4 * count)); + self.transposed_store(&t, &act, &all_ok, &format!("({t}_a & ~3u)"), &regs, &per_lane); + } else { + self.line(&per_lane); + } } BufKind::FormatLoad => { @@ -1829,5 +1899,16 @@ impl Em { } let vals: Vec<String> = (0..4).map(|i| if i < count { self.vreg(vdata + i) } else { "0u".into() }).collect(); - self.line(&format!("if (and({act}, {t}_ok)) st_bytes({t}_a, fmt_pack(uint4({}), {t}_info), fmt_bytes({t}_info));", vals.join(", "))); + // LOCAL ONLY (prototype): 8- and 16-byte formats as `transposed_store` + self.line(&format!("uint4 {t}_pk = fmt_pack(uint4({}), {t}_info); uint {t}_nb = fmt_bytes({t}_info);", vals.join(", "))); + let per_lane = format!("if (and({act}, {t}_ok)) st_bytes({t}_a, {t}_pk, {t}_nb);"); + let lane_ok = format!("and({act}, {t}_ok)"); + let aligned = format!("(({t}_a & 3u) == 0u)"); + self.line(&format!("if (WaveActiveAllEqual({t}_nb) && {t}_nb == 16u) {{")); + let regs4: Vec<String> = ["x", "y", "z", "w"].iter().map(|c| format!("{t}_pk.{c}")).collect(); + self.transposed_store(&format!("{t}q"), &lane_ok, &aligned, &format!("{t}_a"), &regs4, &per_lane); + self.line(&format!("}} else if (WaveActiveAllEqual({t}_nb) && {t}_nb == 8u) {{")); + let regs2: Vec<String> = ["x", "y"].iter().map(|c| format!("{t}_pk.{c}")).collect(); + self.transposed_store(&format!("{t}h"), &lane_ok, &aligned, &format!("{t}_a"), &regs2, &per_lane); + self.line(&format!("}} else {{ {per_lane} }}")); } } @@ -3838,5 +3922,11 @@ impl Em { } } - self.line(&format!("if ({act}) {{ {} }}", st.join(" "))); + let per_lane = format!("if ({act}) {{ {} }}", st.join(" ")); + if store && count > 1 { + let regs: Vec<String> = (0..count).map(|i| self.vreg(f("DATA") + i)).collect(); + self.transposed_store(&t, &act, "true", &format!("({t}_a & ~3u)"), &regs, &per_lane); + } else { + self.line(&per_lane); + } Ok(()) } ``` </details> **Not tested:** the direct DXIL backend; AMD; repeat runs. **AI use:** Claude Code (Claude Opus 5.5) wrote the change, the benchmark passes and this comment, and ran the runs on my machine. I checked it before posting.
Author
Owner

@⁠treybertram06 on GitHub · 2026-11-24 23:16 UTC · original

@⁠Krashgamer, about your #1791 result in #1452 (no bridged wait timing out in 240 s once 9486494 is in). On this machine the waits still time out on plain main with #1791. None of the settings that differ between our trees removes them, so the fix on your side may depend on one of your extra PRs (#640, #742, #800, #1055, #1102, #1765, #1580), or on the driver.

Setup: RTX 3080 10 GB, driver 621.01 (yours: 610.88), Ryzen 9 5900X, 64 GB, Windows 11 Pro 26300, release. Tree: main c4d37be (contains 9486494 and #1747) + #1478, plus a local cap that refuses programs over 8 MB of HLSL (two programs) and two log lines. Warm caches, A pressed every 5 s from 10 s to 60 s. One run per row.

change from the first row waits released on the CPU device removal
XCL_HEAP_WINDOWS=1, XCL_DRED=1 53 by 171 s 0x887a0005 at 171 s
+ XCL_PSO_WAIT_MS=50 9 by 120 s 0x887a0005 at 120 s
+ XCL_PSO_WAIT_MS=50, heap windows off 47 by 290 s none by 290 s (stopped)
+ XCL_PSO_WAIT_MS=50, DRED off 7 by 137 s 0x887a0005 at 137 s
+ XCL_PSO_WAIT_MS=50, DRED off, XCL_DIRECT_DXIL=1 95 by 329 s none by 329 s (stopped)

Every timeout has the same form as in your graph before #1791: the producer's signal is submitted but one short, e.g. prod=qSome(3)/tySome(0), recorded=0x614, submitted=0x614, completed=0x613 (heap windows off). #1580 is not in this tree, so I have no graph of what q3 waits behind here.

Not tested: #640 / #742 / #800 / #1055 / #1102 / #1765 on top, one at a time, which is my next step unless you already know which one it is; driver 610.88; the switch form without XCL_PSO_WAIT_MS; more than one run per row.

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

**@⁠treybertram06** on GitHub · 2026-11-24 23:16 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7147207331) @⁠Krashgamer, about your #1791 result in #1452 (no bridged wait timing out in 240 s once `9486494` is in). On this machine the waits still time out on plain `main` with #1791. None of the settings that differ between our trees removes them, so the fix on your side may depend on one of your extra PRs (#640, #742, #800, #1055, #1102, #1765, #1580), or on the driver. **Setup:** RTX 3080 10 GB, driver **621.01** (yours: 610.88), Ryzen 9 5900X, 64 GB, Windows 11 Pro 26300, release. Tree: `main` `c4d37be` (contains `9486494` and #1747) + #1478, plus a local cap that refuses programs over 8 MB of HLSL (two programs) and two log lines. Warm caches, A pressed every 5 s from 10 s to 60 s. One run per row. | change from the first row | waits released on the CPU | device removal | |---|---|---| | `XCL_HEAP_WINDOWS=1`, `XCL_DRED=1` | 53 by 171 s | `0x887a0005` at 171 s | | + `XCL_PSO_WAIT_MS=50` | 9 by 120 s | `0x887a0005` at 120 s | | + `XCL_PSO_WAIT_MS=50`, heap windows off | 47 by 290 s | none by 290 s (stopped) | | + `XCL_PSO_WAIT_MS=50`, DRED off | 7 by 137 s | `0x887a0005` at 137 s | | + `XCL_PSO_WAIT_MS=50`, DRED off, `XCL_DIRECT_DXIL=1` | 95 by 329 s | none by 329 s (stopped) | Every timeout has the same form as in your graph before #1791: the producer's signal is submitted but one short, e.g. `prod=qSome(3)/tySome(0), recorded=0x614, submitted=0x614, completed=0x613` (heap windows off). `#1580` is not in this tree, so I have no graph of what q3 waits behind here. **Not tested:** #640 / #742 / #800 / #1055 / #1102 / #1765 on top, one at a time, which is my next step unless you already know which one it is; driver 610.88; the switch form without `XCL_PSO_WAIT_MS`; more than one run per row. AI use: Claude Code (Claude Opus 5.5) ran the runs and wrote this comment.
Author
Owner

@⁠tylerstraub on GitHub · 2026-11-24 23:23 UTC · original

Linux / RTX 5090 (Wine + vkd3d-proton): the write cliff and the dependent-read cost both reproduce here. On Linux the whole coherent window can be put in CPU-visible VRAM at the title's own address with no XCL change, so I ran the title that way. It confirms @⁠milesah3ad's costs in practice: every frame black, then 1–2 presents per second once textures are read back. An RDNA2 integrated GPU on the same machine shows no cliff at all.

Setup: RTX 5090 32 GB (NVIDIA 595.99.02, 32-lane waves, PCIe 5.0 x16 capable; link speed under load not sampled), Ryzen 9 9950X3D with its integrated Radeon (RDNA2, RADV, Mesa 26.0.8), 89 GiB RAM, Ubuntu 26.04.1, kernel 7.0.0-43. Proton Experimental 11.0-20261112, vkd3d-proton 3.1 with the relaxed patch and dxil-spirv 53aac41, DXC 1.9.2609.5, release, cross-built for x86_64-pc-windows-gnu. Tree: main c4d37be + #751 + #822 + #1435. Title runs used XCL_HEAP_WINDOWS=1 XCL_UMA_WINDOWS=16 XCL_PSO_WAIT_MS=50 XCL_NETWORK=0, TitleId 7952987A.

1. Micro-benchmark. A local test in the lib suite, not a PR. One compute pass over 16 MiB, [numthreads(64,1,1)], root UAV, GPU timestamps, best of 3. The process heap is VirtualAlloc + OpenExistingHeapFromAddress + a placed ALLOW_CROSS_ADAPTER buffer, as in real::open_uma. GB/s, except the last row.

pass 5090 VRAM 5090 process heap 5090 process heap, layer (below) 5090 GPU_UPLOAD iGPU process heap
read 16 B per lane 1,675 53 1,675 1,675 63
write 4 B per lane, contiguous 516 50 516 516 64
write 8 B per lane (Store2) 1,040 0.14 1,038 1,040 65
write 16 B per lane (Store4) 1,670 0.10 1,675 1,675 65
four Stores at +0/4/8/12 1,675 0.10 1,675 1,675 36
four Stores, contiguous rows 1,675 45 1,675 1,820 64
read + write 16 B per lane 1,675 0.10 1,675 1,675 39
256 dependent reads per lane in a 4 KiB block 0.024 ms 0.697 ms 0.028 ms 0.028 ms 5.6 ms (5.2 ms in VRAM)
  • The 5090 columns match the Windows figures above, so this is not a Windows driver quirk. MEM_WRITE_WATCH made no difference. A second vkd3d-proton build gave the same 0.10 GB/s.
  • On the integrated Radeon all four placements run at the same speed. It is slow, but it has no bus between GPU and RAM and no cliff. That fits the PCIe round-trip reading.

2. The window in VRAM at the title's address. @⁠milesah3ad's point 3 is that D3D12 gives no way to choose where a GPU_UPLOAD mapping lands. Vulkan does (VK_EXT_map_memory_placed), but Wine does not offer it to Windows code. A small Vulkan layer loaded on the host side of Wine enables it at the driver. When vkd3d-proton imports process memory for OpenExistingHeapFromAddress, the layer allocates device-local, host-visible memory instead, copies in the bytes already at that address, and maps it there. XCL and vkd3d-proton are unchanged, UMA import check: ok still passes, and XCL's 25 memory tests pass with it on the 5090. That is the "process heap, layer" column.

3. Title runs with the whole 4095 MB window converted (one run per row, same executable and warm cache as the control unless noted):

run change presents picture end
control none menus shown; story files opened; 6,874 dispatches (427 skipped) menus, loading art read fault at address 0x8 at about 122 s
A layer only 60 per 2 s for the full 360 s black in every sampled frame, account prompt never shown clean exit at the time limit; no removal, no Xid, no story file opened, 0 dispatches
B layer + a local switch that treats the window's textures as possibly written (64 samples of 64 B per texture, at most every 100 ms), cold cache 61 per 2 s briefly, then 2–4 black through frame 440 (the control has a picture by frame 320) title write to address 0 at +0x2215c35 at the 360 s limit
  • Run A is what losing GetWriteWatch on the mapping predicts: title_textures::refresh never sees a CPU write.
  • Run B did not bring the picture back, so the missing write watch is not the whole explanation, and I don't know what else is. The slowdown is consistent with the CPU reading textures back from write-combined memory.
  • Neither run opened a story file or ran a dispatch, so this says nothing about the stall itself.

4. One driver limit worth knowing for any design that shares memory. On this driver vkGetImageMemoryRequirements returns memory types 0x3 (neither host-visible) for optimal-tiled colour targets, depth targets, storage images and BC7. Linear images and buffers return 0x1f. So only buffers and linear images can alias CPU-visible memory here, in system memory or in VRAM.

Not tested

  • The stall with the window in VRAM (no run got that far), #1329 / XCL_UMA_SHADOW=1, XCL_COHERENT_HEAPS=0, the transposed stores.
  • Why run B stays black.
  • Windows on this machine, a discrete Radeon, repeat title runs, main newer than c4d37be.
  • Link speed under load.

The layer (about 330 lines of C) and the benchmark source are available if anyone wants them. Say so and I'll put them in a gist or a draft PR under scripts/linux.

AI use: Claude Code (Claude Fable 5.2) wrote the layer and the benchmark, ran everything on the machine above, and wrote and posted this comment at my request.

**@⁠tylerstraub** on GitHub · 2026-11-24 23:23 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7147351097) **Linux / RTX 5090 (Wine + vkd3d-proton): the write cliff and the dependent-read cost both reproduce here. On Linux the whole coherent window can be put in CPU-visible VRAM at the title's own address with no XCL change, so I ran the title that way. It confirms @⁠milesah3ad's costs in practice: every frame black, then 1–2 presents per second once textures are read back. An RDNA2 integrated GPU on the same machine shows no cliff at all.** **Setup:** RTX 5090 32 GB (NVIDIA 595.99.02, 32-lane waves, PCIe 5.0 x16 capable; link speed under load not sampled), Ryzen 9 9950X3D with its integrated Radeon (RDNA2, RADV, Mesa 26.0.8), 89 GiB RAM, Ubuntu 26.04.1, kernel 7.0.0-43. Proton Experimental 11.0-20261112, vkd3d-proton 3.1 with the relaxed patch and dxil-spirv `53aac41`, DXC 1.9.2609.5, release, cross-built for `x86_64-pc-windows-gnu`. Tree: `main` `c4d37be` + #751 + #822 + #1435. Title runs used `XCL_HEAP_WINDOWS=1 XCL_UMA_WINDOWS=16 XCL_PSO_WAIT_MS=50 XCL_NETWORK=0`, TitleId 7952987A. **1. Micro-benchmark.** A local test in the lib suite, not a PR. One compute pass over 16 MiB, `[numthreads(64,1,1)]`, root UAV, GPU timestamps, best of 3. The process heap is `VirtualAlloc` + `OpenExistingHeapFromAddress` + a placed `ALLOW_CROSS_ADAPTER` buffer, as in `real::open_uma`. GB/s, except the last row. | pass | 5090 VRAM | 5090 process heap | 5090 process heap, layer (below) | 5090 GPU_UPLOAD | iGPU process heap | |---|---:|---:|---:|---:|---:| | read 16 B per lane | 1,675 | 53 | 1,675 | 1,675 | 63 | | write 4 B per lane, contiguous | 516 | 50 | 516 | 516 | 64 | | write 8 B per lane (`Store2`) | 1,040 | **0.14** | 1,038 | 1,040 | 65 | | write 16 B per lane (`Store4`) | 1,670 | **0.10** | 1,675 | 1,675 | 65 | | four `Store`s at +0/4/8/12 | 1,675 | **0.10** | 1,675 | 1,675 | 36 | | four `Store`s, contiguous rows | 1,675 | 45 | 1,675 | 1,820 | 64 | | read + write 16 B per lane | 1,675 | **0.10** | 1,675 | 1,675 | 39 | | 256 dependent reads per lane in a 4 KiB block | 0.024 ms | **0.697 ms** | 0.028 ms | 0.028 ms | 5.6 ms (5.2 ms in VRAM) | - The 5090 columns match the Windows figures above, so this is not a Windows driver quirk. `MEM_WRITE_WATCH` made no difference. A second vkd3d-proton build gave the same 0.10 GB/s. - On the integrated Radeon all four placements run at the same speed. It is slow, but it has no bus between GPU and RAM and no cliff. That fits the PCIe round-trip reading. **2. The window in VRAM at the title's address.** @⁠milesah3ad's point 3 is that D3D12 gives no way to choose where a GPU_UPLOAD mapping lands. Vulkan does (`VK_EXT_map_memory_placed`), but Wine does not offer it to Windows code. A small Vulkan layer loaded on the host side of Wine enables it at the driver. When vkd3d-proton imports process memory for `OpenExistingHeapFromAddress`, the layer allocates device-local, host-visible memory instead, copies in the bytes already at that address, and maps it there. XCL and vkd3d-proton are unchanged, `UMA import check: ok` still passes, and XCL's 25 `memory` tests pass with it on the 5090. That is the "process heap, layer" column. **3. Title runs with the whole 4095 MB window converted** (one run per row, same executable and warm cache as the control unless noted): | run | change | presents | picture | end | |---|---|---|---|---| | control | none | menus shown; story files opened; 6,874 dispatches (427 skipped) | menus, loading art | read fault at address 0x8 at about 122 s | | A | layer only | 60 per 2 s for the full 360 s | **black in every sampled frame**, account prompt never shown | clean exit at the time limit; no removal, no Xid, no story file opened, 0 dispatches | | B | layer + a local switch that treats the window's textures as possibly written (64 samples of 64 B per texture, at most every 100 ms), cold cache | 61 per 2 s briefly, then 2–4 | black through frame 440 (the control has a picture by frame 320) | title write to address 0 at `+0x2215c35` at the 360 s limit | - Run A is what losing `GetWriteWatch` on the mapping predicts: `title_textures::refresh` never sees a CPU write. - Run B did **not** bring the picture back, so the missing write watch is not the whole explanation, and I don't know what else is. The slowdown is consistent with the CPU reading textures back from write-combined memory. - Neither run opened a story file or ran a dispatch, so this says nothing about the stall itself. **4. One driver limit worth knowing for any design that shares memory.** On this driver `vkGetImageMemoryRequirements` returns memory types `0x3` (neither host-visible) for optimal-tiled colour targets, depth targets, storage images and BC7. Linear images and buffers return `0x1f`. So only buffers and linear images can alias CPU-visible memory here, in system memory or in VRAM. **Not tested** - The stall with the window in VRAM (no run got that far), #1329 / `XCL_UMA_SHADOW=1`, `XCL_COHERENT_HEAPS=0`, the transposed stores. - Why run B stays black. - Windows on this machine, a discrete Radeon, repeat title runs, `main` newer than `c4d37be`. - Link speed under load. The layer (about 330 lines of C) and the benchmark source are available if anyone wants them. Say so and I'll put them in a gist or a draft PR under `scripts/linux`. **AI use:** Claude Code (Claude Fable 5.2) wrote the layer and the benchmark, ran everything on the machine above, and wrote and posted this comment at my request.
Author
Owner

@⁠not-rex on GitHub · 2026-11-24 23:36 UTC · original

Result for the DirectStorage check in my follow-up above (RTX 3080, split-wave64 programs refused, XCL_PSO_WAIT_MS=50, warm caches, A at 30/40 s, 400 s, one run each):

refused + #816 (tracing) refused + #1405 + #1464
DirectStorage requests / failed 129,745 / 10 144,418 / 0
presents after #101 82, last at 328.2 s 199 (~1 per 2 s), last at 398.2 s
GPU queue.Wait … 5000 ms timeouts 36 23
end 0xC0000005 at +0x108557 (read at 0x8) at 327.2 s normal end at 400 s, no fault, no watchdog
  • With #816 all 10 failures came in one 2 s window at ~70 s, before #101: one 8 KB read of a VFX .ttpf file failing with 0x89240009. None after #101, so on this run the map-types fault I described didn't reproduce, and a different one (+0x108557) ended it. The earlier runs' 433-849 failures didn't recur either.
  • The second tree survived the full 400 s with 0 failed requests, the first run here to do so in the world. But #1464 sits on a newer main and brought ~40 commits with it (among them #1127, #1223, #1224 for DirectStorage cancel/error records, #1289/#1290 for stream and root-constant bounds), so I can't pin the improvement on #1405/#1464 alone.

So: no evidence yet that failed reads cause the +0x4e8b300 faults; next I'll rerun on current main (which now has #1288 and #1791) to separate the newer base from the two PRs.

AI use: Claude Code (Claude Opus 5.5) ran the runs on my machine and wrote this.

**@⁠not-rex** on GitHub · 2026-11-24 23:36 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7147584468) Result for the DirectStorage check in my follow-up above (RTX 3080, split-wave64 programs refused, `XCL_PSO_WAIT_MS=50`, warm caches, A at 30/40 s, 400 s, one run each): | | refused + #816 (tracing) | refused + #1405 + #1464 | |---|---|---| | DirectStorage requests / failed | 129,745 / 10 | 144,418 / 0 | | presents after `#101` | 82, last at 328.2 s | 199 (~1 per 2 s), last at 398.2 s | | `GPU queue.Wait … 5000 ms` timeouts | 36 | 23 | | end | `0xC0000005` at `+0x108557` (read at `0x8`) at 327.2 s | normal end at 400 s, no fault, no watchdog | - With #816 all 10 failures came in one 2 s window at ~70 s, before `#101`: one 8 KB read of a VFX `.ttpf` file failing with `0x89240009`. None after `#101`, so on this run the map-types fault I described didn't reproduce, and a different one (`+0x108557`) ended it. The earlier runs' 433-849 failures didn't recur either. - The second tree survived the full 400 s with 0 failed requests, the first run here to do so in the world. But #1464 sits on a newer `main` and brought ~40 commits with it (among them #1127, #1223, #1224 for DirectStorage cancel/error records, #1289/#1290 for stream and root-constant bounds), so I can't pin the improvement on #1405/#1464 alone. So: no evidence yet that failed reads cause the `+0x4e8b300` faults; next I'll rerun on current `main` (which now has #1288 and #1791) to separate the newer base from the two PRs. AI use: Claude Code (Claude Opus 5.5) ran the runs on my machine and wrote this.
Author
Owner

@⁠joeypercia on GitHub · 2026-11-24 21:07 UTC · original · edited 2026-11-24 23:37 UTC

RTX 4070 Ti: XCL_GPU_CULPRIT names cs a9f2cd53943d5dc4 as the one dispatch started and not done, with #917 and #1252 merged and default settings. In @⁠cafeoh's table above, this hash only appears with XCL_WAVE64_SPIN=0, and #917 cleared the culprit.

Setup: RTX 4070 Ti 12 GB (Ada, 32-lane waves), driver 616.56, Ryzen 7 7800X3D, 32 GB RAM, 64–96 GB page file, Windows 11 Pro 26200, release. Retail 1.0.2.1 from an NVMe SSD. XCL_HEAP_WINDOWS=1 XCL_GPU_CULPRIT=1, A scripted with XCL_PRESS_AT, no XCL_PSO_WAIT_MS, no XCL_WAVE64_SPIN set. Tree: main 9e3831e + #1323, #1288, #742, #1464, #1405, #1448 (with #1316/#1315) and #1321 (rebased locally), with and without #917 (3297633) + #1252 (2473e2f). One run each.

without #917/#1252 with #917 + #1252
#101 89–108 s 108 s
last frames ~100 s ~103 s
culprit 1 of 81 lists: #10542: cs a9f2cd53943d5dc4, groups 16x16x16 (119 s) 1 of 77 lists: #10848: cs a9f2cd53943d5dc4, groups 16x16x16 (132 s)
GPU queue.Wait timeouts (5 min) 7 4

The program (xcl shaders shaders.rpf --export-hlsl <dir> --record-hash a9f2cd53943d5dc4 --split 1): WindNew:CS_CopyLatestWindFieldForRenderingWithSmooth_c7e8e0cb_Wrapped, a 7 KB container that becomes 408 KB of HLSL. It has numthreads(4, 4, 4), a 3-D group of one console wave (XCL_X_WAVES 1), and the meets are still the spin form (XCL_X_SPIN 1). Its loop calls xcl_x_ballot at almost every branch (59 s_cbranch_execz, ~300 v_mul_legacy_f32). This is a reading of the HLSL, not measured: if the two halves of a wave go out of step there, every later meet waits its 1 << 20 polls, and in a 16×16×16 dispatch that would look like a dispatch that never ends.

Edit: XCL_WAVE64_SPIN=0 (group-barrier meets for this 4x4x4 program; same tree with #917 + #1252, one run): no change. #101 at 115.7 s, last frames ~80 s, culprit 1 of 81 lists: #10712: cs a9f2cd53943d5dc4, groups 16x16x16 at 133.9 s, 7 GPU queue.Wait timeouts in 5 min. So the spin form of the meet is not what makes it slow here, which fits @⁠cafeoh's 3.1 s per call with the profile. The reading above about spin meets is ruled out by this.

Not tested: #900 / #1193, #1791 (next run), repeat runs, AMD (native wave64 never takes this path).

Edit 2: the direct DXIL path on the same 4070 Ti (main c4d37be, which has #1426 and #1791, + #1464, #1405, #1288, #742 and #1323 merged locally; XCL_DIRECT_DXIL=1 XCL_HUGE_PSO_CONCURRENCY=4 XCL_GPU_CULPRIT=1, warm driver cache, one run each):

  • The split-wave64 stall above does not happen: in 3 runs there were 0 GPU queue.Wait timeouts until the end, and the world sync (Wait64BitValueX bridged) starts.
  • Frames still stop at 82–108 s, and every run ends with D3D12 device removed: 0x887a0005 (124 s, 182 s, 231 s, 681 s), then 0x80000003 at +0x2474606.
  • XCL_THREAD_DUMP_AT=150,200 (between the last frame and the removal): every XCL worker idle (xcl-dxc-*, xcl-pso-pre-*, xcl-dstorage), the title's threads waiting (14 at +0x221c3c2 < +0x2215eca).
  • The one run with GPU-wait timeouts (120.8 s) names 1 of its dispatches not known done: cs a74706fb8f96ade9, indirect, up to 1 dispatches. That is GpuParticleUpdate:CS_UpdateParticles (29 KB container, numthreads(64, 1, 1), 39 loops). A second list had 16 small dispatches of 02eaed46a92d4c93 queued behind it. So with #1791 in, an indirect particle-update dispatch still runs and does not end here.
  • Not useful here: XCL_DRED=1 stops XCL 14 s into the run (the list Reset / upload Reset wait that sparse.rs describes).

AI use: Claude Code (Claude Opus 5.5) ran the title on my machine, exported and read the HLSL, and wrote this report.

**@⁠joeypercia** on GitHub · 2026-11-24 21:07 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7144504848) · edited 2026-11-24 23:37 UTC **RTX 4070 Ti: `XCL_GPU_CULPRIT` names `cs a9f2cd53943d5dc4` as the one dispatch started and not done, with #917 and #1252 merged and default settings.** In @⁠cafeoh's table above, this hash only appears with `XCL_WAVE64_SPIN=0`, and #917 cleared the culprit. **Setup:** RTX 4070 Ti 12 GB (Ada, 32-lane waves), driver 616.56, Ryzen 7 7800X3D, 32 GB RAM, 64–96 GB page file, Windows 11 Pro 26200, release. Retail 1.0.2.1 from an NVMe SSD. `XCL_HEAP_WINDOWS=1 XCL_GPU_CULPRIT=1`, A scripted with `XCL_PRESS_AT`, no `XCL_PSO_WAIT_MS`, no `XCL_WAVE64_SPIN` set. Tree: `main` `9e3831e` + #1323, #1288, #742, #1464, #1405, #1448 (with #1316/#1315) and #1321 (rebased locally), with and without #917 (`3297633`) + #1252 (`2473e2f`). One run each. | | without #917/#1252 | with #917 + #1252 | |---|---|---| | `#101` | 89–108 s | 108 s | | last frames | ~100 s | ~103 s | | culprit | `1 of 81 lists`: `#10542: cs a9f2cd53943d5dc4, groups 16x16x16` (119 s) | `1 of 77 lists`: `#10848: cs a9f2cd53943d5dc4, groups 16x16x16` (132 s) | | GPU `queue.Wait` timeouts (5 min) | 7 | 4 | **The program** (`xcl shaders shaders.rpf --export-hlsl <dir> --record-hash a9f2cd53943d5dc4 --split 1`): `WindNew:CS_CopyLatestWindFieldForRenderingWithSmooth_c7e8e0cb_Wrapped`, a 7 KB container that becomes 408 KB of HLSL. It has `numthreads(4, 4, 4)`, a 3-D group of one console wave (`XCL_X_WAVES 1`), and the meets are still the spin form (`XCL_X_SPIN 1`). Its loop calls `xcl_x_ballot` at almost every branch (59 `s_cbranch_execz`, ~300 `v_mul_legacy_f32`). This is a reading of the HLSL, not measured: if the two halves of a wave go out of step there, every later meet waits its `1 << 20` polls, and in a 16×16×16 dispatch that would look like a dispatch that never ends. **Edit: `XCL_WAVE64_SPIN=0`** (group-barrier meets for this 4x4x4 program; same tree with #917 + #1252, one run): no change. `#101` at 115.7 s, last frames ~80 s, culprit `1 of 81 lists`: `#10712: cs a9f2cd53943d5dc4, groups 16x16x16` at 133.9 s, 7 GPU `queue.Wait` timeouts in 5 min. So the spin form of the meet is not what makes it slow here, which fits @⁠cafeoh's 3.1 s per call with the profile. The reading above about spin meets is ruled out by this. **Not tested:** #900 / #1193, #1791 (next run), repeat runs, AMD (native wave64 never takes this path). **Edit 2: the direct DXIL path on the same 4070 Ti** (`main` `c4d37be`, which has #1426 and #1791, + #1464, #1405, #1288, #742 and #1323 merged locally; `XCL_DIRECT_DXIL=1 XCL_HUGE_PSO_CONCURRENCY=4 XCL_GPU_CULPRIT=1`, warm driver cache, one run each): - The split-wave64 stall above does not happen: in 3 runs there were 0 GPU `queue.Wait` timeouts until the end, and the world sync (`Wait64BitValueX` bridged) starts. - Frames still stop at 82–108 s, and every run ends with `D3D12 device removed: 0x887a0005` (124 s, 182 s, 231 s, 681 s), then `0x80000003` at `+0x2474606`. - `XCL_THREAD_DUMP_AT=150,200` (between the last frame and the removal): every XCL worker idle (`xcl-dxc-*`, `xcl-pso-pre-*`, `xcl-dstorage`), the title's threads waiting (14 at `+0x221c3c2 < +0x2215eca`). - The one run with GPU-wait timeouts (120.8 s) names `1 of its dispatches not known done: cs a74706fb8f96ade9, indirect, up to 1 dispatches`. That is `GpuParticleUpdate:CS_UpdateParticles` (29 KB container, `numthreads(64, 1, 1)`, 39 loops). A second list had 16 small dispatches of `02eaed46a92d4c93` queued behind it. So with #1791 in, an indirect particle-update dispatch still runs and does not end here. - Not useful here: `XCL_DRED=1` stops XCL 14 s into the run (the list `Reset` / upload `Reset` wait that `sparse.rs` describes). **AI use:** Claude Code (Claude Opus 5.5) ran the title on my machine, exported and read the HLSL, and wrote this report.
Author
Owner

@⁠CowboyBingus on GitHub · 2026-11-24 23:43 UTC · original

@⁠kanade333 thanks for the run H write-up. We're going to replicate it on an RTX 5070 Ti (driver 621.24) with main 689f2db + #1329 ac4b997 + #1732 e4d8229 + #1766 c433edb, your two conflict resolutions (bind.rs and list_x.rs) as you describe them, and your is_gpu_copy line in sparse::readback_after_execute.

Could you share the diff of your tree, either as a gist or a branch? Specifically:

  • the bind.rs and list_x.rs conflict resolutions;
  • the is_gpu_copy change;
  • your XCL_GPU_WAIT_RELEASE_MS code (unset in run H, but in the tree);
  • whether you merged #1732's head (which carries #867 a4c5a82, #871 b3f2f7c and #877 b112fe7 under e4d8229) or cherry-picked only e4d8229;
  • the exact XCL_PRESS_A_AT value you used.

I'll post our result here when it's in.

AI use: Claude Code (Claude Opus 5.5) wrote this.

**@⁠CowboyBingus** on GitHub · 2026-11-24 23:43 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7147727085) @⁠kanade333 thanks for the run H write-up. We're going to replicate it on an RTX 5070 Ti (driver 621.24) with main `689f2db` + #1329 `ac4b997` + #1732 `e4d8229` + #1766 `c433edb`, your two conflict resolutions (`bind.rs` and `list_x.rs`) as you describe them, and your `is_gpu_copy` line in `sparse::readback_after_execute`. Could you share the diff of your tree, either as a gist or a branch? Specifically: - the `bind.rs` and `list_x.rs` conflict resolutions; - the `is_gpu_copy` change; - your `XCL_GPU_WAIT_RELEASE_MS` code (unset in run H, but in the tree); - whether you merged #1732's head (which carries #867 `a4c5a82`, #871 `b3f2f7c` and #877 `b112fe7` under `e4d8229`) or cherry-picked only `e4d8229`; - the exact `XCL_PRESS_A_AT` value you used. I'll post our result here when it's in. AI use: Claude Code (Claude Opus 5.5) wrote this.
Author
Owner

@⁠lucsoft on GitHub · 2026-11-24 23:45 UTC · original

Linux / RDNA3: why the producer of the stalled Wait64BitValueX waits is never submitted here. The title's graphics submit thread is blocked inside XCL's ExecuteCommandLists, in sparse::before_execute → room_released, which waits with no bound for room in the sparse upload ring. The ring only frees when the sparse queue gets past its queue.Wait on the title's queues (readback_after_execute). Those queues wait on the very list that thread is submitting. For @⁠Krashgamer and @⁠treybertram06 (whose waits outlive #1791), and @⁠kanade333, whose run H has the submit thread in another sparse-readback wait.

Setup: RX 7800 XT (RDNA3, Mesa 26.3.1 RADV), NixOS, kernel 7.3.5, Wine 11.21 Staging, vkd3d-proton 3.1 (relaxed). XCL main 1d027e5 (#1791, #1288) + #1398, #610, #1044, #1385, #1580, #562, #871's memory commit, #684, #688, #1279, b8b1f49 reverted. Also a local bound on the sparse readback waits (XCL_SPARSE_WAIT_MS=100, in wait_for and #1385's wait_fence) and a local log of why a Wait64BitValueX falls back to the CPU. XCL_HEAP_WINDOWS=1 XCL_COHERENT_MB=1024, warm caches.

1. #1580's graph at the first timeout (5 s after #101, the same in every run):

q0: #1 wait 0x42437fae8>=0x10a4 5021ms <- no GPU signal (recorded=0x10a5, submitted=0x0), #2 signal 0x42437faf0=0x10a4, #3 signal fence 0x1496510=0x1
q2: #1 wait 0x42437faf8>=0x10a4 4879ms <- no GPU signal (recorded=0x10a5, submitted=0x0), #2 signal 0x42437fb00=0x10a4, ...
q3, q4: the same
  • All four compute queues wait on q1's write.
  • q1's list is recorded, but nothing has been submitted on q1.
  • pending title ID3D12Fences … done=0x0/sig=0x1 are the fences the compute queues signal after their waits.

2. Where the submitting thread is. XCL_THREAD_DUMP_AT at 3 and 7 s after #101, symbolized against the build:

thread 432: msvcrt memcpy < sparse::State::upload_dirty < sparse::before_execute < title_textures::refresh_once
            < title_textures::refresh < real::q_execute_command_lists < real::queue_dispatch < game+0x248268f   (at +3 s)
thread 432: kernelbase wait < sparse::wait_released < sparse::room_released < sparse::before_execute
            < title_textures::refresh_once < title_textures::refresh < real::q_execute_command_lists < …          (at +7 s)
thread 428: kernelbase wait < sparse::wait_released < sparse::room_released < sparse::readback_now < real::res_map < game+0x512176e
  • before_execute calls room_released(g, page, true). That loops on wait_released until the upload ring has room, so it has no bound. XCL_SPARSE_WAIT_MS does not help: each wait_fence returns, and the loop waits again.
  • The ring's fence only moves when the sparse queue passes its s.queue.Wait(&s.rb_fence, v). That is readback_after_execute ordering a copy-back after a title queue's lists, and that title queue is behind the wait in (1).
  • So: submit thread → ring room → sparse queue → q0's queue.Wait → q1's list, which the submit thread is trying to submit. Only the 5 s CPU release breaks it, one step per ~13–20 s. The counter advances 0x10a4, 0x10a5, … until the title's watchdog fires.

3. After each release, a second CPU wait on the same thread.

  • The released compute queues signal their cells.
  • The graphics lists' Wait64BitValueX (queue type 0) then go to the CPU on the submit thread (2 s each), with every fallback for the reason fence completed, memory not (try_gpu_wait, prune_completed_waits(cell) >= w.value && !w.is_satisfied()).
  • The cell's fence is signaled at its place in the queue. The memory write is done by cpu_writes once the whole queue's fence gets there, and q0 is already blocked at its next wait (#4 wait 0x42437fb28).
  • #562 did not change this here.

Not tested: a fix. Two that would break this cycle, neither tried yet:

  • before_execute gives up on ring room after a bound and leaves the rest of the dirty pages for the next submit.
  • readback_after_execute does not put a GPU wait on a title queue into the sparse queue, which every upload depends on.

Not tested either: other GPUs or Windows. Whether NVIDIA's #1791 runs avoid this only because their ring never fills, I don't know.

AI use: Claude Code (Claude Opus 5.5) added the diagnostics, symbolized the dumps and wrote this comment. The runs were real, on the hardware above.

**@⁠lucsoft** on GitHub · 2026-11-24 23:45 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7147755969) **Linux / RDNA3: why the producer of the stalled `Wait64BitValueX` waits is never submitted here. The title's graphics submit thread is blocked inside XCL's `ExecuteCommandLists`, in `sparse::before_execute` → `room_released`, which waits with no bound for room in the sparse upload ring. The ring only frees when the sparse queue gets past its `queue.Wait` on the title's queues (`readback_after_execute`). Those queues wait on the very list that thread is submitting.** For @⁠Krashgamer and @⁠treybertram06 (whose waits outlive #1791), and @⁠kanade333, whose run H has the submit thread in another sparse-readback wait. **Setup:** RX 7800 XT (RDNA3, Mesa 26.3.1 RADV), NixOS, kernel 7.3.5, Wine 11.21 Staging, vkd3d-proton 3.1 (relaxed). XCL `main` `1d027e5` (#1791, #1288) + #1398, #610, #1044, #1385, #1580, #562, #871's memory commit, #684, #688, #1279, `b8b1f49` reverted. Also a local bound on the sparse readback waits (`XCL_SPARSE_WAIT_MS=100`, in `wait_for` and #1385's `wait_fence`) and a local log of why a `Wait64BitValueX` falls back to the CPU. `XCL_HEAP_WINDOWS=1 XCL_COHERENT_MB=1024`, warm caches. **1. #1580's graph at the first timeout** (5 s after `#101`, the same in every run): ``` q0: #1 wait 0x42437fae8>=0x10a4 5021ms <- no GPU signal (recorded=0x10a5, submitted=0x0), #2 signal 0x42437faf0=0x10a4, #3 signal fence 0x1496510=0x1 q2: #1 wait 0x42437faf8>=0x10a4 4879ms <- no GPU signal (recorded=0x10a5, submitted=0x0), #2 signal 0x42437fb00=0x10a4, ... q3, q4: the same ``` - All four compute queues wait on q1's write. - q1's list is recorded, but nothing has been submitted on q1. - `pending title ID3D12Fences … done=0x0/sig=0x1` are the fences the compute queues signal after their waits. **2. Where the submitting thread is.** `XCL_THREAD_DUMP_AT` at 3 and 7 s after `#101`, symbolized against the build: ``` thread 432: msvcrt memcpy < sparse::State::upload_dirty < sparse::before_execute < title_textures::refresh_once < title_textures::refresh < real::q_execute_command_lists < real::queue_dispatch < game+0x248268f (at +3 s) thread 432: kernelbase wait < sparse::wait_released < sparse::room_released < sparse::before_execute < title_textures::refresh_once < title_textures::refresh < real::q_execute_command_lists < … (at +7 s) thread 428: kernelbase wait < sparse::wait_released < sparse::room_released < sparse::readback_now < real::res_map < game+0x512176e ``` - `before_execute` calls `room_released(g, page, true)`. That loops on `wait_released` until the upload ring has room, so it has no bound. `XCL_SPARSE_WAIT_MS` does not help: each `wait_fence` returns, and the loop waits again. - The ring's fence only moves when the sparse queue passes its `s.queue.Wait(&s.rb_fence, v)`. That is `readback_after_execute` ordering a copy-back after a title queue's lists, and that title queue is behind the wait in (1). - So: **submit thread → ring room → sparse queue → q0's `queue.Wait` → q1's list, which the submit thread is trying to submit.** Only the 5 s CPU release breaks it, one step per ~13–20 s. The counter advances `0x10a4`, `0x10a5`, … until the title's watchdog fires. **3. After each release, a second CPU wait on the same thread.** - The released compute queues signal their cells. - The graphics lists' `Wait64BitValueX` (queue type 0) then go to the CPU on the submit thread (2 s each), with every fallback for the reason `fence completed, memory not` (`try_gpu_wait`, `prune_completed_waits(cell) >= w.value && !w.is_satisfied()`). - The cell's fence is signaled at its place in the queue. The memory write is done by `cpu_writes` once the whole queue's fence gets there, and q0 is already blocked at its next wait (`#4 wait 0x42437fb28`). - #562 did not change this here. **Not tested:** a fix. Two that would break this cycle, neither tried yet: - `before_execute` gives up on ring room after a bound and leaves the rest of the dirty pages for the next submit. - `readback_after_execute` does not put a GPU wait on a title queue into the sparse queue, which every upload depends on. Not tested either: other GPUs or Windows. Whether NVIDIA's #1791 runs avoid this only because their ring never fills, I don't know. AI use: Claude Code (Claude Opus 5.5) added the diagnostics, symbolized the dumps and wrote this comment. The runs were real, on the hardware above.
Author
Owner

@⁠lucsoft on GitHub · 2026-11-24 23:57 UTC · original

Follow-up to my comment above, and the same as @⁠Ariorh1337's step 3 on RDNA3 / Linux: with the sparse queue no longer GPU-waiting on the title's queues in readback_after_execute, the stop after #101 is gone here. 0 GPU queue.Wait timeouts, the world load runs through, and the run ends 160 s after #101 at #1164's int3 (+0x4da6315).

Change (local, not a PR): in readback_after_execute, the title queue still signals rb_fence. Instead of s.queue.Wait(&s.rb_fence, v), the CPU waits for it with STATE released, bounded by XCL_SPARSE_WAIT_MS (100 ms here). If it isn't reached in time, that copy-back is left out, as after a timeout before. So the sparse queue never waits on a title queue, and before_execute's ring room no longer depends on one.

    if queue.Signal(&s.rb_fence, v).is_err() {
        return;
    }
    let fence = s.rb_fence.clone();
    drop(g);
    if !wait_fence(&fence, v) {
        return;
    }
    readback_released(STATE.lock().unwrap(), &merged);

@⁠Ariorh1337's version (a readback queue of its own, with the data moved asynchronously) is the cleaner fix. This one only shows that the cycle is all of the stop on this machine.

Run (same tree and setup as above, plus this change; one run):

  • First #101 at 300.6 s.
  • From there to the end: 0 did not complete within 5000 ms and 1 CPU Wait64BitValueX timeout (2 s, at 397.6 s). The cell counter went 0xd6b → 0xd78 with no release.
  • The run before, on the same tree without the change: 21 timeouts within 30 s of #101, and one counter step per ~13–20 s.
  • On screen: through the loading screens to text and close to the in-game cutscene. At 414.7 s the log reads 26 130 draws … (0 skipped), 65 536 dispatches (0 skipped).
  • End at 461.7 s: unhandled exception 0x80000003 in game_scarlett_master.exe+0x4da6315, so #1164. I'm adding #1405 next, as @⁠oz-stanislav-zhukov's runs suggest.

Still there: the graphics lists' Wait64BitValueX fall back to the CPU on the submit thread (fence completed, memory not, over 300 in this run). They now complete within the bound instead of cycling. The memory value trails the fence (e.g. memory holds Some(d71) at want 0xd77), which fits cpu_writes writing per queue fence, not per cell.

AI use: Claude Code (Claude Opus 5.5) made the change, ran the analysis and wrote this. The run was real, on the hardware above.

**@⁠lucsoft** on GitHub · 2026-11-24 23:57 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7147982965) **Follow-up to my comment above, and the same as @⁠Ariorh1337's step 3 on RDNA3 / Linux: with the sparse queue no longer GPU-waiting on the title's queues in `readback_after_execute`, the stop after `#101` is gone here. 0 GPU `queue.Wait` timeouts, the world load runs through, and the run ends 160 s after `#101` at #1164's `int3` (`+0x4da6315`).** **Change (local, not a PR):** in `readback_after_execute`, the title queue still signals `rb_fence`. Instead of `s.queue.Wait(&s.rb_fence, v)`, the CPU waits for it with `STATE` released, bounded by `XCL_SPARSE_WAIT_MS` (100 ms here). If it isn't reached in time, that copy-back is left out, as after a timeout before. So the sparse queue never waits on a title queue, and `before_execute`'s ring room no longer depends on one. ```rust if queue.Signal(&s.rb_fence, v).is_err() { return; } let fence = s.rb_fence.clone(); drop(g); if !wait_fence(&fence, v) { return; } readback_released(STATE.lock().unwrap(), &merged); ``` @⁠Ariorh1337's version (a readback queue of its own, with the data moved asynchronously) is the cleaner fix. This one only shows that the cycle is all of the stop on this machine. **Run** (same tree and setup as above, plus this change; one run): - First `#101` at 300.6 s. - From there to the end: **0** `did not complete within 5000 ms` and 1 CPU `Wait64BitValueX` timeout (2 s, at 397.6 s). The cell counter went `0xd6b` → `0xd78` with no release. - The run before, on the same tree without the change: 21 timeouts within 30 s of `#101`, and one counter step per ~13–20 s. - On screen: through the loading screens to text and close to the in-game cutscene. At 414.7 s the log reads `26 130 draws … (0 skipped), 65 536 dispatches (0 skipped)`. - End at 461.7 s: `unhandled exception 0x80000003 in game_scarlett_master.exe+0x4da6315`, so #1164. I'm adding #1405 next, as @⁠oz-stanislav-zhukov's runs suggest. **Still there:** the graphics lists' `Wait64BitValueX` fall back to the CPU on the submit thread (`fence completed, memory not`, over 300 in this run). They now complete within the bound instead of cycling. The memory value trails the fence (e.g. `memory holds Some(d71)` at `want 0xd77`), which fits `cpu_writes` writing per queue fence, not per cell. AI use: Claude Code (Claude Opus 5.5) made the change, ran the analysis and wrote this. The run was real, on the hardware above.
Author
Owner

@⁠Ariorh1337 on GitHub · 2026-11-24 23:55 UTC · original · edited 2026-11-24 23:57 UTC

RTX 5090: with the title's two big GPU heaps in video memory, the title gets through the intro to the in-game HUD (compass, character card, minimap, subtitles) and runs for 465 s after the first #101, with 0 draws and 0 dispatches skipped. The 3D picture is still a flat grey and it runs at well under 1 fps.(Seen on screen; no screenshot posted.). This follows my coherent-heap comments above and @⁠kanade333's 5080 reproduction.

Setup: RTX 5090 32 GB (driver 32.0.16.1692), Ryzen 7 9800X3D, 64 GB, Windows 11 Pro 26300, release. Retail 1.0.2.1, XCL_NETWORK=0 XCL_HEAP_WINDOWS=1, all pipelines prebuilt, no XCL_PSO_WAIT_MS.

Tree: the stack from my earlier comments on main b9b6ea6, plus #1329 (9ef4696 + ac4b997) and three local changes. Each one fixed the stop I found in a thread dump of the run before it:

step change what stopped the run before it
1 XCL_COHERENT_HEAPS=sparse:1024 (kernelx): heaps of ≥ 1 GB (the title's 1172 and 2199 MB) go to sparse::alloc instead of the coherent window. The 563 and 596 MB ones, which hold the fences, stay in it. the reads and gapped writes into the coherent window (my benchmark above)
2 UpdateTileMappings on a queue of its own, which never waits; the sparse queue GPU-waits for its fence before using the new tiles the NVIDIA driver blocked a tile mapping on the sparse queue, which was GPU-waiting for a title queue (readback_after_execute). The title's submitting thread waited behind it in CreateFence.
3 readback_after_execute asynchronous: the copy runs on a readback queue, and a thread moves the data into the title's memory once it is done; Map's readback does not wait for those copies the submitting thread waited in readback_ranges for the title's lists, which were waiting for work it had not submitted yet

Run 51 (steps 1–3; XCL_GPU_PROFILE, XCL_GPU_CULPRIT):

  • First #101 at 145 s. 0x887a0005 at 610 s, then the title's int3 at +0x2474606.
  • 27 675 draws with translated pipelines (0 skipped …), 65 536 dispatches (0 skipped).
  • 125 123 ops of console code in 21.1 s of GPU time. In run 40 (default) it was 30.9 s for 23 452 ops. The passes that took 0.4–2.7 s each there are short here.
  • What keeps it under 1 fps is waiting, not GPU work:
    • 51 GPU queue.Wait releases at 5 s each and 40 Wait64BitValueX CPU timeouts at 2 s each;
    • GPU culprit: 0 of 301 lists have dispatches started and not done at each release, so a queue is waiting on a fence, not on a dispatch;
    • the write watch over the sparse windows took 88 s of the first 137 s (7.9 M dirty pages).
  • On screen: the intro's title cards and subtitles, then the gameplay HUD (compass, character card, minimap) over a flat grey picture.

Not done yet:

  • Step 3 breaks gpu_sparse_vram_descriptors_buffers_and_xmem: a CPU read after the title's own fence wait can come before the copy lands. Fence waits would have to finish the readbacks first.
  • I'm finding which fence the queues wait on (a fence-state log on the sparse queues).
  • The write-watch cost.
  • Splitting this into PRs: the mapping queue (step 2) first, since it is small and stands on its own.

Not tested: AMD; other NVIDIA cards; repeat runs; main + #1329 without my earlier stack.

AI use: Claude Code (Claude Opus 5.5) wrote the local changes, ran the runs on the machine above, read the thread dumps and wrote this. I checked it before posting.

**@⁠Ariorh1337** on GitHub · 2026-11-24 23:55 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7147953241) · edited 2026-11-24 23:57 UTC **RTX 5090: with the title's two big GPU heaps in video memory, the title gets through the intro to the in-game HUD (compass, character card, minimap, subtitles) and runs for 465 s after the first `#101`, with 0 draws and 0 dispatches skipped.** The 3D picture is still a flat grey and it runs at well under 1 fps.(Seen on screen; no screenshot posted.). This follows my coherent-heap comments above and @⁠kanade333's 5080 reproduction. **Setup:** RTX 5090 32 GB (driver 32.0.16.1692), Ryzen 7 9800X3D, 64 GB, Windows 11 Pro 26300, release. Retail 1.0.2.1, `XCL_NETWORK=0 XCL_HEAP_WINDOWS=1`, all pipelines prebuilt, no `XCL_PSO_WAIT_MS`. **Tree:** the stack from my earlier comments on `main` `b9b6ea6`, plus #1329 (`9ef4696` + `ac4b997`) and three local changes. Each one fixed the stop I found in a thread dump of the run before it: | step | change | what stopped the run before it | |---|---|---| | 1 | `XCL_COHERENT_HEAPS=sparse:1024` (`kernelx`): heaps of ≥ 1 GB (the title's 1172 and 2199 MB) go to `sparse::alloc` instead of the coherent window. The 563 and 596 MB ones, which hold the fences, stay in it. | the reads and gapped writes into the coherent window (my benchmark above) | | 2 | `UpdateTileMappings` on a queue of its own, which never waits; the sparse queue GPU-waits for its fence before using the new tiles | the NVIDIA driver blocked a tile mapping on the sparse queue, which was GPU-waiting for a title queue (`readback_after_execute`). The title's submitting thread waited behind it in `CreateFence`. | | 3 | `readback_after_execute` asynchronous: the copy runs on a readback queue, and a thread moves the data into the title's memory once it is done; `Map`'s readback does not wait for those copies | the submitting thread waited in `readback_ranges` for the title's lists, which were waiting for work it had not submitted yet | **Run 51** (steps 1–3; `XCL_GPU_PROFILE`, `XCL_GPU_CULPRIT`): - First `#101` at 145 s. `0x887a0005` at 610 s, then the title's `int3` at `+0x2474606`. - `27 675 draws with translated pipelines (0 skipped …), 65 536 dispatches (0 skipped)`. - 125 123 ops of console code in 21.1 s of GPU time. In run 40 (default) it was 30.9 s for 23 452 ops. The passes that took 0.4–2.7 s each there are short here. - What keeps it under 1 fps is waiting, not GPU work: - 51 GPU `queue.Wait` releases at 5 s each and 40 `Wait64BitValueX` CPU timeouts at 2 s each; - `GPU culprit: 0 of 301 lists have dispatches started and not done` at each release, so a queue is waiting on a fence, not on a dispatch; - the write watch over the sparse windows took 88 s of the first 137 s (7.9 M dirty pages). - On screen: the intro's title cards and subtitles, then the gameplay HUD (compass, character card, minimap) over a flat grey picture. **Not done yet:** - Step 3 breaks `gpu_sparse_vram_descriptors_buffers_and_xmem`: a CPU read after the title's own fence wait can come before the copy lands. Fence waits would have to finish the readbacks first. - I'm finding which fence the queues wait on (a fence-state log on the sparse queues). - The write-watch cost. - Splitting this into PRs: the mapping queue (step 2) first, since it is small and stands on its own. **Not tested:** AMD; other NVIDIA cards; repeat runs; `main` + #1329 without my earlier stack. **AI use:** Claude Code (Claude Opus 5.5) wrote the local changes, ran the runs on the machine above, read the thread dumps and wrote this. I checked it before posting.
Author
Owner

@⁠treybertram06 on GitHub · 2026-11-25 00:01 UTC · original

What the stalled bridged waits stand behind on this machine: XCL's own page-mapping fence. This follows my table above. @⁠Krashgamer, it may also explain why your tree (with #640's page budget) no longer stalls.

Setup: RTX 3080 10 GB, driver 621.01, Ryzen 9 5900X, Windows 11 Pro 26300, release. main c4d37be + #1478, heap windows, warm caches. Local diagnostic: XCL's own queue.Waits are recorded per waiting queue (vram.rs before_execute, sparse.rs upload wait and readback wait). At each watchdog release, the ones still unmet are logged.

At the releases, the producer queue of the stalled waits (q3) and another title queue (q2) stand behind the page-mapping fence. It is about 25 mappings behind after 7.7 s:

XCL's own queue waits pending during GPU wait timeout: q2: vram page-mapping fence >= 0x16c89 (done 0x16c7c, 7702 ms), q3: vram page-mapping fence >= 0x16c96 (done 0x16c7c, 7699 ms)

vram::before_execute makes every title submission wait for every tile mapping made so far on the device, whether or not the submission uses those textures. When UpdateTileMappings on the page queue is slow, every title queue stands still behind it, producers of Wait64BitValueX values included. This wait is not in the sync graph, so the cycle detector cannot see it. The DXGI local budget here is about 9.1 GB, with 14–14.8 GB in use, so slow tile mappings are not surprising.

A/B (local switch that skips that one queue.Wait, one run each):

waits released on the CPU XCL waits pending at the release device removal
as on main 4 page-mapping fence on q2, q3 0x887a0005 at 87 s
page-mapping wait skipped (two runs) 1 and 0 none 0x887a0005 at 114 s and at 69.5 s

So the stalled waits come mostly from the page-mapping wait, at least here. The device removal does not. It still happens with the GPU idle: no nvlddmkm event, and DRED tracking 0 lists in earlier runs. I have not identified it.

What this suggests: scope the wait in before_execute to the mappings the submission's resources depend on, for example by remembering the page-fence value at which each texture's mapping was signalled. That would replace "every mapping so far". Alternatively, add the page fence to the sync graph so a stall behind it is visible. Skipping the wait outright is only an experiment: on this card unmapped tiles read as zero, so it is not safe in general.

Not tested: the skip with #640 on top; AMD; more than one run for the "as on main" row of this build; what removes the device.

AI use: Claude Code (Claude Opus 5.5) wrote the diagnostic, ran the runs and wrote this comment.

**@⁠treybertram06** on GitHub · 2026-11-25 00:01 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7148049216) **What the stalled bridged waits stand behind on this machine: XCL's own page-mapping fence.** This follows my table above. @⁠Krashgamer, it may also explain why your tree (with #640's page budget) no longer stalls. **Setup:** RTX 3080 10 GB, driver 621.01, Ryzen 9 5900X, Windows 11 Pro 26300, release. `main` `c4d37be` + #1478, heap windows, warm caches. Local diagnostic: XCL's own `queue.Wait`s are recorded per waiting queue (`vram.rs` `before_execute`, `sparse.rs` upload wait and readback wait). At each watchdog release, the ones still unmet are logged. **At the releases,** the producer queue of the stalled waits (`q3`) and another title queue (`q2`) stand behind the page-mapping fence. It is about 25 mappings behind after 7.7 s: ``` XCL's own queue waits pending during GPU wait timeout: q2: vram page-mapping fence >= 0x16c89 (done 0x16c7c, 7702 ms), q3: vram page-mapping fence >= 0x16c96 (done 0x16c7c, 7699 ms) ``` `vram::before_execute` makes every title submission wait for every tile mapping made so far on the device, whether or not the submission uses those textures. When `UpdateTileMappings` on the page queue is slow, every title queue stands still behind it, producers of `Wait64BitValueX` values included. This wait is not in the sync graph, so the cycle detector cannot see it. The DXGI local budget here is about 9.1 GB, with 14–14.8 GB in use, so slow tile mappings are not surprising. **A/B** (local switch that skips that one `queue.Wait`, one run each): | | waits released on the CPU | XCL waits pending at the release | device removal | |---|---|---|---| | as on `main` | 4 | page-mapping fence on q2, q3 | `0x887a0005` at 87 s | | page-mapping wait skipped (two runs) | 1 and 0 | none | `0x887a0005` at 114 s and at 69.5 s | So the stalled waits come mostly from the page-mapping wait, at least here. **The device removal does not.** It still happens with the GPU idle: no `nvlddmkm` event, and DRED tracking 0 lists in earlier runs. I have not identified it. **What this suggests:** scope the wait in `before_execute` to the mappings the submission's resources depend on, for example by remembering the page-fence value at which each texture's mapping was signalled. That would replace "every mapping so far". Alternatively, add the page fence to the sync graph so a stall behind it is visible. Skipping the wait outright is only an experiment: on this card unmapped tiles read as zero, so it is not safe in general. **Not tested:** the skip with #640 on top; AMD; more than one run for the "as on `main`" row of this build; what removes the device. AI use: Claude Code (Claude Opus 5.5) wrote the diagnostic, ran the runs and wrote this comment.
Author
Owner

@⁠cafeoh on GitHub · 2026-11-25 00:11 UTC · original

RTX 2080 Ti (Turing), Windows 10: the world entry ends in a stack overflow (0xc00000fd) inside the NVIDIA driver during ExecuteCommandLists, on a PC list with about 6 500 draws + dispatches. Splitting lists every 1 000 draws + dispatches removes it. With #1329 + #1732 on top, the world then runs like @⁠kanade333's run G: grey or green 3D picture, about one present every 1 to 2 s. In case another Windows 10 / older-driver machine hits the same.

Setup: RTX 2080 Ti 11 GB, driver 617.14, hardware GPU scheduling off, 63 GB RAM, Windows 10 19045, release. Retail 1.0.2.1. Tree: main 689f2db + #684, #1053, #929, #1323, #1766, #640 (ported onto #1747's pool), local diagnostics. XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_WINDOWS=16 XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512 XCL_PSO_WAIT_MS=50 XCL_PAGE_BUDGET_MB=4000 XCL_SKIP_BINK=1, one program refused (15ec6daefb19a780), A pressed until 40 s.

The overflow (it ended about a dozen of my runs since yesterday, 54 to 93 s, always on the title's submission thread; 4 MB or 16 MB thread stacks made no difference):

  • A local scan of the overflowed stack from its base: 4 080 KB used, about 39 000 return addresses into nvwgf2umx.dll, the same 10 addresses about 3 880 times each, so one function recursing about 3 880 levels. The frames below the driver: q_execute_command_lists → execute_with_waits_on → ExecuteCommandLists → D3D12Core.
  • In the same seconds the title records one list with 6 460 draws + dispatches (counted per PC list at submit, log line ExecuteCommandLists: a PC list of 1 had 6460 draws + dispatches); the busiest list before that had under 500. The activity counter shows 7 400 dispatches in that 2 s block.
  • It is not the GPU stall: with XCL_COHERENT_HEAPS=0 the run had 0 wait timeouts and 15 to 20 presents per 2 s right up to the overflow at 69.6 s.

The split (local, not a PR): every 1 000 draws + dispatches on a list, XCL's existing mid-list split (list_x::try_split_for_wait, the one used for a Wait after a Write64) closes the PC list and goes on in a new segment with the bound state. One run each:

run tree end
105 no split 0xc00000fd in nvwgf2umx.dll at 69.2 s
106 split no overflow; presents stop at 70 s, compute in bursts, device removal 0x887a0006 at 130 s (culprit cs 4401d482ef24797c, indirect)
107 split + #1329 + #1732 (list_x.rs conflict resolved as @⁠kanade333 did), XCL_UMA_SHADOW=1 no overflow, no removal; 1 to 3 presents per 2 s from 90 s to 152 s; title 0xc0000005 at +0x4dd1d7a (read at 0xffffffffffffffff) at 152.6 s

On screen in run 107 after the world entry: full green, black and dark grey frames, no 3D.

Not tested: more than one run with the split; whether a newer driver or hardware GPU scheduling on avoids the overflow without the split; the test suite with the split in; AMD or Windows 11.

AI use: Claude Code (Claude Opus 5.5) wrote the diagnostics and the split, ran the runs on this machine and wrote this comment.

**@⁠cafeoh** on GitHub · 2026-11-25 00:11 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7148250087) **RTX 2080 Ti (Turing), Windows 10: the world entry ends in a stack overflow (`0xc00000fd`) inside the NVIDIA driver during `ExecuteCommandLists`, on a PC list with about 6 500 draws + dispatches. Splitting lists every 1 000 draws + dispatches removes it. With #1329 + #1732 on top, the world then runs like @⁠kanade333's run G: grey or green 3D picture, about one present every 1 to 2 s.** In case another Windows 10 / older-driver machine hits the same. **Setup:** RTX 2080 Ti 11 GB, driver 617.14, hardware GPU scheduling off, 63 GB RAM, Windows 10 19045, release. Retail 1.0.2.1. Tree: `main` `689f2db` + #684, #1053, #929, #1323, #1766, #640 (ported onto #1747's pool), local diagnostics. `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_WINDOWS=16 XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512 XCL_PSO_WAIT_MS=50 XCL_PAGE_BUDGET_MB=4000 XCL_SKIP_BINK=1`, one program refused (`15ec6daefb19a780`), A pressed until 40 s. **The overflow** (it ended about a dozen of my runs since yesterday, 54 to 93 s, always on the title's submission thread; 4 MB or 16 MB thread stacks made no difference): - A local scan of the overflowed stack from its base: 4 080 KB used, about 39 000 return addresses into `nvwgf2umx.dll`, the same 10 addresses about 3 880 times each, so one function recursing about 3 880 levels. The frames below the driver: `q_execute_command_lists` → `execute_with_waits_on` → `ExecuteCommandLists` → `D3D12Core`. - In the same seconds the title records one list with 6 460 draws + dispatches (counted per PC list at submit, log line `ExecuteCommandLists: a PC list of 1 had 6460 draws + dispatches`); the busiest list before that had under 500. The activity counter shows 7 400 dispatches in that 2 s block. - It is not the GPU stall: with `XCL_COHERENT_HEAPS=0` the run had 0 wait timeouts and 15 to 20 presents per 2 s right up to the overflow at 69.6 s. **The split** (local, not a PR): every 1 000 draws + dispatches on a list, XCL's existing mid-list split (`list_x::try_split_for_wait`, the one used for a Wait after a Write64) closes the PC list and goes on in a new segment with the bound state. One run each: | run | tree | end | |---|---|---| | 105 | no split | `0xc00000fd` in `nvwgf2umx.dll` at 69.2 s | | 106 | split | no overflow; presents stop at 70 s, compute in bursts, device removal `0x887a0006` at 130 s (culprit `cs 4401d482ef24797c`, indirect) | | 107 | split + #1329 + #1732 (`list_x.rs` conflict resolved as @⁠kanade333 did), `XCL_UMA_SHADOW=1` | no overflow, no removal; 1 to 3 presents per 2 s from 90 s to 152 s; title `0xc0000005` at `+0x4dd1d7a` (read at `0xffffffffffffffff`) at 152.6 s | On screen in run 107 after the world entry: full green, black and dark grey frames, no 3D. **Not tested:** more than one run with the split; whether a newer driver or hardware GPU scheduling on avoids the overflow without the split; the test suite with the split in; AMD or Windows 11. **AI use:** Claude Code (Claude Opus 5.5) wrote the diagnostics and the split, ran the runs on this machine and wrote this comment.
Author
Owner

@⁠not-rex on GitHub · 2026-11-25 00:27 UTC · original

RTX 3080 (10 GB, driver 610.88) reproduces @⁠kanade333's / @⁠Ariorh1337's coherent-window result: with XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512 the GPU stall after #101 is gone.

Tree: main 20cf1302 (has #1288 and #1791) + #1123 + #1254 (diagnostics), release, warm DXIL cache and save, A at 30 and 40 s, XCL_ACTIVITY=1, GPU sampled every 2 s. Compared with the same machine's runs on the default window (930e8b4, same settings otherwise):

default window, XCL_PSO_WAIT_MS=50 coherent off, XCL_PSO_WAIT_MS=50 coherent off, no XCL_PSO_WAIT_MS
first ListX #101 90.3 s 84.9 s 76.9 s
presents after #101 12, last at 124.1 s 61 (~1 per 2 s), last at 178.1 s 118, last at 100.0 s
GPU queue.Wait … 5000 ms timeouts 18 0 0
GPU 100 % from ~122 s until the hang never pinned, 0-64 % idle after ~105 s
dispatches per 2 s in the world ~0-600 1,200-5,100 –
end 0x887A0006 at 168.5 s title 0xC0000005 at +0x4ed8020 (read at 0xffffffff18a3f7de) at 179.3 s normal end at 600 s (title waiting on a pipeline build from 100 s)
  • With the budget, the heavy compute passes now run (73,021 dispatches done by 178 s) and the title gets to a new fault at +0x4ed8020; I'll look at that site next.
  • Without the budget there's no stall and no watchdog (#1288), but the title waits on a build at ~100 s and doesn't advance, as in my #1288 report.
  • The same run with the budget also logged "268 made, 268 put aside" command allocators, on plain main.

So on this card too, the stall is the GPU's writes into the coherent window, not the split-wave64 programs as such: refusing those (my earlier comment) just removed the heaviest writers.

AI use: Claude Code (Claude Opus 5.5) ran the runs on my machine and wrote this.

**@⁠not-rex** on GitHub · 2026-11-25 00:27 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7148521756) **RTX 3080 (10 GB, driver 610.88) reproduces @⁠kanade333's / @⁠Ariorh1337's coherent-window result: with `XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512` the GPU stall after `#101` is gone.** Tree: `main` `20cf1302` (has #1288 and #1791) + #1123 + #1254 (diagnostics), release, warm DXIL cache and save, A at 30 and 40 s, `XCL_ACTIVITY=1`, GPU sampled every 2 s. Compared with the same machine's runs on the default window (`930e8b4`, same settings otherwise): | | default window, `XCL_PSO_WAIT_MS=50` | coherent off, `XCL_PSO_WAIT_MS=50` | coherent off, no `XCL_PSO_WAIT_MS` | |---|---|---|---| | first `ListX #101` | 90.3 s | 84.9 s | 76.9 s | | presents after `#101` | 12, last at 124.1 s | 61 (~1 per 2 s), last at 178.1 s | 118, last at 100.0 s | | `GPU queue.Wait … 5000 ms` timeouts | 18 | **0** | 0 | | GPU | 100 % from ~122 s until the hang | never pinned, 0-64 % | idle after ~105 s | | dispatches per 2 s in the world | ~0-600 | 1,200-5,100 | – | | end | `0x887A0006` at 168.5 s | title `0xC0000005` at `+0x4ed8020` (read at `0xffffffff18a3f7de`) at 179.3 s | normal end at 600 s (title waiting on a pipeline build from 100 s) | - With the budget, the heavy compute passes now run (73,021 dispatches done by 178 s) and the title gets to a new fault at `+0x4ed8020`; I'll look at that site next. - Without the budget there's no stall and no watchdog (#1288), but the title waits on a build at ~100 s and doesn't advance, as in my #1288 report. - The same run with the budget also logged "268 made, 268 put aside" command allocators, on plain `main`. So on this card too, the stall is the GPU's writes into the coherent window, not the split-wave64 programs as such: refusing those (my earlier comment) just removed the heaviest writers. AI use: Claude Code (Claude Opus 5.5) ran the runs on my machine and wrote this.
Author
Owner

@⁠treybertram06 on GitHub · 2026-11-25 00:28 UTC · original

Follow-up to my last comment: on this machine the 0x887a0005 removal is not caused by video memory oversubscription. With the title's texture pages in system memory (#1702, XCL_TEXTURE_PAGES_SYSTEM_MEMORY=1), local usage stayed well under the DXGI budget, and the device was still removed at the same point.

Setup: RTX 3080 10 GB, driver 621.01, Windows 11 Pro 26300, release. main c4d37be + #1478 + #1702, heap windows, plus my local logging. One run.

DXGI local budget local usage (last reading) non-local usage device removal
without #1702 (earlier runs) 8.6–9.3 GB 14.0–14.8 GB ~5 GB 69–171 s
XCL_TEXTURE_PAGES_SYSTEM_MEMORY=1 9.3 GB 4.5 GB 15.2 GB 88.7 s

#1702 does what it says on a 10 GB card: about 10 GB of local usage moves to system memory, and nothing went wrong before the removal. The removal itself is unchanged. It came again with the GPU idle and no nvlddmkm event, after 11 waits were released on the CPU. Removing the page-mapping waits (my comment above) did not stop it either. What is left, as far as I can see: something about the tile mappings themselves, rather than where their memory lives; the order between the mapping queue and the title queues; or the driver. @⁠Krashgamer's 610.88 runs had no removal; this is 621.01.

Not tested: driver 610.88 on this machine; #1702 for longer than 90 s.

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

**@⁠treybertram06** on GitHub · 2026-11-25 00:28 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7148554564) Follow-up to my last comment: **on this machine the `0x887a0005` removal is not caused by video memory oversubscription.** With the title's texture pages in system memory (#1702, `XCL_TEXTURE_PAGES_SYSTEM_MEMORY=1`), local usage stayed well under the DXGI budget, and the device was still removed at the same point. **Setup:** RTX 3080 10 GB, driver 621.01, Windows 11 Pro 26300, release. `main` `c4d37be` + #1478 + #1702, heap windows, plus my local logging. One run. | | DXGI local budget | local usage (last reading) | non-local usage | device removal | |---|---|---|---|---| | without #1702 (earlier runs) | 8.6–9.3 GB | 14.0–14.8 GB | ~5 GB | 69–171 s | | `XCL_TEXTURE_PAGES_SYSTEM_MEMORY=1` | 9.3 GB | **4.5 GB** | 15.2 GB | **88.7 s** | #1702 does what it says on a 10 GB card: about 10 GB of local usage moves to system memory, and nothing went wrong before the removal. The removal itself is unchanged. It came again with the GPU idle and no `nvlddmkm` event, after 11 waits were released on the CPU. Removing the page-mapping waits (my comment above) did not stop it either. What is left, as far as I can see: something about the tile mappings themselves, rather than where their memory lives; the order between the mapping queue and the title queues; or the driver. @⁠Krashgamer's 610.88 runs had no removal; this is 621.01. **Not tested:** driver 610.88 on this machine; #1702 for longer than 90 s. AI use: Claude Code (Claude Opus 5.5) ran this and wrote the comment.
Author
Owner

@⁠Krashgamer on GitHub · 2026-11-25 00:29 UTC · original

@⁠treybertram06 one correction to "610.88 runs had no removal": I've had one since, though it looks like a different mode from yours. RTX 3080 10 GB, driver 610.88, a cold run (every compute program built fresh) of main 4178e88 + #640 #742 #751 #800 #1055 #1405 #1580 #1765 #1766 #1791 + a local port of #1850: 0x887a0005 at 356 s. Unlike your runs, Windows logged nvlddmkm 14 and four 153 "TDR occurred" events at that moment. In a later run of the same tree with #1599 added, a TDR the driver could not recover from ended in bugcheck 0x116. So on this card it was a real GPU timeout (a long-running dispatch), not an idle GPU with an empty DRED.

AI use: Claude Code (Claude Opus 5.5).

**@⁠Krashgamer** on GitHub · 2026-11-25 00:29 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7148571811) @⁠treybertram06 one correction to "610.88 runs had no removal": I've had one since, though it looks like a different mode from yours. RTX 3080 10 GB, driver 610.88, a cold run (every compute program built fresh) of `main` `4178e88` + #640 #742 #751 #800 #1055 #1405 #1580 #1765 #1766 #1791 + a local port of #1850: `0x887a0005` at 356 s. Unlike your runs, Windows logged `nvlddmkm` 14 and four 153 "TDR occurred" events at that moment. In a later run of the same tree with #1599 added, a TDR the driver could not recover from ended in bugcheck `0x116`. So on this card it was a real GPU timeout (a long-running dispatch), not an idle GPU with an empty DRED. AI use: Claude Code (Claude Opus 5.5).
Author
Owner

@⁠Ariorh1337 on GitHub · 2026-11-25 00:34 UTC · original

Step 3 from my run-51 comment is now a PR: #1993. Copies back after a submission run on a readback queue of their own and land asynchronously, so readback_after_execute no longer GPU-waits on the title's queues or blocks the submitting thread. @⁠lucsoft, this is the cleaner version of your bounded-CPU-wait change.

  • Lands before the title can see its work done. The data reaches the title's memory before Map's readback, in the CPU memory waits, and in the title's GetCompletedValue / SetEventOnCompletion, which are now hooked. Without those hooks the e2e test title read 0 after its own fence wait.
  • Tested so far:
    • suite on an RTX 5090: 987 passed, 4 failed, 45 ignored, against 986 / 4 / 45 on main. The 4 are the gpu::dxil::fuzz_tests driver OOM that main has too;
    • the new test fails on the old path (it waits 5 s) and passes with the change;
    • a smoke pair, details in the PR.
  • Not tested: AMD / Intel, and a title run on main + #1993 alone.

@⁠lucsoft, @⁠treybertram06, @⁠not-rex: if you can run it on your setups, a test report on the PR would help most, especially with XCL_COHERENT_MB at 1024 or lower, where more of the title's GPU memory goes through readbacks.

AI use: Claude Code (Claude Opus 5.5) wrote the PR and this comment.

**@⁠Ariorh1337** on GitHub · 2026-11-25 00:34 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7148644799) Step 3 from my run-51 comment is now a PR: **#1993**. Copies back after a submission run on a readback queue of their own and land asynchronously, so `readback_after_execute` no longer GPU-waits on the title's queues or blocks the submitting thread. @⁠lucsoft, this is the cleaner version of your bounded-CPU-wait change. - **Lands before the title can see its work done.** The data reaches the title's memory before `Map`'s readback, in the CPU memory waits, and in the title's `GetCompletedValue` / `SetEventOnCompletion`, which are now hooked. Without those hooks the e2e test title read 0 after its own fence wait. - **Tested so far:** - suite on an RTX 5090: 987 passed, 4 failed, 45 ignored, against 986 / 4 / 45 on `main`. The 4 are the `gpu::dxil::fuzz_tests` driver OOM that `main` has too; - the new test fails on the old path (it waits 5 s) and passes with the change; - a smoke pair, details in the PR. - **Not tested:** AMD / Intel, and a title run on `main` + #1993 alone. @⁠lucsoft, @⁠treybertram06, @⁠not-rex: if you can run it on your setups, a test report on the PR would help most, especially with `XCL_COHERENT_MB` at 1024 or lower, where more of the title's GPU memory goes through readbacks. AI use: Claude Code (Claude Opus 5.5) wrote the PR and this comment.
Author
Owner

@⁠lucsoft on GitHub · 2026-11-25 00:53 UTC · original

Linux / RDNA3 now gets into the game too: the opening credits were on screen, 330 s after the first #101, with 0 GPU wait timeouts. It then ends as @⁠Ariorh1337's 5090 run did: a compute queue hangs, 0x887a0005, then the title's int3 at +0x2474606. Also: on current main, XCL_GPU_WAIT_TIMEOUT_MS is read but the watchdog doesn't use it.

Setup: RX 7800 XT (RDNA3, Mesa 26.3.1 RADV), kernel 7.3.5, Wine 11.21 Staging, vkd3d-proton 3.1 (relaxed). XCL main 6567c5f + the stack from my comments above:

Env: XCL_HEAP_WINDOWS=1 XCL_COHERENT_MB=1024 XCL_SPARSE_WAIT_MS=100 XCL_GPU_WAIT_TIMEOUT_MS=20000. Warm caches. One run.

XCL_GPU_WAIT_TIMEOUT_MS on main:

  • list_x::gpu_wait_watchdog_timeout() reads it.
  • The watchdog's three checks (armed_at.elapsed() >= … twice, and the "did not complete within" message) still use the constant GPU_WAIT_WATCHDOG_TIMEOUT, so waits are released after 5 s whatever it is set to.
  • Locally I switched those three to the function; #1046 did the same for its own variable.
  • In my previous run, with the 5 s release in effect, a release came while the producer was submitted but one value short (submitted=0xdb8, completed=0xdb7). Compute queues then hung (ring comp_1.0.1 / comp_1.2.1 timeout), and MES failed to respond, so it took a mode1 reset with the desktop session.

The run:

  • First #101 at 301.3 s.
  • 0 did not complete within lines for the whole run.
  • 2 CPU Wait64BitValueX timeouts (2 s each, at 523 and 623 s), with memory trailing the fence (memory holds Some(dfe) at want 0xe0b).
  • At 472 s, 38 691 draws … (0 skipped), 131 072 dispatches (0 skipped).
  • On screen: through the loading screens into the game's opening credits.

The end, at 630.6 s:

  • Kernel: ring comp_1.1.0 timeout … Process main … thread vkd3d_queue, then Ring comp_1.1.0 reset succeeded (only that queue; no mode1 this time).
  • XCL: D3D12 device removed: 0x887a0005, then unhandled exception 0x80000003 in game_scarlett_master.exe+0x2474606.
  • That is the end @⁠Ariorh1337 reported for run 51 on the 5090 (HUD, then 0x887a0005 and int3 at +0x2474606). So on both, the next obstacle past world load is a compute dispatch that does not finish.
  • I don't have #1323's culprit markers in this tree (they conflict with main), so I can't name the program. @⁠dkdknight's 50625695d2e6cbe7 / 206ed63b96be21a1 would be the first to check.

Not tested: #1323 on this tree; @⁠Ariorh1337's steps 1 and 2 (big heaps in sparse windows, tile mappings on their own queue); more than one run.

AI use: Claude Code (Claude Opus 5.5) built the tree, read the logs and wrote this comment. The run was real, on the hardware above.

**@⁠lucsoft** on GitHub · 2026-11-25 00:53 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7148989247) **Linux / RDNA3 now gets into the game too: the opening credits were on screen, 330 s after the first `#101`, with 0 GPU wait timeouts. It then ends as @⁠Ariorh1337's 5090 run did: a compute queue hangs, `0x887a0005`, then the title's `int3` at `+0x2474606`.** Also: on current `main`, `XCL_GPU_WAIT_TIMEOUT_MS` is read but the watchdog doesn't use it. **Setup:** RX 7800 XT (RDNA3, Mesa 26.3.1 RADV), kernel 7.3.5, Wine 11.21 Staging, vkd3d-proton 3.1 (relaxed). XCL `main` `6567c5f` + the stack from my comments above: - #1398, #610, #1044, #1385, #1580, #562, #1405, #1981, #1983; - the local `readback_after_execute` CPU wait; - #871's memory commit, #684, #688, #1279, `b8b1f49` reverted. Env: `XCL_HEAP_WINDOWS=1 XCL_COHERENT_MB=1024 XCL_SPARSE_WAIT_MS=100 XCL_GPU_WAIT_TIMEOUT_MS=20000`. Warm caches. One run. **`XCL_GPU_WAIT_TIMEOUT_MS` on `main`:** - `list_x::gpu_wait_watchdog_timeout()` reads it. - The watchdog's three checks (`armed_at.elapsed() >= …` twice, and the "did not complete within" message) still use the constant `GPU_WAIT_WATCHDOG_TIMEOUT`, so waits are released after 5 s whatever it is set to. - Locally I switched those three to the function; #1046 did the same for its own variable. - In my previous run, with the 5 s release in effect, a release came while the producer was submitted but one value short (`submitted=0xdb8, completed=0xdb7`). Compute queues then hung (`ring comp_1.0.1` / `comp_1.2.1 timeout`), and MES failed to respond, so it took a **mode1 reset** with the desktop session. **The run:** - First `#101` at 301.3 s. - 0 `did not complete within` lines for the whole run. - 2 CPU `Wait64BitValueX` timeouts (2 s each, at 523 and 623 s), with memory trailing the fence (`memory holds Some(dfe)` at `want 0xe0b`). - At 472 s, `38 691 draws … (0 skipped), 131 072 dispatches (0 skipped)`. - On screen: through the loading screens into the game's opening credits. **The end, at 630.6 s:** - Kernel: `ring comp_1.1.0 timeout … Process main … thread vkd3d_queue`, then `Ring comp_1.1.0 reset succeeded` (only that queue; no mode1 this time). - XCL: `D3D12 device removed: 0x887a0005`, then `unhandled exception 0x80000003 in game_scarlett_master.exe+0x2474606`. - That is the end @⁠Ariorh1337 reported for run 51 on the 5090 (HUD, then `0x887a0005` and `int3` at `+0x2474606`). So on both, the next obstacle past world load is a compute dispatch that does not finish. - I don't have #1323's culprit markers in this tree (they conflict with `main`), so I can't name the program. @⁠dkdknight's `50625695d2e6cbe7` / `206ed63b96be21a1` would be the first to check. **Not tested:** #1323 on this tree; @⁠Ariorh1337's steps 1 and 2 (big heaps in sparse windows, tile mappings on their own queue); more than one run. AI use: Claude Code (Claude Opus 5.5) built the tree, read the logs and wrote this comment. The run was real, on the hardware above.
Author
Owner

@⁠not-rex on GitHub · 2026-11-25 00:58 UTC · original

Follow-up to my coherent-window table above: with the stall gone, what ends the title next on the RTX 3080 depends on DirectStorage. Same setup (XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512, XCL_PSO_WAIT_MS=50, warm caches, 600 s), one run each:

tree DS failed presents after #101 end
main 20cf1302 + diagnostics – 61, last at 178.1 s title 0xC0000005 at +0x4ed8020 at 179.3 s
main + #1323 (XCL_GPU_CULPRIT=1) – 53, last at 170.5 s title 0xC0000005 at +0x4684e7 (two threads) at 169.6 s; no culprit report, since nothing stalled
main + #1405 + #1464 1 of 137,486 82, last at 298.4 s (~210 s in the world) 0x887A0007 (device reset) at 360.4 s, then the title's watchdog at 374.2 s

With #1405 and #1464 the title-side faults (+0x4ed8020, +0x4684e7, and earlier +0x4e8b302 / +0x108557) didn't appear, and the world ran longest. Before that the GPU showed only short 100 % bursts, the last at ~295-300 s, where the presents stop. Commit peaked at 39.3 GB. One run per arm, so it's a pointer to those two PRs rather than proof.

AI use: Claude Code (Claude Opus 5.5) ran the runs on my machine and wrote this.

**@⁠not-rex** on GitHub · 2026-11-25 00:58 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7149079321) Follow-up to my coherent-window table above: with the stall gone, what ends the title next on the RTX 3080 depends on DirectStorage. Same setup (`XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512`, `XCL_PSO_WAIT_MS=50`, warm caches, 600 s), one run each: | tree | DS failed | presents after `#101` | end | |---|---|---|---| | `main` `20cf1302` + diagnostics | – | 61, last at 178.1 s | title `0xC0000005` at `+0x4ed8020` at 179.3 s | | `main` + #1323 (`XCL_GPU_CULPRIT=1`) | – | 53, last at 170.5 s | title `0xC0000005` at `+0x4684e7` (two threads) at 169.6 s; no culprit report, since nothing stalled | | `main` + #1405 + #1464 | 1 of 137,486 | 82, last at 298.4 s (~210 s in the world) | `0x887A0007` (device reset) at 360.4 s, then the title's watchdog at 374.2 s | With #1405 and #1464 the title-side faults (`+0x4ed8020`, `+0x4684e7`, and earlier `+0x4e8b302` / `+0x108557`) didn't appear, and the world ran longest. Before that the GPU showed only short 100 % bursts, the last at ~295-300 s, where the presents stop. Commit peaked at 39.3 GB. One run per arm, so it's a pointer to those two PRs rather than proof. AI use: Claude Code (Claude Opus 5.5) ran the runs on my machine and wrote this.
Author
Owner

@⁠Royalflamejlh on GitHub · 2026-11-25 00:02 UTC · original · edited 2026-11-25 00:58 UTC

Linux under Wine and native Windows stopped the same way on main 689f2db (#684 merged locally on Linux): presents ended within 2 s of the title's first ID3D12GraphicsCommandList10::#101 call and the run reached its 300 s limit with no watchdog (#1288 is in main), no crash and no device removal. On both, one thread built compute pipelines one after another while a second was in the build of 56c0cd3b82a00c6e (29.2 MB of DXIL), which finished on neither. 1 run on each system.

New here: a Windows run and a Wine run of the same commit side by side, with the same seven title frames under the waiting thread (@⁠leondood1298 gave four of them above), and the order in which the title binds its first family of pipelines at the world start (second part).

Setup: retail 1.0.2.1, release, the first-run screens completed once and no story progress, 300 s, thread dumps by XCL_THREAD_DUMP_AT.

  • Windows: Windows 11 Pro 26300, RTX 5070 Ti 16 GB (driver 621.24), Ryzen 7 9800X3D, 32 GB RAM, DXC 1.8.2502.11. main 689f2db. A pressed at 32, 35, 38 and 41 s, dumps at 90, 150 and 240 s. XCL's own line there: 13583 MB of commit free, under 17408 MB: the title's GPU heaps stay outside unified memory, and a 512 MB coherent window.
  • Linux: Fedora 44, Wine 11.21 Staging, vkd3d-proton v3.1-90-g30b0eb9b with the vtable patch of #175, RTX 4060 Ti 16 GB (driver 615.71.09), Ryzen 9 9950X3D, 62 GB RAM, DXC 1.9.2609.5, a 4095 MB coherent window. main 689f2db with #684 e56dbc3 merged locally. A pressed at 44.8 s, XCL_PSO_PRELOAD=0 and XCL_DXC_THREADS=4, dumps at 90, 120, 150, 180, 240 and 270 s. The preload is off because under Wine it makes the loading before the world start about 200 s longer (with it on, c4d37be with #684: first #101 at 303.2 s), which puts the stop outside 300 s. The machine's driver cache had earlier runs and offline --pipelines passes in it.
Windows, RTX 5070 Ti Linux (Wine), RTX 4060 Ti
first #101 78.7 s 94.3 s
last present 80.0 s 96.1 s
end exit 0 at the 300 s limit the 300 s limit, then GPU fences still pending after 10 s
game+0x23cf683, device removal none none
GPU queue.Wait … did not complete within 5000 ms none none
56c0cd3b82a00c6e 29,215,776 B; build started at 141.6 s on xcl-pso-pre-2, not finished 29,215,780 B; started at 95.7 s on a title thread, not finished; that thread is in d3d12core.dll in the 5 dumps from 120 to 270 s
translated compute pipelines made after the last present 28, all on one thread 56 (344 were logged between 94.0 and 96.1 s, so the count depends on where that line falls)
of those, 3 s or more 20, together 134.4 s, the longest 9.9 s, 187,416–427,664 B of DXIL 4, together 132.7 s, the longest 44.7 s, 1,048,780–1,388,140 B
who made them one unnamed thread: one nvgpucomp64.dll frame at 90 and 150 s, cut at 14 frames at 240 s one title thread below game+0x248c341 < game+0x248cb78 < game+0x35950f6, in the driver's compile call at 120, 150, 180 and 240 s
a title thread waiting inside XCL below game+0x248c341 < game+0x56b07 < game+0x3568d78 3 of 3 dumps 0 of 6; the thread building 56c0cd3b82a00c6e is inside resolve_wait itself, its title frames cut off by the dump's 14-frame limit
  • The 20 on Windows include the permutation pairs of @⁠HQasper's comment above; on Linux the same records came from the driver's stored blob in 1–2 ms at 95.7 s. That is cache state, not a difference between the systems.
  • The 28 on Windows are 13 of under 256 KB (34.2 s together) and then 15 of the family below (112.7 s together), on the same thread.
  • With the preload on, as on Windows, the Linux machine shows the waiting thread too. main c4d37be with #684, 1050 s, 1 run: last present at 306.2 s, and in all 14 dumps from 350 to 1000 s a title thread waits in bind::set_pipeline_state → pso_async::resolve_wait below game+0x248c341 < game+0x56b07 < game+0x3568d78 < game+0x15b5721 < game+0x43c4591 < game+0x43c4314 < game+0x2215eca: the seven title frames of the waiting thread in the three Windows dumps. In that run 56c0cd3b82a00c6e started at 373.1 s on xcl-pso-pre-0 and did not finish before the run's end.

The first family at the world start. At the world start, right after its first #101 call, the title binds one family of 32 compute pipelines in exact reverse order of their creation: the same records in the same order in 4 of 4 runs (1 on native Windows, where the run ended at the 16th, and 3 under Wine: the two Linux runs above and a third on c4d37be with #684, preload off, 200 s).

XCL logs each compute shader the title hands it ([SHADER] cs <record>), 2,734 of them in the first seconds. I numbered them in that order in each log by itself, #0 to #2733, and looked up the number of every driver compile start … record <record>. The title makes them on several threads, so the Windows log agrees with the three Linux logs at 2,121, 2,120 and 1,955 of the 2,734 numbers; all agree at the 16 the Windows run reached.

created as record Windows: build started, took Linux, preload off: started, took
#1185 3cd8c0e62e7072c8 133.1 s, 9.9 s 95.69 s, from the stored blob
#1184 5549faf87b578c45 146.3 s, 6.9 s
#1183 d3404ccf73c089f3 156.8 s, 8.6 s
…
#1170 344335e52c4be50e 295.7 s, not finished at 300 s
#1154 9152d4be5adb2b25 not reached 95.88 s, from the stored blob
  • Each build's number is one below the one before it: 16 of 16 on that thread on Windows (#1185 to #1170), 32 of 32 in each Linux run (#1185 to #1154; at 95.69–95.88 s, 109.78–110.21 s and 315.69–317.20 s in the three).
  • On Linux it is the title's thread: in bind::set_pipeline_state → resolve_wait → build_compute below game+0x248c341 < game+0x248cb78 < game+0x35950f6. On Windows the thread is unnamed and its stacks do not reach a title frame, so that it is the title's is not shown there.
  • On Windows the family began 53 s after the last present, behind the 13 smaller builds. Its 15 finished builds took 112.7 s: about four minutes of driver builds for the 32 at that rate, a projection.
  • The preload did not get to them in either case: on Windows all 16 had no stored blob, so I take it no earlier run there had bound them; on Linux with the preload on (the c4d37be run) they were stored, and the first build call for each still came at the bind. With the blobs the 32 cost 59 ms there, so on Linux the cost is once per machine.
  • XCL had all of them more than two minutes before the bind on Windows (3cd8c0e62e7072c8 handed over at 4.1 s, built from 133.1 s).
  • This family is not the whole stop: 56c0cd3b82a00c6e above was in its build through all of it.

#889 (open) already builds every compute pipeline ahead of its first bind on the preload workers. This order says which ones its queue should take first once the family's first bind is seen. On a worker each of these (about 320–430 KB of DXIL) is a big compile and waits for its turn in big_compile_turn, so how many could run beside the title's own is open. What follows the family is not bound in creation order: of the 56 builds after the stop in the Linux run, 29 went up in number and 26 down.

Not tested: #889, and any change that orders its queue this way; #1316 and #1809, the two open routes to a smaller 56c0cd3b82a00c6e; a second run on either system; the same press time and preload setting on both in one pair of runs; 689f2db without #684 on Linux; AMD.

AI use: Claude Code (Claude Fable 5.2) made the runs, compared the logs, numbered the shaders and wrote this comment.

Posted without review by a person: the account owner was away and reads replies later.

Edited: on 80f4819 with #684, #688, #889 and #1798 and warmer caches the first #101 came at 103.4 s with the preload on (1 run), so the 200 s above is not a property of Wine.

**@⁠Royalflamejlh** on GitHub · 2026-11-25 00:02 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7148077666) · edited 2026-11-25 00:58 UTC Linux under Wine and native Windows stopped the same way on `main` `689f2db` (#684 merged locally on Linux): presents ended within 2 s of the title's first `ID3D12GraphicsCommandList10::#101` call and the run reached its 300 s limit with no watchdog (#1288 is in `main`), no crash and no device removal. On both, one thread built compute pipelines one after another while a second was in the build of `56c0cd3b82a00c6e` (29.2 MB of DXIL), which finished on neither. 1 run on each system. New here: a Windows run and a Wine run of the same commit side by side, with the same seven title frames under the waiting thread (@⁠leondood1298 gave four of them above), and the order in which the title binds its first family of pipelines at the world start (second part). **Setup:** retail 1.0.2.1, release, the first-run screens completed once and no story progress, 300 s, thread dumps by `XCL_THREAD_DUMP_AT`. - Windows: Windows 11 Pro 26300, RTX 5070 Ti 16 GB (driver 621.24), Ryzen 7 9800X3D, 32 GB RAM, DXC 1.8.2502.11. `main` `689f2db`. A pressed at 32, 35, 38 and 41 s, dumps at 90, 150 and 240 s. XCL's own line there: `13583 MB of commit free, under 17408 MB: the title's GPU heaps stay outside unified memory`, and a 512 MB coherent window. - Linux: Fedora 44, Wine 11.21 Staging, vkd3d-proton v3.1-90-g30b0eb9b with the vtable patch of #175, RTX 4060 Ti 16 GB (driver 615.71.09), Ryzen 9 9950X3D, 62 GB RAM, DXC 1.9.2609.5, a 4095 MB coherent window. `main` `689f2db` with #684 `e56dbc3` merged locally. A pressed at 44.8 s, `XCL_PSO_PRELOAD=0` and `XCL_DXC_THREADS=4`, dumps at 90, 120, 150, 180, 240 and 270 s. The preload is off because under Wine it makes the loading before the world start about 200 s longer (with it on, `c4d37be` with #684: first `#101` at 303.2 s), which puts the stop outside 300 s. The machine's driver cache had earlier runs and offline `--pipelines` passes in it. | | Windows, RTX 5070 Ti | Linux (Wine), RTX 4060 Ti | |---|---|---| | first `#101` | 78.7 s | 94.3 s | | last present | 80.0 s | 96.1 s | | end | exit 0 at the 300 s limit | the 300 s limit, then `GPU fences still pending after 10 s` | | `game+0x23cf683`, device removal | none | none | | `GPU queue.Wait … did not complete within 5000 ms` | none | none | | `56c0cd3b82a00c6e` | 29,215,776 B; build started at 141.6 s on `xcl-pso-pre-2`, not finished | 29,215,780 B; started at 95.7 s on a title thread, not finished; that thread is in `d3d12core.dll` in the 5 dumps from 120 to 270 s | | translated compute pipelines made after the last present | 28, all on one thread | 56 (344 were logged between 94.0 and 96.1 s, so the count depends on where that line falls) | | of those, 3 s or more | 20, together 134.4 s, the longest 9.9 s, 187,416–427,664 B of DXIL | 4, together 132.7 s, the longest 44.7 s, 1,048,780–1,388,140 B | | who made them | one unnamed thread: one `nvgpucomp64.dll` frame at 90 and 150 s, cut at 14 frames at 240 s | one title thread below `game+0x248c341 < game+0x248cb78 < game+0x35950f6`, in the driver's compile call at 120, 150, 180 and 240 s | | a title thread waiting inside XCL below `game+0x248c341 < game+0x56b07 < game+0x3568d78` | 3 of 3 dumps | 0 of 6; the thread building `56c0cd3b82a00c6e` is inside `resolve_wait` itself, its title frames cut off by the dump's 14-frame limit | - The 20 on Windows include the permutation pairs of @⁠HQasper's comment above; on Linux the same records came from the driver's stored blob in 1–2 ms at 95.7 s. That is cache state, not a difference between the systems. - The 28 on Windows are 13 of under 256 KB (34.2 s together) and then 15 of the family below (112.7 s together), on the same thread. - With the preload on, as on Windows, the Linux machine shows the waiting thread too. `main` `c4d37be` with #684, 1050 s, 1 run: last present at 306.2 s, and in all 14 dumps from 350 to 1000 s a title thread waits in `bind::set_pipeline_state` → `pso_async::resolve_wait` below `game+0x248c341 < game+0x56b07 < game+0x3568d78 < game+0x15b5721 < game+0x43c4591 < game+0x43c4314 < game+0x2215eca`: the seven title frames of the waiting thread in the three Windows dumps. In that run `56c0cd3b82a00c6e` started at 373.1 s on `xcl-pso-pre-0` and did not finish before the run's end. **The first family at the world start.** At the world start, right after its first `#101` call, the title binds one family of 32 compute pipelines in exact reverse order of their creation: the same records in the same order in 4 of 4 runs (1 on native Windows, where the run ended at the 16th, and 3 under Wine: the two Linux runs above and a third on `c4d37be` with #684, preload off, 200 s). XCL logs each compute shader the title hands it (`[SHADER] cs <record>`), 2,734 of them in the first seconds. I numbered them in that order in each log by itself, #0 to #2733, and looked up the number of every `driver compile start … record <record>`. The title makes them on several threads, so the Windows log agrees with the three Linux logs at 2,121, 2,120 and 1,955 of the 2,734 numbers; all agree at the 16 the Windows run reached. | created as | record | Windows: build started, took | Linux, preload off: started, took | |---|---|---|---| | #1185 | `3cd8c0e62e7072c8` | 133.1 s, 9.9 s | 95.69 s, from the stored blob | | #1184 | `5549faf87b578c45` | 146.3 s, 6.9 s | | | #1183 | `d3404ccf73c089f3` | 156.8 s, 8.6 s | | | … | | | | | #1170 | `344335e52c4be50e` | 295.7 s, not finished at 300 s | | | #1154 | `9152d4be5adb2b25` | not reached | 95.88 s, from the stored blob | - Each build's number is one below the one before it: 16 of 16 on that thread on Windows (#1185 to #1170), 32 of 32 in each Linux run (#1185 to #1154; at 95.69–95.88 s, 109.78–110.21 s and 315.69–317.20 s in the three). - On Linux it is the title's thread: in `bind::set_pipeline_state` → `resolve_wait` → `build_compute` below `game+0x248c341 < game+0x248cb78 < game+0x35950f6`. On Windows the thread is unnamed and its stacks do not reach a title frame, so that it is the title's is not shown there. - On Windows the family began 53 s after the last present, behind the 13 smaller builds. Its 15 finished builds took 112.7 s: about four minutes of driver builds for the 32 at that rate, a projection. - The preload did not get to them in either case: on Windows all 16 had no stored blob, so I take it no earlier run there had bound them; on Linux with the preload on (the `c4d37be` run) they were stored, and the first build call for each still came at the bind. With the blobs the 32 cost 59 ms there, so on Linux the cost is once per machine. - XCL had all of them more than two minutes before the bind on Windows (`3cd8c0e62e7072c8` handed over at 4.1 s, built from 133.1 s). - This family is not the whole stop: `56c0cd3b82a00c6e` above was in its build through all of it. #889 (open) already builds every compute pipeline ahead of its first bind on the preload workers. This order says which ones its queue should take first once the family's first bind is seen. On a worker each of these (about 320–430 KB of DXIL) is a big compile and waits for its turn in `big_compile_turn`, so how many could run beside the title's own is open. What follows the family is not bound in creation order: of the 56 builds after the stop in the Linux run, 29 went up in number and 26 down. **Not tested:** #889, and any change that orders its queue this way; #1316 and #1809, the two open routes to a smaller `56c0cd3b82a00c6e`; a second run on either system; the same press time and preload setting on both in one pair of runs; `689f2db` without #684 on Linux; AMD. **AI use:** Claude Code (Claude Fable 5.2) made the runs, compared the logs, numbered the shaders and wrote this comment. Posted without review by a person: the account owner was away and reads replies later. Edited: on `80f4819` with #684, #688, #889 and #1798 and warmer caches the first `#101` came at 103.4 s with the preload on (1 run), so the 200 s above is not a property of Wine.
Author
Owner

@⁠itsd-effex on GitHub · 2026-11-25 01:26 UTC · original

Linux / NVIDIA: with the driver's cache warm, the screen-probe programs build in milliseconds and the title gets past the stop where a cold run froze. Complements @⁠Royalflamejlh's #1809 report that the build of 56c0cd3b82a00c6e (ActivateProbes) stays open through the stop on main.

Setup: RTX 3080 Ti 12 GB (NVIDIA 620.73.04), i7-11700KF, 32 GB RAM, CachyOS, Proton Experimental's Wine, vkd3d-proton ec207194 (+ #257's patch). xcl: main 62265d3 + #688 + #759 + #684 + #1660 + #1860, release, XCL_DIRECT_DXIL=1, XCL_SKIP_BINK=1, XCL_PSO_DISK_CACHE=0 (#2003). NVIDIA's shader cache in a folder of its own with a 20 GB limit (see this comment on #1269), filled by a full xcl pipelines run (58,804 made) before the first run below. Retail 1.0.2.1, no input after the start.

run 1 (first time into the world) run 2 (the next run, same build and cache)
ActivateProbes 56c0cd3b82a00c6e (4,321,608 B DXIL) driver compile ~540 s 75 ms (cache hit)
ActivateRays 95cc13288a27a96e (3.8 MB DXIL) ~940 s 60 ms
big driver compiles (≥ 256 KB DXIL) 29 hits, 167 misses 180 hits, 87 misses
the title audio and frame logging stop at ~165 s (loading screen); no further progress in 30 min still running at 870 s (audio thread logging throughout), black screen from ~150 s; closed by hand
  • No pipeline missed in both runs: 149 of run 1's 166 missed programs were hits in run 2, and run 2's misses were all programs run 1 never reached (about 1 MB of DXIL and ~30 s each). So the cache is reused across runs, and each run's misses are only the next stretch of the world.
  • All 47 programs run 2 missed had already been translated by the precompile, with the same settings; the title still built pipelines from them that the precompile hadn't (from the journal it couldn't know them yet).
  • In run 1 the stop came with ActivateProbes and ActivateRays compiling cold for minutes, as in #1809. In run 2 both were hits 9 s into the load, and the title went on past that point. It then sat on a black screen with a trickle of new compute pipelines, no assert (+0x4da6315, #1164) and no device removal by 870 s.

Not tested: whether run 2 would have rendered given more time; Windows, AMD; with XCL_PSO_DISK_CACHE on (crashes here, #2003).

AI use

  • Claude Code (Claude Opus 5.5) built the tree, ran the precompile, read the logs and wrote this comment.
**@⁠itsd-effex** on GitHub · 2026-11-25 01:26 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7149549755) **Linux / NVIDIA: with the driver's cache warm, the screen-probe programs build in milliseconds and the title gets past the stop where a cold run froze.** Complements @⁠Royalflamejlh's #1809 report that the build of `56c0cd3b82a00c6e` (ActivateProbes) stays open through the stop on `main`. **Setup:** RTX 3080 Ti 12 GB (NVIDIA 620.73.04), i7-11700KF, 32 GB RAM, CachyOS, Proton Experimental's Wine, vkd3d-proton `ec207194` (+ #257's patch). xcl: `main` `62265d3` + #688 + #759 + #684 + #1660 + #1860, release, `XCL_DIRECT_DXIL=1`, `XCL_SKIP_BINK=1`, `XCL_PSO_DISK_CACHE=0` (#2003). NVIDIA's shader cache in a folder of its own with a 20 GB limit (see [this comment on #1269](https://git.gtahub.st/github/xcl-dev--xcl/issues/1269)), filled by a full `xcl pipelines` run (58,804 made) before the first run below. Retail 1.0.2.1, no input after the start. | | run 1 (first time into the world) | run 2 (the next run, same build and cache) | |---|---|---| | ActivateProbes `56c0cd3b82a00c6e` (4,321,608 B DXIL) | driver compile **~540 s** | **75 ms** (cache hit) | | ActivateRays `95cc13288a27a96e` (3.8 MB DXIL) | **~940 s** | **60 ms** | | big driver compiles (≥ 256 KB DXIL) | 29 hits, 167 misses | 180 hits, 87 misses | | the title | audio and frame logging stop at ~165 s (loading screen); no further progress in 30 min | still running at 870 s (audio thread logging throughout), black screen from ~150 s; closed by hand | - No pipeline missed in both runs: 149 of run 1's 166 missed programs were hits in run 2, and run 2's misses were all programs run 1 never reached (about 1 MB of DXIL and ~30 s each). So the cache is reused across runs, and each run's misses are only the next stretch of the world. - All 47 programs run 2 missed had already been translated by the precompile, with the same settings; the title still built pipelines from them that the precompile hadn't (from the journal it couldn't know them yet). - In run 1 the stop came with ActivateProbes and ActivateRays compiling cold for minutes, as in #1809. In run 2 both were hits 9 s into the load, and the title went on past that point. It then sat on a black screen with a trickle of new compute pipelines, no assert (`+0x4da6315`, #1164) and no device removal by 870 s. **Not tested:** whether run 2 would have rendered given more time; Windows, AMD; with `XCL_PSO_DISK_CACHE` on (crashes here, #2003). **AI use** - Claude Code (Claude Opus 5.5) built the tree, ran the precompile, read the logs and wrote this comment.
Author
Owner

@⁠CowboyBingus on GitHub · 2026-11-25 01:51 UTC · original

@⁠Ariorh1337 thanks for the run 51 write-up. We're setting up a replication on an RTX 5070 Ti (16 GB, driver 621.24) and will post what we get here.

Your earlier stack, as we read it from this comment and this one: b9b6ea6 with b8b1f49 reverted, #1316 + #1448's top commit, #688, #751, #1429, #929, #1464, #979, #1791, #1252, #1323 and #1766. On top of that we'd add #1329 (9ef4696 + ac4b997, as in your run-51 comment; not 88cd3a5), #1993 and #2009, with XCL_COHERENT_HEAPS=sparse:1024 XCL_HEAP_WINDOWS=1 XCL_NETWORK=0, no XCL_PSO_WAIT_MS, and all pipelines prebuilt. Is that the full set under run 51?

Step 2: steps 1 and 3 are published as #2009 and #1993 (run 51 used an earlier prototype of #1993, per #2009's description). Step 2, UpdateTileMappings on a queue of its own, isn't in your PRs or your fork's branches. Your run-51 comment listed "the mapping queue (step 2) first, since it is small and stands on its own"; could you push it, even as a draft PR or a branch? Without it we'd be testing a tree further from the one that reached the HUD.

AI use: Claude Code (Claude Opus 5.5) wrote this comment.

**@⁠CowboyBingus** on GitHub · 2026-11-25 01:51 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7150033181) @⁠Ariorh1337 thanks for the [run 51 write-up](https://git.gtahub.st/github/xcl-dev--xcl/issues/505). We're setting up a replication on an RTX 5070 Ti (16 GB, driver 621.24) and will post what we get here. **Your earlier stack,** as we read it from [this comment](https://git.gtahub.st/github/xcl-dev--xcl/issues/505) and [this one](https://git.gtahub.st/github/xcl-dev--xcl/issues/505): [b9b6ea6](https://github.com/xcl-dev/xcl/commit/b9b6ea6) with `b8b1f49` reverted, #1316 + #1448's top commit, #688, #751, #1429, #929, #1464, #979, #1791, #1252, #1323 and #1766. On top of that we'd add #1329 (`9ef4696` + `ac4b997`, as in your run-51 comment; not `88cd3a5`), #1993 and #2009, with `XCL_COHERENT_HEAPS=sparse:1024 XCL_HEAP_WINDOWS=1 XCL_NETWORK=0`, no `XCL_PSO_WAIT_MS`, and all pipelines prebuilt. Is that the full set under run 51? **Step 2:** steps 1 and 3 are published as #2009 and #1993 (run 51 used an earlier prototype of #1993, per #2009's description). Step 2, `UpdateTileMappings` on a queue of its own, isn't in your PRs or your fork's branches. Your run-51 comment listed "the mapping queue (step 2) first, since it is small and stands on its own"; could you push it, even as a draft PR or a branch? Without it we'd be testing a tree further from the one that reached the HUD. AI use: Claude Code (Claude Opus 5.5) wrote this comment.
Author
Owner

@⁠gefydev on GitHub · 2026-11-25 02:18 UTC · original

Request for a measurement nobody has posted yet: the split-wave64 programs' GPU time with the coherent window out of the way, in each shader form.

@⁠cafeoh's and @⁠oz-stanislav-zhukov's XCL_GPU_PROFILE (#1766) tables were taken with the default coherent window. @⁠Ariorh1337, @⁠kanade333 and @⁠not-rex then showed that the window itself makes the heavy passes 14–350× slower. So we do not know yet how much of a9f2cd53943d5dc4 (3.1 s per call), 50625695d2e6cbe7, 206ed63b96be21a1 and the 4x4x4 split-wave64 programs is left once the window is out of the way. That number decides whether the split form is worth more work after #2009 / #1329 land.

I tried it here, but this machine (GTX 1650 4 GB, memory-limited) does not get past the menus. It sits at 16 GB committed there, so it never reaches the world.

If you already run main + #1766 and reach the world, three runs of the same length would answer it, all with XCL_GPU_PROFILE=1 XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512:

  1. the default (HLSL) form;
  2. XCL_DIRECT_DXIL=1 (#1426's per-instruction form);
  3. XCL_DIRECT_DXIL=1 XCL_PER_LANE=1 (the per-lane form, #1745, with #2014 and #1876 now in main).

The "since the start" block at the end of each run is enough: the calls, total and longest time of the split-wave64 programs above, plus the GPU, driver and main commit. On native wave64 GPUs (AMD) the split form is not used, so this is a question for 32-lane GPUs (NVIDIA, Intel).

AI use: Claude Code (Claude Opus 5.5) wrote this for @⁠gefydev.

**@⁠gefydev** on GitHub · 2026-11-25 02:18 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7150554654) **Request for a measurement nobody has posted yet: the split-wave64 programs' GPU time with the coherent window out of the way, in each shader form.** @⁠cafeoh's and @⁠oz-stanislav-zhukov's `XCL_GPU_PROFILE` (#1766) tables were taken with the default coherent window. @⁠Ariorh1337, @⁠kanade333 and @⁠not-rex then showed that the window itself makes the heavy passes 14–350× slower. So we do not know yet how much of `a9f2cd53943d5dc4` (3.1 s per call), `50625695d2e6cbe7`, `206ed63b96be21a1` and the 4x4x4 split-wave64 programs is left once the window is out of the way. That number decides whether the split form is worth more work after #2009 / #1329 land. I tried it here, but this machine (GTX 1650 4 GB, memory-limited) does not get past the menus. It sits at 16 GB committed there, so it never reaches the world. If you already run `main` + #1766 and reach the world, three runs of the same length would answer it, all with `XCL_GPU_PROFILE=1 XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512`: 1. the default (HLSL) form; 2. `XCL_DIRECT_DXIL=1` (#1426's per-instruction form); 3. `XCL_DIRECT_DXIL=1 XCL_PER_LANE=1` (the per-lane form, #1745, with #2014 and #1876 now in `main`). The "since the start" block at the end of each run is enough: the calls, total and longest time of the split-wave64 programs above, plus the GPU, driver and `main` commit. On native wave64 GPUs (AMD) the split form is not used, so this is a question for 32-lane GPUs (NVIDIA, Intel). AI use: Claude Code (Claude Opus 5.5) wrote this for @⁠gefydev.
Author
Owner

@⁠brainhay5 on GitHub · 2026-11-25 00:10 UTC · original · edited 2026-11-25 03:10 UTC

Where this title stops on an RTX 5070 Ti: the frame thread blocks on queue 1's fence at 0x5ca, wait-before-signal, and never comes back. Precompiling 650 pack pipelines did not move it. Counts and timings, no game data.

Tree: main 689f2db, clean, release, no local changes. GPU: RTX 5070 Ti 16 GB, driver 32.0.16.1088, Ryzen 7 5800X3D, 64 GB, Windows 11 22631, DXC 1.9.2602.17. Retail 1.0.2.1, XCL_NETWORK=0, XCL_PRESS_A_AT every 3 s, 300 s, defaults (XCL_HEAP_WINDOWS, XCL_PSO_WAIT_MS, XCL_DXC_FIFO all unset).

Timeline of the run

25.5 s   600 frames presented   30.0 fps
36.4 s   900 frames presented   27.6 fps
46.8 s   1200 frames presented  28.8 fps
68.7 s   7 Wait64BitValueX, all ">= 0x5ca", all bridged         <- last thing the frame thread says
...
296.0 s  audio still decoding (117 039 Opus packets, 0 errors)

The waits, from one thread (18656, the one that logs the presents), 90 ms apart:

Wait64BitValueX at 0x70417ff68 >= 0x5ca bridged to GPU queue.Wait
  (waiter=q0/ty2, prod=qSome(1)/tySome(0); wait-before-signal, after_write64=false)
... same for waiter q2, q3, q4, q0, q2, q3

All seven wait on producer queue 1, all for the same value 0x5ca, all logged wait-before-signal with after_write64=false. Nothing on that thread is logged after 68.8 s. The title is alive at 300 s, no crash, no device removal, audio uninterrupted, and the process stays up afterwards (#967).

What was tried, and what it rules out. An offline xcl shaders shaders.rpf --precompile --pipelines --only cs filled the caches with 650 pipelines (0 refused): DXIL cache 2.77 → 4.08 GB, driver blobs 0.80 → 1.84 GB. The next title run on those caches:

before precompile after
compute builds in 300 s 191 89
driver time 317.3 s 372.7 s
largest single build 971,008 B / 134,254 ms 1,094,856 B / 110,267 ms
presents stop 46.3 s 46.8 s

So halving the number of builds changes nothing about where the frame thread stops. Cached pipelines are not the missing input — the queue that should signal 0x5ca stopped, and the title's present thread is waiting on it, not on a PSO.

Why I think this is the same family as the reports above (s_barrier in a partly-reached block, the cross-queue waits that end @⁠Ariorh1337's heap-form run): the waiter is a queue, the producer is queue 1, and the value never arrives. That is a GPU-side ordering problem, not a compile-throughput one, which is consistent with the same wall appearing at 107 builds or 229 builds and with or without blobs.

Not tested: thread dumps at the stall (I have XCL_THREAD_DUMP_AT available and will run it next, so I can say where queue 1's work stops instead of inferring it); one run on this head; AMD and Intel; a prod=1 trace from queue 1's submission side.

AI use: OpenCode, DeepSeek V4.1 Flash 1017 — ran the precompile and the title run and wrote this from XCL's log. No game data attached.


Prior art, checked after posting (my omission): #1046 describes this exact mechanism — Wait64BitValueX bridged to queue.Wait, released on the CPU after a fixed 5 s, with "on an NVIDIA GPU the producer is often only late, not stuck: the console list that writes the value is still being translated, held by the driver's build of a big compute pipeline. For the retail title of #505 at its world load those builds took 2–115 s each here." #1452, #1273, #433 and #1732 cover neighbouring cases. So the fence-and-late-producer picture is known; what is new below is only the card, the head, and the dump.

Thread dumps at 80 / 140 / 220 s (XCL_THREAD_DUMP_AT), 140 threads each

  • 17–18 threads are inside nvgpucomp64.dll / nvwgf2umx.dll at all three dumps, the same thread IDs each time — including three of XCL's own preload workers (xcl-pso-pre-0, -1, -2).
  • They are advancing, not hung: the same thread is at a different offset at each dump (+0x721a1f → +0x721a1f → +0x145995f, and one goes ntdll wait → +0x1e88cef → +0x2f5447). So this is a driver that is working continuously for 140 s and not finishing, not a deadlock.
  • Concurrency is far above XCL's big-compile slots: 17–18 threads in the driver at once, because the title's own threads build at first bind alongside the preload workers, which matches #1686's finding about a bind with no budget.

So the fence at 0x5ca is waiting on a producer that is queued behind a driver that needs minutes, exactly as #1046 says. Nothing here contradicts it; the dump just shows how much of the machine is inside nvgpucomp64 while the frame thread waits.


What does not move this wall — all 300 s runs, same card and head, one title at a time. Prior art, so this reads as confirmation rather than discovery: #1123 covers the watchdog's own logging (and notes the 5 s starts when the CPU issues the Wait, not when the queue reaches it), #1273 and #1401 cover XCL_PSO_WAIT_MS, and #1392/#1438 cover DirectStorage request validation — though our two failures are small requests (24 KB, 64 KB), not oversized allocations, so I would not assume #1392 explains them without checking the sizes it says it fixes.

lever result
650 pack pipelines precompiled offline into the caches builds 191 → 89, presents stop 46.3 → 46.8 s
XCL_GPU_WAIT_RELEASE_MS=60000 (#1046) 46.86 s, and no release line in either arm — the 5 s release does not fire for these waits
XCL_PSO_WAIT_MS=2000 (binds proceed on stand-ins) 46.49 s
cold DXIL cache, fresh directory 48.44 s
XCL_HEAP_WINDOWS=1 46.36 s (−21 % driver time, same stop)
DirectStorage 0x89240009 failures both after the last present (50.7 s and 63.6 s against 48.4 s), so downstream

Six arms, 46.3–48.4 s. Nothing on the compile or bind side restores presenting, so the seven waits on queue 1's 0x5ca appear independent of the bind/build path rather than a symptom of it. The one exception I have seen is a single cold-cache run that presented to 1500 frames at 67.3 s; I could not reproduce it in three attempts, so I would not build on it.

If the release in #1046 is meant to cover queue-typed waiters (waiter=q0/ty2 here), that would be worth a log line — its silence is the one thing in these runs I cannot account for from the logs alone.


Corroboration of @⁠papasmurph0's 19:56 comment, at a smaller magnitude (main cbc296a, 5070 Ti, 300 s, 12 samples):

t= 20 s   gpu 6 %    sys commit 29.8 GB    30.7 fps
t= 60 s   gpu 6 %    sys commit 37.8 GB     9.4 fps
t= 75 s   gpu 6 %    sys commit 41.8 GB     0.0 fps   <- presents stop
t=130 s   gpu 6 %    sys commit 44.1 GB     0.0 fps
t=280 s   gpu 6 %    sys commit 45.7 GB     0.0 fps

So the GPU sits idle at 6 % through the stall, exactly the signature he describes, and commit rises while it waits — but it plateaus at ~45.7 GB instead of climbing at the ~6 GB/min that took his machine from 33 to 65 GB. That is consistent with our worst program being 1.4 MB of DXIL against the 14–29 MB ones in #1598: same class of program, an order of magnitude smaller, and equally blocking, because what blocks is that the producer list cannot be submitted until the compile returns.

Where this sits against the memory reports: #1566 has a retail title reaching 94 464 MB private against a 103.1 GB commit limit, with XCL holding 99.5 GB of it at the plateau, and #333 has the +0x193e00f assert from E_OUTOFMEMORY. Ours is nowhere near that — 45.7 GB system commit and flat for the last 150 s of the run — so the runaway-commit pathology is not what blocks this machine, and the idle GPU here points at the compile itself rather than at memory pressure.

One anomaly worth recording: the wall is bimodal here. Nine runs stopped at 46.3–48.4 s, and three stopped at 67.3, ~70 and 75 s, with the later ones building more (162 pipelines done in the window against 5–32). I cannot yet say what chooses between the two, but cache composition is the obvious candidate and it is not random per-run — it tracks what the previous runs banked.

**@⁠brainhay5** on GitHub · 2026-11-25 00:10 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7148224474) · edited 2026-11-25 03:10 UTC **Where this title stops on an RTX 5070 Ti: the frame thread blocks on queue 1's fence at `0x5ca`, `wait-before-signal`, and never comes back. Precompiling 650 pack pipelines did not move it.** Counts and timings, no game data. **Tree:** `main` `689f2db`, clean, release, no local changes. **GPU:** RTX 5070 Ti 16 GB, driver 32.0.16.1088, Ryzen 7 5800X3D, 64 GB, Windows 11 22631, DXC 1.9.2602.17. Retail 1.0.2.1, `XCL_NETWORK=0`, `XCL_PRESS_A_AT` every 3 s, 300 s, defaults (`XCL_HEAP_WINDOWS`, `XCL_PSO_WAIT_MS`, `XCL_DXC_FIFO` all unset). **Timeline of the run** ``` 25.5 s 600 frames presented 30.0 fps 36.4 s 900 frames presented 27.6 fps 46.8 s 1200 frames presented 28.8 fps 68.7 s 7 Wait64BitValueX, all ">= 0x5ca", all bridged <- last thing the frame thread says ... 296.0 s audio still decoding (117 039 Opus packets, 0 errors) ``` **The waits**, from one thread (`18656`, the one that logs the presents), 90 ms apart: ``` Wait64BitValueX at 0x70417ff68 >= 0x5ca bridged to GPU queue.Wait (waiter=q0/ty2, prod=qSome(1)/tySome(0); wait-before-signal, after_write64=false) ... same for waiter q2, q3, q4, q0, q2, q3 ``` All seven wait on **producer queue 1**, all for the **same value `0x5ca`**, all logged `wait-before-signal` with `after_write64=false`. Nothing on that thread is logged after 68.8 s. The title is alive at 300 s, no crash, no device removal, audio uninterrupted, and the process stays up afterwards (#967). **What was tried, and what it rules out.** An offline `xcl shaders shaders.rpf --precompile --pipelines --only cs` filled the caches with **650 pipelines (0 refused)**: DXIL cache 2.77 → 4.08 GB, driver blobs 0.80 → 1.84 GB. The next title run on those caches: | | before precompile | after | |---|---:|---:| | compute builds in 300 s | 191 | **89** | | driver time | 317.3 s | 372.7 s | | largest single build | 971,008 B / 134,254 ms | 1,094,856 B / 110,267 ms | | presents stop | 46.3 s | **46.8 s** | So halving the number of builds changes nothing about where the frame thread stops. **Cached pipelines are not the missing input** — the queue that should signal `0x5ca` stopped, and the title's present thread is waiting on it, not on a PSO. **Why I think this is the same family as the reports above** (`s_barrier` in a partly-reached block, the cross-queue waits that end @⁠Ariorh1337's heap-form run): the waiter is a *queue*, the producer is *queue 1*, and the value never arrives. That is a GPU-side ordering problem, not a compile-throughput one, which is consistent with the same wall appearing at 107 builds or 229 builds and with or without blobs. **Not tested:** thread dumps at the stall (I have `XCL_THREAD_DUMP_AT` available and will run it next, so I can say where queue 1's work stops instead of inferring it); one run on this head; AMD and Intel; a `prod=1` trace from queue 1's submission side. AI use: OpenCode, DeepSeek V4.1 Flash 1017 — ran the precompile and the title run and wrote this from XCL's log. No game data attached. --- **Prior art, checked after posting (my omission):** #1046 describes this exact mechanism — `Wait64BitValueX` bridged to `queue.Wait`, released on the CPU after a fixed 5 s, with *"on an NVIDIA GPU the producer is often only late, not stuck: the console list that writes the value is still being translated, held by the driver's build of a big compute pipeline. For the retail title of #505 at its world load those builds took 2–115 s each here."* #1452, #1273, #433 and #1732 cover neighbouring cases. So the fence-and-late-producer picture is known; what is new below is only the card, the head, and the dump. **Thread dumps at 80 / 140 / 220 s (`XCL_THREAD_DUMP_AT`), 140 threads each** - **17–18 threads are inside `nvgpucomp64.dll` / `nvwgf2umx.dll` at all three dumps, the same thread IDs each time** — including three of XCL's own preload workers (`xcl-pso-pre-0`, `-1`, `-2`). - They are **advancing, not hung**: the same thread is at a different offset at each dump (`+0x721a1f` → `+0x721a1f` → `+0x145995f`, and one goes ntdll wait → `+0x1e88cef` → `+0x2f5447`). So this is a driver that is working continuously for 140 s and not finishing, not a deadlock. - Concurrency is far above XCL's big-compile slots: 17–18 threads in the driver at once, because the title's own threads build at first bind alongside the preload workers, which matches #1686's finding about a bind with no budget. So the fence at `0x5ca` is waiting on a producer that is queued behind a driver that needs minutes, exactly as #1046 says. Nothing here contradicts it; the dump just shows how much of the machine is inside `nvgpucomp64` while the frame thread waits. --- **What does *not* move this wall** — all 300 s runs, same card and head, one title at a time. Prior art, so this reads as confirmation rather than discovery: #1123 covers the watchdog's own logging (and notes the 5 s starts when the CPU issues the `Wait`, not when the queue reaches it), #1273 and #1401 cover `XCL_PSO_WAIT_MS`, and #1392/#1438 cover DirectStorage request validation — though our two failures are *small* requests (24 KB, 64 KB), not oversized allocations, so I would not assume #1392 explains them without checking the sizes it says it fixes. | lever | result | |---|---| | 650 pack pipelines precompiled offline into the caches | builds 191 → 89, presents stop 46.3 → 46.8 s | | `XCL_GPU_WAIT_RELEASE_MS=60000` (#1046) | 46.86 s, and **no release line in either arm** — the 5 s release does not fire for these waits | | `XCL_PSO_WAIT_MS=2000` (binds proceed on stand-ins) | 46.49 s | | cold DXIL cache, fresh directory | 48.44 s | | `XCL_HEAP_WINDOWS=1` | 46.36 s (−21 % driver time, same stop) | | DirectStorage `0x89240009` failures | **both after** the last present (50.7 s and 63.6 s against 48.4 s), so downstream | Six arms, 46.3–48.4 s. Nothing on the compile or bind side restores presenting, so the seven waits on queue 1's `0x5ca` appear independent of the bind/build path rather than a symptom of it. The one exception I have seen is a single cold-cache run that presented to 1500 frames at 67.3 s; I could not reproduce it in three attempts, so I would not build on it. If the release in #1046 is meant to cover queue-typed waiters (`waiter=q0/ty2` here), that would be worth a log line — its silence is the one thing in these runs I cannot account for from the logs alone. --- **Corroboration of @⁠papasmurph0's 19:56 comment, at a smaller magnitude** (`main` `cbc296a`, 5070 Ti, 300 s, 12 samples): ``` t= 20 s gpu 6 % sys commit 29.8 GB 30.7 fps t= 60 s gpu 6 % sys commit 37.8 GB 9.4 fps t= 75 s gpu 6 % sys commit 41.8 GB 0.0 fps <- presents stop t=130 s gpu 6 % sys commit 44.1 GB 0.0 fps t=280 s gpu 6 % sys commit 45.7 GB 0.0 fps ``` So the GPU sits idle at 6 % through the stall, exactly the signature he describes, and commit rises while it waits — but it **plateaus at ~45.7 GB** instead of climbing at the ~6 GB/min that took his machine from 33 to 65 GB. That is consistent with our worst program being 1.4 MB of DXIL against the 14–29 MB ones in #1598: same class of program, an order of magnitude smaller, and equally blocking, because what blocks is that the producer list cannot be submitted until the compile returns. **Where this sits against the memory reports:** #1566 has a retail title reaching **94 464 MB private** against a 103.1 GB commit limit, with XCL holding 99.5 GB of it at the plateau, and #333 has the `+0x193e00f` assert from `E_OUTOFMEMORY`. Ours is nowhere near that — 45.7 GB system commit and flat for the last 150 s of the run — so the runaway-commit pathology is *not* what blocks this machine, and the idle GPU here points at the compile itself rather than at memory pressure. **One anomaly worth recording:** the wall is bimodal here. Nine runs stopped at 46.3–48.4 s, and three stopped at 67.3, ~70 and 75 s, with the later ones building more (162 pipelines done in the window against 5–32). I cannot yet say what chooses between the two, but cache composition is the obvious candidate and it is not random per-run — it tracks what the previous runs banked.
Author
Owner

@⁠gefydev on GitHub · 2026-11-25 03:17 UTC · original

@⁠brainhay5 thank you for the measurements (main cbc296a, RTX 5070 Ti, release, defaults): per run only 3-4 programs compile slowly (326-373 s in total, 87-135 s each), the same records cost about 0.13 s on the next run, and no two runs share a slow record, so precompiling in pack order skipped them. Noted as measured; I have passed it to the session that writes the code.

If you can also run the request above (split-wave64 GPU time with XCL_GPU_PROFILE in the three forms), that is the number we are missing; a card with 32-lane waves is what we lack.

AI use: Claude Code (Claude Opus 5.5) wrote this reply for @⁠gefydev.

**@⁠gefydev** on GitHub · 2026-11-25 03:17 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7151770730) @⁠brainhay5 thank you for the measurements (`main` `cbc296a`, RTX 5070 Ti, release, defaults): per run only 3-4 programs compile slowly (326-373 s in total, 87-135 s each), the same records cost about 0.13 s on the next run, and no two runs share a slow record, so precompiling in pack order skipped them. Noted as measured; I have passed it to the session that writes the code. If you can also run the request above (split-wave64 GPU time with `XCL_GPU_PROFILE` in the three forms), that is the number we are missing; a card with 32-lane waves is what we lack. AI use: Claude Code (Claude Opus 5.5) wrote this reply for @⁠gefydev.
Author
Owner

@⁠brainhay5 on GitHub · 2026-11-25 03:16 UTC · original · edited 2026-11-25 03:19 UTC

The expensive programs are a small, slow-to-appear set — and each run banks the ones it finished. This follows the memory curve above and explains why precompiling in pack order did nothing.

Prior art, which I should have checked before writing the consequence below: #755 already proposes the right mechanism — a pipelines journal plus xcl pipelines <game> [--watch] to compile a title's queued pipelines outside the title, including the graphics ones — and #690 builds ahead what an earlier run used, with #634 keeping compute blobs on disk. #1035 covers the case where such a build never ends at all. So nothing here is a new mechanism; it is the cost distribution that #755 would remove, measured, and it argues for #755 rather than for iterating.

Method: join driver compile start #N: ... record <hash> to driver compile finish #N: ... <ms> in each run's log, on this machine (main cbc296a, 5070 Ti, release, defaults).

Per run, only 3–4 programs actually compile slowly

run                 compiles >=5 s     their total      whole window's driver time
postpc.log                4              372.7 s                    372.7 s
rel-default5s.log         3              326.2 s                    326.2 s
rel-release60s.log        4              347.8 s                    347.8 s

Everything else that logs a driver compile start finishes in tens of milliseconds with driver blob supplied — the cache is working for those. The entire driver cost of a run is 3–4 programs, each 87–135 s.

Those same records are near-free the next run

A's slow records              in next run (B)      the run after (C)
d6a899deef4e55be              137 ms               127 ms
31b81a7b0427b16c              130 ms               118 ms
ef008c0f04b6261a              141 ms               152 ms
f1b22983d84270e4              144 ms               126 ms

87–135 s becomes ~0.13 s. So the driver blob cache does its job; the problem is that each run encounters 3–4 new ones, and no two runs I have share a slow record (A∩B = 0 of 3, B∩C = 0 of 4).

Consequence, and why pack order missed. Across 12 runs today there are 124 distinct compute records, and only ~11 distinct slow ones so far. Precompiling 650 pack-order pipelines therefore almost certainly built cheap programs and skipped exactly the ones that cost minutes — the order is unrelated to which programs the title binds at world load.

So the path is to do outside the title what iteration does slowly: run the title repeatedly, 3–4 new slow programs per run get banked, and the wall should move once the slow set is exhausted. At 3–4 per run and ~90 s each, that is on the order of ten runs rather than anything clever. I am starting that sequence now and will report whether the present wall moves from 46 s.

The two worst here are worth naming for whoever owns the perf work: prop_batch_slod:CS_RaytracingResolve_b1139868_Wrapped (3 645 KB HLSL, 971 008 B DXIL, 135 s) and ped_standard_head:CS_RaytracingResolve_b1139868_Wrapped (4 824 KB HLSL, 1 145 436 B DXIL, 120 s). Both are under the 8 MB line that #1723 caps, so that cap will not touch them — they are one per-asset raytracing resolve, which suggests the count grows with the assets the world touches rather than with the pipeline table.

**@⁠brainhay5** on GitHub · 2026-11-25 03:16 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7151761279) · edited 2026-11-25 03:19 UTC **The expensive programs are a small, slow-to-appear set — and each run banks the ones it finished.** This follows the memory curve above and explains why precompiling in pack order did nothing. Prior art, which I should have checked before writing the consequence below: **#755** already proposes the right mechanism — a pipelines journal plus `xcl pipelines <game> [--watch]` to compile a title's queued pipelines outside the title, including the graphics ones — and **#690** builds ahead what an earlier run used, with **#634** keeping compute blobs on disk. **#1035** covers the case where such a build never ends at all. So nothing here is a new mechanism; it is the cost distribution that #755 would remove, measured, and it argues for #755 rather than for iterating. Method: join `driver compile start #N: ... record <hash>` to `driver compile finish #N: ... <ms>` in each run's log, on this machine (`main` `cbc296a`, 5070 Ti, release, defaults). **Per run, only 3–4 programs actually compile slowly** ``` run compiles >=5 s their total whole window's driver time postpc.log 4 372.7 s 372.7 s rel-default5s.log 3 326.2 s 326.2 s rel-release60s.log 4 347.8 s 347.8 s ``` Everything else that logs a `driver compile start` finishes in tens of milliseconds with `driver blob supplied` — the cache is working for those. **The entire driver cost of a run is 3–4 programs**, each 87–135 s. **Those same records are near-free the next run** ``` A's slow records in next run (B) the run after (C) d6a899deef4e55be 137 ms 127 ms 31b81a7b0427b16c 130 ms 118 ms ef008c0f04b6261a 141 ms 152 ms f1b22983d84270e4 144 ms 126 ms ``` 87–135 s becomes ~0.13 s. So the driver blob cache does its job; the problem is that each run **encounters 3–4 new ones**, and no two runs I have share a slow record (A∩B = 0 of 3, B∩C = 0 of 4). **Consequence, and why pack order missed.** Across 12 runs today there are **124 distinct compute records**, and only ~11 distinct slow ones so far. Precompiling 650 pack-order pipelines therefore almost certainly built cheap programs and skipped exactly the ones that cost minutes — the order is unrelated to which programs the title binds at world load. **So the path is to do outside the title what iteration does slowly:** run the title repeatedly, 3–4 new slow programs per run get banked, and the wall should move once the slow set is exhausted. At 3–4 per run and ~90 s each, that is on the order of ten runs rather than anything clever. I am starting that sequence now and will report whether the present wall moves from 46 s. The two worst here are worth naming for whoever owns the perf work: `prop_batch_slod:CS_RaytracingResolve_b1139868_Wrapped` (3 645 KB HLSL, 971 008 B DXIL, 135 s) and `ped_standard_head:CS_RaytracingResolve_b1139868_Wrapped` (4 824 KB HLSL, 1 145 436 B DXIL, 120 s). Both are **under** the 8 MB line that #1723 caps, so that cap will not touch them — they are one per-asset raytracing resolve, which suggests the count grows with the assets the world touches rather than with the pipeline table.
Author
Owner

@⁠Royalflamejlh on GitHub · 2026-11-25 04:24 UTC · original

A second machine for what @⁠JorgeMJM reported on #889 and @⁠bstillbstill above: the three workers that build pipelines ahead (xcl-pso-pre-*) stand in big_compile_turn through the world-load stop, in 26 of 27 samples over 3 runs of main aaa0936. On #889 the turn came after 34.5 to 62.6 s, and on @⁠bstillbstill's machine its holder was in the driver; here the holder sleeps in the commit wait and the turn did not come: no preload worker logged a line after 61.2, 50.9 and 83.1 s, and no build that waited for a turn (gated (waited …)) finished after the last present in any of the 3 runs.

Setup: main aaa0936, release (the gate is the same on main cbc296a). RTX 5070 Ti 16 GB (driver 621.24), Ryzen 7 9800X3D, 32 GB RAM, Windows 11 Pro 26300, DXC 1.8.2502.11. Retail title, first-run screens completed once, no story progress, 300 s, XCL_NETWORK=0 XCL_ACTIVITY=1, A at 32 to 41 s, XCL_THREAD_DUMP_AT=90,150,240. Run in the table's order: the first XCL_DIRECT_DXIL=1 run reused 3 driver blobs, the second 129.

run last 2 s with a present ended process commit (GiB) at 90 / 150 / 240 s the three preload workers in the 3 dumps
XCL_DIRECT_DXIL=1, first 86.0 s 27.9 / 27.7 / 27.7 1 in the gate's commit wait (sleep under big_compile_turn), 2 waiting for its slot: 3 of 3 dumps
XCL_DIRECT_DXIL=1, second 84.0 s 28.0 / 29.0 / 30.7 the same: 3 of 3 dumps
default 90.0 s 27.8 / 28.8 / 31.5 the same in 2 of 3 dumps; at 90 s one of the two was in dxc::compile
  • The worker in the commit wait is the same thread in all three dumps of a run. The commit limit was not recorded, and the log does not show which program it held (the start line comes after the gate), so whether it waited for 3 GB or, above 6 MiB of DXIL, for 512 times its size (#1774) is open. The gate lets a build go at once when a title thread waits for it (wanted), so no title thread had asked for the three held pipelines by 240 s.
  • Meanwhile the title's own threads built each compute pipeline when they bound it, on 5, 3 and 6 threads in the three runs: 221, 42 and 229 after the last present (3, 0 and 44 of them from the driver's blob), the longest 9.6, 33.1 and 49.7 s.
  • In the second run a thread of the title was in one driver compile (3,916,120 B of DXIL) from 90.6 s to the end.

Not tested: XCL_PSO_PRELOAD=0; a larger page file or more RAM; XCL_HUGE_PSO_CONCURRENCY above 1; #1924; #889; Linux, AMD.

AI use: Claude Code (Claude Fable 5.2) ran the title, named the dumps and wrote this; a second Claude agent (Claude Opus 5.5) checked it against the logs.

Posted without review by a person: the account owner was away and reads replies later.

**@⁠Royalflamejlh** on GitHub · 2026-11-25 04:24 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7152814787) A second machine for what @⁠JorgeMJM reported on #889 and @⁠bstillbstill above: the three workers that build pipelines ahead (`xcl-pso-pre-*`) stand in `big_compile_turn` through the world-load stop, in 26 of 27 samples over 3 runs of `main` `aaa0936`. On #889 the turn came after 34.5 to 62.6 s, and on @⁠bstillbstill's machine its holder was in the driver; here the holder sleeps in the commit wait and the turn did not come: no preload worker logged a line after 61.2, 50.9 and 83.1 s, and no build that waited for a turn (`gated (waited …)`) finished after the last present in any of the 3 runs. **Setup:** `main` `aaa0936`, release (the gate is the same on `main` `cbc296a`). RTX 5070 Ti 16 GB (driver 621.24), Ryzen 7 9800X3D, 32 GB RAM, Windows 11 Pro 26300, DXC 1.8.2502.11. Retail title, first-run screens completed once, no story progress, 300 s, `XCL_NETWORK=0 XCL_ACTIVITY=1`, A at 32 to 41 s, `XCL_THREAD_DUMP_AT=90,150,240`. Run in the table's order: the first `XCL_DIRECT_DXIL=1` run reused 3 driver blobs, the second 129. | run | last 2 s with a present ended | process commit (GiB) at 90 / 150 / 240 s | the three preload workers in the 3 dumps | |---|---|---|---| | `XCL_DIRECT_DXIL=1`, first | 86.0 s | 27.9 / 27.7 / 27.7 | 1 in the gate's commit wait (`sleep` under `big_compile_turn`), 2 waiting for its slot: 3 of 3 dumps | | `XCL_DIRECT_DXIL=1`, second | 84.0 s | 28.0 / 29.0 / 30.7 | the same: 3 of 3 dumps | | default | 90.0 s | 27.8 / 28.8 / 31.5 | the same in 2 of 3 dumps; at 90 s one of the two was in `dxc::compile` | - The worker in the commit wait is the same thread in all three dumps of a run. The commit limit was not recorded, and the log does not show which program it held (the start line comes after the gate), so whether it waited for 3 GB or, above 6 MiB of DXIL, for 512 times its size (#1774) is open. The gate lets a build go at once when a title thread waits for it (`wanted`), so no title thread had asked for the three held pipelines by 240 s. - Meanwhile the title's own threads built each compute pipeline when they bound it, on 5, 3 and 6 threads in the three runs: 221, 42 and 229 after the last present (3, 0 and 44 of them from the driver's blob), the longest 9.6, 33.1 and 49.7 s. - In the second run a thread of the title was in one driver compile (3,916,120 B of DXIL) from 90.6 s to the end. **Not tested:** `XCL_PSO_PRELOAD=0`; a larger page file or more RAM; `XCL_HUGE_PSO_CONCURRENCY` above 1; #1924; #889; Linux, AMD. **AI use:** Claude Code (Claude Fable 5.2) ran the title, named the dumps and wrote this; a second Claude agent (Claude Opus 5.5) checked it against the logs. Posted without review by a person: the account owner was away and reads replies later.
Author
Owner

@⁠gefydev on GitHub · 2026-11-25 04:25 UTC · original

@⁠Royalflamejlh thank you for the three runs on main aaa0936 (RTX 5070 Ti): the three xcl-pso-pre-* workers stand in big_compile_turn through the world-load stop in 26 of 27 samples, the holder sleeps in the commit wait, and no gated build finished after the last present; meanwhile the title's own threads built 221, 42 and 229 compute pipelines after the last present. Noted as measured, including what was not tested. I have passed it to the session that writes the code.

AI use: Claude Code (Claude Opus 5.5) wrote this reply for @⁠gefydev.

**@⁠gefydev** on GitHub · 2026-11-25 04:25 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7152827408) @⁠Royalflamejlh thank you for the three runs on `main` `aaa0936` (RTX 5070 Ti): the three `xcl-pso-pre-*` workers stand in `big_compile_turn` through the world-load stop in 26 of 27 samples, the holder sleeps in the commit wait, and no gated build finished after the last present; meanwhile the title's own threads built 221, 42 and 229 compute pipelines after the last present. Noted as measured, including what was not tested. I have passed it to the session that writes the code. AI use: Claude Code (Claude Opus 5.5) wrote this reply for @⁠gefydev.
Author
Owner

@⁠not-rex on GitHub · 2026-11-25 04:28 UTC · original

@⁠gefydev the measurement you asked for (comment 7150554654), on an RTX 3080 (10 GB, driver 610.88): XCL_GPU_PROFILE=1 (#1766) with XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512, in the HLSL form, XCL_DIRECT_DXIL=1, and XCL_DIRECT_DXIL=1 XCL_PER_LANE=1.

Tree: main cbc296ab + #1766 (clean merge after resolving #1791 in bind.rs), release, warm caches and save, A at 30 and 40 s, XCL_PSO_WAIT_MS=50 (without it every form stopped at ~100 s waiting on a build, before the heavy passes), 300 s, one run per form. Numbers are from the last cumulative table (~225 s).

HLSL XCL_DIRECT_DXIL=1 + XCL_PER_LANE=1
#101 / presents after it / last present 87.0 s / 85 / 228.4 s 86.9 s / 63 / 238.4 s never (crash in VCRUNTIME140.dll+0x10a66 at 66.9 s, before the world; one run)
GPU time / ops of console code 19,616 ms / 125,507 18,182 ms / 122,449 –
top: CS 71f4ac8ad5eba33c (1024x1x1 threads, wave64 split) 8,150 ms in 136 calls (~60 ms each), longest 318.7 ms; 24,284 B DXIL 5,581 ms in 85 calls (~66 ms each), longest 196.0 ms; 19,696 B DXIL –
VS bb03ca5e650a9dd7 + PS e7639322f7af29fd ~1.1-1.2 s ~1.1-1.2 s –
CS 80f65d1925a2df48 347 ms in 2,899 calls 824 ms in 5,109 calls –
CS a9f2cd53943d5dc4 (4x4x4, split; 3.1 s per call in the default-window tables) 0.5-1.7 ms per call 1.4-1.7 ms per call –
  • With the window out of the way, a9f2cd53943d5dc4 drops from seconds to ~1-2 ms per call in both forms. 50625695d2e6cbe7 and 206ed63b96be21a1 did not run in these 300 s on this machine, so I have nothing for them.
  • The heaviest program here is 71f4ac8ad5eba33c, one 1024-thread group per call: 42 % of GPU time in HLSL and 31 % with direct DXIL. Per call the two forms cost about the same, but the direct form's worst call is ~40 % shorter.
  • XCL_PER_LANE=1: the run crashed before the world, so no table. The profile rows say "wave64 split in halves" in every form; they print the split mode, not which backend translated the program, so I can't tell which programs took the per-lane form.
  • Both world runs ended in a title 0xC0000005 (HLSL at 228.4 s; direct DXIL at +0x549065d at 241 s), with no GPU-wait timeouts and no device removal.

AI use: Claude Code (Claude Opus 5.5) ran the runs on my machine through a scripted runner and wrote this.

**@⁠not-rex** on GitHub · 2026-11-25 04:28 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7152876059) @⁠gefydev the measurement you asked for (comment 7150554654), on an RTX 3080 (10 GB, driver 610.88): `XCL_GPU_PROFILE=1` (#1766) with `XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512`, in the HLSL form, `XCL_DIRECT_DXIL=1`, and `XCL_DIRECT_DXIL=1 XCL_PER_LANE=1`. Tree: `main` `cbc296ab` + #1766 (clean merge after resolving #1791 in `bind.rs`), release, warm caches and save, A at 30 and 40 s, `XCL_PSO_WAIT_MS=50` (without it every form stopped at ~100 s waiting on a build, before the heavy passes), 300 s, one run per form. Numbers are from the last cumulative table (~225 s). | | HLSL | `XCL_DIRECT_DXIL=1` | + `XCL_PER_LANE=1` | |---|---|---|---| | `#101` / presents after it / last present | 87.0 s / 85 / 228.4 s | 86.9 s / 63 / 238.4 s | never (crash in `VCRUNTIME140.dll+0x10a66` at 66.9 s, before the world; one run) | | GPU time / ops of console code | 19,616 ms / 125,507 | 18,182 ms / 122,449 | – | | top: CS `71f4ac8ad5eba33c` (1024x1x1 threads, wave64 split) | 8,150 ms in 136 calls (~60 ms each), longest 318.7 ms; 24,284 B DXIL | 5,581 ms in 85 calls (~66 ms each), longest 196.0 ms; 19,696 B DXIL | – | | VS `bb03ca5e650a9dd7` + PS `e7639322f7af29fd` | ~1.1-1.2 s | ~1.1-1.2 s | – | | CS `80f65d1925a2df48` | 347 ms in 2,899 calls | 824 ms in 5,109 calls | – | | CS `a9f2cd53943d5dc4` (4x4x4, split; 3.1 s per call in the default-window tables) | 0.5-1.7 ms per call | 1.4-1.7 ms per call | – | - With the window out of the way, `a9f2cd53943d5dc4` drops from seconds to ~1-2 ms per call in both forms. `50625695d2e6cbe7` and `206ed63b96be21a1` did not run in these 300 s on this machine, so I have nothing for them. - The heaviest program here is `71f4ac8ad5eba33c`, one 1024-thread group per call: 42 % of GPU time in HLSL and 31 % with direct DXIL. Per call the two forms cost about the same, but the direct form's worst call is ~40 % shorter. - `XCL_PER_LANE=1`: the run crashed before the world, so no table. The profile rows say "wave64 split in halves" in every form; they print the split mode, not which backend translated the program, so I can't tell which programs took the per-lane form. - Both world runs ended in a title `0xC0000005` (HLSL at 228.4 s; direct DXIL at `+0x549065d` at 241 s), with no GPU-wait timeouts and no device removal. AI use: Claude Code (Claude Opus 5.5) ran the runs on my machine through a scripted runner and wrote this.
Author
Owner

@⁠gefydev on GitHub · 2026-11-25 04:29 UTC · original

@⁠not-rex thank you, this is the measurement we were missing. Noted (RTX 3080, main cbc296ab + #1766, one run per form, last cumulative table at ~225 s): GPU time 19,616 ms in the HLSL form against 18,182 ms with XCL_DIRECT_DXIL=1; the heaviest program 71f4ac8ad5eba33c costs about the same per call in both (~60 ms and ~66 ms) with the direct form's worst call about 40 % shorter; a9f2cd53943d5dc4 drops to about 1-2 ms per call with the window out of the way; 50625695d2e6cbe7 and 206ed63b96be21a1 did not run.

The XCL_PER_LANE=1 run crashed in VCRUNTIME140.dll+0x10a66 at 66.9 s, before the world. I have passed that to the session that writes the code. If the log has a panic message, a per-lane / direct DXIL fallback line or the last few lines before the crash, please post them (no game data or folder names).

AI use: Claude Code (Claude Opus 5.5) wrote this reply for @⁠gefydev.

**@⁠gefydev** on GitHub · 2026-11-25 04:29 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7152895719) @⁠not-rex thank you, this is the measurement we were missing. Noted (RTX 3080, `main` `cbc296ab` + #1766, one run per form, last cumulative table at ~225 s): GPU time 19,616 ms in the HLSL form against 18,182 ms with `XCL_DIRECT_DXIL=1`; the heaviest program `71f4ac8ad5eba33c` costs about the same per call in both (~60 ms and ~66 ms) with the direct form's worst call about 40 % shorter; `a9f2cd53943d5dc4` drops to about 1-2 ms per call with the window out of the way; `50625695d2e6cbe7` and `206ed63b96be21a1` did not run. The `XCL_PER_LANE=1` run crashed in `VCRUNTIME140.dll+0x10a66` at 66.9 s, before the world. I have passed that to the session that writes the code. If the log has a panic message, a `per-lane` / `direct DXIL` fallback line or the last few lines before the crash, please post them (no game data or folder names). AI use: Claude Code (Claude Opus 5.5) wrote this reply for @⁠gefydev.
Author
Owner

@⁠gefydev on GitHub · 2026-11-25 04:33 UTC · original

@⁠not-rex a follow-up on your measurement. With the coherent window out of the way, the split-wave64 programs are no longer the problem (a9f2cd53943d5dc4 at 0.5-1.7 ms per call instead of 3.1 s), and the per-instruction form's GPU time is close to the HLSL form's (18.2 s against 19.6 s). So we will not optimize the split form for now.

On the XCL_PER_LANE=1 crash: a run here on main 3da2abb with XCL_DIRECT_DXIL=1 XCL_PER_LANE=1 (180 s, menus only) ran to the end, with only the expected fallback lines, so one crash does not show a per-lane bug yet. VCRUNTIME140.dll in your stack is the title's own copy, so a fault in its copy routine is title-side; #646 reports the same kind of crash without per-lane. If you can rerun the per-lane form once and it crashes again at the same place, please post it, together with any panic message, per-lane / fallback line or the last lines before the crash (no game data or folder names).

AI use: Claude Code (Claude Opus 5.5) wrote this reply for @⁠gefydev.

**@⁠gefydev** on GitHub · 2026-11-25 04:33 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7152955804) @⁠not-rex a follow-up on your measurement. With the coherent window out of the way, the split-wave64 programs are no longer the problem (`a9f2cd53943d5dc4` at 0.5-1.7 ms per call instead of 3.1 s), and the per-instruction form's GPU time is close to the HLSL form's (18.2 s against 19.6 s). So we will not optimize the split form for now. On the `XCL_PER_LANE=1` crash: a run here on `main` `3da2abb` with `XCL_DIRECT_DXIL=1 XCL_PER_LANE=1` (180 s, menus only) ran to the end, with only the expected fallback lines, so one crash does not show a per-lane bug yet. `VCRUNTIME140.dll` in your stack is the title's own copy, so a fault in its copy routine is title-side; #646 reports the same kind of crash without per-lane. If you can rerun the per-lane form once and it crashes again at the same place, please post it, together with any panic message, `per-lane` / fallback line or the last lines before the crash (no game data or folder names). AI use: Claude Code (Claude Opus 5.5) wrote this reply for @⁠gefydev.
Author
Owner

@⁠treybertram06 on GitHub · 2026-11-25 01:28 UTC · original · edited 2026-11-25 05:26 UTC

Correction: the "four runs of 300 s with no removal" below were made while a stopped test script was still launching runs in parallel, so they are not valid either (at least one of them actually had a removal at 171 s). With that and the two later removals on 621.40 (3 659 s, 93.3 s), I have no evidence of a driver effect.


Driver update: on this card the 0x887a0005 removal (idle GPU, no nvlddmkm event) has not come back on NVIDIA 621.40.

RTX 3080 10 GB, Windows 11 Pro 26300, same tree as my comments above (main c4d37be + #1478 + #1702 with its switch off + local logging), warm caches.

  • On 621.01: every run of this tree lost the device at 69–171 s (more than ten runs today, across the settings in my tables above).
  • On 621.40: four runs of 300 s of title time each (with and without #1993, at the default coherent window and at XCL_COHERENT_MB=1024) had no removal and no crash. GPU waits were still released on the CPU 1–6 times per run. One earlier 30-minute run on 621.40 had no removal either, but it spent that time rebuilding the driver cache, so it never got far into the world load.

So anyone chasing this mode on NVIDIA should probably update first. This is four runs on one card, and 300 s each, which is past every removal I saw on 621.01 but not a long session. @⁠Krashgamer's removal on 610.88 was a real TDR with nvlddmkm events, so a different mode from this one.

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

Correction: it came back on 621.40. A long run of main 00cf258 (with #1983 in, + #1478 + #1702 with its switch off + local caps) lost the device with the same signature, 0x887a0005, no nvlddmkm event, after 3 659 s. The title had been waiting on cold compute pipeline builds for most of that hour: the recompiler changes on main had invalidated the driver cache. A CreatePlacedResourceX at 3658.97 s was already refused with 0x887a0005, two seconds before the device-removed check fired. So on this card 621.40 makes the removal much rarer or later (one in about 1.5 h of title time over five runs, against every run within 69–171 s on 621.01), but does not fix it.

**@⁠treybertram06** on GitHub · 2026-11-25 01:28 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7149578752) · edited 2026-11-25 05:26 UTC **Correction:** the "four runs of 300 s with no removal" below were made while a stopped test script was still launching runs in parallel, so they are not valid either (at least one of them actually had a removal at 171 s). With that and the two later removals on 621.40 (3 659 s, 93.3 s), I have **no evidence of a driver effect**. --- **Driver update: on this card the `0x887a0005` removal (idle GPU, no `nvlddmkm` event) has not come back on NVIDIA 621.40.** RTX 3080 10 GB, Windows 11 Pro 26300, same tree as my comments above (`main` `c4d37be` + #1478 + #1702 with its switch off + local logging), warm caches. - **On 621.01:** every run of this tree lost the device at 69–171 s (more than ten runs today, across the settings in my tables above). - **On 621.40:** four runs of 300 s of title time each (with and without #1993, at the default coherent window and at `XCL_COHERENT_MB=1024`) had no removal and no crash. GPU waits were still released on the CPU 1–6 times per run. One earlier 30-minute run on 621.40 had no removal either, but it spent that time rebuilding the driver cache, so it never got far into the world load. So anyone chasing this mode on NVIDIA should probably update first. This is four runs on one card, and 300 s each, which is past every removal I saw on 621.01 but not a long session. @⁠Krashgamer's removal on 610.88 was a real TDR with `nvlddmkm` events, so a different mode from this one. AI use: Claude Code (Claude Opus 5.5) ran this and wrote the comment. **Correction:** it came back on 621.40. A long run of `main` `00cf258` (with #1983 in, + #1478 + #1702 with its switch off + local caps) lost the device with the same signature, `0x887a0005`, no `nvlddmkm` event, after **3 659 s**. The title had been waiting on cold compute pipeline builds for most of that hour: the recompiler changes on `main` had invalidated the driver cache. A `CreatePlacedResourceX` at 3658.97 s was already refused with `0x887a0005`, two seconds before the device-removed check fired. So on this card 621.40 makes the removal much rarer or later (one in about 1.5 h of title time over five runs, against every run within 69–171 s on 621.01), but does not fix it.
Author
Owner

@⁠kanade333 on GitHub · 2026-11-24 22:55 UTC · original · edited 2026-11-25 05:35 UTC

RTX 5080: the same cliff as in @⁠Ariorh1337's comment. With XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512 the heavy compute passes of the world get 14 to 350 times shorter and the queue.Wait timeouts go from 326 to 0. One run each, so this is a second data point, not a fix.

Setup: NVIDIA GeForce RTX 5080 16 GB (driver 610.88, 32-lane waves), AMD Ryzen 9 9950X, 32 GB RAM (commit limit 97 GB with a fixed 64 GB page file), Windows 11 Pro 26200, rustc 1.100.0, DXC 1.9.2602.17, release. Retail title 1.0.2.1, XCL_NETWORK=0.

Tree: main 689f2db with #1766 (c433edb) merged locally. The merge conflicts in two places in crates/xcl/src/hle/d3d12x/bind.rs (#1791's fresh_indirect_arguments against #1766's timestamps); I kept both, with the profile's begin / end around fresh_indirect_arguments. So this is not a clean-tree build.

Caches: warm. All 2 689 compute programs of the pack were built beforehand with xcl shaders <pack> --precompile --only cs --pipelines under XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 (0 errors, 0 refused). In both title runs the longest logged driver compile of a compute pipeline was 0.22 s, and of a graphics pipeline 4 ms.

Env, both runs: XCL_GPU_PROFILE=1 XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_ACTIVITY=1 XCL_RUN_SECONDS=240, scripted A presses from 14 s to 50 s (XCL_PRESS_A_AT). No XCL_PSO_WAIT_MS: 0 draws and 0 dispatches skipped in both.

run A, default run B, XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512
coherent window coherent 4015/4095 MB coherent 90/512 MB
video memory at the end 15 721 MB local, 4 740 MB non-local 16 142 MB local, 1 307 MB non-local
GPU queue.Wait timeouts (5 s) 326 0
GPU time of console code (profile, "since the start") 200 109 ms in 69 647 ops at 224.9 s 10 605 ms in 77 674 ops at 83.7 s
presents per 20 s 381, 584, 294, 4, 1, 1, 0, 1, 1, 1, 1, 0 93, 385, 441, 137, 23
end of the run title exception 0xc0000005 at +0x4ed80c0 (read at 0xffffffffffffffff), 227.1 s title exception 0xc0000005 at +0x108557 (read at 0xffffffffffffffff), 95.0 s
device removal none none

On screen:

  • Run A: from 84 s on the world shows one present every 20 to 30 s. The 3D picture was a flat grey; subtitles were drawn, though not all the time.
  • Run B: the intro's title cards were drawn, and so were subtitles, in step with the audio. The cutscene's 3D picture was black. That matches what @⁠Ariorh1337 describes for run 41.

Longest single call per program (the largest "longest" over all 2 s blocks of #1766's profile):

console CS run A run B
4097cf4856634349 (ExecuteIndirect) 2849.8 ms not in any top 15
206ed63b96be21a1 2736.4 ms not in any top 15
50625695d2e6cbe7 1332.7 ms not in any top 15
79d178afa02abd49 1310.1 ms 26.4 ms
facc2a585fba55c2 874.0 ms 2.5 ms
2e7b19ebe687ea83 847.6 ms 13.5 ms
45a2f1928c4e6f73 822.8 ms 7.1 ms
80f65d1925a2df48 795.4 ms 57.9 ms
b0c0fed0cdf7fd9c 772.1 ms 4.2 ms

"Not in any top 15" means the program was never among the 15 costliest of a 2 s block in run B. It may not have run at all, as in @⁠Ariorh1337's run 41.

Seen in three earlier runs of the default configuration (same tree without the profile, or b9b6ea6 + #1748): in the world phase nvidia-smi showed the GPU at 100 % utilisation while drawing 57 to 67 W, which fits a GPU waiting on memory and not computing. Not sampled in runs A and B.

Also tried on the same tree without the profile, one run each, no change in the 18 to 37 s per world frame:

  • a local change that releases a stalled GPU queue.Wait after 250 ms instead of 5 s (the idea of #1046);
  • XCL_RAYTRACING=off;
  • device_type = "lockhart": same memory use, and a device removal (0x887a0006) at 86 s.

Not tested: more than one run of each; AMD or Intel GPUs; the HLSL path (everything here is XCL_DIRECT_DXIL=1); a build of #1766's own head; whether run B's early title exception comes from the moved heaps.

AI use: Claude Code (Claude Fable 5.2) built the tree, ran both runs on the machine above, extracted the numbers from the logs and wrote this comment. I checked it before posting.


Update 1 (same machine, a few hours later): with the window's copy in video memory (#1329) the compute time is gone here too, and with #1732 on top the world shows about 1 to 2 presents per second instead of one every 20 to 30 s. None of the five runs ended at +0x23cf683. The 3D picture is still grey.

Tree: main 689f2db + #1329 (ac4b997, with #1326 and #1327 under it; it merges cleanly) + #1766 (c433edb, the same two bind.rs hunks as above). Runs E to G add #1732 (e4d8229). #1732 conflicts with #1329 in ListState::note_write (list_x.rs): I kept #1329's is_gpu_copy test and call ensure_lazy_mapped only for sparse addresses. I also changed the filter in sparse::readback_after_execute from is_sparse to is_gpu_copy, so that ranges in the copied window are read back too. That one line is mine and comes from neither PR. All runs carry a local XCL_GPU_WAIT_RELEASE_MS (the idea of #1046). So this is not a clean tree.

Env: as in runs A and B, plus XCL_UMA_SHADOW=1. TdrDelay is at its Windows default. Same warm caches. 0 draws and 0 dispatches skipped in every run.

run tree wait release presents after 70 s GPU time of console code (profile, last "since the start") end
C + #1329 250 ms 18 in 93 s 2 531 ms in 80 737 ops title 0x80000003 at +0x4da6315, 169.4 s
D + #1329 20 ms 29 in 76 s 3 105 ms in 132 813 ops title 0xc0000005 at +0x3d3db6 (read at 0xffffffffffffffff), 149.5 s
E + #1329 + #1732 20 ms 77 in 166 s, none from about 112 s to 218 s 5 874 ms in 284 704 ops title 0xc0000005 at +0x108557 (read at 0x8), 236.2 s
F + #1329 + #1732 20 ms – – XCL's own access violation, 88.2 s (below)
G + #1329 + #1732 20 ms 94 in 66 s 7 087 ms in 332 934 ops title 0x80000003 at +0x4da6315, 137.2 s

For comparison, run A (default) had 200 109 ms of GPU time in 69 647 ops.

  • Compute time: the longest call of any compute program in a top 15 was 79 ms (C), 23 ms (D), 15 ms (E) and 30 ms (G), against 2 850 ms in run A.
  • Pace in the world, presents per 10 s from 70 s on: run E 13, 17, 13, 22, 2, then 0 for 100 s, then 6, 4. Run G 14, 17, 12, 16, 16, 10, 9.
  • Run E's 100 s without a present: four graphics pipelines (300 to 316 KB of DXIL) were built on demand, 2.1 to 2.4 s in the driver each, finishing at 141, 178, 210 and 216 s. Run G had them cached: no gap, and no driver compile of 1 s or more.
  • What the wait releases are: 323 (C), 555 (D), 970 (E) and 1 403 (G) GPU queue.Wait releases. In 323, 555, 951 and 1 384 of them the producer's submitted value was still below the awaited one, e.g. >= 0x4bf … recorded=0x4c0, submitted=0x4bc, completed=0x4bc. So nearly every release is a wait for a list the title had recorded but not submitted yet.
  • No device removal and no nvlddmkm event in any of the five runs.
  • Memory: 36 to 37 GB committed by the process. Video memory is reported as 19.7 to 20.1 GB local on this 16 GB card, with 0.7 to 0.8 GB non-local.
  • Run F: 0xc0000005 in memcpy (VCRUNTIME140.dll+0x1c45a), reading a 4 KiB page at a title address (0xdcf978000), from xcl::gpu::tiling::Chain::detile_level (tiling.rs:438 in this tree) under title_textures::subresources (title_textures.rs:1225), on a subresources_on worker thread. This looks like the one event #1288's description mentions. Stack resolved with the build's PDB.
  • For #1164: run G's 0x80000003 had rdx = rdi = 0xaaaaaaaadefbf7be; run C's had rdx = rdi = 0x969c2003.

On screen: in runs E and G the intro's title cards, the cutscene's 2D pictures and the subtitles are drawn, and audio and subtitles ran without a break up to the end of run G. The 3D shots stay grey; run E also showed green flashes.

Not tested: #1329 or #1732 on a clean tree; the tree without my is_gpu_copy line; #1732 with the default 5 s release; whether the title exceptions at +0x3d3db6 and +0x108557 come from releasing waits after 20 ms; more than one run of each configuration (E and G are the same configuration, and so is F).

AI use (update 1): Claude Code (Claude Fable 5.2) built the trees, ran the runs, extracted the numbers from the logs, resolved the stack and wrote this update. I read it before it was added.


Update 2 (one more run on the same tree): with #1732 the short wait release is not needed. At the default 5 s there are 0 GPU queue.Wait releases and the world keeps the same pace. In 6 of 8 thread dumps the title's thread inside XCL is in title_textures::refresh. The grey is the same flat colour as on @⁠wondercrash's RTX 5090, and it changes from shot to shot.

Run H: the tree of runs E to G (main 689f2db + #1329 + #1732 + #1766), XCL_GPU_WAIT_RELEASE_MS unset, so the 5 s default, plus XCL_THREAD_DUMP_AT=84,87,90,93,96,99,102,105 and XCL_FRAME_DUMP=10. Same env and warm caches otherwise.

  • Waits: 0 queue.Wait releases and 1 Wait64BitValueX timeout, against 970 and 1 403 releases in runs E and G. So the releases I counted in update 1 were waits my 20 ms setting cut short before the title had submitted the producer's list, not stalls. Runs D to G should be read with that in mind, and their title exceptions may come from it.
  • Pace, presents per 10 s from 70 s on: 13, 15, 16, 20, 13 while the cutscene played. At about 120 s I skipped the cutscene by hand (the skip prompt was up): 63 presents in the next 10 s, all black in the frame dumps. Profile: 6 540 ms of GPU time in 313 905 ops. 0 draws and 0 dispatches skipped, no device removal.
  • End: title 0xc0000005 at +0x7b619c (read at 0x0), 130.0 s, about 10 s after that skip. So this end says nothing about how long the cutscene would have run.

Thread dumps (8, 3 s apart, 84 to 105 s; XCL frames resolved with the build's PDB). In each dump one title thread was inside XCL other than in Sleep:

where dumps
title_textures::refresh → take_written (title_textures.rs:701) 4
title_textures::refresh → texture::upload_batch → gpu::fence::wait (texture.rs:297) 1
title_textures::refresh → vram::before_execute, waiting for a mutex (vram.rs:838) 1
q_execute_command_lists → readback_sparse_writes → sparse::readback_after_execute, in its condvar wait (sparse.rs:1526, #1732's synchronous case) 2

One dump also had a second title thread in XMemMapPhysicalPagesScatter → map_pages. Line numbers are those of this local tree. This fits #582 and @⁠Ariorh1337's dumps: with the GPU side fast, the submitting thread's time is in the look before each submit.

Frame dumps (960x540, picture area rows 60 to 420):

  • four dumps in a row: mean RGB 49/52/57, red between 48 and 51 over the whole area. That is the same colour @⁠wondercrash reports (49/52/57);
  • the two dumps after them: 32/32/44, with no variation at all in red;
  • the title card before them: 34/34/46 behind its text.

Title cards, subtitles and the skip prompt are drawn correctly over it. A guess, not tested: one flat colour per shot that changes with the shot looks like a full-screen pass reading a single texel or the smallest mip of the scene, not like an uncleared or zeroed target.

Not tested: more than this one run with the default release; the frame trace or XCL_DEBUG_SKIP_SHADERS to find the pass; #1034, #455 or #1832 against the refresh time.

AI use (update 2): Claude Code (Claude Fable 5.2) ran the run, resolved the stacks, measured the frame dumps and wrote this update. I read it before it was added.


Update 3: the tree of runs E to H, for @⁠CowboyBingus and anyone who wants to repeat it.

  • How it was put together, on main 689f2db, nothing committed:
    1. git merge --no-commit --no-ff of #1329's head ac4b997 (it carries #1326 and #1327 under it). Clean.
    2. #1766 c433edb as git diff <merge-base with main> c433edb | git apply --3way. Two conflicts in bind.rs.
    3. #1732 the same way from its head e4d8229, so the whole branch: #867, #871 and #877 under it are in, not only the top commit. One conflict in list_x.rs.
  • Input: XCL_PRESS_A_AT=14,17,21,26,31,37,43,50, nothing else. Run H was skipped by hand at about 120 s, as said above.
The four local pieces

hle/d3d12x/bind.rs, both ExecuteIndirect paths of execute_indirect (#1791's fresh_indirect_arguments kept inside #1766's stamps):

        let t = super::gpu_profile::begin(this, pso, super::gpu_profile::Kind::PcIndirect, [max, 0, 0]);
        fresh_indirect_arguments(this, || pc(this, sig, max, args, args_off, count_buf, count_off));
        super::gpu_profile::end(this, t);
        return;
            let t = super::gpu_profile::begin(this, pso, if gfx { super::gpu_profile::Kind::IndirectDraw } else { super::gpu_profile::Kind::IndirectDispatch }, [max, 0, 0]);
            fresh_indirect_arguments(this, || pc(this, sig, max, args, args_off, count_buf, count_off));
            super::gpu_profile::end(this, t);

hle/d3d12x/list_x.rs, ListState::note_write (#1329's test kept, #877's lazy mapping only for sparse addresses):

        if crate::gpu::uma::get().is_some_and(|u| u.is_gpu_copy(va as usize)) {
            if crate::gpu::uma::get().is_some_and(|u| u.is_sparse(va as usize)) {
                unsafe { super::sparse::ensure_lazy_mapped(va as usize, size as usize) };
            }

hle/d3d12x/sparse.rs, readback_after_execute (my line: is_sparse became is_gpu_copy):

    let mut filtered: Vec<(usize, usize)> = ranges.iter().copied().filter(|&(a, n)| n > 0 && u.is_gpu_copy(a)).collect();

hle/d3d12x/list_x.rs, the release knob (unset in run H), used in place of GPU_WAIT_WATCHDOG_TIMEOUT at its two uses:

fn gpu_wait_watchdog_timeout() -> Duration {
    static T: OnceLock<Duration> = OnceLock::new();
    *T.get_or_init(|| {
        std::env::var("XCL_GPU_WAIT_RELEASE_MS")
            .ok()
            .and_then(|v| v.parse::<u64>().ok())
            .filter(|&ms| ms > 0)
            .map(Duration::from_millis)
            .unwrap_or(GPU_WAIT_WATCHDOG_TIMEOUT)
    })
}

No gist or branch: this is all of it. I have not rebuilt it on today's main; there #1732 conflicts in uma.rs (2 places) and sparse.rs (3 places), which I have not resolved.

AI use (update 3): Claude Code (Claude Fable 5.2) extracted this from the worktree and wrote it. I read it before it was added.

**@⁠kanade333** on GitHub · 2026-11-24 22:55 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7146802587) · edited 2026-11-25 05:35 UTC **RTX 5080: the same cliff as in @⁠Ariorh1337's comment. With `XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512` the heavy compute passes of the world get 14 to 350 times shorter and the queue.Wait timeouts go from 326 to 0. One run each, so this is a second data point, not a fix.** **Setup:** NVIDIA GeForce RTX 5080 16 GB (driver 610.88, 32-lane waves), AMD Ryzen 9 9950X, 32 GB RAM (commit limit 97 GB with a fixed 64 GB page file), Windows 11 Pro 26200, rustc 1.100.0, DXC 1.9.2602.17, release. Retail title 1.0.2.1, `XCL_NETWORK=0`. **Tree:** `main` `689f2db` with #1766 (`c433edb`) merged locally. The merge conflicts in two places in `crates/xcl/src/hle/d3d12x/bind.rs` (#1791's `fresh_indirect_arguments` against #1766's timestamps); I kept both, with the profile's `begin` / `end` around `fresh_indirect_arguments`. So this is not a clean-tree build. **Caches:** warm. All 2 689 compute programs of the pack were built beforehand with `xcl shaders <pack> --precompile --only cs --pipelines` under `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1` (0 errors, 0 refused). In both title runs the longest logged driver compile of a compute pipeline was 0.22 s, and of a graphics pipeline 4 ms. **Env, both runs:** `XCL_GPU_PROFILE=1 XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_ACTIVITY=1 XCL_RUN_SECONDS=240`, scripted A presses from 14 s to 50 s (`XCL_PRESS_A_AT`). No `XCL_PSO_WAIT_MS`: 0 draws and 0 dispatches skipped in both. | | run A, default | run B, `XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512` | |---|---|---| | coherent window | `coherent 4015/4095 MB` | `coherent 90/512 MB` | | video memory at the end | 15 721 MB local, 4 740 MB non-local | 16 142 MB local, 1 307 MB non-local | | GPU `queue.Wait` timeouts (5 s) | 326 | 0 | | GPU time of console code (profile, "since the start") | 200 109 ms in 69 647 ops at 224.9 s | 10 605 ms in 77 674 ops at 83.7 s | | presents per 20 s | 381, 584, 294, 4, 1, 1, 0, 1, 1, 1, 1, 0 | 93, 385, 441, 137, 23 | | end of the run | title exception `0xc0000005` at `+0x4ed80c0` (read at `0xffffffffffffffff`), 227.1 s | title exception `0xc0000005` at `+0x108557` (read at `0xffffffffffffffff`), 95.0 s | | device removal | none | none | On screen: - **Run A:** from 84 s on the world shows one present every 20 to 30 s. The 3D picture was a flat grey; subtitles were drawn, though not all the time. - **Run B:** the intro's title cards were drawn, and so were subtitles, in step with the audio. The cutscene's 3D picture was black. That matches what @⁠Ariorh1337 describes for run 41. **Longest single call per program** (the largest "longest" over all 2 s blocks of #1766's profile): | console CS | run A | run B | |---|---|---| | `4097cf4856634349` (ExecuteIndirect) | 2849.8 ms | not in any top 15 | | `206ed63b96be21a1` | 2736.4 ms | not in any top 15 | | `50625695d2e6cbe7` | 1332.7 ms | not in any top 15 | | `79d178afa02abd49` | 1310.1 ms | 26.4 ms | | `facc2a585fba55c2` | 874.0 ms | 2.5 ms | | `2e7b19ebe687ea83` | 847.6 ms | 13.5 ms | | `45a2f1928c4e6f73` | 822.8 ms | 7.1 ms | | `80f65d1925a2df48` | 795.4 ms | 57.9 ms | | `b0c0fed0cdf7fd9c` | 772.1 ms | 4.2 ms | "Not in any top 15" means the program was never among the 15 costliest of a 2 s block in run B. It may not have run at all, as in @⁠Ariorh1337's run 41. **Seen in three earlier runs of the default configuration (same tree without the profile, or `b9b6ea6` + #1748):** in the world phase `nvidia-smi` showed the GPU at 100 % utilisation while drawing 57 to 67 W, which fits a GPU waiting on memory and not computing. Not sampled in runs A and B. **Also tried on the same tree without the profile, one run each, no change in the 18 to 37 s per world frame:** - a local change that releases a stalled GPU `queue.Wait` after 250 ms instead of 5 s (the idea of #1046); - `XCL_RAYTRACING=off`; - `device_type = "lockhart"`: same memory use, and a device removal (`0x887a0006`) at 86 s. **Not tested:** more than one run of each; AMD or Intel GPUs; the HLSL path (everything here is `XCL_DIRECT_DXIL=1`); a build of #1766's own head; whether run B's early title exception comes from the moved heaps. **AI use:** Claude Code (Claude Fable 5.2) built the tree, ran both runs on the machine above, extracted the numbers from the logs and wrote this comment. I checked it before posting. --- **Update 1 (same machine, a few hours later): with the window's copy in video memory (#1329) the compute time is gone here too, and with #1732 on top the world shows about 1 to 2 presents per second instead of one every 20 to 30 s. None of the five runs ended at `+0x23cf683`. The 3D picture is still grey.** **Tree:** `main` `689f2db` + #1329 (`ac4b997`, with #1326 and #1327 under it; it merges cleanly) + #1766 (`c433edb`, the same two `bind.rs` hunks as above). Runs E to G add #1732 (`e4d8229`). #1732 conflicts with #1329 in `ListState::note_write` (`list_x.rs`): I kept #1329's `is_gpu_copy` test and call `ensure_lazy_mapped` only for sparse addresses. I also changed the filter in `sparse::readback_after_execute` from `is_sparse` to `is_gpu_copy`, so that ranges in the copied window are read back too. That one line is mine and comes from neither PR. All runs carry a local `XCL_GPU_WAIT_RELEASE_MS` (the idea of #1046). So this is not a clean tree. **Env:** as in runs A and B, plus `XCL_UMA_SHADOW=1`. `TdrDelay` is at its Windows default. Same warm caches. 0 draws and 0 dispatches skipped in every run. | run | tree | wait release | presents after 70 s | GPU time of console code (profile, last "since the start") | end | |---|---|---|---|---|---| | C | + #1329 | 250 ms | 18 in 93 s | 2 531 ms in 80 737 ops | title `0x80000003` at `+0x4da6315`, 169.4 s | | D | + #1329 | 20 ms | 29 in 76 s | 3 105 ms in 132 813 ops | title `0xc0000005` at `+0x3d3db6` (read at `0xffffffffffffffff`), 149.5 s | | E | + #1329 + #1732 | 20 ms | 77 in 166 s, none from about 112 s to 218 s | 5 874 ms in 284 704 ops | title `0xc0000005` at `+0x108557` (read at `0x8`), 236.2 s | | F | + #1329 + #1732 | 20 ms | – | – | XCL's own access violation, 88.2 s (below) | | G | + #1329 + #1732 | 20 ms | 94 in 66 s | 7 087 ms in 332 934 ops | title `0x80000003` at `+0x4da6315`, 137.2 s | For comparison, run A (default) had 200 109 ms of GPU time in 69 647 ops. - **Compute time:** the longest call of any compute program in a top 15 was 79 ms (C), 23 ms (D), 15 ms (E) and 30 ms (G), against 2 850 ms in run A. - **Pace in the world, presents per 10 s from 70 s on:** run E 13, 17, 13, 22, 2, then 0 for 100 s, then 6, 4. Run G 14, 17, 12, 16, 16, 10, 9. - **Run E's 100 s without a present:** four graphics pipelines (300 to 316 KB of DXIL) were built on demand, 2.1 to 2.4 s in the driver each, finishing at 141, 178, 210 and 216 s. Run G had them cached: no gap, and no driver compile of 1 s or more. - **What the wait releases are:** 323 (C), 555 (D), 970 (E) and 1 403 (G) GPU `queue.Wait` releases. In 323, 555, 951 and 1 384 of them the producer's `submitted` value was still below the awaited one, e.g. `>= 0x4bf … recorded=0x4c0, submitted=0x4bc, completed=0x4bc`. So nearly every release is a wait for a list the title had recorded but not submitted yet. - **No device removal** and no `nvlddmkm` event in any of the five runs. - **Memory:** 36 to 37 GB committed by the process. Video memory is reported as 19.7 to 20.1 GB local on this 16 GB card, with 0.7 to 0.8 GB non-local. - **Run F:** `0xc0000005` in `memcpy` (`VCRUNTIME140.dll+0x1c45a`), reading a 4 KiB page at a title address (`0xdcf978000`), from `xcl::gpu::tiling::Chain::detile_level` (`tiling.rs:438` in this tree) under `title_textures::subresources` (`title_textures.rs:1225`), on a `subresources_on` worker thread. This looks like the one event #1288's description mentions. Stack resolved with the build's PDB. - **For #1164:** run G's `0x80000003` had `rdx = rdi = 0xaaaaaaaadefbf7be`; run C's had `rdx = rdi = 0x969c2003`. **On screen:** in runs E and G the intro's title cards, the cutscene's 2D pictures and the subtitles are drawn, and audio and subtitles ran without a break up to the end of run G. The 3D shots stay grey; run E also showed green flashes. **Not tested:** #1329 or #1732 on a clean tree; the tree without my `is_gpu_copy` line; #1732 with the default 5 s release; whether the title exceptions at `+0x3d3db6` and `+0x108557` come from releasing waits after 20 ms; more than one run of each configuration (E and G are the same configuration, and so is F). **AI use (update 1):** Claude Code (Claude Fable 5.2) built the trees, ran the runs, extracted the numbers from the logs, resolved the stack and wrote this update. I read it before it was added. --- **Update 2 (one more run on the same tree): with #1732 the short wait release is not needed. At the default 5 s there are 0 GPU `queue.Wait` releases and the world keeps the same pace. In 6 of 8 thread dumps the title's thread inside XCL is in `title_textures::refresh`. The grey is the same flat colour as on @⁠wondercrash's RTX 5090, and it changes from shot to shot.** **Run H:** the tree of runs E to G (`main` `689f2db` + #1329 + #1732 + #1766), `XCL_GPU_WAIT_RELEASE_MS` unset, so the 5 s default, plus `XCL_THREAD_DUMP_AT=84,87,90,93,96,99,102,105` and `XCL_FRAME_DUMP=10`. Same env and warm caches otherwise. - **Waits:** 0 `queue.Wait` releases and 1 `Wait64BitValueX` timeout, against 970 and 1 403 releases in runs E and G. So the releases I counted in update 1 were waits my 20 ms setting cut short before the title had submitted the producer's list, not stalls. Runs D to G should be read with that in mind, and their title exceptions may come from it. - **Pace, presents per 10 s from 70 s on:** 13, 15, 16, 20, 13 while the cutscene played. At about 120 s I skipped the cutscene by hand (the skip prompt was up): 63 presents in the next 10 s, all black in the frame dumps. Profile: 6 540 ms of GPU time in 313 905 ops. 0 draws and 0 dispatches skipped, no device removal. - **End:** title `0xc0000005` at `+0x7b619c` (read at `0x0`), 130.0 s, about 10 s after that skip. So this end says nothing about how long the cutscene would have run. **Thread dumps** (8, 3 s apart, 84 to 105 s; XCL frames resolved with the build's PDB). In each dump one title thread was inside XCL other than in `Sleep`: | where | dumps | |---|---| | `title_textures::refresh` → `take_written` (`title_textures.rs:701`) | 4 | | `title_textures::refresh` → `texture::upload_batch` → `gpu::fence::wait` (`texture.rs:297`) | 1 | | `title_textures::refresh` → `vram::before_execute`, waiting for a mutex (`vram.rs:838`) | 1 | | `q_execute_command_lists` → `readback_sparse_writes` → `sparse::readback_after_execute`, in its condvar wait (`sparse.rs:1526`, #1732's synchronous case) | 2 | One dump also had a second title thread in `XMemMapPhysicalPagesScatter` → `map_pages`. Line numbers are those of this local tree. This fits #582 and @⁠Ariorh1337's dumps: with the GPU side fast, the submitting thread's time is in the look before each submit. **Frame dumps** (960x540, picture area rows 60 to 420): - four dumps in a row: mean RGB 49/52/57, red between 48 and 51 over the whole area. That is the same colour @⁠wondercrash reports (49/52/57); - the two dumps after them: 32/32/44, with no variation at all in red; - the title card before them: 34/34/46 behind its text. Title cards, subtitles and the skip prompt are drawn correctly over it. A guess, not tested: one flat colour per shot that changes with the shot looks like a full-screen pass reading a single texel or the smallest mip of the scene, not like an uncleared or zeroed target. **Not tested:** more than this one run with the default release; the frame trace or `XCL_DEBUG_SKIP_SHADERS` to find the pass; #1034, #455 or #1832 against the `refresh` time. **AI use (update 2):** Claude Code (Claude Fable 5.2) ran the run, resolved the stacks, measured the frame dumps and wrote this update. I read it before it was added. --- **Update 3: the tree of runs E to H, for @⁠CowboyBingus and anyone who wants to repeat it.** - **How it was put together**, on `main` `689f2db`, nothing committed: 1. `git merge --no-commit --no-ff` of #1329's head `ac4b997` (it carries #1326 and #1327 under it). Clean. 2. #1766 `c433edb` as `git diff <merge-base with main> c433edb | git apply --3way`. Two conflicts in `bind.rs`. 3. #1732 the same way from its head `e4d8229`, so the whole branch: #867, #871 and #877 under it are in, not only the top commit. One conflict in `list_x.rs`. - **Input:** `XCL_PRESS_A_AT=14,17,21,26,31,37,43,50`, nothing else. Run H was skipped by hand at about 120 s, as said above. <details><summary>The four local pieces</summary> `hle/d3d12x/bind.rs`, both `ExecuteIndirect` paths of `execute_indirect` (#1791's `fresh_indirect_arguments` kept inside #1766's stamps): ```rust let t = super::gpu_profile::begin(this, pso, super::gpu_profile::Kind::PcIndirect, [max, 0, 0]); fresh_indirect_arguments(this, || pc(this, sig, max, args, args_off, count_buf, count_off)); super::gpu_profile::end(this, t); return; ``` ```rust let t = super::gpu_profile::begin(this, pso, if gfx { super::gpu_profile::Kind::IndirectDraw } else { super::gpu_profile::Kind::IndirectDispatch }, [max, 0, 0]); fresh_indirect_arguments(this, || pc(this, sig, max, args, args_off, count_buf, count_off)); super::gpu_profile::end(this, t); ``` `hle/d3d12x/list_x.rs`, `ListState::note_write` (#1329's test kept, #877's lazy mapping only for sparse addresses): ```rust if crate::gpu::uma::get().is_some_and(|u| u.is_gpu_copy(va as usize)) { if crate::gpu::uma::get().is_some_and(|u| u.is_sparse(va as usize)) { unsafe { super::sparse::ensure_lazy_mapped(va as usize, size as usize) }; } ``` `hle/d3d12x/sparse.rs`, `readback_after_execute` (my line: `is_sparse` became `is_gpu_copy`): ```rust let mut filtered: Vec<(usize, usize)> = ranges.iter().copied().filter(|&(a, n)| n > 0 && u.is_gpu_copy(a)).collect(); ``` `hle/d3d12x/list_x.rs`, the release knob (unset in run H), used in place of `GPU_WAIT_WATCHDOG_TIMEOUT` at its two uses: ```rust fn gpu_wait_watchdog_timeout() -> Duration { static T: OnceLock<Duration> = OnceLock::new(); *T.get_or_init(|| { std::env::var("XCL_GPU_WAIT_RELEASE_MS") .ok() .and_then(|v| v.parse::<u64>().ok()) .filter(|&ms| ms > 0) .map(Duration::from_millis) .unwrap_or(GPU_WAIT_WATCHDOG_TIMEOUT) }) } ``` </details> No gist or branch: this is all of it. I have not rebuilt it on today's `main`; there #1732 conflicts in `uma.rs` (2 places) and `sparse.rs` (3 places), which I have not resolved. **AI use (update 3):** Claude Code (Claude Fable 5.2) extracted this from the worktree and wrote it. I read it before it was added.
Author
Owner

@⁠chazi123 on GitHub · 2026-11-25 05:56 UTC · original

RTX 3060 Laptop 12 GB / Win10 19045 / 32 GB RAM: the ~49 GB commit OOM is gone on current main with XCL_HEAP_WINDOWS=1 XCL_DIRECT_DXIL=1; the world now starts streaming, and the remaining stop on this card is VRAM oversubscription (14.5 GB local on a 12 GB part).

Setup: Xeon W-1250 (6C/12T), 32 GB RAM, RTX 3060 Laptop 12,288 MiB (driver 610.88, 32–32 lanes → every wave64 program split), Win10 19045, commit limit 65.8 GB (2 GB C: + 32 GB E: pagefile). Retail 1.0.2.1, XCL_NETWORK=0. Agility 1.620.2.

Tree: main 6020a33 (11-25) + #488 + #929 + a local Win10 ABI / root-signature downgrade + a local env-gated coherency mirror (XCL_COHERENT_MIRROR, default on). Env: XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512 XCL_HEAP_WINDOWS=1 XCL_DIRECT_DXIL=1 XCL_ACTIVITY=1 XCL_BIG_COMPILES=2, and XCL_PSO_WAIT_MS=50 for the world arm.

  1. The commit balloon was the old memory path, not the mirror. On main 17216a14 (no XCL_HEAP_WINDOWS / XCL_DIRECT_DXIL in that tree) with XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512, commit grew to 48.5–49.2 GB and ended in memory allocation of 2211840 bytes failed, with only ~8.7 GB accounted (target pages 3.6 GB + arenas 0.46 GB + sparse 1 GB). Toggling our coherency mirror off changed nothing (49.2 GB), so the mirror is not the cause. On current main with XCL_HEAP_WINDOWS=1 XCL_DIRECT_DXIL=1 the same coherent settings keep commit at ~16 GB at the menu, no OOM, and 0 Wait64BitValueX timed out, 0 did not complete within, 0 cycle-break warnings.

  2. Menu/intro is stable but CPU-bound here. After the cold intro compiles (a ~20 s 0-FPS burst, 36 pipelines), the menu holds 13–14 presents / 143–165 draws per 2 s (~6–7 fps) with 0 frame-event timeouts. This matches @⁠lucsoft's "30 fps menus with coherent=0" on a 9800X3D; our 6C part is the difference, not a stall.

  3. The world starts, then oversubscribes. After A, DirectStorage ramps (1,265 requests / 97 MB in one 2 s block, 255 dispatches/2 s), then video memory reaches 14,569 MB local on a 12,288 MiB part (+1.1 GB non-local), presents fall to 0–1 per 2 s while dispatches continue (81–103/2 s), and commit reaches ~30 GB. One queue.Wait 5 s timeout, no device removal, no watchdog suicide in this arm. So on a 12 GB card the next wall after the coherent fix is texture/heap placement, not synchronization.

  4. Static confirmation of +0x23cf683 (capstone/pefile on the 120,181,760 B executable): it is mov dword ptr [0], 0x4D8BD421, a deliberate trap, reached from a handler installed into CRT slot 0x71B6348 by 0x23cf6a0; the caller 0x2215acc loads ebp=0x1e (30) and kills after 30 one-second ticks with no progress-counter change, setting the Breakpad key whose decrypted name is "GPU Loc Sig". The crash-stack return +0x4e4ba89 matches 0x2215c16 call 0x4e4ba80. So the recurring +0x23cf683 is the title's own ~30 s GPU watchdog, as this thread concluded; the constant is 30 and the value is a hash of a sorted dword array (reproducible per state, e.g. 7333478d).

  5. Precompile gotcha worth documenting: on a fresh tree, xcl shaders <pack> --precompile --pipelines refuses everything with 0x80070057 (E_INVALIDARG) until D3D12\D3D12Core.dll (Agility) is placed next to the exe; without it the device reports SM 6.5 and every cs_6_6 DXIL is rejected. With it, 75 made / 0 refused.

Question for the thread: what is the recommended placement for a 12 GB VRAM / 32 GB RAM / split-wave64 card to get the world past the 14.5 GB-local oversubscription — #1702-style texture pages in system memory, the compact form (#1315/#1316), or a smaller XCL_UMA_MB? Our CS cache is only partially precompiled (537 driver blobs of 2,689 CS), so cold builds also contribute; a full --only cs --pipelines warm pass under XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 is our next step, per @⁠kanade333.

**@⁠chazi123** on GitHub · 2026-11-25 05:56 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7154287745) **RTX 3060 Laptop 12 GB / Win10 19045 / 32 GB RAM: the ~49 GB commit OOM is gone on current `main` with `XCL_HEAP_WINDOWS=1 XCL_DIRECT_DXIL=1`; the world now starts streaming, and the remaining stop on this card is VRAM oversubscription (14.5 GB local on a 12 GB part).** Setup: Xeon W-1250 (6C/12T), 32 GB RAM, RTX 3060 Laptop 12,288 MiB (driver 610.88, 32–32 lanes → every wave64 program split), Win10 19045, commit limit 65.8 GB (2 GB C: + 32 GB E: pagefile). Retail 1.0.2.1, `XCL_NETWORK=0`. Agility 1.620.2. Tree: `main` `6020a33` (11-25) + #488 + #929 + a local Win10 ABI / root-signature downgrade + a local env-gated coherency mirror (`XCL_COHERENT_MIRROR`, default on). Env: `XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512 XCL_HEAP_WINDOWS=1 XCL_DIRECT_DXIL=1 XCL_ACTIVITY=1 XCL_BIG_COMPILES=2`, and `XCL_PSO_WAIT_MS=50` for the world arm. 1. **The commit balloon was the old memory path, not the mirror.** On `main` `17216a14` (no `XCL_HEAP_WINDOWS` / `XCL_DIRECT_DXIL` in that tree) with `XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512`, commit grew to 48.5–49.2 GB and ended in `memory allocation of 2211840 bytes failed`, with only ~8.7 GB accounted (target pages 3.6 GB + arenas 0.46 GB + sparse 1 GB). Toggling our coherency mirror off changed nothing (49.2 GB), so the mirror is not the cause. On current `main` with `XCL_HEAP_WINDOWS=1 XCL_DIRECT_DXIL=1` the same coherent settings keep commit at ~16 GB at the menu, no OOM, and 0 `Wait64BitValueX timed out`, 0 `did not complete within`, 0 cycle-break warnings. 2. **Menu/intro is stable but CPU-bound here.** After the cold intro compiles (a ~20 s 0-FPS burst, 36 pipelines), the menu holds 13–14 presents / 143–165 draws per 2 s (~6–7 fps) with 0 frame-event timeouts. This matches @⁠lucsoft's "30 fps menus with coherent=0" on a 9800X3D; our 6C part is the difference, not a stall. 3. **The world starts, then oversubscribes.** After A, DirectStorage ramps (1,265 requests / 97 MB in one 2 s block, 255 dispatches/2 s), then video memory reaches **14,569 MB local on a 12,288 MiB part** (+1.1 GB non-local), presents fall to 0–1 per 2 s while dispatches continue (81–103/2 s), and commit reaches ~30 GB. One `queue.Wait` 5 s timeout, no device removal, no watchdog suicide in this arm. So on a 12 GB card the next wall after the coherent fix is texture/heap placement, not synchronization. 4. **Static confirmation of `+0x23cf683`** (capstone/pefile on the 120,181,760 B executable): it is `mov dword ptr [0], 0x4D8BD421`, a deliberate trap, reached from a handler installed into CRT slot `0x71B6348` by `0x23cf6a0`; the caller `0x2215acc` loads `ebp=0x1e` (30) and kills after 30 one-second ticks with no progress-counter change, setting the Breakpad key whose decrypted name is "GPU Loc Sig". The crash-stack return `+0x4e4ba89` matches `0x2215c16 call 0x4e4ba80`. So the recurring `+0x23cf683` is the title's own ~30 s GPU watchdog, as this thread concluded; the constant is 30 and the value is a hash of a sorted dword array (reproducible per state, e.g. `7333478d`). 5. **Precompile gotcha worth documenting:** on a fresh tree, `xcl shaders <pack> --precompile --pipelines` refuses everything with `0x80070057` (E_INVALIDARG) until `D3D12\D3D12Core.dll` (Agility) is placed next to the exe; without it the device reports SM 6.5 and every `cs_6_6` DXIL is rejected. With it, 75 made / 0 refused. Question for the thread: what is the recommended placement for a **12 GB VRAM / 32 GB RAM / split-wave64** card to get the world past the 14.5 GB-local oversubscription — #1702-style texture pages in system memory, the compact form (#1315/#1316), or a smaller `XCL_UMA_MB`? Our CS cache is only partially precompiled (537 driver blobs of 2,689 CS), so cold builds also contribute; a full `--only cs --pipelines` warm pass under `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1` is our next step, per @⁠kanade333.
Author
Owner

@⁠gefydev on GitHub · 2026-11-25 05:57 UTC · original

@⁠chazi123 thank you for the measurements on the RTX 3060 Laptop (12 GB): on current main with XCL_HEAP_WINDOWS=1 XCL_DIRECT_DXIL=1 the commit stays near 16 GB at the menu with no OOM, and the world then oversubscribes video memory (14,569 MB local on a 12,288 MiB part) with presents falling to 0-1 per 2 s. Noted, together with the D3D12Core.dll precompile note. I cannot answer your placement question (texture pages, compact form or XCL_UMA_MB for a 12 GB card); I have passed it to the session that writes the code.

If you can also run the split-wave64 GPU-time request above (XCL_GPU_PROFILE in the three forms), @⁠not-rex's numbers are on a 10 GB card with the coherent window off; a second card would help.

AI use: Claude Code (Claude Opus 5.5) wrote this reply for @⁠gefydev.

**@⁠gefydev** on GitHub · 2026-11-25 05:57 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7154307548) @⁠chazi123 thank you for the measurements on the RTX 3060 Laptop (12 GB): on current `main` with `XCL_HEAP_WINDOWS=1 XCL_DIRECT_DXIL=1` the commit stays near 16 GB at the menu with no OOM, and the world then oversubscribes video memory (14,569 MB local on a 12,288 MiB part) with presents falling to 0-1 per 2 s. Noted, together with the `D3D12Core.dll` precompile note. I cannot answer your placement question (texture pages, compact form or `XCL_UMA_MB` for a 12 GB card); I have passed it to the session that writes the code. If you can also run the split-wave64 GPU-time request above (`XCL_GPU_PROFILE` in the three forms), @⁠not-rex's numbers are on a 10 GB card with the coherent window off; a second card would help. AI use: Claude Code (Claude Opus 5.5) wrote this reply for @⁠gefydev.
Author
Owner

@⁠chazi123 on GitHub · 2026-11-25 06:15 UTC · original

@⁠chazi123 thank you for the measurements on the RTX 3060 Laptop (12 GB): on current with the commit stays near 16 GB at the menu with no OOM, and the world then oversubscribes video memory (14,569 MB local on a 12,288 MiB part) with presents falling to 0-1 per 2 s. Noted, together with the precompile note. I cannot answer your placement question (texture pages, compact form or for a 12 GB card); I have passed it to the session that writes the code.main``XCL_HEAP_WINDOWS=1 XCL_DIRECT_DXIL=1``D3D12Core.dll``XCL_UMA_MB

If you can also run the split-wave64 GPU-time request above ( in the three forms), @⁠not-rex's numbers are on a 10 GB card with the coherent window off; a second card would help.XCL_GPU_PROFILE

AI use: Claude Code (Claude Opus 5.5) wrote this reply for @⁠gefydev.

@⁠gefydev here is the second-card measurement you asked for, on the RTX 3060 Laptop 12 GB (driver 610.88, 32–32 lanes → every wave64 program split), Win10 19045, Xeon W-1250 6C/12T, 32 GB RAM. Tree: main 6020a33 + #488 + #929 + #1766 (applied clean, no bind.rs conflict on this base) + local Win10 ABI / env-gated coherency mirror. Env: XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512 XCL_HEAP_WINDOWS=1 XCL_DIRECT_DXIL=1 XCL_GPU_PROFILE=1 XCL_ACTIVITY=1 XCL_BIG_COMPILES=2 XCL_PSO_WAIT_MS=50, A scripted at 30–120 s. One form only (XCL_DIRECT_DXIL=1); HLSL and XCL_PER_LANE=1 arms not run, for the reason below.

World, cumulative since start (partial window, ~150–230 s; the run was capped by a memory guard, see limitation):

# program threads / form GPU ms calls longest call
1 CS 80f65d1925a2df48 64x1x1, wave64 split 1290.8 223 479.1 ms (7635x1x1 groups)
2 CS 44d832b4bdbd5ef8 1024x1x1, wave64 split 445.8 112 36.0 ms (8x1x1)
3 CS be262edda389c646 64x1x1, wave64 split 277.5 467 11.2 ms (179x1x1)

World, last 2 s block (137–194 ms of GPU time in ~460 ops, 6,400–6,700 ops in flight): the per-call leaders here are wave32, not split — CS 02eaed46a92d4c93 59.1 ms/32 calls (longest 8.2), d22f746890686a68 40.6/57 (4.8), 73ffa0b705ae2cc0 30.3/32 (1.6); the split-wave64 rows in the same block are cheap per call: 20c629c82e9687b4 21.2 ms/82 (longest 0.9), aa35926a5609067b 7.1/22 (1.6), 8ae101406edc576d 7.0/22 (1.6).

Reading vs @⁠not-rex's 10 GB table: with the coherent window off, split-wave64 per-call cost is mostly ≤1.6 ms here too, confirming his conclusion that the window, not the split form, was the cliff. But our cumulative heaviest is 80f65d1925a2df48 (the program he lists at 347 ms/2,899 calls HLSL, 824/5,109 direct), not his top 71f4ac8ad5eba33c — and it is dominated by a few enormous-group calls (9,017 and 7,635 groups, 479–565 ms each) rather than by many small ones. 71f4ac8ad5eba33c did not reach our top rows in this window. So on 12 GB the residual world cost concentrates in one split program's huge dispatches, which is a different shape from the 10 GB card.

Menu stage (same tree/env, before A): 13–14 presents / 143–165 draws per 2 s, commit ~16.5 GB, video 6.7 GB local; heaviest split CS at menu 1e32f25121c1552f 43.7 ms/393 calls, longest 0.3 ms; the 2 s GPU leaders are VS/PS draws (68.5 / 65.3 / 32.1 ms).

Limitation, stated plainly: this box has 32 GB RAM and a 65.8 GB commit limit. Once the world streams, video local reaches 14,569 MB on the 12,288 MiB part and process commit climbs past 29 GB with heavy pagefile churn; a 20 GB guard was intended but my guard script had a bug (multi-process array) and I killed the run manually at ~29 GB, so the world table is a partial window, not a full 300 s, and only one shader form was run. I am not running further heavy arms on this machine without a hardware change; happy to re-run HLSL / PER_LANE or a longer world window if the thread can suggest a placement that keeps commit under ~20 GB on a 12 GB / 32 GB box (texture pages in system memory, compact form, or a smaller XCL_UMA_MB).

**@⁠chazi123** on GitHub · 2026-11-25 06:15 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7154603133) > [@⁠chazi123](https://github.com/chazi123) thank you for the measurements on the RTX 3060 Laptop (12 GB): on current with the commit stays near 16 GB at the menu with no OOM, and the world then oversubscribes video memory (14,569 MB local on a 12,288 MiB part) with presents falling to 0-1 per 2 s. Noted, together with the precompile note. I cannot answer your placement question (texture pages, compact form or for a 12 GB card); I have passed it to the session that writes the code.`main``XCL_HEAP_WINDOWS=1 XCL_DIRECT_DXIL=1``D3D12Core.dll``XCL_UMA_MB` > > If you can also run the split-wave64 GPU-time request above ( in the three forms), [@⁠not-rex](https://github.com/not-rex)'s numbers are on a 10 GB card with the coherent window off; a second card would help.`XCL_GPU_PROFILE` > > AI use: Claude Code (Claude Opus 5.5) wrote this reply for [@⁠gefydev](https://github.com/gefydev). @⁠gefydev here is the second-card measurement you asked for, on the RTX 3060 Laptop 12 GB (driver 610.88, 32–32 lanes → every wave64 program split), Win10 19045, Xeon W-1250 6C/12T, 32 GB RAM. Tree: `main` `6020a33` + #488 + #929 + #1766 (applied clean, no `bind.rs` conflict on this base) + local Win10 ABI / env-gated coherency mirror. Env: `XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512 XCL_HEAP_WINDOWS=1 XCL_DIRECT_DXIL=1 XCL_GPU_PROFILE=1 XCL_ACTIVITY=1 XCL_BIG_COMPILES=2 XCL_PSO_WAIT_MS=50`, A scripted at 30–120 s. One form only (`XCL_DIRECT_DXIL=1`); HLSL and `XCL_PER_LANE=1` arms not run, for the reason below. **World, cumulative since start (partial window, ~150–230 s; the run was capped by a memory guard, see limitation):** | # | program | threads / form | GPU ms | calls | longest call | |---|---|---|---|---|---| | 1 | CS `80f65d1925a2df48` | 64x1x1, wave64 split | 1290.8 | 223 | **479.1 ms** (7635x1x1 groups) | | 2 | CS `44d832b4bdbd5ef8` | 1024x1x1, wave64 split | 445.8 | 112 | 36.0 ms (8x1x1) | | 3 | CS `be262edda389c646` | 64x1x1, wave64 split | 277.5 | 467 | 11.2 ms (179x1x1) | **World, last 2 s block (137–194 ms of GPU time in ~460 ops, 6,400–6,700 ops in flight):** the per-call leaders here are wave32, not split — CS `02eaed46a92d4c93` 59.1 ms/32 calls (longest 8.2), `d22f746890686a68` 40.6/57 (4.8), `73ffa0b705ae2cc0` 30.3/32 (1.6); the split-wave64 rows in the same block are cheap per call: `20c629c82e9687b4` 21.2 ms/82 (longest 0.9), `aa35926a5609067b` 7.1/22 (1.6), `8ae101406edc576d` 7.0/22 (1.6). **Reading vs @⁠not-rex's 10 GB table:** with the coherent window off, split-wave64 per-call cost is mostly ≤1.6 ms here too, confirming his conclusion that the window, not the split form, was the cliff. But our *cumulative* heaviest is `80f65d1925a2df48` (the program he lists at 347 ms/2,899 calls HLSL, 824/5,109 direct), not his top `71f4ac8ad5eba33c` — and it is dominated by a few enormous-group calls (9,017 and 7,635 groups, 479–565 ms each) rather than by many small ones. `71f4ac8ad5eba33c` did not reach our top rows in this window. So on 12 GB the residual world cost concentrates in one split program's huge dispatches, which is a different shape from the 10 GB card. **Menu stage (same tree/env, before A):** 13–14 presents / 143–165 draws per 2 s, commit ~16.5 GB, video 6.7 GB local; heaviest split CS at menu `1e32f25121c1552f` 43.7 ms/393 calls, longest 0.3 ms; the 2 s GPU leaders are VS/PS draws (68.5 / 65.3 / 32.1 ms). **Limitation, stated plainly:** this box has 32 GB RAM and a 65.8 GB commit limit. Once the world streams, video local reaches 14,569 MB on the 12,288 MiB part and process commit climbs past 29 GB with heavy pagefile churn; a 20 GB guard was intended but my guard script had a bug (multi-process array) and I killed the run manually at ~29 GB, so the world table is a partial window, not a full 300 s, and only one shader form was run. I am not running further heavy arms on this machine without a hardware change; happy to re-run HLSL / PER_LANE or a longer world window if the thread can suggest a placement that keeps commit under ~20 GB on a 12 GB / 32 GB box (texture pages in system memory, compact form, or a smaller `XCL_UMA_MB`).
Author
Owner

@⁠gefydev on GitHub · 2026-11-25 06:16 UTC · original

@⁠chazi123 thank you, this is the second card we asked for. Noted (RTX 3060 Laptop 12 GB, XCL_DIRECT_DXIL=1 only, a partial window of about 150-230 s, stopped by hand at about 29 GB commit): split-wave64 per-call cost is mostly 1.6 ms or less, and the residual world cost concentrates in 80f65d1925a2df48 (1,290.8 ms in 223 calls, with a few huge dispatches of 7,635 to 9,017 groups at 479-565 ms each). I have passed the numbers to the session that writes the code. No need to run the heavy arms again on that box.

AI use: Claude Code (Claude Opus 5.5) wrote this reply for @⁠gefydev.

**@⁠gefydev** on GitHub · 2026-11-25 06:16 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7154614483) @⁠chazi123 thank you, this is the second card we asked for. Noted (RTX 3060 Laptop 12 GB, `XCL_DIRECT_DXIL=1` only, a partial window of about 150-230 s, stopped by hand at about 29 GB commit): split-wave64 per-call cost is mostly 1.6 ms or less, and the residual world cost concentrates in `80f65d1925a2df48` (1,290.8 ms in 223 calls, with a few huge dispatches of 7,635 to 9,017 groups at 479-565 ms each). I have passed the numbers to the session that writes the code. No need to run the heavy arms again on that box. AI use: Claude Code (Claude Opus 5.5) wrote this reply for @⁠gefydev.
Author
Owner

@⁠tiagonleal on GitHub · 2026-11-25 07:28 UTC · original

@⁠gefydev two facts for the split-wave64 GPU-time request, from an RTX 5070 Ti 16 GB / 32 GB RAM (driver 32.0.16.1742, Ryzen 7 9800X3D, Windows 11 Pro 10.0.26300). Tree: #2057 at f7e08e6 (contains #1766), release.

1. For 50625695d2e6cbe7, 206ed63b96be21a1 and a9f2cd53943d5dc4 the per-lane arm cannot differ from the direct arm. With XCL_DIRECT_DXIL=1 XCL_PER_LANE=1 the per-lane form refuses all three and the runtime falls back to the split DXIL, byte for byte the same as with XCL_DIRECT_DXIL=1 alone (I compared the dump of xcl shaders <pack> --direct --hash <h> --lanes with the entries in the translated cache of the game runs; the driver blobs are the same files).

  • Refusal, the same for the three: a branch on whether any lane of a mask is set, with lanes in EXEC without its bit (lane_masks.rs:921). In the split form whole-wave branches are switched off (lower.rs:1176-1177, through whole_needs_exchange); with the split off, the survey passes that check for the same programs. It is not the only obstacle: behind it the survey still lists image instructions with NSA addresses for all three, and one structural refusal ("a number read as a mask") for 50625695d2e6cbe7.
  • 4097cf4856634349 (wave32, not split) is refused on unsupported IMAGE_LOAD, reading an NSA address register the bridge did not pass; that looks like what #1797 fixes.
  • Static counts in the split DXIL that runs today (dxc -dumpbin): per iteration of the loop with the > 9999 exit, 162 GroupMemoryBarrierWithGroupSync in 50625695d2e6cbe7 and 72 in 206ed63b96be21a1; a9f2cd53943d5dc4 has no such loop (two loops of 2 trips, 90 barriers each).

2. I could not fill the missing row: 50625, 206ed and a9f2 did not run here either. Two runs of 300 s with XCL_GPU_PROFILE=1 XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512 XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1, compute pipelines precompiled, A at 30 s: the world (first #101) came at 74.2 s and 80.6 s. The first run made no more submits from 86 s while graphics pipelines were still compiling in-game; the second rendered on (21,407 dispatches in 90–100 s) and ran out of physical RAM at about 108 s (working set 19.4 GB), where my memory guard stopped it. None of the three programs is in any profile table. The heaviest entries the 2 s windows did log in the world (90–96 s, window off): CS 24de2aef6c31d55e 823.6 ms in 24 calls (longest 135.9 ms, 79,304 groups), CS d79af1d04922a49b up to 99.7 ms per call, 71f4ac8ad5eba33c 22.6 ms per call. The memory numbers are in my report on #2057.

Not tested: the HLSL form; the per-lane form in a game run; more than 2 runs. The game runs had two local, unpublished switches on (XCL_EXP_WAIT_SUBMITTED=1: the GPU-wait watchdog keeps a wait whose Signal is already submitted, 0 holds logged; XCL_EXP_APU_MAP1=1: ApuMapVirtualAddress in its one-argument form). The translator is the PR's, unchanged.

Run and written with Claude Code (Claude Fable 5.2 and Claude Opus 5.5).

**@⁠tiagonleal** on GitHub · 2026-11-25 07:28 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7155904923) @⁠gefydev two facts for the split-wave64 GPU-time request, from an RTX 5070 Ti 16 GB / 32 GB RAM (driver 32.0.16.1742, Ryzen 7 9800X3D, Windows 11 Pro 10.0.26300). Tree: #2057 at `f7e08e6` (contains #1766), release. **1. For `50625695d2e6cbe7`, `206ed63b96be21a1` and `a9f2cd53943d5dc4` the per-lane arm cannot differ from the direct arm.** With `XCL_DIRECT_DXIL=1 XCL_PER_LANE=1` the per-lane form refuses all three and the runtime falls back to the split DXIL, byte for byte the same as with `XCL_DIRECT_DXIL=1` alone (I compared the dump of `xcl shaders <pack> --direct --hash <h> --lanes` with the entries in the translated cache of the game runs; the driver blobs are the same files). - Refusal, the same for the three: `a branch on whether any lane of a mask is set, with lanes in EXEC without its bit` (`lane_masks.rs:921`). In the split form whole-wave branches are switched off (`lower.rs:1176-1177`, through `whole_needs_exchange`); with the split off, the survey passes that check for the same programs. It is not the only obstacle: behind it the survey still lists image instructions with NSA addresses for all three, and one structural refusal ("a number read as a mask") for `50625695d2e6cbe7`. - `4097cf4856634349` (wave32, not split) is refused on `unsupported IMAGE_LOAD`, reading an NSA address register the bridge did not pass; that looks like what #1797 fixes. - Static counts in the split DXIL that runs today (`dxc -dumpbin`): per iteration of the loop with the `> 9999` exit, 162 `GroupMemoryBarrierWithGroupSync` in `50625695d2e6cbe7` and 72 in `206ed63b96be21a1`; `a9f2cd53943d5dc4` has no such loop (two loops of 2 trips, 90 barriers each). **2. I could not fill the missing row: 50625, 206ed and a9f2 did not run here either.** Two runs of 300 s with `XCL_GPU_PROFILE=1 XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512 XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1`, compute pipelines precompiled, A at 30 s: the world (first `#101`) came at 74.2 s and 80.6 s. The first run made no more submits from 86 s while graphics pipelines were still compiling in-game; the second rendered on (21,407 dispatches in 90–100 s) and ran out of physical RAM at about 108 s (working set 19.4 GB), where my memory guard stopped it. None of the three programs is in any profile table. The heaviest entries the 2 s windows did log in the world (90–96 s, window off): CS `24de2aef6c31d55e` 823.6 ms in 24 calls (longest 135.9 ms, 79,304 groups), CS `d79af1d04922a49b` up to 99.7 ms per call, `71f4ac8ad5eba33c` 22.6 ms per call. The memory numbers are in my report on #2057. **Not tested:** the HLSL form; the per-lane form in a game run; more than 2 runs. The game runs had two local, unpublished switches on (`XCL_EXP_WAIT_SUBMITTED=1`: the GPU-wait watchdog keeps a wait whose `Signal` is already submitted, 0 holds logged; `XCL_EXP_APU_MAP1=1`: `ApuMapVirtualAddress` in its one-argument form). The translator is the PR's, unchanged. Run and written with Claude Code (Claude Fable 5.2 and Claude Opus 5.5).
Author
Owner

@⁠gefydev on GitHub · 2026-11-25 07:30 UTC · original

@⁠tiagonleal thank you for the two facts and the runs (RTX 5070 Ti, #2057 at f7e08e6). Noted: with XCL_DIRECT_DXIL=1 XCL_PER_LANE=1 the per-lane form refuses 50625695d2e6cbe7, 206ed63b96be21a1 and a9f2cd53943d5dc4 on the whole-wave branch rule in the split form and falls back to the same split DXIL as the direct form, so a per-lane arm cannot differ for them; and none of the three programs ran in your two 300 s runs either. I have passed it to the session that writes the code. No need to run more arms for these three.

AI use: Claude Code (Claude Opus 5.5) wrote this reply for @⁠gefydev.

**@⁠gefydev** on GitHub · 2026-11-25 07:30 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7155930105) @⁠tiagonleal thank you for the two facts and the runs (RTX 5070 Ti, #2057 at `f7e08e6`). Noted: with `XCL_DIRECT_DXIL=1 XCL_PER_LANE=1` the per-lane form refuses `50625695d2e6cbe7`, `206ed63b96be21a1` and `a9f2cd53943d5dc4` on the whole-wave branch rule in the split form and falls back to the same split DXIL as the direct form, so a per-lane arm cannot differ for them; and none of the three programs ran in your two 300 s runs either. I have passed it to the session that writes the code. No need to run more arms for these three. AI use: Claude Code (Claude Opus 5.5) wrote this reply for @⁠gefydev.
Author
Owner

@⁠PracticalStudios on GitHub · 2026-11-25 08:00 UTC · original

On an RTX 3090 (24 GB, driver 621.24, 62 GB RAM), most huge driver compiles during the world load skip the big-compile gate because the title is waiting for them. Up to 15 were in flight at once, and process commit kept climbing until the run hit my 38 GB job cap.

Setup: main cbc296a + #684 + #2120, release, with XCL_HEAP_WINDOWS=1 XCL_DIRECT_DXIL=1 XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512 XCL_PSO_WAIT_MS=50. One 300 s run with scripted A presses.

  • Presents: about 60 per 2 s until 74 s, then 0–3 per 2 s. Frame dumps show only the loading screen. The #101 stub is first called at 79.5 s.
  • Commit: 19.1 GB at 70 s, 29.9 GB at 102 s, 38.8 GB at 242 s. The run ended there, at the job cap I set, so the end itself is mine.
    • 70 → 102 s: this rise tracks texture pages. Target pages go from 4.6 to 10.0 GB, sparse pools from 1.0 to 2.0 GB, local video memory from 7.7 to 14.3 GB.
    • 160 → 242 s: this rise comes while pools and video memory are flat, with 10–15 huge compiles in flight on title threads (0.3–1.0 MB of DXIL each). real.rs puts each at about 1.5 GB in the driver. I did not measure each compile's own commit.
  • Huge compiles:
    • 77 of the 93 logged huge compiles finished as wanted at once (no slot), so they skipped both the slot limit and the commit headroom check in big_compile_turn. Only 16 were gated.
    • The bypass is deliberate: holding back a build the title waits for holds the title back. But with the 50 ms pipeline budget the title moves on and asks for the next pipeline, so more of these are wanted at the same time.

I have not tried any change to this. It may matter for #2130 and #2098, which touch the same gate.

**@⁠PracticalStudios** on GitHub · 2026-11-25 08:00 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7156493170) On an RTX 3090 (24 GB, driver 621.24, 62 GB RAM), most huge driver compiles during the world load skip the big-compile gate because the title is waiting for them. Up to 15 were in flight at once, and process commit kept climbing until the run hit my 38 GB job cap. **Setup:** `main` cbc296a + #684 + #2120, release, with `XCL_HEAP_WINDOWS=1 XCL_DIRECT_DXIL=1 XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512 XCL_PSO_WAIT_MS=50`. One 300 s run with scripted A presses. - **Presents:** about 60 per 2 s until 74 s, then 0–3 per 2 s. Frame dumps show only the loading screen. The `#101` stub is first called at 79.5 s. - **Commit:** 19.1 GB at 70 s, 29.9 GB at 102 s, 38.8 GB at 242 s. The run ended there, at the job cap I set, so the end itself is mine. - **70 → 102 s:** this rise tracks texture pages. Target pages go from 4.6 to 10.0 GB, sparse pools from 1.0 to 2.0 GB, local video memory from 7.7 to 14.3 GB. - **160 → 242 s:** this rise comes while pools and video memory are flat, with 10–15 huge compiles in flight on title threads (0.3–1.0 MB of DXIL each). `real.rs` puts each at about 1.5 GB in the driver. I did not measure each compile's own commit. - **Huge compiles:** - 77 of the 93 logged huge compiles finished as `wanted at once (no slot)`, so they skipped both the slot limit and the commit headroom check in `big_compile_turn`. Only 16 were gated. - The bypass is deliberate: holding back a build the title waits for holds the title back. But with the 50 ms pipeline budget the title moves on and asks for the next pipeline, so more of these are wanted at the same time. I have not tried any change to this. It may matter for #2130 and #2098, which touch the same gate.
Author
Owner

@⁠gefydev on GitHub · 2026-11-25 08:01 UTC · original

@⁠PracticalStudios thank you for the RTX 3090 run (main cbc296a + #684 + #2120, 300 s): 77 of the 93 logged huge compiles were "wanted at once" and skipped the slot limit and the commit headroom check, up to 15 were in flight, and commit rose from 29.9 GB at 102 s to 38.8 GB at 242 s while pools and video memory were flat. Noted as measured, including that the end is your job cap. I have passed it to the session that writes the code; your note about #2130 and #2098 is on the thread for their authors.

AI use: Claude Code (Claude Opus 5.5) wrote this reply for @⁠gefydev.

**@⁠gefydev** on GitHub · 2026-11-25 08:01 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7156512120) @⁠PracticalStudios thank you for the RTX 3090 run (`main` `cbc296a` + #684 + #2120, 300 s): 77 of the 93 logged huge compiles were "wanted at once" and skipped the slot limit and the commit headroom check, up to 15 were in flight, and commit rose from 29.9 GB at 102 s to 38.8 GB at 242 s while pools and video memory were flat. Noted as measured, including that the end is your job cap. I have passed it to the session that writes the code; your note about #2130 and #2098 is on the thread for their authors. AI use: Claude Code (Claude Opus 5.5) wrote this reply for @⁠gefydev.
Author
Owner

@⁠Anon64 on GitHub · 2026-11-25 10:45 UTC · original

RTX 3060 12 GB (Windows 11) adds one card to the coherent-window result: with XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512 the stall on a9f2cd53943d5dc4 is gone and the title runs about 2.5× longer, but later stalls on other programs remain.

Tree: main 568e7db + #1323 (XCL_GPU_CULPRIT=1), release, Rust 1.100.0, XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1, warm caches, A every 4 s from 20 to 60 s, run until the title ends. One run per arm.

first GPU queue.Wait … 5000 ms timeouts the watchdog ends it at
default window 76.7 s 52 143.4 s
default window, XCL_UMA_SHADOW off 79.3 s 52 145.5 s
default window, a9f2cd53943d5dc4 through HLSL instead of direct DXIL 76.5 s 4 101.3 s
XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512 118.4 s 229 371.5 s
  • With the default window, #1323 names one unfinished dispatch on q2 at the first timeout, every time: a9f2cd53943d5dc4, 16x16x16 groups. It stays the culprit when that one program is translated through HLSL (a local switch, not a PR) and with the UMA shadow off, so on this card too it is not the direct DXIL translation.
  • With the coherent window off, a9f2cd53943d5dc4 is never named. The first stall comes at 118 s, and the culprits there are be262edda389c646 (13 of the named dispatches) and 80f65d1925a2df48 (6), the pair that alternates in long runs of 1x1x1 to 3272x1x1 dispatches.
  • #1741's bounded split-wave exchange, ported by hand onto this main (compute and mesh groups only), did not change the default-window stall: same culprit at 96 s.

AI use: Claude Code (Claude Opus 5.5) ran the runs on my machine and wrote this.

**@⁠Anon64** on GitHub · 2026-11-25 10:45 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7160139718) **RTX 3060 12 GB (Windows 11) adds one card to the coherent-window result: with `XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512` the stall on `a9f2cd53943d5dc4` is gone and the title runs about 2.5× longer, but later stalls on other programs remain.** Tree: `main` `568e7db` + #1323 (`XCL_GPU_CULPRIT=1`), release, Rust 1.100.0, `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1`, warm caches, A every 4 s from 20 to 60 s, run until the title ends. One run per arm. | | first `GPU queue.Wait … 5000 ms` | timeouts | the watchdog ends it at | |---|---|---|---| | default window | 76.7 s | 52 | 143.4 s | | default window, `XCL_UMA_SHADOW` off | 79.3 s | 52 | 145.5 s | | default window, `a9f2cd53943d5dc4` through HLSL instead of direct DXIL | 76.5 s | 4 | 101.3 s | | **`XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512`** | **118.4 s** | 229 | **371.5 s** | - With the default window, #1323 names one unfinished dispatch on q2 at the first timeout, every time: `a9f2cd53943d5dc4`, 16x16x16 groups. It stays the culprit when that one program is translated through HLSL (a local switch, not a PR) and with the UMA shadow off, so on this card too it is not the direct DXIL translation. - With the coherent window off, `a9f2cd53943d5dc4` is never named. The first stall comes at 118 s, and the culprits there are `be262edda389c646` (13 of the named dispatches) and `80f65d1925a2df48` (6), the pair that alternates in long runs of 1x1x1 to 3272x1x1 dispatches. - #1741's bounded split-wave exchange, ported by hand onto this `main` (compute and mesh groups only), did not change the default-window stall: same culprit at 96 s. **AI use:** Claude Code (Claude Opus 5.5) ran the runs on my machine and wrote this.
Author
Owner

@⁠gefydev on GitHub · 2026-11-25 10:46 UTC · original

@⁠Anon64 thank you for the RTX 3060 (12 GB) runs on main 568e7db + #1323: with XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512 the stall on a9f2cd53943d5dc4 is gone (first GPU wait timeout at 118.4 s instead of 76.7 s, watchdog end at 371.5 s instead of 143.4 s), and the later culprits are be262edda389c646 and 80f65d1925a2df48; the stall stays on a9f2cd53943d5dc4 through HLSL and with the UMA shadow off, so it is not the direct translation. Noted as measured, one run per arm. I have passed it to the session that writes the code.

AI use: Claude Code (Claude Opus 5.5) wrote this reply for @⁠gefydev.

**@⁠gefydev** on GitHub · 2026-11-25 10:46 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7160164401) @⁠Anon64 thank you for the RTX 3060 (12 GB) runs on `main` `568e7db` + #1323: with `XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512` the stall on `a9f2cd53943d5dc4` is gone (first GPU wait timeout at 118.4 s instead of 76.7 s, watchdog end at 371.5 s instead of 143.4 s), and the later culprits are `be262edda389c646` and `80f65d1925a2df48`; the stall stays on `a9f2cd53943d5dc4` through HLSL and with the UMA shadow off, so it is not the direct translation. Noted as measured, one run per arm. I have passed it to the session that writes the code. AI use: Claude Code (Claude Opus 5.5) wrote this reply for @⁠gefydev.
Author
Owner

@⁠MacieGx on GitHub · 2026-11-25 11:47 UTC · original

RTX 5080 (16 GB, driver 621.24), Ryzen 7 5800X3D, 32 GB: the world now draws textured and lit, with sun shadows, on screen (still overexposed, see "open"). Full scenes reach the G-buffer: buildings with windows and railings, vegetation and palms, parked cars, and characters with textured clothing (still at a low level of detail). Notes on why the 3D was flat grey, since several of us have been looking at textures: for this title on NVIDIA it was not (first) a texture problem.

The grey was the lighting of an empty G-buffer. Dumping every target of a world frame: main depth and all G-buffer colour targets were 0 except single texels, while the draws counted 0 skipped. The flat colour is what the deferred lighting and composite make of nothing. Behind that, one cause hid the next:

  1. World geometry lives in the title's 24 GB GPU view of its memory (the second reservation kernelx::mirrors pairs with the CPU view, plus the 6 GB pool CopyPageMappingsBatchX points pages at). Mesh-shader meshlets, indices and vertices are addressed there, outside XCL's memory windows 0–3, so every load read 0. A meshlet count word of 0 gives exactly "1 vertex / 1 primitive" (counts are stored n−1), which is what the two-pass records showed. Locally I map that range as extra windows filled on demand from the CPU view / page mappings; a PR will follow (it builds on #1055 / #1102).
  2. The world's mesh and pixel shaders index the bound descriptor heaps themselves and expect their addresses in the user SGPRs after the root arguments (view heap, then sampler heap). With them 0, every group drew meshlet 0 and textures read garbage. #1803 does exactly this; it is what turned "props only" into full scenes here.
  3. Textures sampled through heap indices were evicted and never came back under a page budget: no transition and no CPU write ever marks them used. Touching the textures a draw's material record names fixed the black albedo (local; it builds on #640 / #782).
  4. Float16 interpolants packed two per dword (173 of 362 world PS): see my review on #1975 for the layout the title's programs use; branch with tests linked there.
  5. Constant data after the program: 676 of 26503 records read tables placed after s_endpgm through s_getpc_b64; the translation read zeros there. The ACES LUT bake then made a one-colour 64-cube output LUT, so the presented frame was flat even with a correct scene behind it. Fix: #2229.

Other things that were needed to get a world frame to complete at all:

  • the two-pass ExecuteIndirect mesh path must read bounded records (indirect_clamp, #1795). Unbounded records produced garbage indirect dispatches (NVIDIA event log: MMU fault / SKEDCHECK16_CTA_THREAD_DIMENSION_ZERO, then 0x887a0006);
  • a lock-order deadlock between the sparse STATE lock and indirect_clamp's SCRATCH (allocator reset vs buffer release; I will note it on #1795);
  • per-queue copy-back fences, as in #2057's 1225bb9 (with one shared rb_fence a copy back could run before the lists it follows, and the title's Wait64BitValueX waits then timed out on a label the GPU had written);
  • DirectStorage AutoSubmitDisabled honoured (#1599 / #1790): with it, 0 failed requests instead of hundreds, and more than 16384 page lists were found changed after their request was enqueued, i.e. writes that went to the wrong pages before;
  • precompiling the compute passes of the console mesh shaders (#2246) and caching the mesh pipelines' driver blobs at run time, so the world is not stuck compiling.

Community PRs in my local stack on top of main: #1385, #1809, #1834, #1798, #541, #724, #1248, #640 + #782 (ported onto #1747's TilePool), #1182, #1836, #1795, #1793, #1329, #1993, #1055, #1102, #2050, and 8 commits from #2057. Env: XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_PAGE_BUDGET_MB=2048, with --precompile --only cs|ms --pipelines and --only ps|vs (same XCL_HEAP_WINDOWS) after every translator change.

Open:

  • the lit target is too dark and only partly lit (local lights / indirect diffuse), so auto-exposure sits at its floor and the frame is blown out and teal;
  • black sky, a checker stipple on surfaces, low-detail figures;
  • RAM: about half the runs end at 2–3 min with < 800 MB free on 32 GB;
  • an occasional 0x887a0005 about 30 s into the world.

AI use: Claude Code (Claude Opus 5.5 coordinating; Claude Fable 5.2 and Opus 5.5 subagents for the analyses and patches). Every number above comes from runs on this machine.

**@⁠MacieGx** on GitHub · 2026-11-25 11:47 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7161507418) **RTX 5080 (16 GB, driver 621.24), Ryzen 7 5800X3D, 32 GB: the world now draws textured and lit, with sun shadows, on screen** (still overexposed, see "open"). Full scenes reach the G-buffer: buildings with windows and railings, vegetation and palms, parked cars, and characters with textured clothing (still at a low level of detail). Notes on why the 3D was flat grey, since several of us have been looking at textures: for this title on NVIDIA it was not (first) a texture problem. **The grey was the lighting of an empty G-buffer.** Dumping every target of a world frame: main depth and all G-buffer colour targets were 0 except single texels, while the draws counted 0 skipped. The flat colour is what the deferred lighting and composite make of nothing. Behind that, one cause hid the next: 1. **World geometry lives in the title's 24 GB GPU view of its memory** (the second reservation `kernelx::mirrors` pairs with the CPU view, plus the 6 GB pool `CopyPageMappingsBatchX` points pages at). Mesh-shader meshlets, indices and vertices are addressed there, outside XCL's memory windows 0–3, so every load read 0. A meshlet count word of 0 gives exactly "1 vertex / 1 primitive" (counts are stored n−1), which is what the two-pass records showed. Locally I map that range as extra windows filled on demand from the CPU view / page mappings; a PR will follow (it builds on #1055 / #1102). 2. **The world's mesh and pixel shaders index the bound descriptor heaps themselves** and expect their addresses in the user SGPRs after the root arguments (view heap, then sampler heap). With them 0, every group drew meshlet 0 and textures read garbage. #1803 does exactly this; it is what turned "props only" into full scenes here. 3. **Textures sampled through heap indices were evicted and never came back** under a page budget: no transition and no CPU write ever marks them used. Touching the textures a draw's material record names fixed the black albedo (local; it builds on #640 / #782). 4. **Float16 interpolants packed two per dword** (173 of 362 world PS): see my review on #1975 for the layout the title's programs use; branch with tests linked there. 5. **Constant data after the program**: 676 of 26503 records read tables placed after `s_endpgm` through `s_getpc_b64`; the translation read zeros there. The ACES LUT bake then made a one-colour 64-cube output LUT, so the presented frame was flat even with a correct scene behind it. Fix: #2229. Other things that were needed to get a world frame to complete at all: - the two-pass ExecuteIndirect mesh path must read bounded records (`indirect_clamp`, #1795). Unbounded records produced garbage indirect dispatches (NVIDIA event log: MMU fault / `SKEDCHECK16_CTA_THREAD_DIMENSION_ZERO`, then 0x887a0006); - a lock-order deadlock between the sparse `STATE` lock and `indirect_clamp`'s `SCRATCH` (allocator reset vs buffer release; I will note it on #1795); - per-queue copy-back fences, as in #2057's 1225bb9 (with one shared `rb_fence` a copy back could run before the lists it follows, and the title's `Wait64BitValueX` waits then timed out on a label the GPU had written); - DirectStorage `AutoSubmitDisabled` honoured (#1599 / #1790): with it, 0 failed requests instead of hundreds, and more than 16384 page lists were found changed after their request was enqueued, i.e. writes that went to the wrong pages before; - precompiling the compute passes of the console mesh shaders (#2246) and caching the mesh pipelines' driver blobs at run time, so the world is not stuck compiling. Community PRs in my local stack on top of `main`: #1385, #1809, #1834, #1798, #541, #724, #1248, #640 + #782 (ported onto #1747's TilePool), #1182, #1836, #1795, #1793, #1329, #1993, #1055, #1102, #2050, and 8 commits from #2057. Env: `XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_PAGE_BUDGET_MB=2048`, with `--precompile --only cs|ms --pipelines` and `--only ps|vs` (same `XCL_HEAP_WINDOWS`) after every translator change. **Open:** - the lit target is too dark and only partly lit (local lights / indirect diffuse), so auto-exposure sits at its floor and the frame is blown out and teal; - black sky, a checker stipple on surfaces, low-detail figures; - RAM: about half the runs end at 2–3 min with < 800 MB free on 32 GB; - an occasional 0x887a0005 about 30 s into the world. AI use: Claude Code (Claude Opus 5.5 coordinating; Claude Fable 5.2 and Opus 5.5 subagents for the analyses and patches). Every number above comes from runs on this machine.
Author
Owner

@⁠schoperena on GitHub · 2026-11-25 12:08 UTC · original

RTX 5060 Ti 16 GB (Blackwell): with warm caches and XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512 the world load starts at ~73 s and the first world frame (green) ends in a device removal at 87–91 s, DRED page fault at GPU VA 0x0, no long-running dispatch

Counts and timings only, no game data.

task: world load on NVIDIA Blackwell with every compute and graphics pipeline cached
lane: nv-win
gpu: RTX 5060 Ti 16 GB (Blackwell, 32-lane waves), driver 621.24 (32.0.16.2124); Ryzen 7 5800X, 32 GB RAM, Windows 11 Pro 26300
tree: main cbc296a + #1993 + #1924 + #2160 + #2163 + #2065 + #1985 + #2078 + #2157 + #2178 + runtime commits of #2057 (#1329 UMA shadow, 1225bb9, 5e3c657, b5e8baf, #1599, XCL_WATCH_HOT, #1766); HLSL path, all shader caches warm
result: device removed 0x887a0005 at 87.6 s and 91.3 s (2 of 2 runs), "DRED page fault at GPU VA 0x0; allocations there: []; recently freed: []"; XCL_GPU_PROFILE shows nothing running long before it

Runs

run tree / settings world load starts end
3 main 689f2db + #1791, XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512, compute cache only ~300 s stopped by hand after 24 min at 0 fps building graphics PSOs; 0 GPU wait time-outs, 0 removals
4 cbc296a + #1993 + #1924, same coherent settings, compute + graphics caches ~305 s removed 0x887a0005 at 337 s, silent (no DRED)
5 tree above, + XCL_UMA_SHADOW=1 XCL_WATCH_HOT=0 XCL_DRED=1 XCL_SKIP_BINK=1 ~73 s removed at 87.6 s, DRED page fault at VA 0x0
6 run 5 + XCL_GPU_PROFILE=1 ~75 s removed at 91.3 s, DRED page fault at VA 0x0

Notes

  • The coherent-window setting from @⁠kanade333 / @⁠Ariorh1337 reproduces here: with the default 4095 MB window an earlier run stalled after load; with 512 MB there were 0 queue.Wait time-outs in all four runs. The cost on this card: the intro dropped to 15–17 fps with choppy audio (write-watch: 8.3 s over 1,024 looks, 1.27 M dirty pages). XCL_SKIP_BINK=1 (#1053) avoids most of it.
  • Runs 5 and 6 reach the world load ~230 s earlier than run 4 because the intro movies are skipped. So the earlier removal is probably the same event reached sooner, not a regression from XCL_UMA_SHADOW / XCL_WATCH_HOT=0. This is not yet checked A/B.
  • On screen the first world frame is a flat green; the removal follows within seconds.
  • Run 6, last profiler window before the removal: 138 ms of GPU time in 2,261 ops (3,119 in flight, 0 lost), the longest op 2.5 ms (CS 2e7b19ebe687ea83, split wave64). There was no "RUNNING … not finished" line, so this looks like an immediate fault on a null address rather than a hang. a9f2cd53943d5dc4 (named at this fault by @⁠Raul-Paiva) is loaded in this run but is not among the top programs.
  • Just before the removal: split command list (type 2) around mid-list Wait after Write64 (#2–#8), and #2163's spare list taken twice (#32, #64). The "driver refused the compute PSO … with 0x887a0005" lines after it are a consequence: every create fails once the device is gone.
  • No nvlddmkm / 4101 event in the System log. Not a TDR.

Open question: which access reaches VA 0. Candidates I'm checking: ExecuteIndirect argument/count buffers, root descriptors, null views, and title addresses outside the windows. Happy to run any build or env var that narrows it down. I can run the same setup again within minutes.

AI use: Claude Code (Claude Opus 5.5) built the tree, ran the title on the hardware above, read the logs and drafted this report; I reviewed it.

**@⁠schoperena** on GitHub · 2026-11-25 12:08 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7161982070) **RTX 5060 Ti 16 GB (Blackwell): with warm caches and `XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512` the world load starts at ~73 s and the first world frame (green) ends in a device removal at 87–91 s, DRED page fault at GPU VA 0x0, no long-running dispatch** Counts and timings only, no game data. ```xcl-result task: world load on NVIDIA Blackwell with every compute and graphics pipeline cached lane: nv-win gpu: RTX 5060 Ti 16 GB (Blackwell, 32-lane waves), driver 621.24 (32.0.16.2124); Ryzen 7 5800X, 32 GB RAM, Windows 11 Pro 26300 tree: main cbc296a + #1993 + #1924 + #2160 + #2163 + #2065 + #1985 + #2078 + #2157 + #2178 + runtime commits of #2057 (#1329 UMA shadow, 1225bb9, 5e3c657, b5e8baf, #1599, XCL_WATCH_HOT, #1766); HLSL path, all shader caches warm result: device removed 0x887a0005 at 87.6 s and 91.3 s (2 of 2 runs), "DRED page fault at GPU VA 0x0; allocations there: []; recently freed: []"; XCL_GPU_PROFILE shows nothing running long before it ``` **Runs** | run | tree / settings | world load starts | end | |---|---|---|---| | 3 | main 689f2db + #1791, `XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512`, compute cache only | ~300 s | stopped by hand after 24 min at 0 fps building graphics PSOs; **0 GPU wait time-outs, 0 removals** | | 4 | cbc296a + #1993 + #1924, same coherent settings, compute + graphics caches | ~305 s | removed `0x887a0005` at 337 s, silent (no DRED) | | 5 | tree above, + `XCL_UMA_SHADOW=1 XCL_WATCH_HOT=0 XCL_DRED=1 XCL_SKIP_BINK=1` | ~73 s | removed at 87.6 s, DRED page fault at VA 0x0 | | 6 | run 5 + `XCL_GPU_PROFILE=1` | ~75 s | removed at 91.3 s, DRED page fault at VA 0x0 | **Notes** - The coherent-window setting from @⁠kanade333 / @⁠Ariorh1337 reproduces here: with the default 4095 MB window an earlier run stalled after load; with 512 MB there were 0 `queue.Wait` time-outs in all four runs. The cost on this card: the intro dropped to 15–17 fps with choppy audio (write-watch: 8.3 s over 1,024 looks, 1.27 M dirty pages). `XCL_SKIP_BINK=1` (#1053) avoids most of it. - Runs 5 and 6 reach the world load ~230 s earlier than run 4 because the intro movies are skipped. So the earlier removal is probably the same event reached sooner, not a regression from `XCL_UMA_SHADOW` / `XCL_WATCH_HOT=0`. This is not yet checked A/B. - On screen the first world frame is a flat green; the removal follows within seconds. - Run 6, last profiler window before the removal: 138 ms of GPU time in 2,261 ops (3,119 in flight, 0 lost), the longest op 2.5 ms (CS `2e7b19ebe687ea83`, split wave64). There was **no "RUNNING … not finished" line**, so this looks like an immediate fault on a null address rather than a hang. `a9f2cd53943d5dc4` (named at this fault by @⁠Raul-Paiva) is loaded in this run but is not among the top programs. - Just before the removal: `split command list (type 2) around mid-list Wait after Write64` (#2–#8), and #2163's spare list taken twice (#32, #64). The "driver refused the compute PSO … with 0x887a0005" lines after it are a consequence: every create fails once the device is gone. - No `nvlddmkm` / 4101 event in the System log. Not a TDR. **Open question:** which access reaches VA 0. Candidates I'm checking: ExecuteIndirect argument/count buffers, root descriptors, null views, and title addresses outside the windows. Happy to run any build or env var that narrows it down. I can run the same setup again within minutes. **AI use:** Claude Code (Claude Opus 5.5) built the tree, ran the title on the hardware above, read the logs and drafted this report; I reviewed it.
Author
Owner

@⁠schoperena on GitHub · 2026-11-25 12:30 UTC · original

Follow-up to my RTX 5060 Ti report above: five settings and two candidate fixes, same end every time: a DRED "page fault at GPU VA 0x0" during the world load. The settings only move when it happens.

Same machine, tree and warm caches as above. Counts and timings only.

run change from the tree above first world frame removed at dispatches before
5 XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512 XCL_UMA_SHADOW=1 XCL_WATCH_HOT=0 green 87.6 s ~16 k
7 run 5 + #1914 (companion SRVs for every image UAV dimension) green 82.8 s ~16 k
8 run 7 + XCL_SKIP_CS=b1a01ac73a80651e,777348c43857fdd2,a9f2cd53943d5dc4,ffe81a9ab980b657 (the 4x4x4 volume programs in the last profiler window) green 84.8 s ~16 k
9A run 7 without XCL_UMA_SHADOW, XCL_WATCH_HOT default (on) green, then the grey loading background 117.4 s ~20 k
9B run 9A with the default coherent window (4095 MB) none seen 90.9 s ~33 k (and ~14 k draws)

All runs: XCL_DRED=1 XCL_SKIP_BINK=1, 0 queue.Wait time-outs, 0 skipped draws or dispatches, commit ~30 GB of 32 GB RAM + page file, and the same end: 0x887a0005, then DRED page fault at GPU VA 0x0; allocations there: []; recently freed: [] and the title's assert at +0x2474606.

What I read from it

  • #1914 does not change it here. Skipping the four volume programs (incl. a9f2cd53943d5dc4) does not either. The skip is not logged per dispatch, so I can't fully confirm it applied.
  • XCL_UMA_SHADOW=1 + XCL_WATCH_HOT=0 bring the removal earlier on this card: 87.6 s / ~16 k dispatches with them, 117.4 s / ~20 k without them.
  • With the full 4095 MB window the earlier GPU stall no longer shows up on this tree (0 time-outs). The world load runs about twice as fast as with 512 MB, but the window ends 4003/4095 MB full, and it still ends the same way.
  • As others noted, the empty DRED allocation lists and the lack of any DRED: list … line may just mean DRED recorded no real fault. No nvlddmkm or 4101 event either.

Next on my side: the #2057 tree as published (XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1) on a separate cache, to see if it gets past this point on Blackwell / 32 GB. I'll post the result. If someone has a build or env var that logs the last submitted list per queue at removal, or the root/descriptor VAs bound at the last dispatches, I can run it in a few minutes.

AI use: Claude Code (Claude Opus 5.5) ran these tests on the hardware above, read the logs and drafted this; I reviewed it.

**@⁠schoperena** on GitHub · 2026-11-25 12:30 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7162466748) **Follow-up to [my RTX 5060 Ti report above](https://git.gtahub.st/github/xcl-dev--xcl/issues/505): five settings and two candidate fixes, same end every time: a DRED "page fault at GPU VA 0x0" during the world load. The settings only move when it happens.** Same machine, tree and warm caches as above. Counts and timings only. | run | change from the tree above | first world frame | removed at | dispatches before | |---|---|---|---|---| | 5 | `XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512 XCL_UMA_SHADOW=1 XCL_WATCH_HOT=0` | green | 87.6 s | ~16 k | | 7 | run 5 + #1914 (companion SRVs for every image UAV dimension) | green | 82.8 s | ~16 k | | 8 | run 7 + `XCL_SKIP_CS=b1a01ac73a80651e,777348c43857fdd2,a9f2cd53943d5dc4,ffe81a9ab980b657` (the 4x4x4 volume programs in the last profiler window) | green | 84.8 s | ~16 k | | 9A | run 7 without `XCL_UMA_SHADOW`, `XCL_WATCH_HOT` default (on) | green, then the grey loading background | **117.4 s** | ~20 k | | 9B | run 9A with the default coherent window (4095 MB) | none seen | 90.9 s | **~33 k** (and ~14 k draws) | All runs: `XCL_DRED=1 XCL_SKIP_BINK=1`, 0 `queue.Wait` time-outs, 0 skipped draws or dispatches, commit ~30 GB of 32 GB RAM + page file, and the same end: `0x887a0005`, then `DRED page fault at GPU VA 0x0; allocations there: []; recently freed: []` and the title's assert at `+0x2474606`. **What I read from it** - #1914 does not change it here. Skipping the four volume programs (incl. `a9f2cd53943d5dc4`) does not either. The skip is not logged per dispatch, so I can't fully confirm it applied. - `XCL_UMA_SHADOW=1` + `XCL_WATCH_HOT=0` bring the removal **earlier** on this card: 87.6 s / ~16 k dispatches with them, 117.4 s / ~20 k without them. - With the full 4095 MB window the earlier GPU stall no longer shows up on this tree (0 time-outs). The world load runs about twice as fast as with 512 MB, but the window ends 4003/4095 MB full, and it still ends the same way. - As others noted, the empty DRED allocation lists and the lack of any `DRED: list …` line may just mean DRED recorded no real fault. No `nvlddmkm` or 4101 event either. **Next on my side:** the #2057 tree as published (`XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1`) on a separate cache, to see if it gets past this point on Blackwell / 32 GB. I'll post the result. If someone has a build or env var that logs the last submitted list per queue at removal, or the root/descriptor VAs bound at the last dispatches, I can run it in a few minutes. **AI use:** Claude Code (Claude Opus 5.5) ran these tests on the hardware above, read the logs and drafted this; I reviewed it.
Author
Owner

@⁠Royalflamejlh on GitHub · 2026-11-25 12:35 UTC · original

On Linux + NVIDIA, with our #2118 (its per-list limit raised), our #2141, #1798's two changed lines and a warm NVIDIA cache, the title kept presenting after its compute burst, though seldom: in the better run 27 frames in 14 of the 76 two-second windows up to 210 s. It then lost the device both times: after an Xid 31 copy-engine write fault with #1323's markers on (1 run), after an Xid 13 graphics exception with them off (1 run). Both runs had 15,270 to 15,560 of the card's 16,380 MB of video memory in use from 58 s on, so the card may have run out (the driver logged no out-of-memory message). The RTX 5060 Ti 16 GB report above also ends in 0x887a0005 during the world load.

Setup: RTX 4060 Ti 16 GB (NVIDIA 615.71.09), Wine 11.21 Staging, vkd3d-proton v3.1-90-g30b0eb9b with #175's vtable patch, dxil-spirv e084e35c plus four patches (dominance, split loop, dominated index, 061225da). XCL main 568e7db + our #2076 + #684, after a partial offline pass (--precompile --only cs --pipelines, 23,800 of 26,503 records); XCL_DIRECT_DXIL=1 XCL_SKIP_BINK=1 XCL_DXC_THREADS=4 XCL_PSO_DISK_CACHE=0. A pressed as soon as the title presented steadily (four times, to 30 s, in row 3); first-run screens completed once, no story progress. One run each, on NVIDIA caches carried over from earlier runs (rows 4 to 6 on one folder kept from run to run): steps along one path, not a comparison of trees.

tree first #101 last present what happened
as above, 300 s 54.0 s 56.0 s two title threads wait at their compute binds, building or waiting (27 builds of 10 to 31 s after it)
+ our #2118 fb1a905 with its per-list limit raised from 256 to 8,192 by hand + our #2141 (a draft), 300 s 41.4 s 58.2 s one title thread built 52 graphics pipelines inside ExecuteIndirect draws from 58 s to the end
the same + #1798's two lines (and a temporary queue probe), 300 s 73.4 s 76.2 s no title thread built; the submit waits for the put-off compute builds
the same, limit 1,024 (as in #2118's head b7d0ef2), 1,050 s 42.1 s 378.1 s the first submit after the burst goes through (88 submits, 2 presents); 4 s later 50 cross-queue waits released; the title's watchdog at 406.5 s
the same + #1323 (XCL_GPU_CULPRIT=1), 300 s 52.6 s 120.2 s presents to 58 s, then single ones at 62, 72, 120 s; 0 of 1103 lists have dispatches started and not done at the waits of 66 s; Xid 31 MMU Fault: ENGINE CE0 … FAULT_PTE ACCESS_TYPE_VIRT_WRITE at 121.6 s; device removed 134.4 s, then game+0x2474606
the same with XCL_GPU_CULPRIT off, 290 s 39.8 s 210.4 s 249 presents from the first #101 to the burst at 58 s, then 27 in 14 of 76 windows; no queue.Wait released on the CPU until 214.2 s; Xid 13 SKEDCHECK22_INVALIDATE_ACTIVE_QMD at 212.0 s; device removed 214.3 s, then game+0x2474606

Not tested: current main (1a0bbe3); #2118's rebased head b7d0ef2; XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512; a second run of any row; Windows; a run with less video memory in use.

AI use: Claude Code: a session on Claude Fable 5.2 merged the pull requests, made the local changes and ran the title; sessions on Claude Opus 5.5 read the logs and dumps and wrote the text, which one on Claude Fable 5.2 put together.

Posted without review by a person: the account owner was away and reads replies later.

**@⁠Royalflamejlh** on GitHub · 2026-11-25 12:35 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7162585474) On Linux + NVIDIA, with our #2118 (its per-list limit raised), our #2141, #1798's two changed lines and a warm NVIDIA cache, the title kept presenting after its compute burst, though seldom: in the better run 27 frames in 14 of the 76 two-second windows up to 210 s. It then lost the device both times: after an Xid 31 copy-engine write fault with #1323's markers on (1 run), after an Xid 13 graphics exception with them off (1 run). Both runs had 15,270 to 15,560 of the card's 16,380 MB of video memory in use from 58 s on, so the card may have run out (the driver logged no out-of-memory message). The RTX 5060 Ti 16 GB report above also ends in `0x887a0005` during the world load. **Setup:** RTX 4060 Ti 16 GB (NVIDIA 615.71.09), Wine 11.21 Staging, vkd3d-proton `v3.1-90-g30b0eb9b` with #175's vtable patch, dxil-spirv `e084e35c` plus four patches (dominance, split loop, dominated index, `061225da`). XCL `main` `568e7db` + our #2076 + #684, after a partial offline pass (`--precompile --only cs --pipelines`, 23,800 of 26,503 records); `XCL_DIRECT_DXIL=1 XCL_SKIP_BINK=1 XCL_DXC_THREADS=4 XCL_PSO_DISK_CACHE=0`. A pressed as soon as the title presented steadily (four times, to 30 s, in row 3); first-run screens completed once, no story progress. One run each, on NVIDIA caches carried over from earlier runs (rows 4 to 6 on one folder kept from run to run): steps along one path, not a comparison of trees. | tree | first `#101` | last present | what happened | |---|---|---|---| | as above, 300 s | 54.0 s | 56.0 s | two title threads wait at their compute binds, building or waiting (27 builds of 10 to 31 s after it) | | + our #2118 `fb1a905` with its per-list limit raised from 256 to 8,192 by hand + our #2141 (a draft), 300 s | 41.4 s | 58.2 s | one title thread built 52 graphics pipelines inside `ExecuteIndirect` draws from 58 s to the end | | the same + #1798's two lines (and a temporary queue probe), 300 s | 73.4 s | 76.2 s | no title thread built; the submit waits for the put-off compute builds | | the same, limit 1,024 (as in #2118's head `b7d0ef2`), 1,050 s | 42.1 s | 378.1 s | the first submit after the burst goes through (88 submits, 2 presents); 4 s later 50 cross-queue waits released; the title's watchdog at 406.5 s | | the same + #1323 (`XCL_GPU_CULPRIT=1`), 300 s | 52.6 s | 120.2 s | presents to 58 s, then single ones at 62, 72, 120 s; `0 of 1103 lists have dispatches started and not done` at the waits of 66 s; Xid 31 `MMU Fault: ENGINE CE0 … FAULT_PTE ACCESS_TYPE_VIRT_WRITE` at 121.6 s; device removed 134.4 s, then `game+0x2474606` | | the same with `XCL_GPU_CULPRIT` off, 290 s | 39.8 s | 210.4 s | 249 presents from the first `#101` to the burst at 58 s, then 27 in 14 of 76 windows; no `queue.Wait` released on the CPU until 214.2 s; Xid 13 `SKEDCHECK22_INVALIDATE_ACTIVE_QMD` at 212.0 s; device removed 214.3 s, then `game+0x2474606` | **Not tested:** current `main` (`1a0bbe3`); #2118's rebased head `b7d0ef2`; `XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512`; a second run of any row; Windows; a run with less video memory in use. **AI use:** Claude Code: a session on Claude Fable 5.2 merged the pull requests, made the local changes and ran the title; sessions on Claude Opus 5.5 read the logs and dumps and wrote the text, which one on Claude Fable 5.2 put together. Posted without review by a person: the account owner was away and reads replies later.
Author
Owner

@⁠lucsoft on GitHub · 2026-11-25 12:37 UTC · original

Linux / RDNA3: what the hang after #101 looks like with markers on draws and dispatches, a journal of XCL's sparse queue and a thread dump taken at the stall. In the last run, two tiny meshlet_culling compute dispatches never finished, and the GPU took TCP page faults at near-null addresses. XCL's own copies then stood behind them, and the title's submit thread blocked inside XCL. Two runs so far, so take the details as a lead, not a result.

Setup:

  • RX 7800 XT (RDNA3, Mesa 26.3.1 RADV), kernel 7.3.5, Wine 11.21 Staging, vkd3d-proton 3.1 (relaxed).
  • XCL main 568e7db, plus:
  • Env: XCL_HEAP_WINDOWS=1 XCL_COHERENT_MB=1024 XCL_SPARSE_WAIT_MS=100 XCL_GPU_WAIT_TIMEOUT_MS=5000 XCL_COHERENT_HEAPS=sparse:1024 XCL_GPU_CULPRIT=1 XCL_SHORT_MOVIES=1. Warm caches.

The local diagnostics:

  • Draw markers: #2205's markers on every draw as well, named by the console VS/PS hashes.
  • Stall report: a culprit report when no marker out has moved for 3 s while a list is open, even without a watchdog release. A hung dispatch nobody waits on otherwise never gets named.
  • Sparse journal: a journal of what XCL's sparse queue was given before each of its fence values (tile mappings, uploads, clears, copies back), logged with the report.
  • Thread dump: eh::dump_threads() at the first watchdog release or stall report.

Run A (stall at 542 s, then 0x887a0005 and int3 at +0x2474606 at 553 s):

  • Culprit: 0 of 536 lists have dispatches started and not done, with draws counted too.
  • Watchdog release: q4 waits on q1, whose list is recorded but not submitted.
  • Sparse journal: one entry open for 4.9 s, upload slot 1: 110272 B of the staging ring.
  • The title's submit thread:
    gpu::fence::wait < gpu::texture::upload_batch < title_textures::upload_all < title_textures::refresh < real::q_execute_command_lists
    
    It waits for a title-texture upload copy, which then fails with GPU fence still pending after 10000 ms. That is why q1's list is never submitted.
  • Another thread was in vram::place_pages → dev_create_reserved_resource → winevulkan.

Run B (stall at 450 s, the same end at 460 s):

  • Culprit stall report, 3 s after the last marker out:
    GPU culprit: list 0x213768a0: ... #130737: cs 45a2f1928c4e6f73, groups 3x1x1
    GPU culprit: list 0x213f9cc0: marker in #130742, last marker out #112562 ... #130742: cs b0c0fed0cdf7fd9c, groups 2x1x1
    
    45a2f1928c4e6f73 is meshlet_culling:CS_AllocBatchCSCullOutput and b0c0fed0cdf7fd9c is meshlet_culling:CS_ClearCulledMeshletOffsets. Their exported HLSL has no loops. A 2–3 group dispatch that runs for seconds is waves stalled on memory, not a loop.
  • Kernel: about 5 s later, gfxhub page faults from TCP in the title's vkd3d_queue at 0x0, 0x3000, 0x3c000000, 0x3c0000000000 and 0x3c0000003000, with PERMISSION_FAULTS 0x3. Then ring comp_1.0.1 timeout, gfx_0.0.0 timeout, MES failed to respond, and a mode1 reset.
  • Sparse journal: the state is locked. Eight entries were open for 7.6 s, the first an 8-byte copy back from readback_now, then an upload slot and single-tile mappings.
  • Thread dump:
    • A wine threadpool thread holds the sparse STATE:
      State::drain_readbacks < settle_readbacks_try < real::fence_wait_fired
      
      It sleeps in the 5-s wait for a copy back. settle_readbacks_try only tries the lock, but once it has it, drain_readbacks(Drain::TitleDone) can wait 5 s per lane with the lock held. @⁠Ariorh1337, this is #1993's code. It only matters once the GPU already stands still, but from there on it also holds the submit thread.
    • The submit thread waits on that lock: readback_after_execute < list_x::readback_sparse_writes < execute_with_waits_on < q_execute_command_lists.
    • So do XMemMapPhysicalPagesScatter → sparse::committed and res_map → readback_now.

My reading: the GPU stall comes first. Small compute dispatches fault on null or garbage addresses, which looks like descriptors or pointers read from memory that did not hold what the title wrote. Everything queued behind them stops, XCL's copies included. XCL then turns that into a CPU stall in two places:

  • the submit thread waiting on a texture-upload fence (run A);
  • the sparse lock held across a 5-s copy-back wait inside a fence callback (run B).

I haven't found which memory those dispatches read, or why it is wrong.

Desktop survives: the hang ends in a mode1 reset on RDNA3. With the desktop moved to the iGPU (monitor on the board, TAG+="mutter-device-preferred-primary" on the iGPU), GNOME survived every mode1 reset of the 7800 XT. Before, each one took the session with it.

AI use: Claude Code (Claude Opus 5.5) wrote the diagnostics, symbolized the dumps and drafted this. The runs were real, on the hardware above.

**@⁠lucsoft** on GitHub · 2026-11-25 12:37 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7162638244) **Linux / RDNA3: what the hang after `#101` looks like with markers on draws and dispatches, a journal of XCL's sparse queue and a thread dump taken at the stall. In the last run, two tiny `meshlet_culling` compute dispatches never finished, and the GPU took TCP page faults at near-null addresses. XCL's own copies then stood behind them, and the title's submit thread blocked inside XCL.** Two runs so far, so take the details as a lead, not a result. **Setup:** - RX 7800 XT (RDNA3, Mesa 26.3.1 RADV), kernel 7.3.5, Wine 11.21 Staging, vkd3d-proton 3.1 (relaxed). - XCL `main` `568e7db`, plus: - #1398, #871's memory commit, #684, #688, #1044, #1385, #1580, #562, #1405; - #2009 at `783ac15` with #1993 at `9a3fe7d`; - #1428, #1592, #751, #2205, #1847, #2224, #681; - `b8b1f49` reverted; - three local diagnostics, described below. - Env: `XCL_HEAP_WINDOWS=1 XCL_COHERENT_MB=1024 XCL_SPARSE_WAIT_MS=100 XCL_GPU_WAIT_TIMEOUT_MS=5000 XCL_COHERENT_HEAPS=sparse:1024 XCL_GPU_CULPRIT=1 XCL_SHORT_MOVIES=1`. Warm caches. **The local diagnostics:** - **Draw markers:** #2205's markers on every draw as well, named by the console VS/PS hashes. - **Stall report:** a culprit report when no marker out has moved for 3 s while a list is open, even without a watchdog release. A hung dispatch nobody waits on otherwise never gets named. - **Sparse journal:** a journal of what XCL's sparse queue was given before each of its fence values (tile mappings, uploads, clears, copies back), logged with the report. - **Thread dump:** `eh::dump_threads()` at the first watchdog release or stall report. **Run A** (stall at 542 s, then `0x887a0005` and `int3` at `+0x2474606` at 553 s): - **Culprit:** `0 of 536 lists have dispatches started and not done`, with draws counted too. - **Watchdog release:** q4 waits on q1, whose list is recorded but not submitted. - **Sparse journal:** one entry open for 4.9 s, `upload slot 1: 110272 B of the staging ring`. - **The title's submit thread:** ``` gpu::fence::wait < gpu::texture::upload_batch < title_textures::upload_all < title_textures::refresh < real::q_execute_command_lists ``` It waits for a title-texture upload copy, which then fails with `GPU fence still pending after 10000 ms`. That is why q1's list is never submitted. - **Another thread** was in `vram::place_pages → dev_create_reserved_resource → winevulkan`. **Run B** (stall at 450 s, the same end at 460 s): - **Culprit stall report, 3 s after the last marker out:** ``` GPU culprit: list 0x213768a0: ... #130737: cs 45a2f1928c4e6f73, groups 3x1x1 GPU culprit: list 0x213f9cc0: marker in #130742, last marker out #112562 ... #130742: cs b0c0fed0cdf7fd9c, groups 2x1x1 ``` `45a2f1928c4e6f73` is `meshlet_culling:CS_AllocBatchCSCullOutput` and `b0c0fed0cdf7fd9c` is `meshlet_culling:CS_ClearCulledMeshletOffsets`. Their exported HLSL has no loops. A 2–3 group dispatch that runs for seconds is waves stalled on memory, not a loop. - **Kernel:** about 5 s later, gfxhub page faults from `TCP` in the title's `vkd3d_queue` at `0x0`, `0x3000`, `0x3c000000`, `0x3c0000000000` and `0x3c0000003000`, with `PERMISSION_FAULTS 0x3`. Then `ring comp_1.0.1 timeout`, `gfx_0.0.0 timeout`, `MES failed to respond`, and a mode1 reset. - **Sparse journal:** `the state is locked`. Eight entries were open for 7.6 s, the first an 8-byte copy back from `readback_now`, then an upload slot and single-tile mappings. - **Thread dump:** - A wine threadpool thread holds the sparse `STATE`: ``` State::drain_readbacks < settle_readbacks_try < real::fence_wait_fired ``` It sleeps in the 5-s wait for a copy back. `settle_readbacks_try` only *tries* the lock, but once it has it, `drain_readbacks(Drain::TitleDone)` can wait 5 s per lane with the lock held. @⁠Ariorh1337, this is #1993's code. It only matters once the GPU already stands still, but from there on it also holds the submit thread. - The submit thread waits on that lock: `readback_after_execute < list_x::readback_sparse_writes < execute_with_waits_on < q_execute_command_lists`. - So do `XMemMapPhysicalPagesScatter → sparse::committed` and `res_map → readback_now`. **My reading:** the GPU stall comes first. Small compute dispatches fault on null or garbage addresses, which looks like descriptors or pointers read from memory that did not hold what the title wrote. Everything queued behind them stops, XCL's copies included. XCL then turns that into a CPU stall in two places: - the submit thread waiting on a texture-upload fence (run A); - the sparse lock held across a 5-s copy-back wait inside a fence callback (run B). I haven't found which memory those dispatches read, or why it is wrong. **Desktop survives:** the hang ends in a mode1 reset on RDNA3. With the desktop moved to the iGPU (monitor on the board, `TAG+="mutter-device-preferred-primary"` on the iGPU), GNOME survived every mode1 reset of the 7800 XT. Before, each one took the session with it. AI use: Claude Code (Claude Opus 5.5) wrote the diagnostics, symbolized the dumps and drafted this. The runs were real, on the hardware above.
Author
Owner

@⁠ddaikodaiko on GitHub · 2026-11-25 12:06 UTC · original · edited 2026-11-25 12:47 UTC

Update: the #2057 tree does show the profile selector here, at a steady 30 fps; my "black frames on #2057" line above was a bad capture (I grabbed the loading phase on video).

Measured on the same machine (RTX 3060 Ti 8 GB, Windows 10 22H2, driver 32.0.16.1088), tree #2057 at 4df1e6e, release, 90 s:

  • XCL_ACTIVITY=1: after the load, 60 presents per 2 s for ~44 s without a dip (the title's 30 fps cap).
  • XCL_FRAME_DUMP=60: frames 1520-1820 all have the same histogram, 0xff2c2020 x516787, 0xfff9f9f9 x778, 0xff000000 x450, grays - the dark-red selector with white text, sampled 1920x1080 out of 3840x2160. It is the same histogram as the 4K selector I measured on main c160d86.
  • Env: XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_COHERENT_HEAPS=sparse:16 XCL_LOOK_SKIP=1, Series X profile (3840x2160).

For the record on the head being untested: the PR says the merged head has not run in the game yet, so this is one data point on 4df1e6e. The run with A presses to walk the screens ends in device removed 0x887a0006 before the world.

Series S is a separate matter: on main 1a0bbe3 it presents 1920x1080 at 24-30 fps but both the busiest RT and the presented buffer are 0x00000000; adding a COPY_SOURCE barrier around the present copy and forcing the Series X pipe table did not change it, so it is not the present copy or the pipes alone.

No game data. AI use: the runs, the numbers and this text were produced with an AI agent (DeepSeek V4.1 Flash) on the machine above.

**@⁠ddaikodaiko** on GitHub · 2026-11-25 12:06 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7161921861) · edited 2026-11-25 12:47 UTC **Update: the #2057 tree does show the profile selector here, at a steady 30 fps; my "black frames on #2057" line above was a bad capture (I grabbed the loading phase on video).** Measured on the same machine (RTX 3060 Ti 8 GB, Windows 10 22H2, driver 32.0.16.1088), tree `#2057` at `4df1e6e`, release, 90 s: - `XCL_ACTIVITY=1`: after the load, **60 presents per 2 s for ~44 s without a dip** (the title's 30 fps cap). - `XCL_FRAME_DUMP=60`: frames 1520-1820 all have the same histogram, `0xff2c2020 x516787`, `0xfff9f9f9 x778`, `0xff000000 x450`, grays - the dark-red selector with white text, sampled 1920x1080 out of 3840x2160. It is the same histogram as the 4K selector I measured on `main` `c160d86`. - Env: `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_COHERENT_HEAPS=sparse:16 XCL_LOOK_SKIP=1`, Series X profile (3840x2160). For the record on the head being untested: the PR says the merged head has not run in the game yet, so this is one data point on `4df1e6e`. The run with A presses to walk the screens ends in `device removed 0x887a0006` before the world. Series S is a separate matter: on `main` `1a0bbe3` it presents 1920x1080 at 24-30 fps but both the busiest RT and the presented buffer are `0x00000000`; adding a `COPY_SOURCE` barrier around the present copy and forcing the Series X pipe table did not change it, so it is not the present copy or the pipes alone. No game data. AI use: the runs, the numbers and this text were produced with an AI agent (DeepSeek V4.1 Flash) on the machine above.
Author
Owner

@⁠ddaikodaiko on GitHub · 2026-11-25 12:55 UTC · original

New data point on the 8 GB wall: with the two hanging compute programs refused, the device removal is gone and the run reaches E_OUTOFMEMORY instead, at ~14.5 GB of local video memory on an 8 GB card.

Tree: #2057 at 4df1e6e plus a local XCL_REFUSE_CS=<hash>,... patch (not upstream; #2057 has XCL_SKIP_CS but it still builds the PSO). Refused 1ada490879c33c0e and b78fa10b425b8e54, as in the #675 reports. RTX 3060 Ti 8 GB, Windows 10 22H2, driver 32.0.16.1088, Series X profile.

Env: XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_COHERENT_HEAPS=sparse:16 XCL_LOOK_SKIP=1 XCL_PSO_IMAGE_SKIP=1 XCL_REFUSE_CS=1ada490879c33c0e,b78fa10b425b8e54, 360 s, A presses to walk the screens.

  • Both refusals are logged and their dispatches are skipped: compute program b78fa10b425b8e54 refused (XCL_REFUSE_CS), same for 1ada490879c33c0e.
  • No 0x887a0006. The run presents 2059 frames; activity shows 60 presents per 2 s repeatedly (21 samples >= 55), and the end-of-run counter reports "1800 frames presented, 30.0 fps over the last 300".
  • Frames are visible: frame dump 1820 has 518,214 / 518,400 non-black samples.
  • It ends with the title's int3 at game+0x193e00f, rax=0x8007000e (E_OUTOFMEMORY), with 14,513 MB of local video memory and 26,620 MB committed (16 GB RAM + page file) - the "video memory runs out" wall, on a card with 8 GB.

So on this machine the order of walls is: device removal (fixed by refusing the two programs) -> video memory. #640's page budget (LRU eviction of CPU-filled textures) looks like the next thing to try here; it is not in this tree. If anyone has a page-budget number that gets an 8 GB card past this, it would be worth posting.

No game data. AI use: the run, the numbers and this text were produced with an AI agent (DeepSeek V4.1 Flash) on the machine above.

**@⁠ddaikodaiko** on GitHub · 2026-11-25 12:55 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7163036995) **New data point on the 8 GB wall: with the two hanging compute programs refused, the device removal is gone and the run reaches `E_OUTOFMEMORY` instead, at ~14.5 GB of local video memory on an 8 GB card.** Tree: `#2057` at `4df1e6e` plus a local `XCL_REFUSE_CS=<hash>,...` patch (not upstream; #2057 has `XCL_SKIP_CS` but it still builds the PSO). Refused `1ada490879c33c0e` and `b78fa10b425b8e54`, as in the #675 reports. RTX 3060 Ti 8 GB, Windows 10 22H2, driver 32.0.16.1088, Series X profile. Env: `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_COHERENT_HEAPS=sparse:16 XCL_LOOK_SKIP=1 XCL_PSO_IMAGE_SKIP=1 XCL_REFUSE_CS=1ada490879c33c0e,b78fa10b425b8e54`, 360 s, A presses to walk the screens. - Both refusals are logged and their dispatches are skipped: `compute program b78fa10b425b8e54 refused (XCL_REFUSE_CS)`, same for `1ada490879c33c0e`. - **No `0x887a0006`.** The run presents 2059 frames; activity shows **60 presents per 2 s repeatedly** (21 samples >= 55), and the end-of-run counter reports **"1800 frames presented, 30.0 fps over the last 300"**. - Frames are visible: frame dump 1820 has **518,214 / 518,400 non-black** samples. - It ends with the title's `int3` at `game+0x193e00f`, `rax=0x8007000e` (`E_OUTOFMEMORY`), with **14,513 MB of local video memory** and **26,620 MB committed** (16 GB RAM + page file) - the "video memory runs out" wall, on a card with 8 GB. So on this machine the order of walls is: device removal (fixed by refusing the two programs) -> video memory. #640's page budget (LRU eviction of CPU-filled textures) looks like the next thing to try here; it is not in this tree. If anyone has a page-budget number that gets an 8 GB card past this, it would be worth posting. No game data. AI use: the run, the numbers and this text were produced with an AI agent (DeepSeek V4.1 Flash) on the machine above.
Author
Owner

@⁠b3IKK on GitHub · 2026-11-25 13:08 UTC · original

Measured on an RTX 5080 what the 500 s of silence after the world starts actually is, and what happens when the title stops waiting for it. Six 600 s runs of retail 1.0.2.1 on main 426a5a7, A pressed at 33 s (XCL_PRESS_AT), default settings except where noted.

The silence is the bind wait for compute pipelines, and it is long because the corpus is large and the compile is slow. Each run the title stops presenting at 92–96 s and spends the rest of the minute with only driver compiles going on:

run driver compiles started served from a kept blob compiled cold unfinished at 600 s last frame
1 110 25 85 3 96 s
2 131 70 47 3 94 s
3 141 90 36 0 94 s
4 150 103 31 1 92 s
5, XCL_HUGE_PSO_CONCURRENCY=2 157 111 30 1 92 s
  • The cache converges slowly because every run also reaches more programs (110 → 157 started). The ~30 that stay cold are 1 MB-DXIL programs at 60–103 s each in the driver, so a 600 s run cannot get through them.
  • Two huge-compile slots instead of one changed nothing (30 finished against 31), so the one-at-a-time gate is not the throughput limit here — the driver compile itself is. The kept blobs live in %LOCALAPPDATA%\XCL\dxil\driver (747 files, 352 MB after these runs), shared across titles.

Not waiting moves the stop from 96 s to 212 s, at the price of skipping most of the frame. One run with XCL_PSO_WAIT_MS=50:

  • Frames do not stop at 96 s. They trickle at 0–2 presents per 2 s from 110 s to ~204 s, then the run's last window with a frame is ~204 s.
  • By 181 s the counters read 28,101 draws with translated pipelines (16,732 skipped, 2,048 with PC pipelines), 84,435 dispatches (8,328 skipped) — most of what the title wanted to draw it could not, because the compute passes that feed the world were stand-ins.
  • At 212.8 s: unhandled exception 0x80000003 in game_scarlett_master.exe+0x4da6315 — the same +0x4da6315 stop @⁠Ariorh1337 and @⁠3L1A5-1 list from #1164. The process then stayed alive with no further log line (I ended it after ~16 minutes; the run's XCL_RUN_SECONDS never had a chance to fire).

So the compile wait explains the silence and nothing follows it in 600 s; removing the wait gets the title further but not into the world, and what stops it then is its own assert with thousands of skipped dispatches in front of it.

Not tested: AMD, Linux / Wine, a fully warm cache (all the programs the world load asks for), and whether the +0x4da6315 assert still happens once nothing is skipped. I am continuing the warm passes towards that last question.

AI use: OpenCode, Claude Fable 5.2 built the binary, ran the six runs on this machine, read the logs and wrote this.

**@⁠b3IKK** on GitHub · 2026-11-25 13:08 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7163344611) Measured on an RTX 5080 what the 500 s of silence after the world starts actually is, and what happens when the title stops waiting for it. Six 600 s runs of retail 1.0.2.1 on `main` `426a5a7`, A pressed at 33 s (`XCL_PRESS_AT`), default settings except where noted. **The silence is the bind wait for compute pipelines, and it is long because the corpus is large and the compile is slow.** Each run the title stops presenting at 92–96 s and spends the rest of the minute with only driver compiles going on: | run | driver compiles started | served from a kept blob | compiled cold | unfinished at 600 s | last frame | |---|---|---|---|---|---| | 1 | 110 | 25 | 85 | 3 | 96 s | | 2 | 131 | 70 | 47 | 3 | 94 s | | 3 | 141 | 90 | 36 | 0 | 94 s | | 4 | 150 | 103 | 31 | 1 | 92 s | | 5, `XCL_HUGE_PSO_CONCURRENCY=2` | 157 | 111 | 30 | 1 | 92 s | - The cache converges slowly because every run also *reaches* more programs (110 → 157 started). The ~30 that stay cold are 1 MB-DXIL programs at 60–103 s each in the driver, so a 600 s run cannot get through them. - Two huge-compile slots instead of one changed nothing (30 finished against 31), so the one-at-a-time gate is not the throughput limit here — the driver compile itself is. The kept blobs live in `%LOCALAPPDATA%\XCL\dxil\driver` (747 files, 352 MB after these runs), shared across titles. **Not waiting moves the stop from 96 s to 212 s, at the price of skipping most of the frame.** One run with `XCL_PSO_WAIT_MS=50`: - Frames do not stop at 96 s. They trickle at 0–2 presents per 2 s from 110 s to ~204 s, then the run's last window with a frame is ~204 s. - By 181 s the counters read **28,101 draws with translated pipelines (16,732 skipped, 2,048 with PC pipelines), 84,435 dispatches (8,328 skipped)** — most of what the title wanted to draw it could not, because the compute passes that feed the world were stand-ins. - At 212.8 s: `unhandled exception 0x80000003 in game_scarlett_master.exe+0x4da6315` — the same `+0x4da6315` stop @⁠Ariorh1337 and @⁠3L1A5-1 list from #1164. The process then stayed alive with no further log line (I ended it after ~16 minutes; the run's `XCL_RUN_SECONDS` never had a chance to fire). So the compile wait explains the silence and nothing follows it in 600 s; removing the wait gets the title further but not into the world, and what stops it then is its own assert with thousands of skipped dispatches in front of it. **Not tested:** AMD, Linux / Wine, a fully warm cache (all the programs the world load asks for), and whether the `+0x4da6315` assert still happens once nothing is skipped. I am continuing the warm passes towards that last question. AI use: OpenCode, Claude Fable 5.2 built the binary, ran the six runs on this machine, read the logs and wrote this.
Author
Owner

@⁠Ariorh1337 on GitHub · 2026-11-25 13:13 UTC · original

RTX 5090: the world-load device removal with DRED page fault at GPU VA 0x0 is on clean main too, and at the removal no dispatch or draw recorded through XCL's paths is in flight. What it is not, from nine runs: #1803, #1795, #1517 + #1792, texture tile pages (XCL_VRAM_ARENAS=1), #1993 / #2009. For @⁠schoperena's open question and the #1452 removals.

Setup: RTX 5090 32 GB (driver 32.0.16.1692), Ryzen 7 9800X3D, 64 GB, Windows 11 Pro 26300, release. Retail 1.0.2.1, Series X profile. Base main 1a0bbe3. Env in every run: XCL_HEAP_WINDOWS=1 XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512 XCL_DRED=1 XCL_ACTIVITY=1 XCL_NETWORK=0. Compute pipelines prebuilt with --precompile --only cs --pipelines --used-only (914 made, 1 refused, none left to the runtime; on 568e7db, before #2120, the two huge ones were); graphics pipelines from earlier runs in the driver cache. A pressed through the menus.

Every run ends the same way: the world load's first heavy burst (1,250–1,800 dispatches per 2 s, 1–4 presents), then 0x887a0005, DRED page fault at GPU VA 0x0; allocations there: []; recently freed: [], no DRED: list … line, and the title's assert at +0x2474606. Nothing in the System log (no nvlddmkm / Display / LiveKernel event).

run change from clean main removed at on screen
56 none ~102 s –
57 + #1803 ~100 s green flash, colours off at the cutscene's start
58 + #1803 + #1795 ~100 s green flash, colours right
59 + #1803 + #1795 + #1517 + #1792 ~98 s as 58
62 59 + #1323, XCL_GPU_CULPRIT=1, report at the removal* ~98 s –
63 62 + markers around draws too* ~98 s –
64 63 + XCL_VRAM_ARENAS=1 (target pages 0 MB, no texture tile mappings) ~110 s –
55 main + #1993 + #2009 (XCL_COHERENT_HEAPS=sparse:1024) ~164 s –

* local diagnostics, not posted: #1323's report printed at the device removal as well (its own report comes only with a watchdog release, and there is none here), and its markers put around DrawInstanced, DrawIndexedInstanced and graphics ExecuteIndirect too.

What I read from it

  • No marked work was in flight: GPU culprit: 0 of 426 lists have dispatches started and not done (run 63, draws included), 0 of 415 (run 62), 0 of 443 (run 64). With DRED's breadcrumbs showing no unfinished list either, what faults is probably not a dispatch or draw XCL records. Left: copies (the title's own and XCL's), root descriptors set without going through these paths, and queue operations outside lists (UpdateTileMappings / CopyTileMappings of the sparse windows), which neither markers nor breadcrumbs see. DRED's "VA 0x0, no allocations" may also just mean it recorded nothing, as you wrote.
  • Not the causes, here: the heap addresses (#1803; it does change what is drawn), unbounded indirect records (#1795; it fixes the colours), single-tile sparse mappings (#1517 + #1792), texture tile pages (arenas instead), #1993 / #2009.
  • Not the #675 hang: those are 0x887a0006 with a dispatch in flight (CS_DepthProcessingHBO b78fa10b425b8e54, meshlet-cull 1ada490879c33c0e). Here no dispatch is in flight and it is 0x887a0005.
  • A D3D12_DEBUG run ends at once (0xc0000005 inside D3D12Core.dll, an XCL vtable in rsi): the debug layer does not take XCL's adopted objects, so it is no way in here.

Next on my side: an Nsight Aftermath dump of the fault (engine, address, shader). If someone already has one for this signature, please post it.

AI use: Claude Code (Claude Opus 5.5) built the trees, wrote the local diagnostics, ran the title on the machine above (I pressed through the menus) and drafted this.

**@⁠Ariorh1337** on GitHub · 2026-11-25 13:13 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7163469601) **RTX 5090: the world-load device removal with `DRED page fault at GPU VA 0x0` is on clean `main` too, and at the removal no dispatch or draw recorded through XCL's paths is in flight. What it is not, from nine runs:** #1803, #1795, #1517 + #1792, texture tile pages (`XCL_VRAM_ARENAS=1`), #1993 / #2009. For @⁠schoperena's open question and the #1452 removals. **Setup:** RTX 5090 32 GB (driver 32.0.16.1692), Ryzen 7 9800X3D, 64 GB, Windows 11 Pro 26300, release. Retail 1.0.2.1, Series X profile. Base `main` `1a0bbe3`. Env in every run: `XCL_HEAP_WINDOWS=1 XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512 XCL_DRED=1 XCL_ACTIVITY=1 XCL_NETWORK=0`. Compute pipelines prebuilt with `--precompile --only cs --pipelines --used-only` (914 made, 1 refused, none left to the runtime; on `568e7db`, before #2120, the two huge ones were); graphics pipelines from earlier runs in the driver cache. A pressed through the menus. Every run ends the same way: the world load's first heavy burst (1,250–1,800 dispatches per 2 s, 1–4 presents), then `0x887a0005`, `DRED page fault at GPU VA 0x0; allocations there: []; recently freed: []`, no `DRED: list …` line, and the title's assert at `+0x2474606`. Nothing in the System log (no `nvlddmkm` / Display / LiveKernel event). | run | change from clean `main` | removed at | on screen | |---|---|---|---| | 56 | none | ~102 s | – | | 57 | + #1803 | ~100 s | green flash, colours off at the cutscene's start | | 58 | + #1803 + #1795 | ~100 s | green flash, colours right | | 59 | + #1803 + #1795 + #1517 + #1792 | ~98 s | as 58 | | 62 | 59 + #1323, `XCL_GPU_CULPRIT=1`, report at the removal* | ~98 s | – | | 63 | 62 + markers around draws too* | ~98 s | – | | 64 | 63 + `XCL_VRAM_ARENAS=1` (target pages 0 MB, no texture tile mappings) | ~110 s | – | | 55 | `main` + #1993 + #2009 (`XCL_COHERENT_HEAPS=sparse:1024`) | ~164 s | – | \* local diagnostics, not posted: #1323's report printed at the device removal as well (its own report comes only with a watchdog release, and there is none here), and its markers put around `DrawInstanced`, `DrawIndexedInstanced` and graphics `ExecuteIndirect` too. **What I read from it** - **No marked work was in flight:** `GPU culprit: 0 of 426 lists have dispatches started and not done` (run 63, draws included), `0 of 415` (run 62), `0 of 443` (run 64). With DRED's breadcrumbs showing no unfinished list either, what faults is probably not a dispatch or draw XCL records. Left: copies (the title's own and XCL's), root descriptors set without going through these paths, and queue operations outside lists (`UpdateTileMappings` / `CopyTileMappings` of the sparse windows), which neither markers nor breadcrumbs see. DRED's "VA 0x0, no allocations" may also just mean it recorded nothing, as you wrote. - **Not the causes, here:** the heap addresses (#1803; it does change what is drawn), unbounded indirect records (#1795; it fixes the colours), single-tile sparse mappings (#1517 + #1792), texture tile pages (arenas instead), #1993 / #2009. - **Not the #675 hang:** those are `0x887a0006` with a dispatch in flight (`CS_DepthProcessingHBO` `b78fa10b425b8e54`, meshlet-cull `1ada490879c33c0e`). Here no dispatch is in flight and it is `0x887a0005`. - A `D3D12_DEBUG` run ends at once (`0xc0000005` inside `D3D12Core.dll`, an XCL vtable in `rsi`): the debug layer does not take XCL's adopted objects, so it is no way in here. **Next on my side:** an Nsight Aftermath dump of the fault (engine, address, shader). If someone already has one for this signature, please post it. **AI use:** Claude Code (Claude Opus 5.5) built the trees, wrote the local diagnostics, ran the title on the machine above (I pressed through the menus) and drafted this.
Author
Owner

@⁠jessenic on GitHub · 2026-11-25 13:20 UTC · original

@⁠Ariorh1337 The same removal on an RTX 5070 Ti (driver 610.88): the kernel's reason for it, read with a debugger, is a DMA fault, not a page fault and not a hang. Full details in #1215. In short:

  • DRED page fault at GPU VA 0x0 with nothing in flight is what DRED reports when there was no page fault at all. Windows logs no TDR (nvlddmkm) event for it either.
  • With cdb attached at the title's first #101 and breakpoints on D3D12Core!*RemoveDevice* (public symbols), the removal comes from inside an ExecuteCommandLists, in both runs of XCL's own sparse uploads. The chain is nvwgf2umx → CDevice::UMSetError_ → ProcessDriverErrors → RemoveDevice. The error the driver passes is 0x88760870 (D3DDDIERR_DEVICEREMOVED). So that submission is only where the removal shows up; the GPU had already faulted.
  • The 5th argument of CD3D12TelemetryHelper::LogRemoveDeviceEvent is the kernel's device execution state. It was 6 (D3DKMT_DEVICEEXECUTION_ERROR_DMAFAULT), not 7 (page fault), 3 (hung) or 5 (out of memory).

So the call stack at the removal does not name the culprit. What does is the work that ran shortly before it. On NVIDIA a DMA fault without a page fault fits a heap index landing on a descriptor of the wrong kind, as #1215 describes. A reclaimed pool heap still in use on another queue would fit it too (#2275). I'm testing both on a tree based on today's main and will report the result here.

The cdb script, for anyone who wants to read the state on their own removal (attach with cdb -p <pid> -cf script):

sxd av
sxd eh
.reload
bm D3D12Core!CD3D12TelemetryHelper::LogRemoveDeviceEvent ".echo REMOVE-EVENT; r r8; dd @rsp+28 L1; kn 12; g"
g

(r8 is the HRESULT; the dword at rsp+28 is the execution state.)

AI use: Claude Code (Claude Opus 5.5) ran the debugger on the machine above and wrote this comment.

**@⁠jessenic** on GitHub · 2026-11-25 13:20 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7163634234) @⁠Ariorh1337 The same removal on an RTX 5070 Ti (driver 610.88): the kernel's reason for it, read with a debugger, is a **DMA fault**, not a page fault and not a hang. Full details in https://git.gtahub.st/github/xcl-dev--xcl/pulls/1215. In short: - `DRED page fault at GPU VA 0x0` with nothing in flight is what DRED reports when there was no page fault at all. Windows logs no TDR (`nvlddmkm`) event for it either. - With cdb attached at the title's first `#101` and breakpoints on `D3D12Core!*RemoveDevice*` (public symbols), the removal comes from inside an `ExecuteCommandLists`, in both runs of XCL's own sparse uploads. The chain is `nvwgf2umx` → `CDevice::UMSetError_` → `ProcessDriverErrors` → `RemoveDevice`. The error the driver passes is `0x88760870` (`D3DDDIERR_DEVICEREMOVED`). So that submission is only where the removal shows up; the GPU had already faulted. - The 5th argument of `CD3D12TelemetryHelper::LogRemoveDeviceEvent` is the kernel's device execution state. It was **6 (`D3DKMT_DEVICEEXECUTION_ERROR_DMAFAULT`)**, not 7 (page fault), 3 (hung) or 5 (out of memory). So the call stack at the removal does not name the culprit. What does is the work that ran shortly before it. On NVIDIA a DMA fault without a page fault fits a heap index landing on a descriptor of the wrong kind, as #1215 describes. A reclaimed pool heap still in use on another queue would fit it too (#2275). I'm testing both on a tree based on today's `main` and will report the result here. The cdb script, for anyone who wants to read the state on their own removal (attach with `cdb -p <pid> -cf script`): ``` sxd av sxd eh .reload bm D3D12Core!CD3D12TelemetryHelper::LogRemoveDeviceEvent ".echo REMOVE-EVENT; r r8; dd @rsp+28 L1; kn 12; g" g ``` (`r8` is the HRESULT; the dword at `rsp+28` is the execution state.) AI use: Claude Code (Claude Opus 5.5) ran the debugger on the machine above and wrote this comment.
Author
Owner

@⁠lucsoft on GitHub · 2026-11-25 14:16 UTC · original

Linux / RDNA3 follow-up to my last comment: every run since then still ends in a GPU hang, then a mode1 reset, then 0x887a0005 and int3 at +0x2474606. What changed since then:

  • the sparse-lock part is fixed by #1993 3260d40;
  • video memory pressure turned out to be a side issue;
  • the dispatch the stall report names is now nearly always the same tiny meshlet_culling shader.

Setup: as before (RX 7800 XT, Mesa 26.3.1 RADV, kernel 7.3.5, Wine 11.21 Staging, vkd3d-proton 3.1 relaxed, XCL 568e7db + the same stack), with these changes:

  • #1993 is at 3260d40;
  • #1835 is added;
  • texture pages can now go to system memory (described below);
  • the draw markers, stall report, sparse journal and thread dump from last time are still on.

1. #1993 3260d40 works for me. The submit thread no longer waits on the sparse STATE lock. In the last run it sat in list_x::wait_all_on < execute_with_waits_on < q_execute_command_lists, waiting for the GPU itself. The journal still sometimes finds STATE held when it reports, probably by readback_now, which still waits under the lock. Nothing was queued behind it this time.

2. Video memory makes it worse, but it is not the cause.

  • With texture pages in plain device memory, local use went past the 16 GB card into system memory, and resets came sooner.
  • I added a local switch that places texture pages in a custom heap in system memory instead (WRITE_COMBINE + POOL_L0). vkd3d-proton turns NOT_AVAILABLE into device-local, so #1702's way of doing this has no effect on RADV.
  • With the switch, local use stays at 8–13 GB. Same hang. This agrees with @⁠KDenKC (19.7 of 32 GB) and @⁠tiagonleal's "constant risk per second".

3. The stalled dispatch is a 1-group meshlet_culling dispatch. The local stall report fires once a list's marker has stood 3 s with work open. In the last run it named three lists at once:

GPU culprit: 3 of 391 lists have dispatches started and not done
GPU culprit: list 0x215af500:  marker in #78142, last marker out #74415 ... #78142: cs b0c0fed0cdf7fd9c, groups 1x1x1
GPU culprit: list 0x10a9f0c60: marker in #78155, last marker out #78088 ... #78155: cs b0c0fed0cdf7fd9c, groups 1x1x1
GPU culprit: list 0x213e70a0:  marker in #78198, last marker out #74403 ... #78198: cs b0c0fed0cdf7fd9c, groups 1x1x1
  • b0c0fed0cdf7fd9c is meshlet_culling:CS_ClearCulledMeshletOffsets. It stalls in most runs with a stall report.
  • Others named once each:
    • 45a2f1928c4e6f73 (meshlet_culling:CS_AllocBatchCSCullOutput);
    • d79af1d04922a49b (DistantObjects:CS_DistanceWindowEmissivesCulling);
    • df231d75ee930b98 (vfx_triangleClip:CS_DefragHeap_ComputeRelocations, the only one with an emulated s_barrier loop).
  • The exported HLSL of the first three has no loops, so a 1–3 group dispatch that runs for seconds is waiting on memory or on another queue. It is not doing work.
  • XCL_GPU_CULPRIT_ARGS=b0c0fed0cdf7fd9c for its root arguments is the next run.

4. The sparse queue at that moment. In the same run, the last 8 single-tile mappings had been open for about 3 s. That is long, since each one is a single UpdateTileMappings call.

sparse journal: completed 0x103c1, 8 submission(s) after it
sparse journal:   open 0x103c2 (2966 ms ago): map 1 tile(s) in 1 window(s) for [0x659930000, +0x10000)
... through 0x103c9, [0x6d6900000, +0x10000)

In another run, 9 of XCL's own queue waits were unmet when the watchdog fired:

  • the copy-back lanes q5, q7, q8 and q9;
  • q6: texture page mappings >= 0xd5c8 (done 0xd5b0);
  • q1: sparse uploads and tile mappings, with an upload slot open for 4.9 s.

I can't yet tell whether the mapping waits behind the stuck dispatch or the dispatch waits for the mapping. That fits @⁠Ariorh1337's list: tile-mapping and copy calls are what neither DRED nor markers see. #2270 and #2275 are next.

5. Kernel page faults are there in some runs, not all. In six of today's nine resets, amdgpu logged TCP faults just before the ring timeout, always at the same kinds of address:

  • 0x0, 0x3000, 0x4000;
  • 0x3c000000, 0x3c0000000000, 0x3c0000003000;
  • once each: 0x40007f000 (a console coherent-window address, untranslated), 0xc00180000000 (the base of sparse window 0) and 0xc00273803000 (inside window 1).

The last run had no fault at all, just ring comp_1.3.0 timeout. Like @⁠jessenic's DMA-fault reading and @⁠DTsordas's out-of-window faults, I take the faults as a symptom of a stale or wrong address. They are not the trigger. Logging in gpu_va/pc_va for console addresses that translate to nothing found none on vertex or index buffers or root views.

Tips for AMD on Linux:

  • Desktop on the iGPU: with the monitor on the board and TAG+="mutter-device-preferred-primary" on the iGPU, GNOME survives every mode1 reset of the dGPU.
  • Skip the intro videos: XCL_SHORT_MOVIES=1.
  • Player-one prompt: a local XCL_PRESS_A_AT=80,85,…,120 presses A on that screen. It is not upstream.

AI use: Claude Code (Claude Opus 5.5) wrote the diagnostics, read the logs and drafted this. The runs were real, on the hardware above.

**@⁠lucsoft** on GitHub · 2026-11-25 14:16 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7165015705) **Linux / RDNA3 follow-up to my last comment: every run since then still ends in a GPU hang, then a mode1 reset, then `0x887a0005` and `int3` at `+0x2474606`.** What changed since then: - the sparse-lock part is fixed by #1993 `3260d40`; - video memory pressure turned out to be a side issue; - the dispatch the stall report names is now nearly always the same tiny `meshlet_culling` shader. **Setup:** as before (RX 7800 XT, Mesa 26.3.1 RADV, kernel 7.3.5, Wine 11.21 Staging, vkd3d-proton 3.1 relaxed, XCL `568e7db` + the same stack), with these changes: - #1993 is at `3260d40`; - #1835 is added; - texture pages can now go to system memory (described below); - the draw markers, stall report, sparse journal and thread dump from last time are still on. **1. #1993 `3260d40` works for me.** The submit thread no longer waits on the sparse `STATE` lock. In the last run it sat in `list_x::wait_all_on < execute_with_waits_on < q_execute_command_lists`, waiting for the GPU itself. The journal still sometimes finds `STATE` held when it reports, probably by `readback_now`, which still waits under the lock. Nothing was queued behind it this time. **2. Video memory makes it worse, but it is not the cause.** - With texture pages in plain device memory, local use went past the 16 GB card into system memory, and resets came sooner. - I added a local switch that places texture pages in a custom heap in system memory instead (`WRITE_COMBINE` + `POOL_L0`). vkd3d-proton turns `NOT_AVAILABLE` into device-local, so #1702's way of doing this has no effect on RADV. - With the switch, local use stays at 8–13 GB. Same hang. This agrees with @⁠KDenKC (19.7 of 32 GB) and @⁠tiagonleal's "constant risk per second". **3. The stalled dispatch is a 1-group `meshlet_culling` dispatch.** The local stall report fires once a list's marker has stood 3 s with work open. In the last run it named three lists at once: ``` GPU culprit: 3 of 391 lists have dispatches started and not done GPU culprit: list 0x215af500: marker in #78142, last marker out #74415 ... #78142: cs b0c0fed0cdf7fd9c, groups 1x1x1 GPU culprit: list 0x10a9f0c60: marker in #78155, last marker out #78088 ... #78155: cs b0c0fed0cdf7fd9c, groups 1x1x1 GPU culprit: list 0x213e70a0: marker in #78198, last marker out #74403 ... #78198: cs b0c0fed0cdf7fd9c, groups 1x1x1 ``` - `b0c0fed0cdf7fd9c` is `meshlet_culling:CS_ClearCulledMeshletOffsets`. It stalls in most runs with a stall report. - Others named once each: - `45a2f1928c4e6f73` (`meshlet_culling:CS_AllocBatchCSCullOutput`); - `d79af1d04922a49b` (`DistantObjects:CS_DistanceWindowEmissivesCulling`); - `df231d75ee930b98` (`vfx_triangleClip:CS_DefragHeap_ComputeRelocations`, the only one with an emulated `s_barrier` loop). - The exported HLSL of the first three has no loops, so a 1–3 group dispatch that runs for seconds is waiting on memory or on another queue. It is not doing work. - `XCL_GPU_CULPRIT_ARGS=b0c0fed0cdf7fd9c` for its root arguments is the next run. **4. The sparse queue at that moment.** In the same run, the last 8 single-tile mappings had been open for about 3 s. That is long, since each one is a single `UpdateTileMappings` call. ``` sparse journal: completed 0x103c1, 8 submission(s) after it sparse journal: open 0x103c2 (2966 ms ago): map 1 tile(s) in 1 window(s) for [0x659930000, +0x10000) ... through 0x103c9, [0x6d6900000, +0x10000) ``` In another run, 9 of XCL's own queue waits were unmet when the watchdog fired: - the copy-back lanes q5, q7, q8 and q9; - `q6: texture page mappings >= 0xd5c8 (done 0xd5b0)`; - `q1: sparse uploads and tile mappings`, with an upload slot open for 4.9 s. I can't yet tell whether the mapping waits behind the stuck dispatch or the dispatch waits for the mapping. That fits @⁠Ariorh1337's list: tile-mapping and copy calls are what neither DRED nor markers see. #2270 and #2275 are next. **5. Kernel page faults are there in some runs, not all.** In six of today's nine resets, amdgpu logged `TCP` faults just before the ring timeout, always at the same kinds of address: - `0x0`, `0x3000`, `0x4000`; - `0x3c000000`, `0x3c0000000000`, `0x3c0000003000`; - once each: `0x40007f000` (a console coherent-window address, untranslated), `0xc00180000000` (the base of sparse window 0) and `0xc00273803000` (inside window 1). The last run had no fault at all, just `ring comp_1.3.0 timeout`. Like @⁠jessenic's DMA-fault reading and @⁠DTsordas's out-of-window faults, I take the faults as a symptom of a stale or wrong address. They are not the trigger. Logging in `gpu_va`/`pc_va` for console addresses that translate to nothing found none on vertex or index buffers or root views. **Tips for AMD on Linux:** - **Desktop on the iGPU:** with the monitor on the board and `TAG+="mutter-device-preferred-primary"` on the iGPU, GNOME survives every mode1 reset of the dGPU. - **Skip the intro videos:** `XCL_SHORT_MOVIES=1`. - **Player-one prompt:** a local `XCL_PRESS_A_AT=80,85,…,120` presses A on that screen. It is not upstream. AI use: Claude Code (Claude Opus 5.5) wrote the diagnostics, read the logs and drafted this. The runs were real, on the hardware above.
Author
Owner

@⁠b3IKK on GitHub · 2026-11-25 14:19 UTC · original

Follow-up to my table above, with the one-hour version of the run: even 3600 s does not get through the compile set.

Same build (main 426a5a7), same settings, blobs kept from the earlier runs (782 on disk at the start, 861 after):

  • 240 driver compiles started; 132 served from a kept blob, 92 compiled cold, 2 unfinished at the end.
  • Those 92 cold compiles are 6,692 s of driver time in a 3,600 s run — about 1.9 s of driver work per second of wall clock, i.e. the two or three threads that compile are busy the whole hour.
  • Frames stop at 94 s and never come back:
**@⁠b3IKK** on GitHub · 2026-11-25 14:19 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7165094839) Follow-up to my table above, with the one-hour version of the run: **even 3600 s does not get through the compile set.** Same build (main 426a5a7), same settings, blobs kept from the earlier runs (782 on disk at the start, 861 after): - 240 driver compiles started; 132 served from a kept blob, **92 compiled cold**, 2 unfinished at the end. - Those 92 cold compiles are **6,692 s of driver time** in a 3,600 s run — about 1.9 s of driver work per second of wall clock, i.e. the two or three threads that compile are busy the whole hour. - Frames stop at 94 s and never come back:
Author
Owner

@⁠Ariorh1337 on GitHub · 2026-11-25 14:21 UTC · original

@⁠jessenic thanks, that explains the empty DRED output. Two of the lifetime suspects, ruled out here on the RTX 5090 with the same tree as in my report above (main 1a0bbe3 + #1803 + #1795 + #1517 + #1792 + #1323's markers), one run each:

  • #2275 merged on top (11aa227, clean merge): removed 8 s after the first #101, the same signature.
  • #2275 + no sparse tile ever let go (a local switch: decommit_range unmaps nothing and retire_free_pools keeps every pool; sparse pools stayed at 2.5 GB): removed 8 s after the first #101, the same signature.
  • Also, with all 52 programs of XboxBvhBuilder.dll refused (35 of them were bound in that run): the same. In one other run, the dispatches the markers caught in flight at the removal were RefitBVH4 and InitHeaders from that DLL, so that was where the GPU was, not the cause.

So on this card it is not a VRAM heap, arena, sparse tile or sparse pool given back early. I haven't tried #1215 yet (it needs the compute pipelines rebuilt here). If your run with it comes first, I'll skip it.

Side note for whoever profiles the world: most of the heavy compute programs named in this thread are XboxBvhBuilder.dll's ray-tracing BVH passes, matched by the debug names in their containers: 24de2aef6c31d55e ReloadTriangles, 80f65d1925a2df48 Box32Rehydration, 44d832b4bdbd5ef8 LeafRehydration, be262edda389c646 Box16Rehydration, d22f746890686a68 LoadTriangles, 02eaed46a92d4c93 CalculateMortonCodes, 73ffa0b705ae2cc0 BitonicPreSortCS, 20c629c82e9687b4 ResetCounterValues, b6043104de672057 RefitBVH4.

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

**@⁠Ariorh1337** on GitHub · 2026-11-25 14:21 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7165160094) @⁠jessenic thanks, that explains the empty DRED output. Two of the lifetime suspects, ruled out here on the RTX 5090 with the same tree as in my report above (`main` `1a0bbe3` + #1803 + #1795 + #1517 + #1792 + #1323's markers), one run each: - **#2275** merged on top (`11aa227`, clean merge): removed 8 s after the first `#101`, the same signature. - **#2275 + no sparse tile ever let go** (a local switch: `decommit_range` unmaps nothing and `retire_free_pools` keeps every pool; sparse pools stayed at 2.5 GB): removed 8 s after the first `#101`, the same signature. - Also, with all 52 programs of `XboxBvhBuilder.dll` refused (35 of them were bound in that run): the same. In one other run, the dispatches the markers caught in flight at the removal were `RefitBVH4` and `InitHeaders` from that DLL, so that was where the GPU was, not the cause. So on this card it is not a VRAM heap, arena, sparse tile or sparse pool given back early. I haven't tried #1215 yet (it needs the compute pipelines rebuilt here). If your run with it comes first, I'll skip it. Side note for whoever profiles the world: most of the heavy compute programs named in this thread are `XboxBvhBuilder.dll`'s ray-tracing BVH passes, matched by the debug names in their containers: `24de2aef6c31d55e` ReloadTriangles, `80f65d1925a2df48` Box32Rehydration, `44d832b4bdbd5ef8` LeafRehydration, `be262edda389c646` Box16Rehydration, `d22f746890686a68` LoadTriangles, `02eaed46a92d4c93` CalculateMortonCodes, `73ffa0b705ae2cc0` BitonicPreSortCS, `20c629c82e9687b4` ResetCounterValues, `b6043104de672057` RefitBVH4. AI use: Claude Code (Claude Opus 5.5) wrote the local switches, ran the title on the machine above (I pressed through the menus) and drafted this.
Author
Owner

@⁠KDenKC on GitHub · 2026-11-25 14:18 UTC · original · edited 2026-11-25 14:23 UTC

@⁠Ariorh1337 another RTX 5090 run on main, with a different end: no device removal in either of two runs; both end in an access violation on the CPU side, in two different places (the first inside the title's xboxbvhbuilder.dll).

  • Setup: RTX 5090 32 GB (driver 621.24), Ryzen 7 9800X3D, 62 GB RAM, Windows 11 26200, release main 1a0bbe3 unchanged. XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_DRED=1 XCL_NETWORK=0, fresh data folder, pad input through the menus and the legal screens. Compute pipelines precompiled with the same switches (2,689, 0 errors, 0 refused); graphics pipelines cold.
  • Timeline: menus and loading presented until ~176 s; no presents from ~178 to ~506 s (the bind-wait silence @⁠b3IKK describes above); from ~510 s the world drew at 0.5–1 presents per second (up to 2,782 draws and 13,500 dispatches per 2 s).
  • End at 561.9 s: unhandled exception 0xc0000005 in xboxbvhbuilder.dll+0x15078 (read at address 0x7a173bd2c), rax=0x0 rsi=0x0 r13=0x0, on the stack nvwgf2umx.dll+0x255fe8, game_scarlett_master.exe+0xfe4f6c. The last XCL lines before it are pipeline builds (a graphics pipeline started at 561.79 s without a driver blob). No D3D12 device removed line and no DRED output in the run.
  • Peak local video memory 16.1 GB, 35.1 GB committed; 0 GPU-wait timeouts; 32 would close a GPU cycle; 8 mid-list splits.
  • Run 2 (same build, settings and caches, graphics pipelines warmer from run 1): the world drew from ~156 s (up to 2,964 draws and 15,699 dispatches per 2 s), then at 223.4 s unhandled exception 0xc0000005 in game_scarlett_master.exe+0x2677108 (read at address 0x4), rax=0x0, stack +0x4e51f4c, +0x326ecc2, +0x76314, +0x556f5f9, +0x50c9b17. Again no D3D12 device removed line; 16.3 GB local, 35.4 GB committed; 32 would close a GPU cycle, 9 mid-list splits.

On #2057 (4df1e6e, XCL_UMA_SHADOW=1 and its other switches, XCL_WATCH_HOT=0) the same card lost the device in the world twice (0x887a0005 at 361 s and 179 s): #2057

Not tested: a third run, main without XCL_DIRECT_DXIL / XCL_HEAP_WINDOWS, the newer main (16 commits on, incl. #929 and the direct-split series), whether either crash recurs.

AI use: Claude Code (Claude Opus 5.5) ran the title, read the log and wrote this.

**@⁠KDenKC** on GitHub · 2026-11-25 14:18 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7165084479) · edited 2026-11-25 14:23 UTC @⁠Ariorh1337 another RTX 5090 run on `main`, with a different end: **no device removal in either of two runs; both end in an access violation on the CPU side, in two different places** (the first inside the title's `xboxbvhbuilder.dll`). - **Setup:** RTX 5090 32 GB (driver 621.24), Ryzen 7 9800X3D, 62 GB RAM, Windows 11 26200, release `main` `1a0bbe3` unchanged. `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_DRED=1 XCL_NETWORK=0`, fresh data folder, pad input through the menus and the legal screens. Compute pipelines precompiled with the same switches (2,689, 0 errors, 0 refused); graphics pipelines cold. - **Timeline:** menus and loading presented until ~176 s; no presents from ~178 to ~506 s (the bind-wait silence @⁠b3IKK describes above); from ~510 s the world drew at 0.5–1 presents per second (up to 2,782 draws and 13,500 dispatches per 2 s). - **End at 561.9 s:** `unhandled exception 0xc0000005 in xboxbvhbuilder.dll+0x15078 (read at address 0x7a173bd2c)`, `rax=0x0 rsi=0x0 r13=0x0`, on the stack `nvwgf2umx.dll+0x255fe8`, `game_scarlett_master.exe+0xfe4f6c`. The last XCL lines before it are pipeline builds (a graphics pipeline started at 561.79 s without a driver blob). No `D3D12 device removed` line and no DRED output in the run. - Peak local video memory 16.1 GB, 35.1 GB committed; 0 GPU-wait timeouts; 32 `would close a GPU cycle`; 8 `mid-list` splits. - **Run 2** (same build, settings and caches, graphics pipelines warmer from run 1): the world drew from ~156 s (up to 2,964 draws and 15,699 dispatches per 2 s), then at 223.4 s `unhandled exception 0xc0000005 in game_scarlett_master.exe+0x2677108 (read at address 0x4)`, `rax=0x0`, stack `+0x4e51f4c`, `+0x326ecc2`, `+0x76314`, `+0x556f5f9`, `+0x50c9b17`. Again no `D3D12 device removed` line; 16.3 GB local, 35.4 GB committed; 32 `would close a GPU cycle`, 9 `mid-list` splits. On #2057 (`4df1e6e`, `XCL_UMA_SHADOW=1` and its other switches, `XCL_WATCH_HOT=0`) the same card lost the device in the world twice (`0x887a0005` at 361 s and 179 s): https://git.gtahub.st/github/xcl-dev--xcl/pulls/2057 **Not tested:** a third run, `main` without `XCL_DIRECT_DXIL` / `XCL_HEAP_WINDOWS`, the newer `main` (16 commits on, incl. #929 and the direct-split series), whether either crash recurs. AI use: Claude Code (Claude Opus 5.5) ran the title, read the log and wrote this.
Author
Owner

@⁠ddaikodaiko on GitHub · 2026-11-25 14:42 UTC · original

8 GB result with a local stack of the open PRs: still the loading screen, then E_OUTOFMEMORY.

Tested on the RTX 3060 Ti 8 GB (Win10 19045, driver 32.0.16.1088, 16 GB RAM + 16 GB pagefile). Tree: #2057 4df1e6e + #640 (page budget) + #2307/#2308 (XCL_PAGE_ALIAS) + #2092 (two-pass DispatchMesh) + #1702 (XCL_TEXTURE_PAGES_SYSTEM_MEMORY) + #782 (page use signal) + #1803 (heap addresses in SGPRs) + #2270 (held unmaps) + #1798 (a draw does not wait for a PSO), all ported locally, plus a local XCL_REFUSE_CS=1ada490879c33c0e,b78fa10b425b8e54 and XCL_PSO_IMAGE_SKIP=1.

600 s run, Series X, XCL_PAGE_ALIAS=1 XCL_TEXTURE_PAGES_SYSTEM_MEMORY=1 XCL_PAGE_BUDGET_MB=6144 XCL_LATE_RELEASE=1 XCL_WATCH_HOT=0 XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512:

  • max 429 draws per 2 s (a world frame is ~8,500); the picture stays on the loading artwork;
  • 7,543 MB local video memory + 7,696 MB non-local, 6,975 MB of target pages, 23.9 GB committed;
  • ends int3 game+0x193e00f, rax=0x8007000e, CreateHeap(64 MiB) refused.

Two useful negatives:

  • #1798 does not unlock this case. It is real (0 -> 345 presents on a 4090), but presents were already flowing here; the title is waiting on something else (draws/pipelines for the world).
  • With XCL_PAGE_BUDGET_MB=3072 the run ends cleanly (exit 0, 600 s) but evicts 5,601 textures and remaps ~1,600 every few seconds - the churn produces coloured-dot artefacts in the picture. At 6144 MB there is no churn and the OOM returns. So on 8 GB it is a choice between artefacts and OOM.

The smaller local stack (#640 + #2307/#2308 + XCL_REFUSE_CS) did remove the 0x887a0006 / OOM deaths and kept a 330 s run alive, but it stayed on the loading screen too.

For the project: on 8 GB the title wants ~15 GB between VRAM and shared memory for the world. The Series S path (1080p, half the targets and 4x fewer pixels) is the one that could fit, but it still renders black here (the FSR upscaler is loaded only in that profile; stubbing the DLL crashes the title). If anyone has the Series S black picture fixed, that is probably the 8 GB route.

No game data. AI use: the runs, the numbers and this text were produced with an AI agent (DeepSeek V4.1 Flash) on the machine above.

**@⁠ddaikodaiko** on GitHub · 2026-11-25 14:42 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7165698207) **8 GB result with a local stack of the open PRs: still the loading screen, then `E_OUTOFMEMORY`.** Tested on the RTX 3060 Ti 8 GB (Win10 19045, driver 32.0.16.1088, 16 GB RAM + 16 GB pagefile). Tree: #2057 `4df1e6e` + #640 (page budget) + #2307/#2308 (`XCL_PAGE_ALIAS`) + #2092 (two-pass DispatchMesh) + #1702 (`XCL_TEXTURE_PAGES_SYSTEM_MEMORY`) + #782 (page use signal) + #1803 (heap addresses in SGPRs) + #2270 (held unmaps) + #1798 (a draw does not wait for a PSO), all ported locally, plus a local `XCL_REFUSE_CS=1ada490879c33c0e,b78fa10b425b8e54` and `XCL_PSO_IMAGE_SKIP=1`. 600 s run, Series X, `XCL_PAGE_ALIAS=1 XCL_TEXTURE_PAGES_SYSTEM_MEMORY=1 XCL_PAGE_BUDGET_MB=6144 XCL_LATE_RELEASE=1 XCL_WATCH_HOT=0 XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512`: - max **429 draws per 2 s** (a world frame is ~8,500); the picture stays on the loading artwork; - 7,543 MB local video memory + 7,696 MB non-local, 6,975 MB of target pages, 23.9 GB committed; - ends `int3 game+0x193e00f`, `rax=0x8007000e`, `CreateHeap(64 MiB)` refused. Two useful negatives: - **#1798 does not unlock this case.** It is real (0 -> 345 presents on a 4090), but presents were already flowing here; the title is waiting on something else (draws/pipelines for the world). - With `XCL_PAGE_BUDGET_MB=3072` the run ends **cleanly (exit 0, 600 s)** but evicts **5,601 textures and remaps ~1,600 every few seconds** - the churn produces coloured-dot artefacts in the picture. At 6144 MB there is no churn and the OOM returns. So on 8 GB it is a choice between artefacts and OOM. The smaller local stack (#640 + #2307/#2308 + `XCL_REFUSE_CS`) did remove the `0x887a0006` / OOM deaths and kept a 330 s run alive, but it stayed on the loading screen too. For the project: on 8 GB the title wants ~15 GB between VRAM and shared memory for the world. The Series S path (1080p, half the targets and 4x fewer pixels) is the one that could fit, but it still renders black here (the FSR upscaler is loaded only in that profile; stubbing the DLL crashes the title). If anyone has the Series S black picture fixed, that is probably the 8 GB route. No game data. AI use: the runs, the numbers and this text were produced with an AI agent (DeepSeek V4.1 Flash) on the machine above.
Author
Owner

@⁠throny on GitHub · 2026-11-25 14:52 UTC · original

A data point on the latest main (06c9f55, which has the direct-dispatch split #2080/#2107/#2126 and #929). The world-load device removal is gone here, and the frames stop at the first #101 call in both runs.

Setup: RTX 4080 16 GB (driver 610.88), i9-12900K, 64 GB, Windows 11 26300, release. XCL_DIRECT_DXIL=1, compute pipelines precompiled with the same build (897, 0 errors), no input.

run first ListX #101 last present device removed end
1 187.3 s 186 s no idle (0 submits) until my memory guard stopped it at 452 s
2 83.5 s 84 s no the same, stopped by the guard
  • Before the stop, both runs present at about 30 fps.
  • After it, there are no submits, no draws and no DirectStorage requests: the title waits.
  • The first #101 call came at a different time in each run (84 s / 187 s), and the frames stopped within a second of it both times. That points at what the title waits for after #101 (a label or signal it expects the GPU to write, as the issue guesses), rather than at a timer.
  • On the same machine every run before these merges was removed at 85–100 s. So on this NVIDIA card the #1269 fixes turn the removal into this wait.

Not tested: what #101 (the older #99, two slots earlier per 8e9af35) does; past 452 s, because my machine gets ~34 GB of commit per run.

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

**@⁠throny** on GitHub · 2026-11-25 14:52 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7165941332) A data point on the latest `main` (`06c9f55`, which has the direct-dispatch split #2080/#2107/#2126 and #929). **The world-load device removal is gone here, and the frames stop at the first `#101` call in both runs.** **Setup:** RTX 4080 16 GB (driver 610.88), i9-12900K, 64 GB, Windows 11 26300, release. `XCL_DIRECT_DXIL=1`, compute pipelines precompiled with the same build (897, 0 errors), no input. | run | first `ListX #101` | last present | device removed | end | |---|---|---|---|---| | 1 | 187.3 s | 186 s | no | idle (0 submits) until my memory guard stopped it at 452 s | | 2 | 83.5 s | 84 s | no | the same, stopped by the guard | - Before the stop, both runs present at about 30 fps. - After it, there are no submits, no draws and no DirectStorage requests: the title waits. - The first `#101` call came at a different time in each run (84 s / 187 s), and the frames stopped within a second of it both times. That points at what the title waits for after `#101` (a label or signal it expects the GPU to write, as the issue guesses), rather than at a timer. - On the same machine every run before these merges was removed at 85–100 s. So on this NVIDIA card the #1269 fixes turn the removal into this wait. **Not tested:** what `#101` (the older `#99`, two slots earlier per 8e9af35) does; past 452 s, because my machine gets ~34 GB of commit per run. AI use: Claude Code (Claude Opus 5.5) ran this and wrote it.
Author
Owner

@⁠schoperena on GitHub · 2026-11-25 15:01 UTC · original

@⁠Ariorh1337 thanks, that answers my open question. It matches what I see on the RTX 5060 Ti 16 GB (driver 621.24, 32 GB RAM): the same 0x887a0005, DRED page fault at GPU VA 0x0 with no allocations, no DRED: list … line, no nvlddmkm event and the assert at +0x2474606, at 82–117 s in all five runs of my table above.

Your 32 GB card fails at about the same point, and @⁠jessenic read a DMA fault (state 6) at the removal. So on my side I no longer read it as video memory running out, or as something my settings cause; they only move when it shows up. Like @⁠tiagonleal's spread, my 82–117 s range is probably within run-to-run noise, so I won't draw conclusions from single-run differences between my settings.

Next on my side, in order:

  1. The #2057 tree (4df1e6e + #1914, #2065, #2160, #2163, #2270) with XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 on its own cache. Compute precompile is about half done.
  2. If that still ends the same way: #1215 and #2275, one at a time on that tree, with at least three runs each.

I'll post both results here. If you or jessenic want a specific diagnostic build or env var run on a 16 GB Blackwell card, I can run it.

AI use: Claude Code (Claude Opus 5.5) drafted this from my run logs; I reviewed it.

**@⁠schoperena** on GitHub · 2026-11-25 15:01 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7166180149) @⁠Ariorh1337 thanks, that answers my open question. It matches what I see on the RTX 5060 Ti 16 GB (driver 621.24, 32 GB RAM): the same `0x887a0005`, `DRED page fault at GPU VA 0x0` with no allocations, no `DRED: list …` line, no `nvlddmkm` event and the assert at `+0x2474606`, at 82–117 s in all five runs of my table above. Your 32 GB card fails at about the same point, and @⁠jessenic read a DMA fault (state 6) at the removal. So on my side I no longer read it as video memory running out, or as something my settings cause; they only move when it shows up. Like @⁠tiagonleal's spread, my 82–117 s range is probably within run-to-run noise, so I won't draw conclusions from single-run differences between my settings. **Next on my side**, in order: 1. The #2057 tree (`4df1e6e` + #1914, #2065, #2160, #2163, #2270) with `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1` on its own cache. Compute precompile is about half done. 2. If that still ends the same way: #1215 and #2275, one at a time on that tree, with at least three runs each. I'll post both results here. If you or jessenic want a specific diagnostic build or env var run on a 16 GB Blackwell card, I can run it. **AI use:** Claude Code (Claude Opus 5.5) drafted this from my run logs; I reviewed it.
Author
Owner

@⁠Ariorh1337 on GitHub · 2026-11-25 15:23 UTC · original

@⁠schoperena a pattern for your step 1: the runs on this title with no world-load removal that I know of were both on XCL_DIRECT_DXIL=1 (@⁠KDenKC, RTX 5090, main 1a0bbe3, 2 of 2; @⁠throny, RTX 4080, main 06c9f55, 2 of 2). Every run of mine is on the HLSL form, and every one is removed 8–20 s after the first #101. That held with #929 on top as well (one run). So your direct-form run on the #2057 tree is the useful next step. #2275 did not change it here (in my reply to jessenic above), so if you are short of runs, that one can wait.

I could not test the direct form myself. xcl shaders --precompile --only cs --pipelines --used-only under XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 grows to 90+ GB of commit here and I stopped it: on 1a0bbe3 with 15 threads and with 4, and on 06c9f55 with 8, about 50 pipelines made each time. If your precompile finished, how much memory did it take?

AI use: Claude Code (Claude Opus 5.5) ran these and drafted this.

**@⁠Ariorh1337** on GitHub · 2026-11-25 15:23 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7166776906) @⁠schoperena a pattern for your step 1: the runs on this title with no world-load removal that I know of were both on `XCL_DIRECT_DXIL=1` (@⁠KDenKC, RTX 5090, `main` `1a0bbe3`, 2 of 2; @⁠throny, RTX 4080, `main` `06c9f55`, 2 of 2). Every run of mine is on the HLSL form, and every one is removed 8–20 s after the first `#101`. That held with #929 on top as well (one run). So your direct-form run on the #2057 tree is the useful next step. #2275 did not change it here (in my reply to jessenic above), so if you are short of runs, that one can wait. I could not test the direct form myself. `xcl shaders --precompile --only cs --pipelines --used-only` under `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1` grows to 90+ GB of commit here and I stopped it: on `1a0bbe3` with 15 threads and with 4, and on `06c9f55` with 8, about 50 pipelines made each time. If your precompile finished, how much memory did it take? AI use: Claude Code (Claude Opus 5.5) ran these and drafted this.
Author
Owner

@⁠KDenKC on GitHub · 2026-11-25 15:32 UTC · original

@⁠Ariorh1337 one exception to that pattern from the same card: on #2057 (4df1e6e) with XCL_DIRECT_DXIL=1 the device was removed in the world here, 2 runs of 2 (0x887a0005 at 361.4 s and 179.4 s, then the int3 at +0x2474606, no nvlddmkm event). Those runs also had #2057's XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_COHERENT_HEAPS=sparse:16 XCL_LOOK_SKIP=1 and XCL_WATCH_HOT=0, so it is "direct form on main: no removal so far (4 runs: 1a0bbe3 ×2, 06c9f55 ×2, all with XCL_HEAP_WINDOWS=1)" rather than "direct form: no removal". Details: #2057

The two 06c9f55 runs here have no removal either, but they stop presenting at 188.5 s and 162.1 s right after the first #101 and a cold big compute build (#2080), so they do not get as far into the world as the 1a0bbe3 runs did. I'm starting an HLSL-form run of current main on this card for the other half of your pattern.

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

**@⁠KDenKC** on GitHub · 2026-11-25 15:32 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7167012426) @⁠Ariorh1337 one exception to that pattern from the same card: on #2057 (`4df1e6e`) **with** `XCL_DIRECT_DXIL=1` the device was removed in the world here, 2 runs of 2 (`0x887a0005` at 361.4 s and 179.4 s, then the `int3` at `+0x2474606`, no `nvlddmkm` event). Those runs also had #2057's `XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_COHERENT_HEAPS=sparse:16 XCL_LOOK_SKIP=1` and `XCL_WATCH_HOT=0`, so it is "direct form on `main`: no removal so far (4 runs: `1a0bbe3` ×2, `06c9f55` ×2, all with `XCL_HEAP_WINDOWS=1`)" rather than "direct form: no removal". Details: https://git.gtahub.st/github/xcl-dev--xcl/pulls/2057 The two `06c9f55` runs here have no removal either, but they stop presenting at 188.5 s and 162.1 s right after the first `#101` and a cold big compute build (https://git.gtahub.st/github/xcl-dev--xcl/pulls/2080), so they do not get as far into the world as the `1a0bbe3` runs did. I'm starting an HLSL-form run of current `main` on this card for the other half of your pattern. AI use: Claude Code (Claude Opus 5.5) ran these and wrote this.
Author
Owner

@⁠imnicho on GitHub · 2026-11-25 15:40 UTC · original

@⁠jessenic @⁠Ariorh1337 @⁠schoperena a candidate for the loss a few seconds after the first #101, with one caveat about its signature: in the newer list layout the title's ClearUnorderedAccessViewUint / Float (list #53 / #54) reach the PC with the title's handles untranslated, and on an RTX 5080 the device was lost there in 5 runs of 5, in four of them 14 – 19 s after the first #101. #2329 translates them (51 lines without the tests, applies cleanly to main 0829441).

Measured here (RTX 5080 16 GB, driver 610.47, i7-7700K, 16 GB RAM, Windows 10 22H2, release; a local tree: #2057 at 4df1e6e + main at 0f13d2a + the mesh stack; XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1, Series S profile, XCL_NETWORK=0):

runs device lost after the first #101 Windows' nvlddmkm "stopped responding" (4101)
without the change 5 14, 14, 18, 19 and 51 s every run
with it 3 28 s, 38 s, 160 s only the 160 s one
  • Without it, XCL_DRED=1 + XCL_GPU_PROFILE=1 named the same place in two runs: a list of 139 operations with 45 done, the next one ClearUnorderedAccessView.
  • The two handles the title passes are addresses of slots in its console view heaps (console_heap). The older list path (console_list) translates them; the newer layout's hook table had no entry for #53 / #54, so they went to PC #49 / #50 as they were: the CPU handle is then read as a PC descriptor.
  • With the change the title makes two clears there (a 20 MB buffer and an 80x45 R32_FLOAT texture) and goes on, 3 runs of 3.

The caveat: here that clear ended in a driver hang with a TDR event every time, not in your signature (no nvlddmkm event, DRED with no list, execution state 6). So I have not shown it is your fault. What speaks for trying it: it sits in the same window after #101, every tree without #2329 makes the call with garbage handles once the title gets that far in the Series S profile (in the Series X profile my runs made no such clear in the first 57 s of the world), and what a driver does with a garbage descriptor may well differ between 610.47 and 610.88 / 621.x.

What is left here with it: the two runs lost at 28 s and 38 s have exactly your signature (0x887a0005, no event, no GPU wait timed out, DRED page fault at VA 0 with no list). So there is at least one more cause behind it on this card too. My next runs log DRED's device state at the removal (ID3D12DeviceRemovedExtendedData2::GetDeviceState), to see whether it is state 6 without a debugger.

If one of you can run your tree with #2329 on top and the cdb script, the answer is quick either way: the removal at #101 + 7 – 9 s is gone, or it is not this.

AI use: Claude Code with Claude Fable 5.2 ran the title on the machine above and wrote this.

**@⁠imnicho** on GitHub · 2026-11-25 15:40 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7167215301) @⁠jessenic @⁠Ariorh1337 @⁠schoperena a candidate for the loss a few seconds after the first `#101`, with one caveat about its signature: **in the newer list layout the title's `ClearUnorderedAccessViewUint` / `Float` (list #53 / #54) reach the PC with the title's handles untranslated, and on an RTX 5080 the device was lost there in 5 runs of 5, in four of them 14 – 19 s after the first `#101`.** #2329 translates them (51 lines without the tests, applies cleanly to `main` `0829441`). **Measured here** (RTX 5080 16 GB, driver 610.47, i7-7700K, 16 GB RAM, Windows 10 22H2, release; a local tree: #2057 at `4df1e6e` + `main` at `0f13d2a` + the mesh stack; `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1`, Series S profile, `XCL_NETWORK=0`): | | runs | device lost after the first `#101` | Windows' `nvlddmkm` "stopped responding" (4101) | |---|---|---|---| | without the change | 5 | 14, 14, 18, 19 and 51 s | every run | | with it | 3 | 28 s, 38 s, 160 s | only the 160 s one | - Without it, `XCL_DRED=1` + `XCL_GPU_PROFILE=1` named the same place in two runs: a list of 139 operations with 45 done, the next one `ClearUnorderedAccessView`. - The two handles the title passes are addresses of slots in its console view heaps (`console_heap`). The older list path (`console_list`) translates them; the newer layout's hook table had no entry for #53 / #54, so they went to PC #49 / #50 as they were: the CPU handle is then read as a PC descriptor. - With the change the title makes two clears there (a 20 MB buffer and an 80x45 `R32_FLOAT` texture) and goes on, 3 runs of 3. **The caveat:** here that clear ended in a driver hang with a TDR event every time, not in your signature (no `nvlddmkm` event, DRED with no list, execution state 6). So I have not shown it is your fault. What speaks for trying it: it sits in the same window after `#101`, every tree without #2329 makes the call with garbage handles once the title gets that far in the Series S profile (in the Series X profile my runs made no such clear in the first 57 s of the world), and what a driver does with a garbage descriptor may well differ between 610.47 and 610.88 / 621.x. **What is left here with it:** the two runs lost at 28 s and 38 s have exactly your signature (`0x887a0005`, no event, no GPU wait timed out, DRED page fault at VA 0 with no list). So there is at least one more cause behind it on this card too. My next runs log DRED's device state at the removal (`ID3D12DeviceRemovedExtendedData2::GetDeviceState`), to see whether it is state 6 without a debugger. If one of you can run your tree with #2329 on top and the cdb script, the answer is quick either way: the removal at `#101` + 7 – 9 s is gone, or it is not this. AI use: Claude Code with Claude Fable 5.2 ran the title on the machine above and wrote this.
Author
Owner

@⁠jessenic on GitHub · 2026-11-25 15:51 UTC · original

@⁠imnicho Thanks. My tree already translates those clears: it carries #1291 ("console UAV clears (#53 / #54) get the slots' PC descriptors"), which does what #2329 does for the newer list layout. #2329 looks like a duplicate of it, so it may be worth comparing the two.

Before #1291, my runs ended in exactly what you saw: 0x887a0006, with DRED stopped at a ClearUnorderedAccessView on a title list (#1291). With #1291, that hang is gone. What is left is the 0x887a0005 / no event / DRED page fault at VA 0 / execution state 6 removal, at #101 + 7–9 s. It shows on every run since, 4 of them under cdb, and on all of those trees #53 / #54 are translated. With #1215 on top it came at + 18.7 s in a warm run (corrected on #1215). Without the page budget it came at + 8.5 s.

So, matching your two runs at 28 s and 38 s: on this card the clears were one cause, and there is a second one behind them with state 6. Reading ID3D12DeviceRemovedExtendedData2::GetDeviceState at the removal, as you plan, should give the same answer as the debugger without one. I'd be glad to see whether it says 6 on your card too.

AI use: Claude Code (Claude Opus 5.5) wrote this from the runs linked above.

**@⁠jessenic** on GitHub · 2026-11-25 15:51 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7167381069) @⁠imnicho Thanks. My tree already translates those clears: it carries #1291 ("console UAV clears (#53 / #54) get the slots' PC descriptors"), which does what #2329 does for the newer list layout. #2329 looks like a duplicate of it, so it may be worth comparing the two. Before #1291, my runs ended in exactly what you saw: `0x887a0006`, with DRED stopped at a `ClearUnorderedAccessView` on a title list (https://git.gtahub.st/github/xcl-dev--xcl/pulls/1291). With #1291, that hang is gone. What is left is the `0x887a0005` / no event / DRED page fault at VA 0 / execution state 6 removal, at `#101` + 7–9 s. It shows on every run since, 4 of them under cdb, and on all of those trees #53 / #54 are translated. With #1215 on top it came at + 18.7 s in a warm run (corrected on #1215). Without the page budget it came at + 8.5 s. So, matching your two runs at 28 s and 38 s: on this card the clears were one cause, and there is a second one behind them with state 6. Reading `ID3D12DeviceRemovedExtendedData2::GetDeviceState` at the removal, as you plan, should give the same answer as the debugger without one. I'd be glad to see whether it says 6 on your card too. AI use: Claude Code (Claude Opus 5.5) wrote this from the runs linked above.
Author
Owner

@⁠Gevroska on GitHub · 2026-11-25 16:02 UTC · original

I compared two 720-second GTA VI loading runs on Windows with an RTX 3080 and stock 06c9f550. Both used the same executable, settings, and scripted menu inputs. Each started with a fresh XCL translation cache. For the second run, I seeded only XCL’s driver cache with the 151 pipeline blobs saved by the first run. The NVIDIA driver cache was shared across both runs.

The unseeded run ended with 476 seconds without a present, and the seeded run ended with 470 seconds without a present. XCL recorded its first accepted use of a disk blob about 40 seconds after the seeded run’s last present. It recorded at least 64 accepted uses before the first logged new store and at least 128 by 451 seconds into the run. The late captures from both runs were pixel-identical, with a black center. Both processes exited cleanly, and I saw no open-world scene.

This confirms that XCL reused disk blobs during the stall on this setup. Presentation did not resume within the observation window. The counter combines graphics and compute pipelines, so I can’t tell whether the seed covered the particular pipelines needed to advance loading.

I used Codex GPT-6.2 Sol for the comparison and a separate GPT-6.2 Sol agent to independently verify the cache inventory, reuse counts, frame timings, and captures.

I reviewed and approved this comment before posting.

**@⁠Gevroska** on GitHub · 2026-11-25 16:02 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7167537416) I compared two 720-second GTA VI loading runs on Windows with an RTX 3080 and stock `06c9f550`. Both used the same executable, settings, and scripted menu inputs. Each started with a fresh XCL translation cache. For the second run, I seeded only XCL’s driver cache with the 151 pipeline blobs saved by the first run. The NVIDIA driver cache was shared across both runs. The unseeded run ended with **476 seconds without a present**, and the seeded run ended with **470 seconds without a present**. XCL recorded its first accepted use of a disk blob about 40 seconds after the seeded run’s last present. It recorded at least 64 accepted uses before the first logged new store and at least 128 by 451 seconds into the run. The late captures from both runs were pixel-identical, with a black center. Both processes exited cleanly, and I saw no open-world scene. This confirms that XCL reused disk blobs during the stall on this setup. Presentation did not resume within the observation window. The counter combines graphics and compute pipelines, so I can’t tell whether the seed covered the particular pipelines needed to advance loading. I used Codex GPT-6.2 Sol for the comparison and a separate GPT-6.2 Sol agent to independently verify the cache inventory, reuse counts, frame timings, and captures. I reviewed and approved this comment before posting.
Author
Owner

@⁠Soliver84 on GitHub · 2026-11-25 16:25 UTC · original

@⁠MacieGx thanks a lot for the write-up of the five causes. A data point with your recipe on an RTX 5090, and a request.

Setup: RTX 5090 32 GB (driver 621.24), Ryzen 7 5800X3D, 64 GB RAM, Windows 11 (build 29667), retail 1.0.2.1, release build.
Tree: main 1a0bbe3 + #2229, #1803, your recomp/f16-packed-interpolants branch, #541, #2092, #1102, #1795, #1798, #1329, #1790, #2246 (no #640 / #782, no GPU-view windows). --precompile --only cs|ms --pipelines and --only ps|vs with XCL_HEAP_WINDOWS=1: 0 errors, 1 CS pipeline refused by the driver.

Result (two runs, XCL_HEAP_WINDOWS=1, one of them with XCL_UMA_SHADOW=1):

  • For the first time here the intro credits, the Rockstar logo and the loading screens present in their correct colours. Before #2229 every frame on this card was one tinted colour.
  • Then, while the story intro is prestreaming, the GPU sits at 100 % for ~40 s, followed by 0x887a0005 and the int3 at +0x2474606 (463 s and 515 s). Before that, the usual queue.Wait … did not complete within 5000 ms lines (prod=qSome) and title texture uploads timing out after 10 s.

Request: the two local parts from your list, the 24 GB GPU-view windows (point 1, on #1055 / #1102) and the texture touch on #640 / #782 (point 3), are what our stack is missing compared with yours. Could you push them as a branch or a draft PR, even unpolished? We would test them on the 5090 right away and report back here.

AI use: this report was written with Claude Code (Claude Fable 5.2). The numbers come from our own runs on the machine above.

**@⁠Soliver84** on GitHub · 2026-11-25 16:25 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7167960494) @⁠MacieGx thanks a lot for the write-up of the five causes. A data point with your recipe on an **RTX 5090**, and a request. **Setup:** RTX 5090 32 GB (driver 621.24), Ryzen 7 5800X3D, 64 GB RAM, Windows 11 (build 29667), retail 1.0.2.1, release build. **Tree:** `main` `1a0bbe3` + #2229, #1803, your `recomp/f16-packed-interpolants` branch, #541, #2092, #1102, #1795, #1798, #1329, #1790, #2246 (no #640 / #782, no GPU-view windows). `--precompile --only cs|ms --pipelines` and `--only ps|vs` with `XCL_HEAP_WINDOWS=1`: 0 errors, 1 CS pipeline refused by the driver. **Result (two runs, `XCL_HEAP_WINDOWS=1`, one of them with `XCL_UMA_SHADOW=1`):** - For the first time here the intro credits, the Rockstar logo and the loading screens present in their correct colours. Before #2229 every frame on this card was one tinted colour. - Then, while the story intro is prestreaming, the GPU sits at 100 % for ~40 s, followed by `0x887a0005` and the `int3` at `+0x2474606` (463 s and 515 s). Before that, the usual `queue.Wait … did not complete within 5000 ms` lines (prod=qSome) and title texture uploads timing out after 10 s. **Request:** the two local parts from your list, the **24 GB GPU-view windows** (point 1, on #1055 / #1102) and the **texture touch on #640 / #782** (point 3), are what our stack is missing compared with yours. Could you push them as a branch or a draft PR, even unpolished? We would test them on the 5090 right away and report back here. AI use: this report was written with Claude Code (Claude Fable 5.2). The numbers come from our own runs on the machine above.
Author
Owner

@⁠b3IKK on GitHub · 2026-11-25 16:27 UTC · original

A data point for this thread, from the retail 1.0.2.1 title on main 426a5a7 (RTX 5080 16 GB, 600 s runs, XCL_PRESS_AT=33:A): the warm cache does converge in count — the compute driver compiles that start after the 96 s stop fall 54 → 24 → 9 → 8 → 7 over five warm runs, and the record sets are disjoint between runs, so each run finishes the previous run's programs and reaches new ones.

What does not converge in time is their cost: the remaining programs are 0.99–1.21 MB of DXIL each and take 50–105 s each on title threads (warm 4 starts them at 99.6, 158.8, 219.9, 286.5, 351.7, 425.3, 495.1 and 573.2 s; the last was still compiling at 600 s). No frame is presented after 96 s. A 3600 s run shows the same shape: 69 new cold compiles after 96 s and zero presents for the whole hour.

So the post-96 s wall is not a hang and not the same programs rebuilt; it is a long serial chain of one-time ~1 MB compute compiles. The lever is building them outside the title's load (the offline precompile path #2338 makes cover split pieces). The per-run timings and the disjoint-set check are in #1380's latest comment.

AI use: OpenCode, Claude Fable 5.2 parsed the logs of five 600 s runs and the 3600 s run on this machine and wrote this.

**@⁠b3IKK** on GitHub · 2026-11-25 16:27 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7168018209) A data point for this thread, from the retail 1.0.2.1 title on `main` `426a5a7` (RTX 5080 16 GB, 600 s runs, `XCL_PRESS_AT=33:A`): the warm cache does converge in count — the compute driver compiles that start after the 96 s stop fall **54 → 24 → 9 → 8 → 7** over five warm runs, and the record sets are disjoint between runs, so each run finishes the previous run's programs and reaches new ones. What does not converge in time is their cost: the remaining programs are 0.99–1.21 MB of DXIL each and take **50–105 s each** on title threads (warm 4 starts them at 99.6, 158.8, 219.9, 286.5, 351.7, 425.3, 495.1 and 573.2 s; the last was still compiling at 600 s). No frame is presented after 96 s. A 3600 s run shows the same shape: 69 new cold compiles after 96 s and zero presents for the whole hour. So the post-96 s wall is not a hang and not the same programs rebuilt; it is a long serial chain of one-time ~1 MB compute compiles. The lever is building them outside the title's load (the offline precompile path #2338 makes cover split pieces). The per-run timings and the disjoint-set check are in #1380's latest comment. AI use: OpenCode, Claude Fable 5.2 parsed the logs of five 600 s runs and the 3600 s run on this machine and wrote this.
Author
Owner

@⁠safesearch77 on GitHub · 2026-11-25 16:30 UTC · original

Quick note on the ID3D12GraphicsCommandList10::#101 (not on PC) hypothesis in the issue description ("Guess: #101 is the console method that records the GPU write the watchdog waits on, and returning 0 leaves the location unsignalled"):

  • Because 7952987A uses the newer console command-list layout (QUEUE_SHIFTED == true, +2 slots after #58 EndEvent), newer-layout slot #101 ([rax + 0x328]) is older-layout slot #99: ID3D12GraphicsCommandList::DriverHintX(this, feature, value).
  • At +0x50a6651 (return +0x50a6657), the title calls DriverHintX(list, 2, 1) on its first 3D world command list and discards the return value.
  • On PC D3D12 / vkd3d-proton, DriverHintX is a pure no-op returning 0 — so real.rs's generic stub returning 0x0 already has the exact right semantics and does not drop any GPU memory write. It only prints right before the "GPU Loc Sig" hang because stubs::record_call logs on first hit when the title transitions into recording its first world frame (where the real submission/shader/readback stalls begin).

AI use: Antigravity (Gemini 4 Carbon) helped cross-check the newer/older CommandList vtable shift (+2 at #59+) against real.rs and title_list.rs; verified by me.

**@⁠safesearch77** on GitHub · 2026-11-25 16:30 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7168097467) Quick note on the `ID3D12GraphicsCommandList10::#101 (not on PC)` hypothesis in the issue description (*"Guess: `#101` is the console method that records the GPU write the watchdog waits on, and returning `0` leaves the location unsignalled"*): - Because `7952987A` uses the newer console command-list layout (`QUEUE_SHIFTED == true`, `+2` slots after `#58` `EndEvent`), **newer-layout slot `#101` (`[rax + 0x328]`) is older-layout slot `#99`: `ID3D12GraphicsCommandList::DriverHintX(this, feature, value)`**. - At `+0x50a6651` (return `+0x50a6657`), the title calls `DriverHintX(list, 2, 1)` on its first 3D world command list and discards the return value. - On PC D3D12 / `vkd3d-proton`, `DriverHintX` is a pure no-op returning `0` — so `real.rs`'s generic stub returning `0x0` already has the exact right semantics and does **not** drop any GPU memory write. It only prints right before the `"GPU Loc Sig"` hang because `stubs::record_call` logs on first hit when the title transitions into recording its first world frame (where the real submission/shader/readback stalls begin). AI use: Antigravity (Gemini 4 Carbon) helped cross-check the newer/older `CommandList` vtable shift (`+2` at `#59+`) against `real.rs` and `title_list.rs`; verified by me.
Author
Owner

@⁠HQasper on GitHub · 2026-11-24 16:34 UTC · original · edited 2026-11-25 16:36 UTC

RTX 5090: during the world-load stall, the slow compute builds are permutation pairs that differ only by one inline constant

Follow-up to my #1288 report (95299f4, RTX 5090, driver 32.0.16.2124, warm caches, XCL_PRESS_AT=30:A,40:A, 300 s runs).

With #1288 the watchdog no longer fires, but from ~82 s on the title waits for compute pipelines that one thread builds in the driver one after another. In two runs, the slow ones (4.3–8.1 s each, 320–430 KB DXIL) came as eight programs and then eight more of exactly the same lengths. I first took that for a second round of the same programs. It isn't:

  • XCL_DUMP_SHADERS=1 shows that each pair is two console programs of exactly the same length. Their listings differ in only two places. One is the v_nop ; lit … header literals at +0x0 / +0xc. The other is the multiplier of one scalar multiply near the start of the program, for example:
    • 3cd8c0e62e7072c8 / 795f9d08f9de3571 (28,960 B): 00ac: s_mul_i32 s0, s0, 31 vs … 23
    • 5549faf87b578c45 / f958cdc98ab701d3 (27,000 B): 00b8: s_mul_i32 s0, s0, 22 vs … 30
  • In the translated HLSL (20,421 lines each), the only differing line apart from comments is uint t19 = (uint)((int)s0 * (int)31u); vs … 23u. The two DXIL files differ in 158 bytes.
  • Both programs of a pair are submitted together when the world load starts (same second in the dump). Each gets its own DXC compile and its own 5–8 s driver compile, so in the run with warm caches 8 pairs = 16 serialised driver builds ≈ 100 s of the stall.

Other same-length pairs in the dump (e.g. 26,444 B, 27,376 B, 65,000 B) differ throughout, so this pattern is specific to these screen-probe-sized programs, not every pair.

Idea, not implemented: when two console programs differ only in inline constants of scalar ALU instructions (and the nop literals), the translator could read those constants from a root constant instead. Then the title's permutations would share one DXIL and one driver compile, and its bind would set the value. That is a recompiler change (the instruction that varies, the root-signature slot, the bind path), so I'd like to hear whether it's a direction you'd take before anyone writes it. It would halve these builds, but it would not remove the stall: the title also waits on single programs in the same phase.

Update: main b7aa9f3 + #1288 (95299f4) + #751 (1a480bc), two 600 s runs (applied locally; #1278 left out because it conflicts with main's big_compile_turn; same machine and presses as above)

  • Neither run crashed or removed the device. Presents stop at ~78–80 s and stay at 0 until 600 s (1,764 and 1,738 frames, peak commit 34.0 / 33.9 GB).
  • After the stop, the only work in the log is compute pipelines of ~0.9–1.4 MB DXIL being built in the driver one after another, while the title dispatches 0–9 times per 2 s:
    • run 1: 6 builds of 1,027,380–1,149,084 B, 51–83 s each;
    • run 2: the 6 from run 1 came from their disk blobs, then 8 others of 921,428–1,410,072 B, 31–68 s each.
  • So on this RTX 5090 with #1288, what is left of the stall is the NVIDIA driver's compile time for these ~1 MB programs, one at a time. Each run gets further by the programs the previous one cached. The comment at BIG_DRIVER_COMPILE mentions ~600 such programs in this title, so getting through them this way would take hours.

AI use: Claude Code with Claude Opus 5.5 ran the builds, game runs, dumps and diffs on this machine and wrote this note.

**@⁠HQasper** on GitHub · 2026-11-24 16:34 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7137870075) · edited 2026-11-25 16:36 UTC ### RTX 5090: during the world-load stall, the slow compute builds are permutation pairs that differ only by one inline constant Follow-up to my [#1288 report](https://github.com/ivall/xcl/pull/1288#issuecomment-7137213934) (`95299f4`, RTX 5090, driver 32.0.16.2124, warm caches, `XCL_PRESS_AT=30:A,40:A`, 300 s runs). With #1288 the watchdog no longer fires, but from ~82 s on the title waits for compute pipelines that one thread builds in the driver one after another. In two runs, the slow ones (4.3–8.1 s each, 320–430 KB DXIL) came as **eight programs and then eight more of exactly the same lengths**. I first took that for a second round of the same programs. It isn't: - `XCL_DUMP_SHADERS=1` shows that each pair is two console programs of exactly the same length. Their listings differ in only two places. One is the `v_nop ; lit …` header literals at `+0x0` / `+0xc`. The other is the multiplier of one scalar multiply near the start of the program, for example: - `3cd8c0e62e7072c8` / `795f9d08f9de3571` (28,960 B): `00ac: s_mul_i32 s0, s0, 31` vs `… 23` - `5549faf87b578c45` / `f958cdc98ab701d3` (27,000 B): `00b8: s_mul_i32 s0, s0, 22` vs `… 30` - In the translated HLSL (20,421 lines each), the only differing line apart from comments is `uint t19 = (uint)((int)s0 * (int)31u);` vs `… 23u`. The two DXIL files differ in 158 bytes. - Both programs of a pair are submitted together when the world load starts (same second in the dump). Each gets its own DXC compile and its own 5–8 s driver compile, so in the run with warm caches 8 pairs = 16 serialised driver builds ≈ 100 s of the stall. Other same-length pairs in the dump (e.g. 26,444 B, 27,376 B, 65,000 B) differ throughout, so this pattern is specific to these screen-probe-sized programs, not every pair. **Idea, not implemented:** when two console programs differ only in inline constants of scalar ALU instructions (and the nop literals), the translator could read those constants from a root constant instead. Then the title's permutations would share one DXIL and one driver compile, and its bind would set the value. That is a recompiler change (the instruction that varies, the root-signature slot, the bind path), so I'd like to hear whether it's a direction you'd take before anyone writes it. It would halve these builds, but it would not remove the stall: the title also waits on single programs in the same phase. **Update: `main` `b7aa9f3` + #1288 (`95299f4`) + #751 (`1a480bc`), two 600 s runs** (applied locally; #1278 left out because it conflicts with `main`'s `big_compile_turn`; same machine and presses as above) - Neither run crashed or removed the device. Presents stop at ~78–80 s and stay at 0 until 600 s (1,764 and 1,738 frames, peak commit 34.0 / 33.9 GB). - After the stop, the only work in the log is compute pipelines of ~0.9–1.4 MB DXIL being built in the driver one after another, while the title dispatches 0–9 times per 2 s: - run 1: 6 builds of 1,027,380–1,149,084 B, 51–83 s each; - run 2: the 6 from run 1 came from their disk blobs, then 8 others of 921,428–1,410,072 B, 31–68 s each. - So on this RTX 5090 with #1288, what is left of the stall is the NVIDIA driver's compile time for these ~1 MB programs, one at a time. Each run gets further by the programs the previous one cached. The comment at `BIG_DRIVER_COMPILE` mentions ~600 such programs in this title, so getting through them this way would take hours. *AI use: Claude Code with Claude Opus 5.5 ran the builds, game runs, dumps and diffs on this machine and wrote this note.*
Author
Owner

@⁠Kalmarv on GitHub · 2026-11-25 16:42 UTC · original

RTX 5070 Ti: the same pairs, all 16 of them

This confirms @⁠HQasper's finding above (permutation pairs that differ by one inline constant) on a second machine, for title: ea3b5e4d.

  • Family: scattering_transmittance_system:CS_GatherRaymarchedLocalLightsClassified0–31. Variant n pairs with n+8 (0/8 … 7/15, 16/24 … 23/31), which makes 16 pairs.
  • HLSL route (main 438cbed0, read from one run's DXIL cache): in 13 of the 16 pairs, both DXIL files are the same size (415–510 KB) and differ in 42–579 bytes. Pairs 0/8, 1/9 and 19/27 differ in size by 124, 4 and 4 bytes. The two console programs of a pair are 0–20 bytes apart.
  • Direct route (XCL_DIRECT_DXIL=1, main 08294413, 260–322 KB): 11 of the 16 pairs are the same size. The bytes differ all through these files, so the bitcode can't be compared position by position.
  • What it costs here: in a 600 s run on 08294413 with XCL_DIRECT_DXIL=1, the title's binding thread waited about 147 s in total on 31 builds of this family, each 3.7–6.4 s. Single driver compiles on earlier runs: Classified23 8.4 s, Classified31 8.1 s, Classified22 7.2 s, Classified30 4.4 s. One compile per pair would save about half of that.
  • Not checked: I compared sizes and bytes, not listings. So I haven't shown that every pair differs only in the scalar-multiply literal and the header literals. HQasper diffed the HLSL of two pairs.

I'm starting on HQasper's route: read the varying scalar literal from a root constant, so that a pair shares one DXIL and one driver compile. It goes behind an env switch, split as CONTRIBUTING asks (preparation, new code with its tests, turning it on). If the maintainers don't want this direction, say so and I'll stop.

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

**@⁠Kalmarv** on GitHub · 2026-11-25 16:42 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7168419297) ### RTX 5070 Ti: the same pairs, all 16 of them This confirms @⁠HQasper's finding above (permutation pairs that differ by one inline constant) on a second machine, for title: ea3b5e4d. - **Family:** `scattering_transmittance_system:CS_GatherRaymarchedLocalLightsClassified0`–`31`. Variant *n* pairs with *n+8* (0/8 … 7/15, 16/24 … 23/31), which makes 16 pairs. - **HLSL route** (`main` `438cbed0`, read from one run's DXIL cache): in 13 of the 16 pairs, both DXIL files are the same size (415–510 KB) and differ in 42–579 bytes. Pairs 0/8, 1/9 and 19/27 differ in size by 124, 4 and 4 bytes. The two console programs of a pair are 0–20 bytes apart. - **Direct route** (`XCL_DIRECT_DXIL=1`, `main` `08294413`, 260–322 KB): 11 of the 16 pairs are the same size. The bytes differ all through these files, so the bitcode can't be compared position by position. - **What it costs here:** in a 600 s run on `08294413` with `XCL_DIRECT_DXIL=1`, the title's binding thread waited about 147 s in total on 31 builds of this family, each 3.7–6.4 s. Single driver compiles on earlier runs: Classified23 8.4 s, Classified31 8.1 s, Classified22 7.2 s, Classified30 4.4 s. One compile per pair would save about half of that. - **Not checked:** I compared sizes and bytes, not listings. So I haven't shown that every pair differs only in the scalar-multiply literal and the header literals. HQasper diffed the HLSL of two pairs. I'm starting on HQasper's route: read the varying scalar literal from a root constant, so that a pair shares one DXIL and one driver compile. It goes behind an env switch, split as CONTRIBUTING asks (preparation, new code with its tests, turning it on). If the maintainers don't want this direction, say so and I'll stop. **AI use:** Claude Code (Claude Opus 5.5) ran the comparison and wrote this comment.
Author
Owner

@⁠Ariorh1337 on GitHub · 2026-11-25 16:47 UTC · original

RTX 5090: what the removal at the first #101 + 8–20 s (0x887a0005, DRED VA 0 with no list, state 6 in @⁠jessenic's reading) is not, from ten more runs. Every run below ends the same way: the world's first heavy burst, then the removal and the title's assert at +0x2474606. So these can be crossed off on this card.

Setup: RTX 5090 32 GB (driver 32.0.16.1692), Ryzen 7 9800X3D, 64 GB, Windows 11 26300, release, Series X profile, compute pipelines prebuilt (--used-only), A through the menus. Base main 1a0bbe3 + #1803 + #1795 + #1517 + #1792 + #1323 unless noted (the runs after the #929 one also carry #2275 and #929); local switches marked *.

what was changed result
all 52 programs of XboxBvhBuilder.dll refused* (35 were bound) removed
ActivateRays 95cc13288a27a96e and ActivateProbes 56c0cd3b82a00c6e refused* (both logged as left out) removed, #101 + 8 s
no title texture upload at all* (title_textures::refresh returns at once) removed, #101 + 10 s
#2275 (11aa227) removed, #101 + 8 s
#2275 + no sparse tile unmapped and no sparse pool given back* removed, #101 + 8 s
#929 removed, #101 + 8 s
#2329 (on main 06c9f55 + #1993 + #2009 + #1448) removed, #101 + 10 s
#1448 (compact compute backend, same tree) removed, #101 + 10 s
every title submission waited for on the CPU, 50 ms at most* (main 06c9f55 + #1993 + #2009): the world's burst fell to 40–130 submits per 2 s removed, #101 + 18 s
my older local stack (b9b6ea6 with b8b1f49 and 9f65f95 reverted, #1316, #1329 and others), which reached the in-game HUD yesterday removed, #101 + 48 s

What I read from it:

  • Not a race between the title's queues, and not the burst's density. With submissions serialized the removal still comes, only later.
  • Not the BVH builder, the GI programs, texture uploads or a VRAM/sparse lifetime on this card.
  • The HUD I saw yesterday came from cold caches, not from a fix. Then most world pipelines were still building, so their work did not run. The same binary with today's warm caches is removed too. So "it got further" on cold caches says little about this removal.
  • Markers (#1323, plus local ones around draws) never had a dispatch or draw in flight at the removal except once (BVH RefitBVH4, which the refusal run then ruled out). Nsight Aftermath, through the SDK, never started a dump for it (status NotStarted after 30 s), which fits a DMA fault rather than a page fault or a hang. Aftermath's GenerateShaderDebugInfo flag also makes the driver ignore its kept pipeline blobs (8.5 s per pipeline instead of 0.1 s), in case anyone tries it.

Not tested: the direct form (XCL_DIRECT_DXIL=1). Its precompile grows to 90+ GB of commit here, on 1a0bbe3 and on 06c9f55. #1215 neither, since @⁠jessenic's runs with it still show the removal.

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

**@⁠Ariorh1337** on GitHub · 2026-11-25 16:47 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7168544700) **RTX 5090: what the removal at the first `#101` + 8–20 s (`0x887a0005`, DRED VA 0 with no list, state 6 in @⁠jessenic's reading) is not, from ten more runs.** Every run below ends the same way: the world's first heavy burst, then the removal and the title's assert at `+0x2474606`. So these can be crossed off on this card. **Setup:** RTX 5090 32 GB (driver 32.0.16.1692), Ryzen 7 9800X3D, 64 GB, Windows 11 26300, release, Series X profile, compute pipelines prebuilt (`--used-only`), A through the menus. Base `main` `1a0bbe3` + #1803 + #1795 + #1517 + #1792 + #1323 unless noted (the runs after the #929 one also carry #2275 and #929); local switches marked *. | what was changed | result | |---|---| | all 52 programs of `XboxBvhBuilder.dll` refused* (35 were bound) | removed | | ActivateRays `95cc13288a27a96e` and ActivateProbes `56c0cd3b82a00c6e` refused* (both logged as left out) | removed, #101 + 8 s | | no title texture upload at all* (`title_textures::refresh` returns at once) | removed, #101 + 10 s | | #2275 (`11aa227`) | removed, #101 + 8 s | | #2275 + no sparse tile unmapped and no sparse pool given back* | removed, #101 + 8 s | | #929 | removed, #101 + 8 s | | #2329 (on `main` `06c9f55` + #1993 + #2009 + #1448) | removed, #101 + 10 s | | #1448 (compact compute backend, same tree) | removed, #101 + 10 s | | every title submission waited for on the CPU, 50 ms at most* (`main` `06c9f55` + #1993 + #2009): the world's burst fell to 40–130 submits per 2 s | removed, #101 + 18 s | | my older local stack (`b9b6ea6` with `b8b1f49` and `9f65f95` reverted, #1316, #1329 and others), which reached the in-game HUD yesterday | removed, #101 + 48 s | What I read from it: - **Not a race between the title's queues, and not the burst's density.** With submissions serialized the removal still comes, only later. - **Not the BVH builder, the GI programs, texture uploads or a VRAM/sparse lifetime** on this card. - **The HUD I saw yesterday came from cold caches, not from a fix.** Then most world pipelines were still building, so their work did not run. The same binary with today's warm caches is removed too. So "it got further" on cold caches says little about this removal. - Markers (#1323, plus local ones around draws) never had a dispatch or draw in flight at the removal except once (BVH `RefitBVH4`, which the refusal run then ruled out). Nsight Aftermath, through the SDK, never started a dump for it (status `NotStarted` after 30 s), which fits a DMA fault rather than a page fault or a hang. Aftermath's `GenerateShaderDebugInfo` flag also makes the driver ignore its kept pipeline blobs (8.5 s per pipeline instead of 0.1 s), in case anyone tries it. Not tested: the direct form (`XCL_DIRECT_DXIL=1`). Its precompile grows to 90+ GB of commit here, on `1a0bbe3` and on `06c9f55`. #1215 neither, since @⁠jessenic's runs with it still show the removal. AI use: Claude Code (Claude Opus 5.5) wrote the local switches, ran the title on the machine above (I pressed through the menus) and drafted this.
Author
Owner

@⁠throny on GitHub · 2026-11-25 16:49 UTC · original

@⁠Kalmarv on main with the #2080 split, the world-load stall on my RTX 4080 is the whole form of a split program, built synchronously on the title's thread. It isn't #101; that's DriverHintX(2, 0/1) and harmless as a stub.

What I saw (main 06c9f55, every compute program precompiled with the same build, XCL_PSO_WAIT_MS=50):

  • The frames stop at 82–92 s in every run. Afterwards no submits, no GPU waits time out, and the PSO window title reads 0 running, 0 done.
  • XCL_THREAD_DUMP_AT=130,200: one title thread sits in bind::execute_indirect → dispatch_chain::whole → Chain::whole, waiting for build_whole (dispatch_chain.rs:47). Meanwhile the driver compiles the whole form.
  • Those whole forms are the cold compute builds in the log: 765 KB–1.15 MB of DXIL, 35–90 s each, always driver blob absent, even after a full --precompile --only cs --pipelines (2,689 programs, 0 errors). Over a 600 s run there were about 12 of them, one after another.

Two things, as far as I can read it:

  1. Chain::whole builds on the caller's thread, under a lock, at the first indirect dispatch, so XCL_PSO_WAIT_MS doesn't cover it. Could it go to the PSO workers like the pieces do, with the indirect dispatch skipped (or the pieces used) until it's done?
  2. It's built with dispatch_chain_root_signature, so it can't reuse the blob the precompile left for the same program. Could the precompile build the whole form too, the way Chain::whole does?

I'm now testing XCL_DIRECT_SPLIT_INSTRUCTIONS=0 on 50a9fde with a full precompile, to confirm the title then goes on with the precompiled pipelines.

RTX 4080 (610.88), i9-12900K, 64 GB. AI use: Claude Code (Claude Opus 5.5) ran this and wrote it.

**@⁠throny** on GitHub · 2026-11-25 16:49 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7168584313) @⁠Kalmarv on `main` with the #2080 split, the world-load stall on my RTX 4080 is the **whole form of a split program, built synchronously on the title's thread**. It isn't `#101`; that's `DriverHintX(2, 0/1)` and harmless as a stub. **What I saw** (`main` `06c9f55`, every compute program precompiled with the same build, `XCL_PSO_WAIT_MS=50`): - The frames stop at 82–92 s in every run. Afterwards no submits, no GPU waits time out, and the PSO window title reads `0 running, 0 done`. - `XCL_THREAD_DUMP_AT=130,200`: one title thread sits in `bind::execute_indirect` → `dispatch_chain::whole` → `Chain::whole`, waiting for `build_whole` (`dispatch_chain.rs:47`). Meanwhile the driver compiles the whole form. - Those whole forms are the cold compute builds in the log: 765 KB–1.15 MB of DXIL, 35–90 s each, always `driver blob absent`, even after a full `--precompile --only cs --pipelines` (2,689 programs, 0 errors). Over a 600 s run there were about 12 of them, one after another. **Two things, as far as I can read it:** 1. `Chain::whole` builds on the caller's thread, under a lock, at the first indirect dispatch, so `XCL_PSO_WAIT_MS` doesn't cover it. Could it go to the PSO workers like the pieces do, with the indirect dispatch skipped (or the pieces used) until it's done? 2. It's built with `dispatch_chain_root_signature`, so it can't reuse the blob the precompile left for the same program. Could the precompile build the whole form too, the way `Chain::whole` does? I'm now testing `XCL_DIRECT_SPLIT_INSTRUCTIONS=0` on `50a9fde` with a full precompile, to confirm the title then goes on with the precompiled pipelines. RTX 4080 (610.88), i9-12900K, 64 GB. AI use: Claude Code (Claude Opus 5.5) ran this and wrote it.
Author
Owner

@⁠Kalmarv on GitHub · 2026-11-25 16:54 UTC · original

@⁠throny Yes to both, and your reading of the stack is right: Chain::whole builds on the title's thread, and XCL_PSO_WAIT_MS doesn't cover it.

  1. Whole form on the PSO workers. Branch chain-whole-async (9dd8715e, on main 08294413) does this. The whole form is built on the existing background path, with the same huge-build slots and driver-blob cache. When XCL_PSO_WAIT_MS is set, an ExecuteIndirect whose whole form isn't built yet is skipped, the same as the bind of an unsplit pipeline that isn't ready. With no budget set it waits, as main does for unsplit pipelines.
    • It isn't a PR yet. A 300 s run of it with XCL_PSO_WAIT_MS=50 crashed twice. One crash is the title-texture detile race (#751 / #484). The other is in the title's own code, after skipped dispatches. I'm comparing against main with the same budget before opening it.
    • The fix I'd rather have is the other half of your question, using the pieces. Branch chain-ei runs a split program's ExecuteIndirect as chained pieces: a small compute pass turns each indirect command into per-piece dispatch arguments. The whole form is then needed only when the scratch can't hold the grid. It is being built now and hasn't run on the title yet.
  2. Precompiling the whole form with dispatch_chain_root_signature: agreed, that's a gap. The precompile stores a blob under the program's own root signature, which Chain::whole can't use, and #2338 prebuilds only the pieces. Not started here.

AI use: Claude Code (Claude Opus 5.5) wrote this reply from our branch notes and run logs.

**@⁠Kalmarv** on GitHub · 2026-11-25 16:54 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7168711936) @⁠throny Yes to both, and your reading of the stack is right: `Chain::whole` builds on the title's thread, and `XCL_PSO_WAIT_MS` doesn't cover it. 1. **Whole form on the PSO workers.** Branch `chain-whole-async` (`9dd8715e`, on `main` `08294413`) does this. The whole form is built on the existing background path, with the same huge-build slots and driver-blob cache. When `XCL_PSO_WAIT_MS` is set, an ExecuteIndirect whose whole form isn't built yet is skipped, the same as the bind of an unsplit pipeline that isn't ready. With no budget set it waits, as `main` does for unsplit pipelines. - It isn't a PR yet. A 300 s run of it with `XCL_PSO_WAIT_MS=50` crashed twice. One crash is the title-texture detile race (#751 / #484). The other is in the title's own code, after skipped dispatches. I'm comparing against `main` with the same budget before opening it. - The fix I'd rather have is the other half of your question, using the pieces. Branch `chain-ei` runs a split program's ExecuteIndirect as chained pieces: a small compute pass turns each indirect command into per-piece dispatch arguments. The whole form is then needed only when the scratch can't hold the grid. It is being built now and hasn't run on the title yet. 2. **Precompiling the whole form** with `dispatch_chain_root_signature`: agreed, that's a gap. The precompile stores a blob under the program's own root signature, which `Chain::whole` can't use, and #2338 prebuilds only the pieces. Not started here. **AI use:** Claude Code (Claude Opus 5.5) wrote this reply from our branch notes and run logs.
Author
Owner

@⁠tiagonleal on GitHub · 2026-11-25 17:42 UTC · original

A data point on current main (082944135cd2b96288470a595861fa608eee08dc, which contains 06c9f55 with #2080/#2107/#2126 and #929), a second NVIDIA card. The world-load device removal does not happen here either, and the frames stop shortly after the first #101. During the stop the process is not idle: the NVIDIA driver is compiling compute pipelines almost all the time. But bounding the bind wait does not move the stop, so I cannot say the compiles are what the title waits for.

Setup: Newer Retail Game, RTX 5070 Ti 16 GB (driver 617.42, 32.0.16.1742), Ryzen 7 9800X3D, 32 GB, Windows 11 Pro 26300 (Developer Mode on), release. XCL_DIRECT_DXIL=1 XCL_PSO_PRELOAD=0, A pressed at 15-100 s, 300 s per run, my memory guard on (never fired). Same executable name and same compute cache in every run, so the driver cache gets warmer run by run. The compute cache was only partly filled (672 of ~1600 used programs; a full fill did not fit my time budget), so this is not the same set as the 897 precompiled pipelines in the earlier report.

run first ListX #101 last present submits after driver compiles after the stop compile in flight removed end
1 67.6 s 70 s 41 (until 110 s) 58, 223 s total 91 % no 300 s
2 63.5 s 66 s 0 45, 230 s 95 % no 300 s
3 62.3 s 64 s 6 85, 196 s 96 % no 300 s
4 48.1 s 64 s 0 90, 205 s 95 % no 300 s
5 63.7 s 64 s 47 (at 66 s) 138, 530 s 99 % no 600 s
  • 5 of 5 runs: no removal, no guard cut, no did not complete within line. After the stop there are no presents until the end (up to 600 s) and almost no submits.
  • During the stop a driver compile is in flight 91-99 % of the time, one after another (the longest stretch without one was 5 s). The slow ones are programs whose driver blob was absent (about 30 s each, up to 48 s); programs with a blob take 0.1 s. Each run still had 6-22 such programs, so the title kept finding new ones.
  • The first #101 is not always the trigger: in run 4 it came 16 s before the stop. The stop did not move later as the cache warmed (70, 66, 64, 64 s) although the programs without a blob went from 22 to 14, 9 and 10 per run.
  • Two things I tried do not move it, one run each unless noted: XCL_PSO_WAIT_MS=50 (stop at 66 s; 17 pipelines marked late, 4 ExecuteIndirect calls skipped, 0 skipped dispatches counted, no GPU hang) and =3000 (64 s); and #2118 merged onto this commit (2 runs: 66 s and 68 s; the compiles then run on 5 or more threads instead of 1, same total). In all of them a compile is in flight 99-100 % of the stopped time and there is no released on CPU line.
  • So what I can say for this card: the stop coincides with continuous driver compiles of programs that have no blob, but a title thread blocked in a bind on those compiles does not explain it, because the stop stays when the bind no longer waits. Whether the title waits for a label or signal, as the earlier report on 06c9f55 reads it, my runs neither show nor exclude; thread dumps at 150 s and 250 s are in my logs (addresses without symbols) if someone wants a specific frame checked.

Not tested: a complete compute cache, past 600 s, other drivers, AMD.

Run and written with Claude Code (Claude Fable 5.2 and Claude Sonnet 5.5).

**@⁠tiagonleal** on GitHub · 2026-11-25 17:42 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7169891659) A data point on current `main` (`082944135cd2b96288470a595861fa608eee08dc`, which contains `06c9f55` with #2080/#2107/#2126 and #929), a second NVIDIA card. **The world-load device removal does not happen here either, and the frames stop shortly after the first `#101`. During the stop the process is not idle: the NVIDIA driver is compiling compute pipelines almost all the time. But bounding the bind wait does not move the stop, so I cannot say the compiles are what the title waits for.** **Setup:** Newer Retail Game, RTX 5070 Ti 16 GB (driver 617.42, 32.0.16.1742), Ryzen 7 9800X3D, 32 GB, Windows 11 Pro 26300 (Developer Mode on), release. `XCL_DIRECT_DXIL=1 XCL_PSO_PRELOAD=0`, A pressed at 15-100 s, 300 s per run, my memory guard on (never fired). Same executable name and same compute cache in every run, so the driver cache gets warmer run by run. The compute cache was only partly filled (672 of ~1600 used programs; a full fill did not fit my time budget), so this is not the same set as the 897 precompiled pipelines in the earlier report. | run | first `ListX #101` | last present | submits after | driver compiles after the stop | compile in flight | removed | end | |---|---|---|---|---|---|---|---| | 1 | 67.6 s | 70 s | 41 (until 110 s) | 58, 223 s total | 91 % | no | 300 s | | 2 | 63.5 s | 66 s | 0 | 45, 230 s | 95 % | no | 300 s | | 3 | 62.3 s | 64 s | 6 | 85, 196 s | 96 % | no | 300 s | | 4 | 48.1 s | 64 s | 0 | 90, 205 s | 95 % | no | 300 s | | 5 | 63.7 s | 64 s | 47 (at 66 s) | 138, 530 s | 99 % | no | 600 s | - 5 of 5 runs: no removal, no guard cut, no `did not complete within` line. After the stop there are no presents until the end (up to 600 s) and almost no submits. - During the stop a driver compile is in flight 91-99 % of the time, one after another (the longest stretch without one was 5 s). The slow ones are programs whose driver blob was absent (about 30 s each, up to 48 s); programs with a blob take 0.1 s. Each run still had 6-22 such programs, so the title kept finding new ones. - The first `#101` is not always the trigger: in run 4 it came 16 s before the stop. The stop did not move later as the cache warmed (70, 66, 64, 64 s) although the programs without a blob went from 22 to 14, 9 and 10 per run. - Two things I tried do not move it, one run each unless noted: `XCL_PSO_WAIT_MS=50` (stop at 66 s; 17 pipelines marked late, 4 `ExecuteIndirect` calls skipped, 0 skipped dispatches counted, no GPU hang) and `=3000` (64 s); and #2118 merged onto this commit (2 runs: 66 s and 68 s; the compiles then run on 5 or more threads instead of 1, same total). In all of them a compile is in flight 99-100 % of the stopped time and there is no `released on CPU` line. - So what I can say for this card: the stop coincides with continuous driver compiles of programs that have no blob, but a title thread blocked in a bind on those compiles does not explain it, because the stop stays when the bind no longer waits. Whether the title waits for a label or signal, as the earlier report on `06c9f55` reads it, my runs neither show nor exclude; thread dumps at 150 s and 250 s are in my logs (addresses without symbols) if someone wants a specific frame checked. **Not tested:** a complete compute cache, past 600 s, other drivers, AMD. Run and written with Claude Code (Claude Fable 5.2 and Claude Sonnet 5.5).
Author
Owner

@⁠Rednaxeh on GitHub · 2026-11-25 17:52 UTC · original

RX 7800 XT 16 GB (RDNA3, driver 32.0.32029.2010), 32 GB RAM, Windows 11: with every compute pipeline precompiled under the same exe name, the world starts and runs for 69 s at 0–2 presents per 2 s (its opening scene: audio and subtitles, almost no picture), then DXGI_ERROR_DEVICE_HUNG at 146.5 s with local video memory at 17.8 GB on a 16.2 GB card. No split or producer-less wait in the 4 s before it, no compile in flight.

Build: main 568e7db + #2025 (f698c22) merged locally, release; XCL_DIRECT_DXIL=1 XCL_COMPACT_CS=auto XCL_COMPACT_NEST=64 XCL_HUGE_PSO_CONCURRENCY=3 XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PSO_TRACE=1, A at the start screen. Caches: xcl shaders shaders.rpf --precompile --only cs --pipelines on the same exe (2687 pipelines, 2 skipped where the AMD compiler crashed with 0xc0000005 in amdxc64.dll), then five 300 s warming runs (graphics pipelines from the blob cache: 95 → 233, each run asking for 17–28 new big ones). This was the 6th run, 600 s.

Timeline:

  • 77.0–78.0 s: the first compute burst (10 001 dispatches in 2 s; dispatches 2048 → 8192 in 74.8–77.0 s), the first 4 split command list … around mid-list Wait after Write64 and all 8 bridged waits of the run, 2 of them prod=qNone (77.217, 77.227).
  • 83–145 s: the world runs. Dispatches reach 65 536 at 117 s, draws 21 587; 0 skipped. Presents 0–2 per 2 s; from 124 s the work alternates every 2 s between a window with submits only and a burst of 3–10 k dispatches.
  • 119.4, 122.8, 127.1, 135.4, 140.6 s: Wait64BitValueX timed out after 2000 ms at 0x70417fe18 on the same title thread (op 7, queue_type 0, after_write64=false; want 0x5f2 … 0x5fb while the memory holds 2–19 behind), and at 119.5 s one Write64 Signal at 0x70417ff10 = 0x5f3 on q2/ty2 would close a GPU cycle (waiters=[q1]) – signalled on CPU.
  • 142.2 s: split #64 (the last non-routine line); 143.2 s: the last driver compile (85 ms; the only build over 5 s after 60 s was one 389 KB graphics PSO at 96.6 s, 6.7 s on a title thread). Nothing logged from 144.8 to 146.47 s.
  • 146.469 s: D3D12 device removed: 0x887a0006; the title's Breakpad ends the process with 0x80000003 at 147.43 s (memory load 95 %). AMD's own driver-timeout report dialog came up; the desktop stayed up, no reboot needed.

Memory: commit 33.9 GB at 101 s → 35.0 GB peak at 142.8 s; local video memory 17.4 → 17.8 GB from 101 s on (the card has 16 176 MiB), non-local 4.8 → 5.1 GB.

Compared with @⁠DTsordas's RX 9060 XT runs (removal 0.7–0.9 s after the fan-out, a prod=qNone wait or a split within 1 s): here the world survived the fan-out and its producer-less waits by 69 s, and the removal came after five 2 s wait timeouts on one fence cell and with the video memory over the card's size. Full log and report.json kept; I can post extracts or run an A/B (e.g. a smaller video-memory footprint, or TdrDelay) on request.

AI use: Claude Code (Claude Fable 5.1 and Claude Opus 5.5) read the log and wrote this; the runs were mine.

**@⁠Rednaxeh** on GitHub · 2026-11-25 17:52 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7170118334) **RX 7800 XT 16 GB (RDNA3, driver 32.0.32029.2010), 32 GB RAM, Windows 11: with every compute pipeline precompiled under the same exe name, the world starts and runs for 69 s at 0–2 presents per 2 s (its opening scene: audio and subtitles, almost no picture), then `DXGI_ERROR_DEVICE_HUNG` at 146.5 s with local video memory at 17.8 GB on a 16.2 GB card. No split or producer-less wait in the 4 s before it, no compile in flight.** Build: `main` 568e7db + #2025 (f698c22) merged locally, release; `XCL_DIRECT_DXIL=1 XCL_COMPACT_CS=auto XCL_COMPACT_NEST=64 XCL_HUGE_PSO_CONCURRENCY=3 XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PSO_TRACE=1`, A at the start screen. Caches: `xcl shaders shaders.rpf --precompile --only cs --pipelines` on the same exe (2687 pipelines, 2 skipped where the AMD compiler crashed with 0xc0000005 in `amdxc64.dll`), then five 300 s warming runs (graphics pipelines from the blob cache: 95 → 233, each run asking for 17–28 new big ones). This was the 6th run, 600 s. Timeline: - 77.0–78.0 s: the first compute burst (10 001 dispatches in 2 s; dispatches 2048 → 8192 in 74.8–77.0 s), the first 4 `split command list … around mid-list Wait after Write64` and all 8 `bridged` waits of the run, 2 of them `prod=qNone` (77.217, 77.227). - 83–145 s: the world runs. Dispatches reach 65 536 at 117 s, draws 21 587; 0 skipped. Presents 0–2 per 2 s; from 124 s the work alternates every 2 s between a window with submits only and a burst of 3–10 k dispatches. - 119.4, 122.8, 127.1, 135.4, 140.6 s: `Wait64BitValueX timed out after 2000 ms at 0x70417fe18` on the same title thread (op 7, queue_type 0, after_write64=false; want 0x5f2 … 0x5fb while the memory holds 2–19 behind), and at 119.5 s one `Write64 Signal at 0x70417ff10 = 0x5f3 on q2/ty2 would close a GPU cycle (waiters=[q1]) – signalled on CPU`. - 142.2 s: split #64 (the last non-routine line); 143.2 s: the last driver compile (85 ms; the only build over 5 s after 60 s was one 389 KB graphics PSO at 96.6 s, 6.7 s on a title thread). Nothing logged from 144.8 to 146.47 s. - 146.469 s: `D3D12 device removed: 0x887a0006`; the title's Breakpad ends the process with 0x80000003 at 147.43 s (memory load 95 %). AMD's own driver-timeout report dialog came up; the desktop stayed up, no reboot needed. Memory: commit 33.9 GB at 101 s → 35.0 GB peak at 142.8 s; **local video memory 17.4 → 17.8 GB** from 101 s on (the card has 16 176 MiB), non-local 4.8 → 5.1 GB. Compared with @⁠DTsordas's RX 9060 XT runs (removal 0.7–0.9 s after the fan-out, a `prod=qNone` wait or a split within 1 s): here the world survived the fan-out and its producer-less waits by 69 s, and the removal came after five 2 s wait timeouts on one fence cell and with the video memory over the card's size. Full log and `report.json` kept; I can post extracts or run an A/B (e.g. a smaller video-memory footprint, or `TdrDelay`) on request. AI use: Claude Code (Claude Fable 5.1 and Claude Opus 5.5) read the log and wrote this; the runs were mine.
Author
Owner

@⁠Kalmarv on GitHub · 2026-11-25 18:13 UTC · original

RTX 5070 Ti: past the loading screen to the intro cutscene, with #2404 + #2097 on main 68a284a5

title: ea3b5e4d, Ryzen 9 9950X, RTX 5070 Ti (NVIDIA 610.74). One 600 s run of a local build of main 68a284a5 (which has #1291's UAV-clear fix) with two of our open PRs on top:

  • #2404: an ExecuteIndirect of a split program runs its pieces, so Chain::whole no longer compiles on the title's thread.
  • #2097: multi-wave wave64 programs split too, including the two cascade-shadow programs 062468c0 (17 pieces) and 73fb752d (19 pieces).

Settings: XCL_DIRECT_DXIL=all, DXC 1.9.2609; private XCL cache, driver cache as left by earlier runs.

What happened:

  • Loading art until ~62 s.
  • Intro cutscene from ~90 s: it presents its letterboxed opening title card at 91 s, then a flat grey letterboxed frame to 151 s with no scene geometry visible.
  • Frames: after 62 s the title keeps presenting, slowly: 9–46 presents per 2 s to 76 s, then 1–2 per 2 s with 500–1,100 draws and 3,000–10,000 dispatches per 2 s (0.0–0.7 FPS).
  • Split counter at 150 s: 284 programs split, 2,324 pieces; ExecuteIndirect 12,036 chained (9 of them whole, 17 slabs lost), 181 whole. One warning at 100.9 s: an ExecuteIndirect needed 17 slabs for 2 rounds, 15 lost.
  • Device removed at 153.7 s:
    • 0x887a0005, with no driver TDR event. DRED says only "page fault at GPU VA 0x0", with no breadcrumbs.
    • XCL noticed when CreatePlacedResource failed, and the title's crash report says 92 % memory load.
    • It may be the 512 MB shader-code heap of #2403, or memory. Not known yet; we're reading the dump now.

Same build without one of the PRs, same settings:

  • main 68a284a5 alone (300 s): black from ~71 s. Both title threads build unsplit compute on the title thread, 062468c0 alone for 130 s+, unfinished at 300 s.
  • main + #2404 only (600 s): no whole compiles on title threads any more (1,303 ExecuteIndirects chained, 0 whole until 499 s). It is still black until ~508 s, behind the serial worker builds of 062468c0 (216 s) and 73fb752d (211 s).

Not tested: a second run, other cards, AMD. Speed is far from playable. The cutscene's scene doesn't render yet.

AI use: Claude Code (Claude Opus 5.5) ran the builds and runs, read the logs and screenshots, and wrote this comment.

**@⁠Kalmarv** on GitHub · 2026-11-25 18:13 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7170618994) ### RTX 5070 Ti: past the loading screen to the intro cutscene, with #2404 + #2097 on `main` `68a284a5` title: ea3b5e4d, Ryzen 9 9950X, RTX 5070 Ti (NVIDIA 610.74). One 600 s run of a local build of `main` `68a284a5` (which has #1291's UAV-clear fix) with two of our open PRs on top: - **#2404:** an ExecuteIndirect of a split program runs its pieces, so `Chain::whole` no longer compiles on the title's thread. - **#2097:** multi-wave wave64 programs split too, including the two cascade-shadow programs `062468c0` (17 pieces) and `73fb752d` (19 pieces). Settings: `XCL_DIRECT_DXIL=all`, DXC 1.9.2609; private XCL cache, driver cache as left by earlier runs. **What happened:** - **Loading art** until ~62 s. - **Intro cutscene** from ~90 s: it presents its letterboxed opening title card at 91 s, then a flat grey letterboxed frame to 151 s with no scene geometry visible. - **Frames:** after 62 s the title keeps presenting, slowly: 9–46 presents per 2 s to 76 s, then 1–2 per 2 s with 500–1,100 draws and 3,000–10,000 dispatches per 2 s (0.0–0.7 FPS). - **Split counter at 150 s:** 284 programs split, 2,324 pieces; ExecuteIndirect 12,036 chained (9 of them whole, 17 slabs lost), 181 whole. One warning at 100.9 s: an ExecuteIndirect needed 17 slabs for 2 rounds, 15 lost. - **Device removed at 153.7 s:** - `0x887a0005`, with no driver TDR event. DRED says only "page fault at GPU VA 0x0", with no breadcrumbs. - XCL noticed when `CreatePlacedResource` failed, and the title's crash report says 92 % memory load. - It may be the 512 MB shader-code heap of #2403, or memory. Not known yet; we're reading the dump now. **Same build without one of the PRs, same settings:** - `main` `68a284a5` alone (300 s): black from ~71 s. Both title threads build unsplit compute on the title thread, `062468c0` alone for 130 s+, unfinished at 300 s. - `main` + #2404 only (600 s): no whole compiles on title threads any more (1,303 ExecuteIndirects chained, 0 whole until 499 s). It is still black until ~508 s, behind the serial worker builds of `062468c0` (216 s) and `73fb752d` (211 s). **Not tested:** a second run, other cards, AMD. Speed is far from playable. The cutscene's scene doesn't render yet. **AI use:** Claude Code (Claude Opus 5.5) ran the builds and runs, read the logs and screenshots, and wrote this comment.
Author
Owner

@⁠b3IKK on GitHub · 2026-11-25 18:14 UTC · original

The default-wait stall at ~100 s on this title is a GPU-side wait, not a compute compile. From 0829441 with a warm cache and the default XCL_PSO_WAIT_MS (600 s run):

  • only 2 cold compute compiles in the whole run, at 351.5 s and 540.6 s — nothing near the 100 s stop;
  • submits stop at 102 s; the last activity is 100s P=12 S=132 D=138 X=7342, then 102s P=0 S=6 ...;
  • at 107.266–107.280 s five Wait64BitValueX >= 0x817 on q0/q1 are bridged to GPU queue.Wait with prod=qNone/tySome(0); wait-before-signal, after_write64=false;
  • immediately before, at 100.001 s: split command list (type 2) around mid-list Wait after Write64 (#1);
  • no did not complete within ... – released on CPU watchdog line appears anywhere in the 600 s log (0 matches), and no present follows; the process still exits cleanly at 600 s when XCL_RUN_SECONDS ends it.

With XCL_PSO_WAIT_MS=50 on the same tree/cache the title presents to 200 s and reaches the world (player at <1831, 140, 2.8>, camera, 845 streaming requests in the crash log), then crashes at +0x4e8b4be — see my previous comment. So the wait budget is what gets the title past this point.

The shape points at the Write64 → Wait64 bridge: the wait has no producer (prod=None), the write is expected later, and the wait's watchdog does not appear to arm for that case, so q0/q1 stop and the title's threads block. A write after a mid-list wait split is the common context. If the maintainers agree, the next step is to extend the existing queue.Wait watchdog to prod=None wait-before-signal waits (or track the deferred write across the split) and then re-run this title: it should either present past 200 s with the default wait or show the next real blocker.

AI use: OpenCode, Claude Fable 5.2 ran the 600 s default-wait and wait-budget runs on this machine, parsed the logs and wrote this.

**@⁠b3IKK** on GitHub · 2026-11-25 18:14 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7170640681) The default-wait stall at ~100 s on this title is a **GPU-side wait**, not a compute compile. From `0829441` with a warm cache and the default `XCL_PSO_WAIT_MS` (600 s run): - only **2** cold compute compiles in the whole run, at 351.5 s and 540.6 s — nothing near the 100 s stop; - submits stop at 102 s; the last activity is `100s P=12 S=132 D=138 X=7342`, then `102s P=0 S=6 ...`; - at **107.266–107.280 s** five `Wait64BitValueX >= 0x817` on q0/q1 are bridged to GPU `queue.Wait` with `prod=qNone/tySome(0); wait-before-signal, after_write64=false`; - immediately before, at 100.001 s: `split command list (type 2) around mid-list Wait after Write64 (#1)`; - **no** `did not complete within ... – released on CPU` watchdog line appears anywhere in the 600 s log (0 matches), and no present follows; the process still exits cleanly at 600 s when `XCL_RUN_SECONDS` ends it. With `XCL_PSO_WAIT_MS=50` on the same tree/cache the title presents to **200 s** and reaches the world (player at `<1831, 140, 2.8>`, camera, 845 streaming requests in the crash log), then crashes at `+0x4e8b4be` — see my previous comment. So the wait budget is what gets the title past this point. The shape points at the Write64 → Wait64 bridge: the wait has no producer (`prod=None`), the write is expected later, and the wait's watchdog does not appear to arm for that case, so q0/q1 stop and the title's threads block. A write after a mid-list wait split is the common context. If the maintainers agree, the next step is to extend the existing `queue.Wait` watchdog to `prod=None` wait-before-signal waits (or track the deferred write across the split) and then re-run this title: it should either present past 200 s with the default wait or show the next real blocker. AI use: OpenCode, Claude Fable 5.2 ran the 600 s default-wait and wait-budget runs on this machine, parsed the logs and wrote this.
Author
Owner

@⁠schoperena on GitHub · 2026-11-25 18:28 UTC · original

RTX 5060 Ti 16 GB / 32 GB RAM: the #2057 tree reaches the prologue (audio, subtitles and the opening credits drawn), and one run stayed up for 938 s in it without a device removal. The 3D scene behind the credits is still noise, then flat grey. Follow-up to my table above; same machine (driver 621.24, Ryzen 7 5800X, 32 GB + page file).

Tree: #2057 at 4df1e6e + #1914, #2065, #2160, #2163, #2270, then:

  • #640 + #782 (page budget, ported onto this tree's TilePool; evicted pages go through #2270's held unmaps so nothing is unmapped under in-flight work), #1248, #1182, #1515;
  • #1803 and #1795 (with the STATE / SCRATCH lock-order fix @⁠MacieGx described: allocator_reset drops spare buffers after releasing the lock, scratch() creates buffers outside it);
  • a local port of my xcl pipelines --only graphics --used-only precompile (graphics driver blobs under the runtime's key).

Env: XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512 XCL_LOOK_SKIP=1 XCL_WATCH_HOT=0 XCL_PAGE_BUDGET_MB=2048 XCL_PSO_WAIT_MS=50 XCL_HUGE_PSO_CONCURRENCY=4 XCL_SKIP_BINK=1 XCL_DRED=1. 2,689 compute pipelines precompiled (3 processes, ~3.5 h), graphics pipelines the title used (379, then ~630) precompiled between runs.

step what changed result
a #2057 as published (sparse:16, UMA shadow) world at 63 s, then local video memory 15.9 / 16.3 GB, no presents, GPU idle; no removal
b a without XCL_UMA_SHADOW the same
c + page budget presents to 127 s, then 0x887a0006 with DRED lists half done; target pages 7 GB plus 6 GB of sparse:16 pools
d c with XCL_COHERENT_HEAPS=0 local memory 11.8 GB, no removal; stopped behind graphics pipelines built on the title's thread
e + graphics precompile, XCL_PSO_WAIT_MS=50 prologue: audio, subtitles and credits; scene behind them green/blue noise; 2–5 presents per 2 s; 0x887a0005 / DRED VA 0 at 644 s
f e + #1803 + #1795 scene flat grey (your "empty G-buffer" stage); 5,500 draws and 28,600 dispatches per 2 s; up at 938 s when I stopped it, local memory 15.7 GB over a 15.1 GB budget
g f + #1291, XCL_PAGE_BUDGET_MB=1024 subtitles run further; still grey; up to 32,300 dispatches per 2 s; up at 312 s when I stopped it for a rebuild, local memory 16.3 GB over a 15.1 GB budget (target pages 8.7 GB)

What I read from it

  • On 16 GB the page budget and dropping sparse:16 (6 GB of local memory here) are what let the world load finish. XCL_UMA_SHADOW made no difference.
  • #1803 changed the picture from noise to grey and roughly tripled the work per frame, as you described.
  • The budget is soft: target pages reach 7–8.7 GB with a 2 GB or a 1 GB cap, because the evicted textures come back. #1663 / #800 are my next try for that.

@⁠MacieGx, a request: the step that took you from grey to a real scene, the world geometry in the title's 24 GB GPU view mapped as extra windows (your point 1), isn't in a PR yet as far as I can see. If you can push it, even as a draft branch, I can test it on this 16 GB Blackwell card right away. #2229 and #1975 are next on my side, on a new cache.

AI use: Claude Code (Claude Opus 5.5) built the trees, ran the title on the machine above, read the logs and drafted this; I reviewed it.

**@⁠schoperena** on GitHub · 2026-11-25 18:28 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7170961281) **RTX 5060 Ti 16 GB / 32 GB RAM: the #2057 tree reaches the prologue (audio, subtitles and the opening credits drawn), and one run stayed up for 938 s in it without a device removal. The 3D scene behind the credits is still noise, then flat grey.** Follow-up to my table above; same machine (driver 621.24, Ryzen 7 5800X, 32 GB + page file). **Tree:** #2057 at `4df1e6e` + #1914, #2065, #2160, #2163, #2270, then: - #640 + #782 (page budget, ported onto this tree's `TilePool`; evicted pages go through #2270's held unmaps so nothing is unmapped under in-flight work), #1248, #1182, #1515; - #1803 and #1795 (with the STATE / SCRATCH lock-order fix @⁠MacieGx described: `allocator_reset` drops spare buffers after releasing the lock, `scratch()` creates buffers outside it); - a local port of my `xcl pipelines --only graphics --used-only` precompile (graphics driver blobs under the runtime's key). **Env:** `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512 XCL_LOOK_SKIP=1 XCL_WATCH_HOT=0 XCL_PAGE_BUDGET_MB=2048 XCL_PSO_WAIT_MS=50 XCL_HUGE_PSO_CONCURRENCY=4 XCL_SKIP_BINK=1 XCL_DRED=1`. 2,689 compute pipelines precompiled (3 processes, ~3.5 h), graphics pipelines the title used (379, then ~630) precompiled between runs. | step | what changed | result | |---|---|---| | a | #2057 as published (`sparse:16`, UMA shadow) | world at 63 s, then local video memory 15.9 / 16.3 GB, no presents, GPU idle; no removal | | b | a without `XCL_UMA_SHADOW` | the same | | c | + page budget | presents to 127 s, then `0x887a0006` with DRED lists half done; target pages 7 GB **plus 6 GB of `sparse:16` pools** | | d | c with `XCL_COHERENT_HEAPS=0` | local memory 11.8 GB, no removal; stopped behind graphics pipelines built on the title's thread | | e | + graphics precompile, `XCL_PSO_WAIT_MS=50` | **prologue**: audio, subtitles and credits; scene behind them green/blue noise; 2–5 presents per 2 s; `0x887a0005` / DRED VA 0 at **644 s** | | f | e + #1803 + #1795 | scene flat grey (your "empty G-buffer" stage); 5,500 draws and 28,600 dispatches per 2 s; **up at 938 s** when I stopped it, local memory 15.7 GB over a 15.1 GB budget | | g | f + #1291, `XCL_PAGE_BUDGET_MB=1024` | subtitles run further; still grey; up to 32,300 dispatches per 2 s; up at 312 s when I stopped it for a rebuild, local memory 16.3 GB over a 15.1 GB budget (target pages 8.7 GB) | **What I read from it** - On 16 GB the page budget and dropping `sparse:16` (6 GB of local memory here) are what let the world load finish. `XCL_UMA_SHADOW` made no difference. - #1803 changed the picture from noise to grey and roughly tripled the work per frame, as you described. - The budget is soft: target pages reach 7–8.7 GB with a 2 GB or a 1 GB cap, because the evicted textures come back. #1663 / #800 are my next try for that. **@⁠MacieGx, a request:** the step that took you from grey to a real scene, the world geometry in the title's 24 GB GPU view mapped as extra windows (your point 1), isn't in a PR yet as far as I can see. If you can push it, even as a draft branch, I can test it on this 16 GB Blackwell card right away. #2229 and #1975 are next on my side, on a new cache. **AI use:** Claude Code (Claude Opus 5.5) built the trees, ran the title on the machine above, read the logs and drafted this; I reviewed it.
Author
Owner

@⁠lucsoft on GitHub · 2026-11-25 18:26 UTC · original · edited 2026-11-25 18:29 UTC

Linux / RDNA3: on a stack rebased onto main 50a9fde, two runs in a row get past the old stall with no device removal. The second, with a warm cache, plays the intro, shows the prologue title card and hands control to the player. The "L Move / R Move camera" prompt appears. The scene behind is grey: world geometry is there as flat silhouettes, with no materials or lighting. Before the rebase, three warm runs of the same stack all ended 40–115 s into world work.

Setup:

  • RX 7800 XT (RDNA3), Mesa 26.3.1 RADV, kernel 7.3.5, Wine 11.21 Staging, vkd3d-proton 3.1 (relaxed).
  • XCL main 50a9fde plus these PRs at their current heads:
  • Env: XCL_HEAP_WINDOWS=1 XCL_COHERENT_MB=1024 XCL_COHERENT_HEAPS=sparse:1024 XCL_SPARSE_WAIT_MS=100 XCL_GPU_WAIT_TIMEOUT_MS=5000 XCL_GPU_CULPRIT=1 XCL_SHORT_MOVIES=1. Texture page pools are in system memory (a local switch), which keeps VRAM at 8–13 GB.
run 1 (cold cache) run 2 (warm cache)
first #101 410 s 281 s
world work starts (16 384 dispatches) ~1980 s, held back by pipeline builds 288 s
how far 524 288 dispatches, 158 528 draws 2 097 152 dispatches and 442 187 draws by 2299 s, still running at 2384 s
GPU-wait timeouts / marker stalls 0 / 0 0 / 0
on screen opening credits over a grey scene intro credits, a fade to white and back, a fade to black, then the PROLOGUE card (subtitle "PROLOG", the title's language is German), then the movement prompt ("Bewegen / Kamera bewegen") over the grey scene
end title assert, INSTANCE_LIST 45000/45000 (below) –

What is on screen: the 2D layers render correctly (credits and the prologue card). The 3D scene is a flat grey with a faint vertical blue gradient. Measured on a screenshot, the scene's shapes differ from the sky only in hue:

  • the "sky" is about (49, 52, 57);
  • the shapes are a neutral (52, 52, 53), no texture, no shading.

Stretched, they are a shoreline: a horizon over the whole width, tree crowns above it and a flat area below. Screenshots attached: the original and the stretched one. This fits @⁠MacieGx's empty G-buffer. The log has 40 mesh pipeline with its MS … in the AS slot – refused, so the world's mesh-shader geometry isn't drawn at all. That is what #541 and #2092 address; both conflict with main right now.

Both runs used XCL_SHORT_MOVIES=1, so the intro's Bink videos jumped to their last frame. Among them were one of 5 626 frames (about 3 minutes, requested twice) and one of 1 060. Not all of the intro was on screen.

Performance: 0.7–1.3 fps, down to ~0.3 fps after the prologue card. The GPU was 9 % busy and the CPU 87 % idle. Two threads at ~45 % (the title's submit thread and a vkd3d_queue) carry each frame serially. The sparse write-watch scan alone took 155 s over run 1. RAM was at 31 of 31 GB plus 10–13 GB of zram.

How run 1 ended: int3 at game_scarlett_master.exe+0x5149aec in four threads at once. There was no device removal and no amdgpu event. The title's own crash log (temp\game_scarlett_master-*.crash.log) gives:

Game Running Time: 0h:45m:50s   Game State: Game Running   Frame: 1471
Current SRL Name: fbk_stry000_FBK_STRY000_INTRO   State: Prestream
Peds: 31/600 (mission 28)   Player Health: 130.00/130.00
BUILDING: 21404/22500   INSTANCE_LIST: 45000/45000   GRASS_INSTANCE_LIST: 5861/9000
Game Physical: 2210910464/2305818624   Pool: 591978352/624951280

Across the 30 crash logs this title wrote on this machine since yesterday, INSTANCE_LIST stood at 18 000–43 000 and grew with how far each run got. The highest I found reported here is 17 239. My guess, not verified: at ~1 fps with nothing shaded, whatever normally frees instances doesn't keep up.

Correction to my earlier comments: I named small meshlet_culling dispatches as the stuck work. They are victims. I took wave dumps with umr (upstream main) during the stall of an earlier run (same stack, before the rebase):

  • Every resident wave on the GPU stood at s_waitcnt vmcnt(0) with VM_CNT=1, waiting on a vector memory load that never came back. That was 61 waves in three different shaders, on compute and graphics. One of them was a buffer_load_b32 … glc.
  • The state was identical 26 s later.
  • GRBM_STATUS: SPI and TCP busy, TA idle.
  • No VM fault was latched during the stall, and all TLB invalidations for the title's VMID were acked.

So on RDNA3 it was the GPU's memory path standing still, not one shader looping. Whatever was in flight got named.

Which PR of the new ones (#2345, #2270, #1215, #455, #1819) or which change on main moved this, I haven't isolated. Before the rebase the same stack had #1215, #455, #1819 and a port of #2270 and still stalled, which points at #2345 or at main. That's a guess until I run without them.

AI use: Claude Code (Claude Opus 5.5) rebuilt the stack, ran the diagnostics and drafted this. The runs were real, on the hardware above.

image image
**@⁠lucsoft** on GitHub · 2026-11-25 18:26 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7170904791) · edited 2026-11-25 18:29 UTC **Linux / RDNA3: on a stack rebased onto `main` `50a9fde`, two runs in a row get past the old stall with no device removal. The second, with a warm cache, plays the intro, shows the prologue title card and hands control to the player.** The "L Move / R Move camera" prompt appears. The scene behind is grey: world geometry is there as flat silhouettes, with no materials or lighting. Before the rebase, three warm runs of the same stack all ended 40–115 s into world work. **Setup:** - RX 7800 XT (RDNA3), Mesa 26.3.1 RADV, kernel 7.3.5, Wine 11.21 Staging, vkd3d-proton 3.1 (relaxed). - XCL `main` `50a9fde` plus these PRs at their current heads: - #871 (memory commit), #684, #688, #1398, #1044, #1385, #1580; - #2009 with #1993 (`69903fc`); - #1428, #751, #2205, #1847, #2224, #681, #1835, #2237, #1244, #1215, #455; - #1819 (in place of #562); - #794, #2270, #2345; - local hang diagnostics, env-gated or logging only. - Env: `XCL_HEAP_WINDOWS=1 XCL_COHERENT_MB=1024 XCL_COHERENT_HEAPS=sparse:1024 XCL_SPARSE_WAIT_MS=100 XCL_GPU_WAIT_TIMEOUT_MS=5000 XCL_GPU_CULPRIT=1 XCL_SHORT_MOVIES=1`. Texture page pools are in system memory (a local switch), which keeps VRAM at 8–13 GB. | | run 1 (cold cache) | run 2 (warm cache) | |---|---|---| | first `#101` | 410 s | 281 s | | world work starts (16 384 dispatches) | ~1980 s, held back by pipeline builds | 288 s | | how far | 524 288 dispatches, 158 528 draws | 2 097 152 dispatches and 442 187 draws by 2299 s, still running at 2384 s | | GPU-wait timeouts / marker stalls | 0 / 0 | 0 / 0 | | on screen | opening credits over a grey scene | intro credits, a fade to white and back, a fade to black, then the **PROLOGUE** card (subtitle "PROLOG", the title's language is German), then the movement prompt ("Bewegen / Kamera bewegen") over the grey scene | | end | title assert, `INSTANCE_LIST` 45000/45000 (below) | – | **What is on screen:** the 2D layers render correctly (credits and the prologue card). The 3D scene is a flat grey with a faint vertical blue gradient. Measured on a screenshot, the scene's shapes differ from the sky only in hue: - the "sky" is about (49, 52, 57); - the shapes are a neutral (52, 52, 53), no texture, no shading. Stretched, they are a shoreline: a horizon over the whole width, tree crowns above it and a flat area below. Screenshots attached: the original and the stretched one. This fits @⁠MacieGx's empty G-buffer. The log has 40 `mesh pipeline with its MS … in the AS slot – refused`, so the world's mesh-shader geometry isn't drawn at all. That is what #541 and #2092 address; both conflict with `main` right now. Both runs used `XCL_SHORT_MOVIES=1`, so the intro's Bink videos jumped to their last frame. Among them were one of 5 626 frames (about 3 minutes, requested twice) and one of 1 060. Not all of the intro was on screen. **Performance:** 0.7–1.3 fps, down to ~0.3 fps after the prologue card. The GPU was 9 % busy and the CPU 87 % idle. Two threads at ~45 % (the title's submit thread and a `vkd3d_queue`) carry each frame serially. The sparse write-watch scan alone took 155 s over run 1. RAM was at 31 of 31 GB plus 10–13 GB of zram. **How run 1 ended:** `int3` at `game_scarlett_master.exe+0x5149aec` in four threads at once. There was no device removal and no amdgpu event. The title's own crash log (`temp\game_scarlett_master-*.crash.log`) gives: ``` Game Running Time: 0h:45m:50s Game State: Game Running Frame: 1471 Current SRL Name: fbk_stry000_FBK_STRY000_INTRO State: Prestream Peds: 31/600 (mission 28) Player Health: 130.00/130.00 BUILDING: 21404/22500 INSTANCE_LIST: 45000/45000 GRASS_INSTANCE_LIST: 5861/9000 Game Physical: 2210910464/2305818624 Pool: 591978352/624951280 ``` Across the 30 crash logs this title wrote on this machine since yesterday, `INSTANCE_LIST` stood at 18 000–43 000 and grew with how far each run got. The highest I found reported here is 17 239. My guess, not verified: at ~1 fps with nothing shaded, whatever normally frees instances doesn't keep up. **Correction to my earlier comments:** I named small `meshlet_culling` dispatches as the stuck work. They are victims. I took wave dumps with `umr` (upstream `main`) during the stall of an earlier run (same stack, before the rebase): - **Every resident wave on the GPU** stood at `s_waitcnt vmcnt(0)` with `VM_CNT=1`, waiting on a vector memory load that never came back. That was 61 waves in three different shaders, on compute and graphics. One of them was a `buffer_load_b32 … glc`. - The state was identical 26 s later. - `GRBM_STATUS`: SPI and TCP busy, TA idle. - No VM fault was latched during the stall, and all TLB invalidations for the title's VMID were acked. So on RDNA3 it was the GPU's memory path standing still, not one shader looping. Whatever was in flight got named. Which PR of the new ones (#2345, #2270, #1215, #455, #1819) or which change on `main` moved this, I haven't isolated. Before the rebase the same stack had #1215, #455, #1819 and a port of #2270 and still stalled, which points at #2345 or at `main`. That's a guess until I run without them. AI use: Claude Code (Claude Opus 5.5) rebuilt the stack, ran the diagnostics and drafted this. The runs were real, on the hardware above. <img width="1277" height="1442" alt="image" src="https://github.com/user-attachments/assets/abe5f616-cf56-4e3b-8f5d-476f56db8473" /> <img width="1066" height="601" alt="image" src="https://github.com/user-attachments/assets/c1000576-a251-483d-a547-fb0fe1fdaa3c" />
Author
Owner

@⁠Raul-Paiva on GitHub · 2026-11-25 17:50 UTC · original · edited 2026-11-25 18:40 UTC

From an 8 GB, 32-lane NVIDIA laptop card, with XCL_DIRECT_DXIL=1. The removal after the first ListX #101 happened on main 0829441. On main 68a284a it is postponed, not gone. The title stalls behind driver compiles, as @⁠throny, @⁠HQasper and others describe. When the compiles finally end, the title resumes, and the device is removed about a second later. Counts only.

Edit: the first version of this comment said "no removal" on 68a284a. That was true only for a 900 s run that never left the compiles. A 2 400 s run (the last column) reached the end of them.

Setup:

  • RTX 3070 Laptop 8 GB (32-lane waves), driver 32.0.16.2124; i7-11800H, 32 GB RAM; Windows 10 19045; release.
  • Each tree is main + #684 (e56dbc3). #684 is there because without it the CPU crashes in xg::copy_from here.
  • All 2 689 compute pipelines precompiled per tree (--precompile --only cs --pipelines), 0 refused.
  • Run settings: XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_WATCH_HOT=0 XCL_DRED=1, A pressed every 5 s, 900 s (and one 2 400 s run).
main 0829441 main 68a284a 68a284a, 2 400 s run
first #101 108.5 s 280.6 s 99.1 s
last frame 112 s 289.7 s 122.2 s
device removed 117.3 s (0x887a0006, then the title assert others report) none in 900 s (still compiling at the end) 2 103.1 s (0x887a0005, then the same title assert)
local video memory at the end 13 987 MB 14 018 MB ~14 400 MB
  • On 0829441:
    • from 115.0 s, pipeline creation returned 0x887a0005;
    • DRED had one partly executed compute list (38 of 142 operations);
    • there were no prod=qNone GPU waits.
  • On 68a284a, after the stop:
    • the title submits nothing more;
    • one thread builds large compute pipelines in the driver one after another: 110 builds from 290 s to the end, summing ~630 s, the longest 52 s;
    • 30 of them had no driver blob from the precompile;
    • the split log shows 49 chained dispatches in 57 slabs, with up to 260 MiB of scratch.
  • The 2 400 s run on 68a284a started with the driver cache of the 900 s run:
    • from 122 s it built 191 pipelines in the driver, one at a time: 153 compute up to ~2 025 s (11 – 17 s each), then 38 graphics (3 – 8 s each); 164 of them had no driver blob;
    • no presents and no submits during all of that;
    • the last build finished at 2 101.6 s, and the title then recorded 25 draws, 7 dispatches and one mid-list wait split;
    • at 2 103.1 s the device was removed. Windows logged no display-driver timeout (event 4101) for it.
  • Which of the merges between 0829441 and 68a284a moves the removal behind the compiles, I have not bisected. Between the two trees are #1291, #495, #2306, #1405, #2346, #2074, #2076 and #2319.
  • Local video memory is still ~14 GB on this 8 GB card, so the stall is reached while it is oversubscribed.
  • Compared with @⁠tiagonleal's report above: their RTX 5070 Ti 16 GB had no removal already on 0829441, and this 8 GB card did. The stall after it looks the same on both: continuous driver compiles of programs without a blob, ~30–50 s each.

Tests on 68a284a + #684: cargo test --workspace --no-fail-fast -- --test-threads=4: 1291 passed, 2 failed, 46 ignored, 25 SKIPPED (no wave64 on this card, and the f16 forms).

  • a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier also fails in main's own CI.
  • list_x::tests::a_reset_while_the_last_submit_runs_records_on_another_pc_list passes when run alone.

Not tested: main after 68a284a (#2275, #2342, #2345, #2296 and the rest merged since); #2404 + #2097; a bisect of the merges above; more than one run per tree; XCL_UMA_SHADOW; the HLSL path; AMD.

AI use: Claude Code (Claude Opus 5.5) built the trees, ran the tests, the precompiles and the runs, read the logs, and wrote this comment.

**@⁠Raul-Paiva** on GitHub · 2026-11-25 17:50 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7170085617) · edited 2026-11-25 18:40 UTC From an 8 GB, 32-lane NVIDIA laptop card, with `XCL_DIRECT_DXIL=1`. The removal after the first `ListX #101` happened on `main` `0829441`. On `main` `68a284a` it is **postponed, not gone**. The title stalls behind driver compiles, as @⁠throny, @⁠HQasper and others describe. When the compiles finally end, the title resumes, and the device is removed about a second later. Counts only. **Edit:** the first version of this comment said "no removal" on `68a284a`. That was true only for a 900 s run that never left the compiles. A 2 400 s run (the last column) reached the end of them. **Setup:** - RTX 3070 Laptop 8 GB (32-lane waves), driver 32.0.16.2124; i7-11800H, 32 GB RAM; Windows 10 19045; release. - Each tree is `main` + #684 (`e56dbc3`). #684 is there because without it the CPU crashes in `xg::copy_from` here. - All 2 689 compute pipelines precompiled per tree (`--precompile --only cs --pipelines`), 0 refused. - Run settings: `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_WATCH_HOT=0 XCL_DRED=1`, A pressed every 5 s, 900 s (and one 2 400 s run). | | `main` `0829441` | `main` `68a284a` | `68a284a`, 2 400 s run | |---|---|---|---| | first `#101` | 108.5 s | 280.6 s | 99.1 s | | last frame | 112 s | 289.7 s | 122.2 s | | device removed | **117.3 s** (`0x887a0006`, then the title assert others report) | none in 900 s (still compiling at the end) | **2 103.1 s** (`0x887a0005`, then the same title assert) | | local video memory at the end | 13 987 MB | 14 018 MB | ~14 400 MB | - **On `0829441`:** - from 115.0 s, pipeline creation returned `0x887a0005`; - DRED had one partly executed compute list (38 of 142 operations); - there were no `prod=qNone` GPU waits. - **On `68a284a`, after the stop:** - the title submits nothing more; - one thread builds large compute pipelines in the driver one after another: 110 builds from 290 s to the end, summing ~630 s, the longest 52 s; - 30 of them had no driver blob from the precompile; - the split log shows 49 chained dispatches in 57 slabs, with up to 260 MiB of scratch. - **The 2 400 s run on `68a284a`** started with the driver cache of the 900 s run: - from 122 s it built 191 pipelines in the driver, one at a time: 153 compute up to ~2 025 s (11 – 17 s each), then 38 graphics (3 – 8 s each); 164 of them had no driver blob; - no presents and no submits during all of that; - the last build finished at 2 101.6 s, and the title then recorded 25 draws, 7 dispatches and one mid-list wait split; - at 2 103.1 s the device was removed. Windows logged no display-driver timeout (event 4101) for it. - **Which of the merges between `0829441` and `68a284a` moves the removal behind the compiles,** I have not bisected. Between the two trees are #1291, #495, #2306, #1405, #2346, #2074, #2076 and #2319. - **Local video memory is still ~14 GB on this 8 GB card,** so the stall is reached while it is oversubscribed. - **Compared with @⁠tiagonleal's report above:** their RTX 5070 Ti 16 GB had no removal already on `0829441`, and this 8 GB card did. The stall after it looks the same on both: continuous driver compiles of programs without a blob, ~30–50 s each. **Tests on `68a284a` + #684:** `cargo test --workspace --no-fail-fast -- --test-threads=4`: 1291 passed, 2 failed, 46 ignored, 25 `SKIPPED` (no wave64 on this card, and the f16 forms). - `a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier` also fails in `main`'s own CI. - `list_x::tests::a_reset_while_the_last_submit_runs_records_on_another_pc_list` passes when run alone. **Not tested:** `main` after `68a284a` (#2275, #2342, #2345, #2296 and the rest merged since); #2404 + #2097; a bisect of the merges above; more than one run per tree; `XCL_UMA_SHADOW`; the HLSL path; AMD. **AI use:** Claude Code (Claude Opus 5.5) built the trees, ran the tests, the precompiles and the runs, read the logs, and wrote this comment.
Author
Owner

@⁠imnicho on GitHub · 2026-11-25 18:42 UTC · original

RTX 5080 16 GB data point on a tree with main 0829441: with every compute pipeline prebuilt the title draws its intro for one to three minutes (flat grey behind the letterbox), and the runs end in two different ways. Also the answer to what I said I would check: GetDeviceState reads 3 for the hang, but 0 for the loss without an event - it does not give the debugger's 6.

Setup: RTX 5080 16 GB (driver 610.47, 32-lane waves), i7-7700K (4 cores / 8 threads), 16 GB RAM, Windows 10 22H2, release, Series S profile, XCL_NETWORK=0, scripted pad. Local tree: #2057 at 4df1e6e + main at 0829441 + #2319's commit + the mesh stack (#2092 at e856fa7, #541, #1803, #1887). XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_TEXTURE_LEVEL_PAGES=1, plus a local switch that makes the two-pass record buffer 4 MiB. All compute pipelines prebuilt: the split pieces and, for all 295 split programs, the whole form with the chain's signature (numbers on #2338).

run beside that first #101 frames after it end Windows events DRED
1 XCL_DRED=1 185.8 s 5 0x887a0006 at + 71 s; the GPU stops at about + 54 s nvlddmkm 153 x3, then 4101 state 3; one list with 4 842 of 4 897 operations done, the next one a Dispatch, pipeline bound there ms 2618a8e8c806c348 (the compute pass of a two-pass mesh shader); the other lists not begun
2 nothing 161.2 s 57 0x887a0005 at + 83 s; last frame at + 62 s 153 x3, then 4101 -
3 XCL_DRED=1 + a local experiment (copies of the buffers behind by-address views) 194.7 s 37 0x887a0005 at + 54 s, frames until then none state 0, page fault at VA 0, no list
4 XCL_DRED=1 XCL_GPU_PROFILE=1 163.5 s 93 0x887a0005 at + 192 s, frames until then none state 0, no list
  • Two endings. Runs 1 and 2 are driver hangs (TDR events both times). Runs 3 and 4 have the signature of this thread: no event, no GPU wait timed out, nothing in flight in DRED.
  • ID3D12DeviceRemovedExtendedData2::GetDeviceState is 3 (hung) for the hang and 0 (unknown) for the loss without an event. So without a debugger it only tells the two apart; @⁠jessenic's cdb script stays the way to read the kernel's state.
  • #2319 matters for XCL_DRED=1: before it, XCL_DRED=1 alone gave no per-list lines here at all, even for a real hang (only together with XCL_GPU_PROFILE=1). With its commit the list lines of run 1 came from XCL_DRED=1 alone.
  • The hang is not a slow program. In run 4's profile (7.3 s of GPU time over 295 000 operations in the whole run) none of the 15 operations that took most has a single call longer than 42 ms, and no two-pass compute pass is among them. So the Dispatch DRED names in run 1 is an occasional one that does not end, not the usual cost of that pipeline. Not explained yet.
  • Memory is not it here: local video memory peaks at 14.0 - 14.5 GB of a 15.0 GB budget; RAM available at the four removals 654, 2 335, 440 and 650 MB.
  • Picture: uniformly grey behind the intro's letterbox in every captured world frame, as others report. In run 3 the first world frame's targets were dumped: the 1280x720 R32_UINT target (360 draws) is all zero; a 1280x720 R16G16B16A16_FLOAT target (425 draws) has texels in 42 % of the samples. I have no dump of the same frame without the experiment to compare with, so this says nothing about the experiment.

Not tested: current main itself (this tree is about 100 commits behind it); the Series X profile; more than one run of each row.

AI use: Claude Code with Claude Fable 5.2 ran the title on the machine above and wrote this.

**@⁠imnicho** on GitHub · 2026-11-25 18:42 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7171276485) **RTX 5080 16 GB data point on a tree with `main` `0829441`: with every compute pipeline prebuilt the title draws its intro for one to three minutes (flat grey behind the letterbox), and the runs end in two different ways. Also the answer to what I said I would check: `GetDeviceState` reads 3 for the hang, but 0 for the loss without an event - it does not give the debugger's 6.** **Setup:** RTX 5080 16 GB (driver 610.47, 32-lane waves), i7-7700K (4 cores / 8 threads), 16 GB RAM, Windows 10 22H2, release, Series S profile, `XCL_NETWORK=0`, scripted pad. Local tree: #2057 at `4df1e6e` + `main` at `0829441` + #2319's commit + the mesh stack (#2092 at `e856fa7`, #541, #1803, #1887). `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_TEXTURE_LEVEL_PAGES=1`, plus a local switch that makes the two-pass record buffer 4 MiB. All compute pipelines prebuilt: the split pieces and, for all 295 split programs, the whole form with the chain's signature (numbers on #2338). | run | beside that | first `#101` | frames after it | end | Windows events | DRED | |---|---|---|---|---|---|---| | 1 | `XCL_DRED=1` | 185.8 s | 5 | `0x887a0006` at + 71 s; the GPU stops at about + 54 s | `nvlddmkm` 153 x3, then 4101 | state 3; one list with 4 842 of 4 897 operations done, the next one a `Dispatch`, pipeline bound there `ms 2618a8e8c806c348` (the compute pass of a two-pass mesh shader); the other lists not begun | | 2 | nothing | 161.2 s | 57 | `0x887a0005` at + 83 s; last frame at + 62 s | 153 x3, then 4101 | - | | 3 | `XCL_DRED=1` + a local experiment (copies of the buffers behind by-address views) | 194.7 s | 37 | `0x887a0005` at + 54 s, frames until then | none | state 0, page fault at VA 0, no list | | 4 | `XCL_DRED=1 XCL_GPU_PROFILE=1` | 163.5 s | 93 | `0x887a0005` at + 192 s, frames until then | none | state 0, no list | - **Two endings.** Runs 1 and 2 are driver hangs (TDR events both times). Runs 3 and 4 have the signature of this thread: no event, no GPU wait timed out, nothing in flight in DRED. - **`ID3D12DeviceRemovedExtendedData2::GetDeviceState`** is 3 (hung) for the hang and 0 (unknown) for the loss without an event. So without a debugger it only tells the two apart; @⁠jessenic's cdb script stays the way to read the kernel's state. - **#2319 matters for `XCL_DRED=1`:** before it, `XCL_DRED=1` alone gave no per-list lines here at all, even for a real hang (only together with `XCL_GPU_PROFILE=1`). With its commit the list lines of run 1 came from `XCL_DRED=1` alone. - **The hang is not a slow program.** In run 4's profile (7.3 s of GPU time over 295 000 operations in the whole run) none of the 15 operations that took most has a single call longer than 42 ms, and no two-pass compute pass is among them. So the `Dispatch` DRED names in run 1 is an occasional one that does not end, not the usual cost of that pipeline. Not explained yet. - **Memory is not it here:** local video memory peaks at 14.0 - 14.5 GB of a 15.0 GB budget; RAM available at the four removals 654, 2 335, 440 and 650 MB. - **Picture:** uniformly grey behind the intro's letterbox in every captured world frame, as others report. In run 3 the first world frame's targets were dumped: the 1280x720 `R32_UINT` target (360 draws) is all zero; a 1280x720 `R16G16B16A16_FLOAT` target (425 draws) has texels in 42 % of the samples. I have no dump of the same frame without the experiment to compare with, so this says nothing about the experiment. **Not tested:** current `main` itself (this tree is about 100 commits behind it); the Series X profile; more than one run of each row. AI use: Claude Code with Claude Fable 5.2 ran the title on the machine above and wrote this.
Author
Owner

@⁠b3IKK on GitHub · 2026-11-25 18:46 UTC · original

Correction, and a better result. My earlier world runs in this thread left XCL_DIRECT_DXIL unset, so they were on the HLSL path — that is why they reported compute split: 0 programs split. With XCL_DIRECT_DXIL=1 on the same retail 1.0.2.1 title (RTX 5080, default wait, 600 s):

run 1 (cold direct cache) run 2 (same cache)
cold compute compiles 55 21
split programs / pieces / chained dispatches 79 / 762 / 53 190 / 1,791 / 148
presents after 96 s (2 s intervals) 0 22
last interval with a present 94 s 142 s
frames shown 1,929 2,738

The second direct run keeps presenting to 142 s and then stalls on the next 21 cold compiles (127–190 s, 290–360 KB DXIL each); no crash, clean exit at 600 s. So the direct backend is the relevant path for this title, and it is converging with the warm cache. Kalmarv's #2404/#2097 are the next stack to test on top. I will correct the earlier crash/fence comments in #1337 accordingly.

AI use: OpenCode, Claude Fable 5.2 ran both direct runs on this machine and wrote this.

**@⁠b3IKK** on GitHub · 2026-11-25 18:46 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7171381524) **Correction, and a better result.** My earlier world runs in this thread left `XCL_DIRECT_DXIL` unset, so they were on the **HLSL path** — that is why they reported `compute split: 0 programs split`. With `XCL_DIRECT_DXIL=1` on the same retail 1.0.2.1 title (RTX 5080, default wait, 600 s): | | run 1 (cold direct cache) | run 2 (same cache) | |---|---:|---:| | cold compute compiles | 55 | 21 | | split programs / pieces / chained dispatches | 79 / 762 / 53 | 190 / 1,791 / 148 | | presents after 96 s (2 s intervals) | 0 | **22** | | last interval with a present | 94 s | **142 s** | | frames shown | 1,929 | 2,738 | The second direct run keeps presenting to 142 s and then stalls on the next 21 cold compiles (127–190 s, 290–360 KB DXIL each); no crash, clean exit at 600 s. So the direct backend is the relevant path for this title, and it is converging with the warm cache. Kalmarv's #2404/#2097 are the next stack to test on top. I will correct the earlier crash/fence comments in #1337 accordingly. AI use: OpenCode, Claude Fable 5.2 ran both direct runs on this machine and wrote this.
Author
Owner

@⁠Ariorh1337 on GitHub · 2026-11-25 18:50 UTC · original

Which programs fill the heap in the title on the RTX 5090, from two more runs (same tree and settings as my comment above). At the removal, the GetCachedBlob bytes of the translated pipelines bound so far:

run after the first #101 pipelines compute graphics total
91 38 s 1211 839, 342 MB 372, 100 MB 442 MB
92 10 s 1158 820, 336 MB 338, 96 MB 432 MB

Run 91 lasted longer only because the world bound its pipelines more slowly: the count crept 416 → 422 → … → 442 MB. It was removed at the same total.

By size, in run 92:

blob size pipelines MB
< 256 KB 597 44
256 KB – 1 MB 384 157
1 – 2 MB 175 226
≥ 2 MB 2 6

So about half of the limit is 175 compute programs of 1–2 MB.

The 60 biggest, by name (xcl shaders shaders.rpf --export-hlsl --record-hash):

  • 47 are CS_RaytracingResolve, one per material (ped_standard_*, standard_2lyr_*, prop_batch_dirt*, standard_vehicle_2lyr*, …), 1.29–1.61 MB each. Many materials have two of them, e.g. ped_standard_muv fb1c6d2d04361754 (1.60 MB) and 1359d5604e0a2c6f (1.52 MB).
  • 8 are cascadeshadows_rendering:CS_ShadowRenderTiled*, including the two biggest of all: 73fb752d7f62c3a5 AlphaCBPPPC 2.98 MB and 062468c09af883b9 CBPPPC 2.71 MB.
  • indirect_light_probes:CS_IrradianceCache_Shade / ShadeSecondary (1.77 / 1.62 MB) and indirect_diffuse_lighting:CS_ScreenProbes_ActivateRays (1.77 MB).

The resolve programs only shade what the ray-tracing structures were hit by. As far as I can tell, the title binds one per material when the world starts. That makes them the first candidate for a smaller form, or for staying out until something needs them. I haven't tried either yet.

How I counted: local diagnostics, not a PR. Each translated pipeline's GetCachedBlob size is added at its first bind and never subtracted. Pipelines outside the translated path aren't counted.

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

**@⁠Ariorh1337** on GitHub · 2026-11-25 18:50 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7171478052) Which programs fill the heap in the title on the RTX 5090, from two more runs (same tree and settings as my comment above). At the removal, the `GetCachedBlob` bytes of the translated pipelines bound so far: | run | after the first `#101` | pipelines | compute | graphics | total | |---|---|---|---|---|---| | 91 | 38 s | 1211 | 839, 342 MB | 372, 100 MB | **442 MB** | | 92 | 10 s | 1158 | 820, 336 MB | 338, 96 MB | **432 MB** | Run 91 lasted longer only because the world bound its pipelines more slowly: the count crept 416 → 422 → … → 442 MB. It was removed at the same total. By size, in run 92: | blob size | pipelines | MB | |---|---|---| | < 256 KB | 597 | 44 | | 256 KB – 1 MB | 384 | 157 | | **1 – 2 MB** | **175** | **226** | | ≥ 2 MB | 2 | 6 | So about half of the limit is 175 compute programs of 1–2 MB. The 60 biggest, by name (`xcl shaders shaders.rpf --export-hlsl --record-hash`): - **47 are `CS_RaytracingResolve`**, one per material (`ped_standard_*`, `standard_2lyr_*`, `prop_batch_dirt*`, `standard_vehicle_2lyr*`, …), 1.29–1.61 MB each. Many materials have two of them, e.g. `ped_standard_muv` `fb1c6d2d04361754` (1.60 MB) and `1359d5604e0a2c6f` (1.52 MB). - 8 are `cascadeshadows_rendering:CS_ShadowRenderTiled*`, including the two biggest of all: `73fb752d7f62c3a5` AlphaCBPPPC 2.98 MB and `062468c09af883b9` CBPPPC 2.71 MB. - `indirect_light_probes:CS_IrradianceCache_Shade` / `ShadeSecondary` (1.77 / 1.62 MB) and `indirect_diffuse_lighting:CS_ScreenProbes_ActivateRays` (1.77 MB). The resolve programs only shade what the ray-tracing structures were hit by. As far as I can tell, the title binds one per material when the world starts. That makes them the first candidate for a smaller form, or for staying out until something needs them. I haven't tried either yet. How I counted: local diagnostics, not a PR. Each translated pipeline's `GetCachedBlob` size is added at its first bind and never subtracted. Pipelines outside the translated path aren't counted. AI use: Claude Code (Claude Opus 5.5) added the count, ran the title on the machine above (I pressed through the menus), named the programs and drafted this.
Author
Owner

@⁠jessenic on GitHub · 2026-11-25 18:54 UTC · original

@⁠Ariorh1337 The constant total fits what I read with the debugger here: a removal with nothing in flight, which the kernel reports as D3DKMT_DEVICEEXECUTION_ERROR_DMAFAULT (state 6), not a page fault or a hang. A limit on the room for shader code would end exactly like that, at whatever the title binds next, which is also why none of the markers ever had work in flight.

It also matches what another project (Five Star Recomp, not XCL; self-reported, I have not checked it) wrote about the same removal on NVIDIA: it lost the device on every boot 25–35 s after the world started loading, and the fix that worked was to hold back the ray-tracing passes by name (CS_RaytracingResolve, the RT shadow passes, the BVH skinning). Making the intersection a plain miss with those passes still running did not help. Holding them back takes your 47 resolve programs out of the total without touching any other theory.

I'm testing it on an RTX 5070 Ti: a local switch keeps every CS_RaytracingResolve program from being created at all, not only its dispatches, since its code would already count. I'll post the result here. If it holds, the next step is to measure the limit itself (the total at removal on a 16 GB card, compared with your 32 GB card).

AI use: Claude Code (Claude Opus 5.5) wrote this.

**@⁠jessenic** on GitHub · 2026-11-25 18:54 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7171562605) @⁠Ariorh1337 The constant total fits what I read with the debugger here: a removal with nothing in flight, which the kernel reports as `D3DKMT_DEVICEEXECUTION_ERROR_DMAFAULT` (state 6), not a page fault or a hang. A limit on the room for shader code would end exactly like that, at whatever the title binds next, which is also why none of the markers ever had work in flight. It also matches what another project (Five Star Recomp, not XCL; self-reported, I have not checked it) wrote about the same removal on NVIDIA: it lost the device on every boot 25–35 s after the world started loading, and the fix that worked was to hold back the ray-tracing passes by name (`CS_RaytracingResolve`, the RT shadow passes, the BVH skinning). Making the intersection a plain miss with those passes still running did not help. Holding them back takes your 47 resolve programs out of the total without touching any other theory. I'm testing it on an RTX 5070 Ti: a local switch keeps every `CS_RaytracingResolve` program from being created at all, not only its dispatches, since its code would already count. I'll post the result here. If it holds, the next step is to measure the limit itself (the total at removal on a 16 GB card, compared with your 32 GB card). AI use: Claude Code (Claude Opus 5.5) wrote this.
Author
Owner

@⁠S1m0ne1997 on GitHub · 2026-11-25 19:07 UTC · original

@⁠Ariorh1337 @⁠jessenic The same constant total on an RTX 4090 24 GB (driver 621.40), with a lower limit than your 5090's:

run world load to removal shader code bound at the removal pipelines of 1 MB or more
1 9 s 349 MB 1172 92
2 8 s 336 MB 1145 86

Both ended in 0x887a0005, DRED page fault at GPU VA 0x0; allocations there: [], as before. In earlier runs of the same tree, the time from the start of the world load to the removal ranged from 23 to 76 s, so the total stays put while the timing moves.

  • How I counted: the same way as Ariorh's local diagnostic. At the first SetPipelineState of each PC pipeline, its GetCachedBlob size is added to a running total, and never subtracted. It is logged every 10 MB and at the removal.
  • Created vs bound: XCL had created 5 635 pipelines by the removal (about 1 GB of DXIL, including the ones built ahead), and only 1 145 of them were bound. Since the total is constant on the bound ones, only code that has been used seems to count toward the limit.
  • Ratio: about 14 MB of code per GB of VRAM on both cards (≈340 MB on 24 GB, ≈437 MB on 32 GB). With two cards it may be a coincidence; a 16 GB card would tell.

Tree: main 0829441 + #2057 + #889 + #2270 + #2275, local graphics build-ahead, XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_COHERENT_HEAPS=sparse:16 XCL_DIRECT_SPLIT_INSTRUCTIONS=0. Ryzen 9 9950X3D, Windows 11 26300.

I can run more measurements on this card, for example the per-program list or the effect of a smaller form of CS_RaytracingResolve, if that helps you; just say which.

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

**@⁠S1m0ne1997** on GitHub · 2026-11-25 19:07 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7171859011) @⁠Ariorh1337 @⁠jessenic The same constant total on an **RTX 4090 24 GB** (driver 621.40), with a lower limit than your 5090's: | run | world load to removal | shader code bound at the removal | pipelines | of 1 MB or more | |---|---|---|---|---| | 1 | 9 s | **349 MB** | 1172 | 92 | | 2 | 8 s | **336 MB** | 1145 | 86 | Both ended in `0x887a0005`, `DRED page fault at GPU VA 0x0; allocations there: []`, as before. In earlier runs of the same tree, the time from the start of the world load to the removal ranged from 23 to 76 s, so the total stays put while the timing moves. - **How I counted:** the same way as Ariorh's local diagnostic. At the first `SetPipelineState` of each PC pipeline, its `GetCachedBlob` size is added to a running total, and never subtracted. It is logged every 10 MB and at the removal. - **Created vs bound:** XCL had created 5 635 pipelines by the removal (about 1 GB of DXIL, including the ones built ahead), and only 1 145 of them were bound. Since the total is constant on the bound ones, only code that has been used seems to count toward the limit. - **Ratio:** about 14 MB of code per GB of VRAM on both cards (≈340 MB on 24 GB, ≈437 MB on 32 GB). With two cards it may be a coincidence; a 16 GB card would tell. **Tree:** `main` `0829441` + #2057 + #889 + #2270 + #2275, local graphics build-ahead, `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_COHERENT_HEAPS=sparse:16 XCL_DIRECT_SPLIT_INSTRUCTIONS=0`. Ryzen 9 9950X3D, Windows 11 26300. I can run more measurements on this card, for example the per-program list or the effect of a smaller form of `CS_RaytracingResolve`, if that helps you; just say which. AI use: Claude Code (Claude Opus 5.5) wrote the counter, ran the title on the machine above (I pressed through the menus) and drafted this.
Author
Owner

@⁠Rednaxeh on GitHub · 2026-11-25 19:12 UTC · original

RX 7800 XT (RDNA3), 32 GB, main 68a284a with XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1: the one compute program the AMD driver never finishes takes the process to 50 GB of commit; stopping its thread saves the run, but no time or memory rule tells it from a legitimate build during world loading. Numbers from a local experiment, not a PR.

Follow-up to my world-start report, for whoever works on the compile-time side (#2088's list) and on AMD.

What the driver does on this card (driver 32.0.32029.2010, direct DXIL of today's main)

  • 95cc13288a27a96e (ActivateRays, 2 177 324 B of plain direct DXIL, not compact on wave64): enters CreateComputePipelineState at 94.9 s on an xcl-pso worker and has not returned at 300 s; the process commit climbs from 31 GB at 80 s to 50.1 GB at the end (about 2 GB every 20 s while it compiles). Same as yesterday's 3.35 MB form (54 GB in 300 s) and as the 13.8 MB HLSL form, which the driver refuses with E_OUTOFMEMORY after 15–33 s. The nested compact form of #2025 builds it in 57 s (my report there).
  • Legitimate big builds on this card: 73fb752d7f62c3a5 (1 165 808 B) 40.9 s, 0.9–1.2 MB programs 35–45 s, 0.3 MB ones 12–14 s; @⁠MK5280's whole-pack pass on an RX 7900 XTX had legitimate builds up to 177 s.

A local experiment: a watchdog that suspends the worker (an idea from a VIctory fork, rewritten; kept as a local tool, not proposed as a PR)

  • Every 2 s it looks at the huge compiles in flight; one judged endless has its worker thread suspended in amdxc64.dll (SuspendThread, after a probe that no thread holds a process heap), its pipeline completed as not built (dispatches skipped), a replacement worker started.
  • Stopping ActivateRays 20 s after it started kept the run alive to 600 s with the commit at 34–37.7 GB instead of 50 GB (1645 frames, no crash); stopping it at 148 s left a 48 GB peak.
  • No rule was right. Commit growth cannot be attributed to a compile: the title's own world loading grows the process by 12 GB in the same 60 s in which the big builds run, so "3 GB more commit after 20 s" blacklisted 73fb752d7f62c3a5 (a 41 s legitimate build) twice. A per-compile time limit has to sit above 177 s on this driver, and by 200 s ActivateRays has already taken 20 GB. Title-thread compiles (0.65–0.95 MB, 20 s and more) grew the commit by only 0.0–0.8 GB, so the growth signal does separate the endless program from most legitimate ones, just not during loading.
  • What would have helped everyone today, at no risk: a log line every 60 s for every compile that has been in the driver for more than N s, with its record, size and the commit growth since it started. XCL_PSO_TRACE=1 only logs starts and finishes, so a program that never finishes leaves no line at all.

Logs of all runs kept; happy to rerun any of them with a switch or a branch on this card.

AI use: Claude Code (Claude Fable 5.1 and Claude Opus 5.5) wrote the experiment and read the logs; the runs were mine.

**@⁠Rednaxeh** on GitHub · 2026-11-25 19:12 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7171968699) **RX 7800 XT (RDNA3), 32 GB, `main` 68a284a with `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1`: the one compute program the AMD driver never finishes takes the process to 50 GB of commit; stopping its thread saves the run, but no time or memory rule tells it from a legitimate build during world loading. Numbers from a local experiment, not a PR.** Follow-up to [my world-start report](https://git.gtahub.st/github/xcl-dev--xcl/issues/505), for whoever works on the compile-time side (#2088's list) and on AMD. **What the driver does on this card (driver 32.0.32029.2010, direct DXIL of today's `main`)** - `95cc13288a27a96e` (`ActivateRays`, 2 177 324 B of plain direct DXIL, not compact on wave64): enters `CreateComputePipelineState` at 94.9 s on an `xcl-pso` worker and has not returned at 300 s; the process commit climbs from 31 GB at 80 s to **50.1 GB** at the end (about 2 GB every 20 s while it compiles). Same as yesterday's 3.35 MB form (54 GB in 300 s) and as the 13.8 MB HLSL form, which the driver refuses with E_OUTOFMEMORY after 15–33 s. The nested compact form of #2025 builds it in 57 s (my report there). - Legitimate big builds on this card: `73fb752d7f62c3a5` (1 165 808 B) 40.9 s, 0.9–1.2 MB programs 35–45 s, 0.3 MB ones 12–14 s; @⁠MK5280's whole-pack pass on an RX 7900 XTX had legitimate builds up to 177 s. **A local experiment: a watchdog that suspends the worker** (an idea from a VIctory fork, rewritten; kept as a local tool, not proposed as a PR) - Every 2 s it looks at the huge compiles in flight; one judged endless has its worker thread suspended in `amdxc64.dll` (`SuspendThread`, after a probe that no thread holds a process heap), its pipeline completed as not built (dispatches skipped), a replacement worker started. - Stopping `ActivateRays` 20 s after it started kept the run alive to 600 s with the commit at 34–37.7 GB instead of 50 GB (1645 frames, no crash); stopping it at 148 s left a 48 GB peak. - **No rule was right.** Commit growth cannot be attributed to a compile: the title's own world loading grows the process by 12 GB in the same 60 s in which the big builds run, so "3 GB more commit after 20 s" blacklisted `73fb752d7f62c3a5` (a 41 s legitimate build) twice. A per-compile time limit has to sit above 177 s on this driver, and by 200 s `ActivateRays` has already taken 20 GB. Title-thread compiles (0.65–0.95 MB, 20 s and more) grew the commit by only 0.0–0.8 GB, so the growth signal does separate the endless program from most legitimate ones, just not during loading. - What would have helped everyone today, at no risk: a log line every 60 s for every compile that has been in the driver for more than N s, with its record, size and the commit growth since it started. `XCL_PSO_TRACE=1` only logs starts and finishes, so a program that never finishes leaves no line at all. Logs of all runs kept; happy to rerun any of them with a switch or a branch on this card. AI use: Claude Code (Claude Fable 5.1 and Claude Opus 5.5) wrote the experiment and read the logs; the runs were mine.
Author
Owner

@⁠jessenic on GitHub · 2026-11-25 19:25 UTC · original

@⁠S1m0ne1997 @⁠Ariorh1337 The 16 GB data point: on an RTX 5070 Ti 16 GB (Blackwell, driver 610.88) the removal came at 434 MB of bound shader code, which is your 5090's 432–442 MB, not 14 MB per GB. So on Blackwell it does not scale with VRAM here: 16 GB and 32 GB end at the same total.

  • How I counted: the same way as you. At the first SetPipelineState of each PC pipeline, its GetCachedBlob size is added and never subtracted.
  • Tree: a local integration branch on main 0829441, with about 40 open PRs, #1803, #1215 and #2275 among them.
  • Setup: HLSL path (not XCL_DIRECT_DXIL), XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1, Series S profile.
  • Counter: the last line before the removal was bound code: 434 MB in 1095 pipelines (153 of 1 MB or more), 60 ms before the device went. It was 0x887a0005 with execution state 6 (cdb), as before.
  • The title drew nothing in that window. No frame was presented after its first #101 (194 s), and it made 0 submits. It was waiting for graphics pipelines to be built, and the total crept up from 404 MB at 198 s to 434 MB at 354 s as they were bound. So the removal follows the total, not the world's work: it came 160 s after the world started here, against 7–9 s on runs where the pipelines were already built.
  • Your 4090 at 336–349 MB would then be a lower limit on Ada, not a VRAM ratio.

Running now: the same tree with every CS_RaytracingResolve program kept from being created (1000 hashes). I'll post whether the total stays under the limit and whether the removal moves.

AI use: Claude Code (Claude Opus 5.5) added the counter, ran the title on the machine above and wrote this.

**@⁠jessenic** on GitHub · 2026-11-25 19:25 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7172288186) @⁠S1m0ne1997 @⁠Ariorh1337 The 16 GB data point: **on an RTX 5070 Ti 16 GB (Blackwell, driver 610.88) the removal came at 434 MB of bound shader code, which is your 5090's 432–442 MB, not 14 MB per GB.** So on Blackwell it does not scale with VRAM here: 16 GB and 32 GB end at the same total. - **How I counted:** the same way as you. At the first `SetPipelineState` of each PC pipeline, its `GetCachedBlob` size is added and never subtracted. - **Tree:** a local integration branch on `main` `0829441`, with about 40 open PRs, #1803, #1215 and #2275 among them. - **Setup:** HLSL path (not `XCL_DIRECT_DXIL`), `XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1`, Series S profile. - **Counter:** the last line before the removal was `bound code: 434 MB in 1095 pipelines (153 of 1 MB or more)`, 60 ms before the device went. It was `0x887a0005` with execution state 6 (cdb), as before. - **The title drew nothing in that window.** No frame was presented after its first `#101` (194 s), and it made 0 submits. It was waiting for graphics pipelines to be built, and the total crept up from 404 MB at 198 s to 434 MB at 354 s as they were bound. So the removal follows the total, not the world's work: it came 160 s after the world started here, against 7–9 s on runs where the pipelines were already built. - **Your 4090 at 336–349 MB** would then be a lower limit on Ada, not a VRAM ratio. Running now: the same tree with every `CS_RaytracingResolve` program kept from being created (1000 hashes). I'll post whether the total stays under the limit and whether the removal moves. AI use: Claude Code (Claude Opus 5.5) added the counter, ran the title on the machine above and wrote this.
Author
Owner

@⁠b3IKK on GitHub · 2026-11-25 19:28 UTC · original

A cross-check on the direct backend with Kalmarv's stack (68a284a + #2404 + #2097), retail 1.0.2.1 on an RTX 5080, XCL_DIRECT_DXIL=1:

stack run cold compiles last present ExecuteIndirect
1 (cold base) 8 116 s 51 chained, 0 whole, 0 slabs lost
2 (warm) 31 92 s 392 chained, 0 whole, 0 slabs lost

#2404 removes the ExecuteIndirect whole-form fallback as intended, but the remaining cold set on the second run is 31 split pieces of 291–372 KB (6–185 s), not whole forms. On the plain direct base (0829441) the warm runs went 55 → 21 → 6 cold and 94 → 142 → 164 s; the stack's new split plan reaches more programs, so its pieces are cold again. The next lever is precompiling the used split pieces (#2338), not the ExecuteIndirect path.

AI use: OpenCode, Claude Fable 5.2 built and ran the stack on this machine and wrote this.

**@⁠b3IKK** on GitHub · 2026-11-25 19:28 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7172348773) A cross-check on the direct backend with Kalmarv's stack (`68a284a` + #2404 + #2097), retail 1.0.2.1 on an RTX 5080, `XCL_DIRECT_DXIL=1`: | stack run | cold compiles | last present | ExecuteIndirect | |---|---:|---:|---| | 1 (cold base) | 8 | 116 s | 51 chained, 0 whole, 0 slabs lost | | 2 (warm) | 31 | 92 s | 392 chained, 0 whole, 0 slabs lost | #2404 removes the ExecuteIndirect whole-form fallback as intended, but the remaining cold set on the second run is 31 **split pieces** of 291–372 KB (6–185 s), not whole forms. On the plain direct base (`0829441`) the warm runs went 55 → 21 → 6 cold and 94 → 142 → 164 s; the stack's new split plan reaches more programs, so its pieces are cold again. The next lever is precompiling the used split pieces (#2338), not the ExecuteIndirect path. AI use: OpenCode, Claude Fable 5.2 built and ran the stack on this machine and wrote this.
Author
Owner

@⁠CowboyBingus on GitHub · 2026-11-25 19:28 UTC · original

@⁠MacieGx a request about item 1 of your comment: mapping the title's 24 GB GPU view as extra windows filled on demand from the CPU view / page mappings. As far as I can find it isn't in a PR or on a branch of your fork yet. Could you push it, even as a draft branch? We would test it on an RTX 5070 Ti right away and report here.

Where we are on that card (driver 621.24): main 2898511a + #2326 + #1055/#1102 (MKmajster's merge 4c40528, plus one local commit that adapts #1102's Source to main's stream recheck) + #1803, with XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_DIRECT_SPLIT_INSTRUCTIONS=100000000 XCL_HUGE_PSO_CONCURRENCY=4 XCL_PSO_WAIT_MS=50, compute pipelines prebuilt (--used-only). One 240 s run: frames were presented until 237 s with no device removal. From about 87 s the frames show flat grey with a letterbox (credits text over it at 232 s), with no world drawn.

AI use: Claude Code (Claude Opus 5.5) ran the builds and runs, read the logs and wrote this comment.

**@⁠CowboyBingus** on GitHub · 2026-11-25 19:28 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7172351653) @⁠MacieGx a request about item 1 of [your comment](https://git.gtahub.st/github/xcl-dev--xcl/issues/505): mapping the title's 24 GB GPU view as extra windows filled on demand from the CPU view / page mappings. As far as I can find it isn't in a PR or on a branch of your fork yet. Could you push it, even as a draft branch? We would test it on an RTX 5070 Ti right away and report here. Where we are on that card (driver 621.24): `main` `2898511a` + #2326 + #1055/#1102 (MKmajster's merge `4c40528`, plus one local commit that adapts #1102's `Source` to `main`'s stream recheck) + #1803, with `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_DIRECT_SPLIT_INSTRUCTIONS=100000000 XCL_HUGE_PSO_CONCURRENCY=4 XCL_PSO_WAIT_MS=50`, compute pipelines prebuilt (`--used-only`). One 240 s run: frames were presented until 237 s with no device removal. From about 87 s the frames show flat grey with a letterbox (credits text over it at 232 s), with no world drawn. AI use: Claude Code (Claude Opus 5.5) ran the builds and runs, read the logs and wrote this comment.
Author
Owner

@⁠jessenic on GitHub · 2026-11-25 19:36 UTC · original

Result of the test from my comment above: with every CS_RaytracingResolve program kept from being created, the removal is gone in this run.

RTX 5070 Ti 16 GB, the same tree, settings and caches as the run that was removed at 434 MB of bound code. Changes: the local switch that leaves the 1000 resolve programs out (each is never translated or handed to the driver, and its dispatches take main's skip path), and XCL_HUGE_PSO_CONCURRENCY=4 XCL_HUGE_PSO_WANTED_CONCURRENCY=6 so the world binds its pipelines sooner.

resolve programs first #101 bound code at the end end
run 2 built 194 s 434 MB in 1095 pipelines (153 of 1 MB or more) 0x887a0005, state 6, at 355 s
run 3 left out (1000) 176 s 358 MB in 2088 pipelines (26 of 1 MB or more) no removal; presenting until the run ended at 600 s
  • The title created all 1000 of them during the run, so it does make one per material, as you read it.
  • The world draws in run 3 (thousands of draws and dispatches every 2 s, about 0.5–1 fps) through the opening credits. The lighting is wrong, as expected without these passes.
  • One run, so not proof. But it fits the constant total on three cards (5090, 4090, this 5070 Ti): it looks like a per-GPU limit on the code of the pipelines a process has bound, and the resolve programs are what push this title over it.
  • What next could keep them: a smaller form of the resolve programs, or binding only the ones the frame uses. Whether releasing a pipeline gives its share back is something I haven't measured.

What else this run showed, for anyone trying it:

  • Local video memory goes to 19.4 GB on the 16 GB card, and commit peaks at 39 GB. Paging is the next limit there.
  • Some frames show large blocks of garbage, tile-shaped, in the lower half. I haven't looked into them yet.

AI use: Claude Code (Claude Opus 5.5) wrote the switch, ran the title on the machine above and wrote this.

**@⁠jessenic** on GitHub · 2026-11-25 19:36 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7172531184) **Result of the test from my comment above:** with every `CS_RaytracingResolve` program kept from being created, the removal is gone in this run. RTX 5070 Ti 16 GB, the same tree, settings and caches as the run that was removed at 434 MB of bound code. Changes: the local switch that leaves the 1000 resolve programs out (each is never translated or handed to the driver, and its dispatches take `main`'s skip path), and `XCL_HUGE_PSO_CONCURRENCY=4 XCL_HUGE_PSO_WANTED_CONCURRENCY=6` so the world binds its pipelines sooner. | | resolve programs | first `#101` | bound code at the end | end | |---|---|---|---|---| | run 2 | built | 194 s | 434 MB in 1095 pipelines (153 of 1 MB or more) | `0x887a0005`, state 6, at 355 s | | run 3 | left out (1000) | 176 s | **358 MB** in 2088 pipelines (26 of 1 MB or more) | **no removal; presenting until the run ended at 600 s** | - The title created all 1000 of them during the run, so it does make one per material, as you read it. - The world draws in run 3 (thousands of draws and dispatches every 2 s, about 0.5–1 fps) through the opening credits. The lighting is wrong, as expected without these passes. - One run, so not proof. But it fits the constant total on three cards (5090, 4090, this 5070 Ti): it looks like a per-GPU limit on the code of the pipelines a process has bound, and the resolve programs are what push this title over it. - What next could keep them: a smaller form of the resolve programs, or binding only the ones the frame uses. Whether releasing a pipeline gives its share back is something I haven't measured. What else this run showed, for anyone trying it: - Local video memory goes to 19.4 GB on the 16 GB card, and commit peaks at 39 GB. Paging is the next limit there. - Some frames show large blocks of garbage, tile-shaped, in the lower half. I haven't looked into them yet. AI use: Claude Code (Claude Opus 5.5) wrote the switch, ran the title on the machine above and wrote this.
Author
Owner

@⁠Rednaxeh on GitHub · 2026-11-25 19:36 UTC · original

RX 7800 XT (RDNA3), 32 GB: main 2898511 crashes at 29.5 s in 2 of 3 default 60 s smoke runs (0xc0000005 in VCRUNTIME140.dll+0x1c136, a title thread's memcpy reading 0xc4901a000, 16 GB committed), while main 68a284a ran 300 s and the same 2898511 survived a 60 s run with XCL_TRACE_FAULTS=1 XCL_NETWORK=0 with no fault logged.

  • Same signature on a local branch cut from 0829441 (read at 0xc49094d00 at 30.3 s), so the window is today's main from about 0829441 on; not deterministic (1 of 3 runs on that branch, 2 of 3 on 2898511).
  • The address is title memory (between the title's CPU pages and the GPU view reservation at 0xdffff0000), read by the title itself: the page was not readable at that moment. The last XCL lines before it are ordinary (driver compile start of b3618a0fd76af79c, compute split: 9 programs split, 49 pieces built); no [WARN].
  • Smoke block of one of the runs (A at ~13 s):
xcl-smoke v1
commit: 2898511af1c038a2ef809719e9b6f89e5675c422
gpu: AMD  Radeon RX 7800 XT
title: 0da1204f
seconds: 60
exit: 0xc0000005
frames shown: none logged (the run did not reach its end)
presents per 2 s (last 3): 60 60 59
device removals: 0
crashes: 2
peak commit: 15777 MB
  • Candidates I have not bisected (merged today, touching title pages and tiles): #2345 (sparse tiles quarantined behind fences), #2275 (VRAM heaps retired across queues), the split-dispatch scratch commits (e9ddf17, 0829441). Logs kept; I can bisect tomorrow if nobody sees it on NVIDIA.

AI use: Claude Code (Claude Fable 5.1) read the logs and wrote this; the runs were mine.

**@⁠Rednaxeh** on GitHub · 2026-11-25 19:36 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7172539525) **RX 7800 XT (RDNA3), 32 GB: `main` 2898511 crashes at 29.5 s in 2 of 3 default 60 s smoke runs (`0xc0000005` in `VCRUNTIME140.dll+0x1c136`, a title thread's `memcpy` reading `0xc4901a000`, 16 GB committed), while `main` 68a284a ran 300 s and the same 2898511 survived a 60 s run with `XCL_TRACE_FAULTS=1 XCL_NETWORK=0` with no fault logged.** - Same signature on a local branch cut from 0829441 (read at `0xc49094d00` at 30.3 s), so the window is today's `main` from about 0829441 on; not deterministic (1 of 3 runs on that branch, 2 of 3 on 2898511). - The address is title memory (between the title's CPU pages and the GPU view reservation at `0xdffff0000`), read by the title itself: the page was not readable at that moment. The last XCL lines before it are ordinary (driver compile start of `b3618a0fd76af79c`, `compute split: 9 programs split, 49 pieces built`); no `[WARN]`. - Smoke block of one of the runs (A at ~13 s): ``` xcl-smoke v1 commit: 2898511af1c038a2ef809719e9b6f89e5675c422 gpu: AMD Radeon RX 7800 XT title: 0da1204f seconds: 60 exit: 0xc0000005 frames shown: none logged (the run did not reach its end) presents per 2 s (last 3): 60 60 59 device removals: 0 crashes: 2 peak commit: 15777 MB ``` - Candidates I have not bisected (merged today, touching title pages and tiles): #2345 (sparse tiles quarantined behind fences), #2275 (VRAM heaps retired across queues), the split-dispatch scratch commits (e9ddf17, 0829441). Logs kept; I can bisect tomorrow if nobody sees it on NVIDIA. AI use: Claude Code (Claude Fable 5.1) read the logs and wrote this; the runs were mine.
Author
Owner

@⁠Raul-Paiva on GitHub · 2026-11-25 20:07 UTC · original

Follow-up to my comment above. This time the tree is the #2404 + #2097 stack that got the 5070 Ti to the intro, on the same 8 GB, 32-lane NVIDIA laptop card. On this card the stall after the first #101 was only delaying the removal. With every cache warm, the device is removed about 6 s after the world starts its full GPU work. Counts only.

Versions (main has moved on since: these runs predate #2118's merge and everything after 2898511):

  • main 2898511, plus three PRs:
    • #684 e56dbc3 (without it the CPU crashes in xg::copy_from here);
    • #2404 5ca9c23;
    • #2097 d5c2781.
  • Both PRs merged in without conflicts.

Setup: RTX 3070 Laptop 8 GB (32-lane waves), driver 32.0.16.2124, i7-11800H, 32 GB RAM, Windows 10 19045, release. XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_WATCH_HOT=0 XCL_DRED=1, A pressed every 5 s.

  • Precompile: --precompile --only cs --pipelines, which since #2338 also builds the split pieces. 8 838 pipelines (2 689 programs, 862 of them split into 7 011 pieces), 0 refused.
  • Tests: cargo test --workspace --no-fail-fast -- --test-threads=4: 1365 passed, 3 failed, 46 ignored, 25 SKIPPED (no wave64 on this card, and the f16 forms). The 3 failures:
    • dispatch_chain_divergent_forward_edges_3d, the #2404 failure already reported on a 3070 and a 3080 Ti;
    • list_x::tests::a_reset_while_the_last_submit_runs_records_on_another_pc_list, which passed alone on the previous tree;
    • vram::tests::d32s8_targets_take_their_own_size_of_video_memory, not looked into.
run caches first #101 last frame driver builds after the stop device removed
1 (2 400 s) compute precompiled, graphics cold 127.3 s 130.1 s 0 compute, 111 graphics, one at a time 1 567.6 s (0x887a0005)
2 (1 200 s) all warm 86.0 s 102.1 s none: 5 of 167 builds had no driver blob 107.9 s (0x887a0006)

Run 1

  • The precompiled split pieces did their job: no compute pipeline was built in the driver after the stop. On 68a284a there had been 153 compute builds there.
  • What was left was 111 graphics pipelines. Each takes about 3.5 s to build but waited about 8.6 s on average for its turn, so ~24 min in all, with no presents or submits.
  • The title resumed when the last build ended, and the device was removed 2 s later. That is the same pattern as on 68a284a (where it was 2 103 s, after 153 compute + 38 graphics builds).

Run 2

  • At 101–102 s the world starts its full GPU work: 7 624 dispatches in 2 s, 152 chained split dispatches in 164 slabs, and 422 MiB of split scratch.
  • Four Wait64 were bridged to queue.Wait with prod=qNone at 101.8 – 105.4 s.
  • At 107.8 s, 4 ExecuteIndirect of a split program skipped: no buffer for the commands of a chained ExecuteIndirect.
  • The removal was logged at 107.9 s.
  • DRED: one partly executed compute list, at 6 778 of 6 852 operations, around 0 15 0 >6 0 15. That is the same neighbourhood as in all my earlier removals.
  • Local video memory: 15.1 GB on the 8 GB card. It was ~14.7 GB in run 1.

So on this card, every tree I have tried (#2057, main 0829441, 68a284a, and this stack) loses the device within seconds of the world's GPU work starting; driver builds only postpone that point. It fits the reports above that tie the removal to the total of bound shader code. I have not measured that total here.

Not tested: main after 2898511 (#2118 and the rest, now 6d12f58); #2423, #2428, #1798, #2385; XCL_UMA_SHADOW; more than one run of each row; the HLSL path; AMD.

AI use: Claude Code (Claude Opus 5.5) built the tree, ran the tests, the precompile and the runs, read the logs, and wrote this comment.

**@⁠Raul-Paiva** on GitHub · 2026-11-25 20:07 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7173219725) Follow-up to [my comment above](https://git.gtahub.st/github/xcl-dev--xcl/issues/505). This time the tree is the #2404 + #2097 stack that got the 5070 Ti to the intro, on the same 8 GB, 32-lane NVIDIA laptop card. **On this card the stall after the first `#101` was only delaying the removal.** With every cache warm, the device is removed about 6 s after the world starts its full GPU work. Counts only. **Versions** (`main` has moved on since: these runs predate #2118's merge and everything after `2898511`): - `main` `2898511`, plus three PRs: - #684 `e56dbc3` (without it the CPU crashes in `xg::copy_from` here); - #2404 `5ca9c23`; - #2097 `d5c2781`. - Both PRs merged in without conflicts. **Setup:** RTX 3070 Laptop 8 GB (32-lane waves), driver 32.0.16.2124, i7-11800H, 32 GB RAM, Windows 10 19045, release. `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_WATCH_HOT=0 XCL_DRED=1`, A pressed every 5 s. - Precompile: `--precompile --only cs --pipelines`, which since #2338 also builds the split pieces. 8 838 pipelines (2 689 programs, 862 of them split into 7 011 pieces), 0 refused. - Tests: `cargo test --workspace --no-fail-fast -- --test-threads=4`: 1365 passed, 3 failed, 46 ignored, 25 `SKIPPED` (no wave64 on this card, and the f16 forms). The 3 failures: - `dispatch_chain_divergent_forward_edges_3d`, the #2404 failure already reported on a 3070 and a 3080 Ti; - `list_x::tests::a_reset_while_the_last_submit_runs_records_on_another_pc_list`, which passed alone on the previous tree; - `vram::tests::d32s8_targets_take_their_own_size_of_video_memory`, not looked into. | run | caches | first `#101` | last frame | driver builds after the stop | device removed | |---|---|---|---|---|---| | 1 (2 400 s) | compute precompiled, graphics cold | 127.3 s | 130.1 s | 0 compute, 111 graphics, one at a time | **1 567.6 s** (`0x887a0005`) | | 2 (1 200 s) | all warm | 86.0 s | 102.1 s | none: 5 of 167 builds had no driver blob | **107.9 s** (`0x887a0006`) | **Run 1** - The precompiled split pieces did their job: no compute pipeline was built in the driver after the stop. On `68a284a` there had been 153 compute builds there. - What was left was 111 graphics pipelines. Each takes about 3.5 s to build but waited about 8.6 s on average for its turn, so ~24 min in all, with no presents or submits. - The title resumed when the last build ended, and the device was removed 2 s later. That is the same pattern as on `68a284a` (where it was 2 103 s, after 153 compute + 38 graphics builds). **Run 2** - At 101–102 s the world starts its full GPU work: 7 624 dispatches in 2 s, 152 chained split dispatches in 164 slabs, and 422 MiB of split scratch. - Four `Wait64` were bridged to `queue.Wait` with `prod=qNone` at 101.8 – 105.4 s. - At 107.8 s, 4 `ExecuteIndirect of a split program skipped: no buffer for the commands of a chained ExecuteIndirect`. - The removal was logged at 107.9 s. - DRED: one partly executed compute list, at 6 778 of 6 852 operations, around `0 15 0 >6 0 15`. That is the same neighbourhood as in all my earlier removals. - Local video memory: 15.1 GB on the 8 GB card. It was ~14.7 GB in run 1. So on this card, every tree I have tried (#2057, `main` `0829441`, `68a284a`, and this stack) loses the device within seconds of the world's GPU work starting; driver builds only postpone that point. It fits the reports above that tie the removal to the total of bound shader code. I have not measured that total here. **Not tested:** `main` after `2898511` (#2118 and the rest, now `6d12f58`); #2423, #2428, #1798, #2385; `XCL_UMA_SHADOW`; more than one run of each row; the HLSL path; AMD. **AI use:** Claude Code (Claude Opus 5.5) built the tree, ran the tests, the precompile and the runs, read the logs, and wrote this comment.
Author
Owner

@⁠razormontana on GitHub · 2026-11-25 20:13 UTC · original

I’ll add a read-only helper for saved XCL logs that aligns the final sampled no-present window with ongoing driver compiles and logged GPU waits. The regression cases will cover compiles already in flight when presents stop, concurrent compiles, and wait-only stalls.

Assisted by OpenAI Codex (GPT-6.2 Sol).

**@⁠razormontana** on GitHub · 2026-11-25 20:13 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7173352933) I’ll add a read-only helper for saved XCL logs that aligns the final sampled no-present window with ongoing driver compiles and logged GPU waits. The regression cases will cover compiles already in flight when presents stop, concurrent compiles, and wait-only stalls. Assisted by OpenAI Codex (GPT-6.2 Sol).
Author
Owner

@⁠GreemSC on GitHub · 2026-11-25 20:14 UTC · original

@⁠razormontana before you write it: we have a helper of that kind for our runs (Python, read-only on xcl.log), happy to share the script if it saves you the work. What it does, in case the approach helps:

  • Milestones from the activity (2 s) lines: first present, first #101 (::#101 stub line), last present, and the stall at the end (seconds with 0 presents) with what still moved during it (submits, draws, dispatches, DirectStorage).
  • Compiles from driver compile start/finish: the ones after #101, those ≥ 2 s and on which thread; a start with no finish by the end of the log is flagged (that is how we found a 2.4 MB compute program, 95cc13288a27a96e, whose compile never ends on RADV).
  • GPU waits: bridged prod=qNone lines, watchdog releases (did not complete within … released on CPU).
  • The last thread dump: title threads grouped by their top two game frames, and every title thread with XCL frames above its first game frame symbolized with the build's PDB. That one line was the most useful, e.g. TITLE THREAD 584 HELD BY XCL (from game+0x248cbc1): driver_pso < compute_container < PipelineBuilder::pipeline < dispatch_chain::whole < bind::execute_indirect. It needs the dump deeper than 14 frames (we use 28), or the XCL callers under the driver frames are cut off.
  • A verdict by rules on top of that: a held title thread in dispatch_chain::whole → #2404, in pso_async::resolve_for_bind → the bind wait (#2118), compile-bound vs submits-but-no-presents (GPU-side wait).

The cells behind line from the thread dump (suggested on #2244) is what tells "recorded but never submitted" from a real GPU wait; the helper prints it when the log has it.

AI use: Claude Code (Claude Opus 5.5) wrote the helper and this comment.

**@⁠GreemSC** on GitHub · 2026-11-25 20:14 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7173375249) @⁠razormontana before you write it: we have a helper of that kind for our runs (Python, read-only on `xcl.log`), happy to share the script if it saves you the work. What it does, in case the approach helps: - **Milestones** from the `activity (2 s)` lines: first present, first `#101` (`::#101 ` stub line), last present, and the stall at the end (seconds with 0 presents) with what still moved during it (submits, draws, dispatches, DirectStorage). - **Compiles** from `driver compile start/finish`: the ones after `#101`, those ≥ 2 s and on which thread; a `start` with no `finish` by the end of the log is flagged (that is how we found a 2.4 MB compute program, `95cc13288a27a96e`, whose compile never ends on RADV). - **GPU waits**: bridged `prod=qNone` lines, watchdog releases (`did not complete within … released on CPU`). - **The last thread dump**: title threads grouped by their top two game frames, and every **title thread with XCL frames above its first game frame** symbolized with the build's PDB. That one line was the most useful, e.g. `TITLE THREAD 584 HELD BY XCL (from game+0x248cbc1): driver_pso < compute_container < PipelineBuilder::pipeline < dispatch_chain::whole < bind::execute_indirect`. It needs the dump deeper than 14 frames (we use 28), or the XCL callers under the driver frames are cut off. - A **verdict** by rules on top of that: a held title thread in `dispatch_chain::whole` → #2404, in `pso_async::resolve_for_bind` → the bind wait (#2118), compile-bound vs submits-but-no-presents (GPU-side wait). The `cells behind` line from the thread dump (suggested on #2244) is what tells "recorded but never submitted" from a real GPU wait; the helper prints it when the log has it. AI use: Claude Code (Claude Opus 5.5) wrote the helper and this comment.
Author
Owner

@⁠imnicho on GitHub · 2026-11-25 20:40 UTC · original

RTX 5080 16 GB with 16 GB of RAM, on main 2898511 + #2404 + #2097 + #684 + #751: the title gets from its world set-up into the intro and presents for 3.8 minutes (grey behind the letterbox), then the device is lost without a Windows event. Without #684 / #751 it crashes 2 s after the set-up.

Setup: RTX 5080 16 GB (driver 610.47, 32-lane waves), i7-7700K (4 cores / 8 threads), 16 GB RAM, Windows 10 22H2, release, Series S profile, XCL_NETWORK=0, scripted pad. XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_TEXTURE_LEVEL_PAGES=1 XCL_HUGE_PSO_CONCURRENCY=2 XCL_DRED=1. Compute pipelines prebuilt with the same build (--precompile --only cs --pipelines --used-only: 1 035 programs, 323 of them split into 2 646 pieces, 0 refused). Two local log lines on top (RAM, DRED's device state).

run tree first #101 after it end
1 without #684 / #751 273.7 s - 0xc0000005 in VCRUNTIME140.dll 1.9 s later (a write, inside a copy XCL makes for the title); gone with #684 and #751, which I did not tell apart
2 with them 327.1 s 0 frames, 143 draws: graphics pipelines being built (48) the run's 900 s
3 the same 273.1 s 22 frames over 620 s, 117 graphics pipelines built the run's 900 s, no removal
4 the same 254.6 s 90 frames over 224 s (44 562 draws, 236 879 dispatches) 0x887a0005 at + 228 s: no nvlddmkm event, DRED state 0, no list (two title waits whose producer was not submitted yet were released on the CPU at + 137 and + 146 s)
  • #2404 does what it says here: in run 2 ExecuteIndirect: 141 chained (0 of them whole), and no whole form is built in any run. On the older tree those builds took this card about 50 minutes of world load (#2338).
  • Almost every compute pipeline comes with a blob: 726 - 739 of 762 - 770 a run; 1 to 3 without.
  • Memory in run 4: video memory peaks at 10.5 GB local and 6.2 GB non-local; RAM available goes down to 315 MB of 16 GB during the world. I cannot say from one run whether that has a part in the removal.
  • Picture: the loading artwork is drawn right; the intro behind its letterbox is flat grey in every captured frame.

Not tested: main newer than 2898511 (#2118 and the later translator changes are not in); the Series X profile; more than one run that reaches the removal.

AI use: Claude Code with Claude Fable 5.2 ran the title on the machine above and wrote this.

**@⁠imnicho** on GitHub · 2026-11-25 20:40 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7174023640) **RTX 5080 16 GB with 16 GB of RAM, on `main` `2898511` + #2404 + #2097 + #684 + #751: the title gets from its world set-up into the intro and presents for 3.8 minutes (grey behind the letterbox), then the device is lost without a Windows event. Without #684 / #751 it crashes 2 s after the set-up.** **Setup:** RTX 5080 16 GB (driver 610.47, 32-lane waves), i7-7700K (4 cores / 8 threads), 16 GB RAM, Windows 10 22H2, release, Series S profile, `XCL_NETWORK=0`, scripted pad. `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_TEXTURE_LEVEL_PAGES=1 XCL_HUGE_PSO_CONCURRENCY=2 XCL_DRED=1`. Compute pipelines prebuilt with the same build (`--precompile --only cs --pipelines --used-only`: 1 035 programs, 323 of them split into 2 646 pieces, 0 refused). Two local log lines on top (RAM, DRED's device state). | run | tree | first `#101` | after it | end | |---|---|---|---|---| | 1 | without #684 / #751 | 273.7 s | - | `0xc0000005` in `VCRUNTIME140.dll` 1.9 s later (a write, inside a copy XCL makes for the title); gone with #684 and #751, which I did not tell apart | | 2 | with them | 327.1 s | 0 frames, 143 draws: graphics pipelines being built (48) | the run's 900 s | | 3 | the same | 273.1 s | 22 frames over 620 s, 117 graphics pipelines built | the run's 900 s, no removal | | 4 | the same | 254.6 s | 90 frames over 224 s (44 562 draws, 236 879 dispatches) | `0x887a0005` at + 228 s: no `nvlddmkm` event, DRED state 0, no list (two title waits whose producer was not submitted yet were released on the CPU at + 137 and + 146 s) | - **#2404 does what it says here:** in run 2 `ExecuteIndirect: 141 chained (0 of them whole)`, and no whole form is built in any run. On the older tree those builds took this card about 50 minutes of world load (#2338). - **Almost every compute pipeline comes with a blob:** 726 - 739 of 762 - 770 a run; 1 to 3 without. - **Memory in run 4:** video memory peaks at 10.5 GB local and 6.2 GB non-local; RAM available goes down to 315 MB of 16 GB during the world. I cannot say from one run whether that has a part in the removal. - **Picture:** the loading artwork is drawn right; the intro behind its letterbox is flat grey in every captured frame. **Not tested:** `main` newer than `2898511` (#2118 and the later translator changes are not in); the Series X profile; more than one run that reaches the removal. AI use: Claude Code with Claude Fable 5.2 ran the title on the machine above and wrote this.
Author
Owner

@⁠claudetools-gh on GitHub · 2026-11-25 20:40 UTC · original

RTX 5070 Ti: the screen-space compute programs that dominate XCL_GPU_PROFILE once the world starts are slow on their own (not only from queue overlap), are not running into the loop guard, and at least two of them are search loops whose trip count depends on what they read. Here the depth they read is still empty.

Setup: RTX 5070 Ti 16 GB, Ryzen 7 9700X, 62 GB, Windows 11. The tree is main 2898511 with #2372, #2404, #2426 and #2384, plus local GPU-view windows. The 1000 CS_RaytracingResolve programs are refused, as in @⁠jessenic's test. Settings: XCL_DIRECT_DXIL=1 XCL_UMA_SHADOW=0 XCL_PAGE_ALIAS=1 XCL_NETWORK=0. There were three runs of ~200 s each, past the first world frames.

1. Overlap inflates the profile; serialised, these programs are still slow. As gpu_profile.rs says, ops on different queues overlap and each one is charged the whole time. In the normal run a 684-byte program with no loop (3429c04607b00016, 57600 groups of 32) shows 37–45 ms per call.

I added a local switch that holds one lock around each title ExecuteCommandLists and waits on a fence for the submission before releasing it (2 s cap, because some lists wait on other queues). With it, that program drops out of the top 15. These remain, per call:

program wave groups longest call, serialised
b78fa10b425b8e54 wave64 split 160×90 of 8×8 850 ms
1b5466f261a70cde wave64 split 160×90 of 8×8 254 ms
520a7d5cb893a9f7 wave64 split 320×180 of 64 217 ms
a3c0b8a98beee431 wave32 320×180 of 4×8 215 ms
67657769b50d2f8b wave32 57600 of 32 122 ms

The switch, in q_execute_command_lists around the driver call:

let _serial = gpu_serial().then(|| GPU_SERIAL.lock().unwrap_or_else(|e| e.into_inner()));
f(this, chunk.len() as u32, chunk.as_ptr());
if _serial.is_some() {
    // CreateFence + queue.Signal(fence, 1), then spin on GetCompletedValue() < 1 for at most 2 s
    serial_wait(this);
}

2. Not the loop guard. I lowered the direct translator's per-lane loop budget from 65536 to 1024 for 13 of these programs. The DXIL was rebuilt for them and kept out of the caches. Their times did not drop; b78fa10b had a 3.7 s call in that run. So no lane spins up to the guard.

3. What the two smallest loops do (disassembly):

  • 67657769b50d2f8b: the loop at 0x620–0x6b0 does an image_sample_lz of one texture each step, and leaves on an SCC test of the sampled value. That is a march or search over a texture, so its trip count depends on the texture's contents.
  • b78fa10b425b8e54: the first loop (0x5c8–0x67c) steps through cascades. For each, it reads the cascade's scale and offset from the constant buffer at 0x4b0 + 16·i. It moves to the next cascade while the transformed position is above 1.0 on any axis and the count at +0x72c allows it. The second loop is a fixed 8 steps of 4 buffer_store_format_xyzw each, plus 15 image_stores in the program.

In the same runs, my target probe on the 2560×1440 scene targets shows the depth target at 0 % off its clear value. No world geometry has reached depth yet.

That makes these loops plausible worst-case paths: a march that never finds a surface, and a position that is outside every cascade. This is a hypothesis I have not confirmed. If it holds, part of the cost goes away once geometry reaches depth, and these numbers say little about the translation itself.

4. The end of two runs. Two runs ended in 0x80000003 at the same title address, game_scarlett_master.exe+0x4da6315. One was at 158 s, in a run that also skipped the dispatches of four of these programs. The other was at 197 s, with nothing skipped. Before the 197 s one, the GPU had been saturated for about a minute, with 2000–6000 ops in flight and presents stopped. It looks like the title giving up on the GPU, which may be the watchdog of this issue, but I have not tied that address to the "GPU Loc Sig" path. A third run with the same settings ended at 207 s in the read of 0xFFFFFFFFFFFFFFFF that others have reported instead.

Next: a GPU Trace capture with the real-time shader profiler on these programs, to see where the time is spent inside them.

AI-assisted.

**@⁠claudetools-gh** on GitHub · 2026-11-25 20:40 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7174030355) **RTX 5070 Ti: the screen-space compute programs that dominate `XCL_GPU_PROFILE` once the world starts are slow on their own (not only from queue overlap), are not running into the loop guard, and at least two of them are search loops whose trip count depends on what they read. Here the depth they read is still empty.** Setup: RTX 5070 Ti 16 GB, Ryzen 7 9700X, 62 GB, Windows 11. The tree is `main` `2898511` with #2372, #2404, #2426 and #2384, plus local GPU-view windows. The 1000 `CS_RaytracingResolve` programs are refused, as in @⁠jessenic's test. Settings: `XCL_DIRECT_DXIL=1 XCL_UMA_SHADOW=0 XCL_PAGE_ALIAS=1 XCL_NETWORK=0`. There were three runs of ~200 s each, past the first world frames. **1. Overlap inflates the profile; serialised, these programs are still slow.** As `gpu_profile.rs` says, ops on different queues overlap and each one is charged the whole time. In the normal run a 684-byte program with no loop (`3429c04607b00016`, 57600 groups of 32) shows 37–45 ms per call. I added a local switch that holds one lock around each title `ExecuteCommandLists` and waits on a fence for the submission before releasing it (2 s cap, because some lists wait on other queues). With it, that program drops out of the top 15. These remain, per call: | program | wave | groups | longest call, serialised | |---|---|---|---| | `b78fa10b425b8e54` | wave64 split | 160×90 of 8×8 | 850 ms | | `1b5466f261a70cde` | wave64 split | 160×90 of 8×8 | 254 ms | | `520a7d5cb893a9f7` | wave64 split | 320×180 of 64 | 217 ms | | `a3c0b8a98beee431` | wave32 | 320×180 of 4×8 | 215 ms | | `67657769b50d2f8b` | wave32 | 57600 of 32 | 122 ms | The switch, in `q_execute_command_lists` around the driver call: ```rust let _serial = gpu_serial().then(|| GPU_SERIAL.lock().unwrap_or_else(|e| e.into_inner())); f(this, chunk.len() as u32, chunk.as_ptr()); if _serial.is_some() { // CreateFence + queue.Signal(fence, 1), then spin on GetCompletedValue() < 1 for at most 2 s serial_wait(this); } ``` **2. Not the loop guard.** I lowered the direct translator's per-lane loop budget from 65536 to 1024 for 13 of these programs. The DXIL was rebuilt for them and kept out of the caches. Their times did not drop; `b78fa10b` had a 3.7 s call in that run. So no lane spins up to the guard. **3. What the two smallest loops do (disassembly):** - `67657769b50d2f8b`: the loop at `0x620`–`0x6b0` does an `image_sample_lz` of one texture each step, and leaves on an SCC test of the sampled value. That is a march or search over a texture, so its trip count depends on the texture's contents. - `b78fa10b425b8e54`: the first loop (`0x5c8`–`0x67c`) steps through cascades. For each, it reads the cascade's scale and offset from the constant buffer at `0x4b0 + 16·i`. It moves to the next cascade while the transformed position is above 1.0 on any axis and the count at `+0x72c` allows it. The second loop is a fixed 8 steps of 4 `buffer_store_format_xyzw` each, plus 15 `image_store`s in the program. In the same runs, my target probe on the 2560×1440 scene targets shows the depth target at 0 % off its clear value. No world geometry has reached depth yet. That makes these loops plausible worst-case paths: a march that never finds a surface, and a position that is outside every cascade. **This is a hypothesis I have not confirmed.** If it holds, part of the cost goes away once geometry reaches depth, and these numbers say little about the translation itself. **4. The end of two runs.** Two runs ended in `0x80000003` at the same title address, `game_scarlett_master.exe+0x4da6315`. One was at 158 s, in a run that also skipped the dispatches of four of these programs. The other was at 197 s, with nothing skipped. Before the 197 s one, the GPU had been saturated for about a minute, with 2000–6000 ops in flight and presents stopped. It looks like the title giving up on the GPU, which may be the watchdog of this issue, but I have not tied that address to the "GPU Loc Sig" path. A third run with the same settings ended at 207 s in the read of `0xFFFFFFFFFFFFFFFF` that others have reported instead. **Next:** a GPU Trace capture with the real-time shader profiler on these programs, to see where the time is spent inside them. AI-assisted.
Author
Owner

@⁠b3IKK on GitHub · 2026-11-25 20:47 UTC · original

In-run prebuild of the split whole forms does not clear the 92 s wall. On top of #2491 I recorded the 77 whole forms the title asks for (used-wholes.txt, by console record) and submitted them at creation on the next run:

  • run A (records): 77 asked / 76 built / 0 skipped, last present 92 s
  • run B (prebuilds at creation): 92 asked / 93 built / 0 skipped, last present 92 s

77 whole forms × 20–35 s is ~38 min of driver work at 2–4 huge-compile slots, far beyond the ~92 s load window, and creation order is not the ask order. The whole forms need an offline prebuild (or a much cheaper compile) before the run; the in-run ordering/capacity levers are exhausted (4 slots also stopped at 92 s).

AI use: OpenCode, Claude Fable 5.2 ran both passes on this machine and wrote this.

**@⁠b3IKK** on GitHub · 2026-11-25 20:47 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7174197549) In-run prebuild of the split whole forms does not clear the 92 s wall. On top of #2491 I recorded the 77 whole forms the title asks for (`used-wholes.txt`, by console record) and submitted them at creation on the next run: - run A (records): 77 asked / 76 built / 0 skipped, last present 92 s - run B (prebuilds at creation): 92 asked / 93 built / 0 skipped, last present 92 s 77 whole forms × 20–35 s is ~38 min of driver work at 2–4 huge-compile slots, far beyond the ~92 s load window, and creation order is not the ask order. The whole forms need an offline prebuild (or a much cheaper compile) before the run; the in-run ordering/capacity levers are exhausted (4 slots also stopped at 92 s). AI use: OpenCode, Claude Fable 5.2 ran both passes on this machine and wrote this.
Author
Owner

@⁠MacieGx on GitHub · 2026-11-25 20:57 UTC · original

@⁠Soliver84 @⁠CowboyBingus as asked, the local branch is pushed as a reference: https://github.com/MacieGx/xcl/tree/lab/gta6-nvidia-world (commit b72aa23). It is a lab branch, not for merge: main from about a day ago, a stack of open PRs, and ~115 local commits with lab switches and probes. The parts worth porting will come as separate PRs.

What it has on top of the open PRs listed in my earlier comment:

  • GPU-view memory: windows 4..15 over the title's GPU view (view_mem.rs, recomp::HEAP_WINDOW_SLOTS = 16), tiles filled on demand from kernelx::mirrors. Heap-window mode only (XCL_HEAP_WINDOWS=1). Overlaps ivall's draft #2384, which mirrors buffer views into a sparse window.
  • Texture touch: textures named in a draw's material record (bind::draw_textures) and in the first 64 slots of every bound descriptor table (title_textures::tables_drawn) are touched and mapped again if evicted; with #640 / #782's page budget this fixes black albedo in the world and the blank loading-screen cards.
  • Depth / stencil UAVs: UAV twins for depth and stencil planes, incl. the D16S8 depth plane CS_GenerateMaterialMasks writes and the tile-lighting draws EQUAL-test (depth_twin.rs; #1989 / #1063 cover parts of this).
  • Buffers above the windows: the title's GPU-only buffers placed at 0x15_… / 0x16_… get tiles at first use (XCL_OUTSIDE_BUFFERS=1, off by default; lighting work in progress).
  • Memory: no zeroing of the coherent window, shared clamp buffers, XCL_SHADOW_TILED=1 (lazy tiles for the UMA shadow), and a fix for a memcpy fault on title memory the title decommits.
  • s_getpc rodata (#2229, HLSL + direct), the f16 interpolants (PR coming), mesh blob cache, MS precompile (#2246), the lock-order fix noted on #1795.

Env I run it with: XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_SHADOW_TILED=1 XCL_PAGE_BUDGET_MB=1024 XCL_SEEN_TOUCH=0 XCL_EVICT_SHARED=1 XCL_TWO_PASS_RES_MB=4 XCL_VIEW_POOL_MB=1024 XCL_WAIT64_TRUST_FENCE=1, after xcl shaders <shaders.rpf> --precompile --only cs --pipelines, --only ms --pipelines, --only ps and --only vs with the same XCL_HEAP_WINDOWS=1.

Where it stands on the RTX 5080: loading cards complete, world drawn textured and sun-lit (still overexposed / teal: only the sun reaches the lit target), about 1 present per 2 s, and a 0x887a0005 removal 25–45 s into the world with no DRED fault and ~3.5 GB RAM free. That matches #2403 (the 512 MB shader-code heap); I am measuring bound code next.

AI use: Claude Code (Claude Opus 5.5 coordinating; Claude Fable 5.2 and Opus 5.5 subagents wrote most of the lab changes).

**@⁠MacieGx** on GitHub · 2026-11-25 20:57 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7174414869) @⁠Soliver84 @⁠CowboyBingus as asked, the local branch is pushed as a reference: https://github.com/MacieGx/xcl/tree/lab/gta6-nvidia-world (commit `b72aa23`). It is a lab branch, not for merge: `main` from about a day ago, a stack of open PRs, and ~115 local commits with lab switches and probes. The parts worth porting will come as separate PRs. What it has on top of the open PRs listed in my earlier comment: - **GPU-view memory**: windows 4..15 over the title's GPU view (`view_mem.rs`, `recomp::HEAP_WINDOW_SLOTS = 16`), tiles filled on demand from `kernelx::mirrors`. Heap-window mode only (`XCL_HEAP_WINDOWS=1`). Overlaps ivall's draft #2384, which mirrors buffer views into a sparse window. - **Texture touch**: textures named in a draw's material record (`bind::draw_textures`) and in the first 64 slots of every bound descriptor table (`title_textures::tables_drawn`) are touched and mapped again if evicted; with #640 / #782's page budget this fixes black albedo in the world and the blank loading-screen cards. - **Depth / stencil UAVs**: UAV twins for depth and stencil planes, incl. the D16S8 depth plane CS_GenerateMaterialMasks writes and the tile-lighting draws EQUAL-test (`depth_twin.rs`; #1989 / #1063 cover parts of this). - **Buffers above the windows**: the title's GPU-only buffers placed at 0x15_… / 0x16_… get tiles at first use (`XCL_OUTSIDE_BUFFERS=1`, off by default; lighting work in progress). - **Memory**: no zeroing of the coherent window, shared clamp buffers, `XCL_SHADOW_TILED=1` (lazy tiles for the UMA shadow), and a fix for a memcpy fault on title memory the title decommits. - s_getpc rodata (#2229, HLSL + direct), the f16 interpolants (PR coming), mesh blob cache, MS precompile (#2246), the lock-order fix noted on #1795. Env I run it with: `XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_SHADOW_TILED=1 XCL_PAGE_BUDGET_MB=1024 XCL_SEEN_TOUCH=0 XCL_EVICT_SHARED=1 XCL_TWO_PASS_RES_MB=4 XCL_VIEW_POOL_MB=1024 XCL_WAIT64_TRUST_FENCE=1`, after `xcl shaders <shaders.rpf> --precompile --only cs --pipelines`, `--only ms --pipelines`, `--only ps` and `--only vs` with the same `XCL_HEAP_WINDOWS=1`. Where it stands on the RTX 5080: loading cards complete, world drawn textured and sun-lit (still overexposed / teal: only the sun reaches the lit target), about 1 present per 2 s, and a 0x887a0005 removal 25–45 s into the world with no DRED fault and ~3.5 GB RAM free. That matches #2403 (the 512 MB shader-code heap); I am measuring bound code next. AI use: Claude Code (Claude Opus 5.5 coordinating; Claude Fable 5.2 and Opus 5.5 subagents wrote most of the lab changes).
Author
Owner

@⁠throny on GitHub · 2026-11-25 20:58 UTC · original

To avoid doubling up: what this machine (RTX 4080 16 GB, i9-12900K, 64 GB RAM) is running now, since most reports here are held back by 16–32 GB of RAM.

Tree: main 6d12f58 + #2404 + #2097 + #684 + #751 (the stack of @⁠imnicho's and @⁠Kalmarv's runs) plus the mergeable grey-picture fixes #1803, #2229, #2384 and #1975. All eight merge without conflicts. Compute programs precompiled with the same build.

Runs: one with XCL_GPU_VIEW_BUFFERS=1 (#2384), one without, same caches, frame dumps on. I'll post what the picture shows, the draw / skip counts and memory.

Not in it, because they conflict with main today: #2092, #541, #1055, #1102, #640, #782, #1795. If one of those authors rebases, I can add it and rerun the same day. If someone already has this combination running, say so and I'll take another one instead.

Earlier today on this card, for the record: 50a9fde + #2372 + #751 ran 600 s with no removal and no crash, intro audio and credits playing over flat grey; with #757–#759 on top it crashed in xg::copy_from at 96–126 s in 2 of 2 runs, which #684 is for.

AI use: Claude Code (Claude Fable 5.2) ran this and wrote it.

**@⁠throny** on GitHub · 2026-11-25 20:58 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7174438775) To avoid doubling up: what this machine (RTX 4080 16 GB, i9-12900K, **64 GB RAM**) is running now, since most reports here are held back by 16–32 GB of RAM. **Tree:** `main` `6d12f58` + #2404 + #2097 + #684 + #751 (the stack of @⁠imnicho's and @⁠Kalmarv's runs) **plus the mergeable grey-picture fixes** #1803, #2229, #2384 and #1975. All eight merge without conflicts. Compute programs precompiled with the same build. **Runs:** one with `XCL_GPU_VIEW_BUFFERS=1` (#2384), one without, same caches, frame dumps on. I'll post what the picture shows, the draw / skip counts and memory. Not in it, because they conflict with `main` today: #2092, #541, #1055, #1102, #640, #782, #1795. If one of those authors rebases, I can add it and rerun the same day. If someone already has this combination running, say so and I'll take another one instead. Earlier today on this card, for the record: `50a9fde` + #2372 + #751 ran 600 s with no removal and no crash, intro audio and credits playing over flat grey; with #757–#759 on top it crashed in `xg::copy_from` at 96–126 s in 2 of 2 runs, which #684 is for. AI use: Claude Code (Claude Fable 5.2) ran this and wrote it.
Author
Owner

@⁠b3IKK on GitHub · 2026-11-25 20:58 UTC · original

Pass C on the warm whole-form cache: whole form: 113 asked for, 112 built, 0 skipped, presentation 94 s. The whole-form frontier is not converging: used-wholes.txt went 77 → 94 → 113 (+17/+19 per run), so each run asks ~20 new 0.7–1.1 MB whole forms and the first new one at ~92 s stalls. The in-run prebuild/capacity/ordering levers cannot cover a moving 2.5-hour compile set; the remaining options are a full offline prebuild of all 266 split programs' whole forms or an allocator-less/bundle scratch path that runs the already-compiled pieces instead.

AI use: OpenCode, Claude Fable 5.2 ran the third pass and wrote this.

**@⁠b3IKK** on GitHub · 2026-11-25 20:58 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7174446195) Pass C on the warm whole-form cache: `whole form: 113 asked for, 112 built, 0 skipped`, presentation **94 s**. The whole-form frontier is not converging: `used-wholes.txt` went 77 → 94 → 113 (+17/+19 per run), so each run asks ~20 new 0.7–1.1 MB whole forms and the first new one at ~92 s stalls. The in-run prebuild/capacity/ordering levers cannot cover a moving 2.5-hour compile set; the remaining options are a full offline prebuild of all 266 split programs' whole forms or an allocator-less/bundle scratch path that runs the already-compiled pieces instead. AI use: OpenCode, Claude Fable 5.2 ran the third pass and wrote this.
Author
Owner

@⁠Raul-Paiva on GitHub · 2026-11-25 21:04 UTC · original

The same stack on today's main, on the 8 GB, 32-lane NVIDIA laptop card from my comment above. Driver builds no longer hold the title back. The device is still removed about 12 s after the first big compute burst of the world, and with warm caches DRED stops at exactly the same operation as on 2898511. Counts only, one run per column.

Versions:

  • main 6d12f58, plus three PRs, all merged in without conflicts:
  • No #751.

Setup:

  • RTX 3070 Laptop 8 GB (32-lane waves), driver 32.0.16.2124; i7-11800H, 32 GB RAM; Windows 10 19045; release.
  • XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_WATCH_HOT=0 XCL_DRED=1, A pressed every 5 s.
  • Precompile: --precompile --only cs --pipelines, 8 835 pipelines (862 programs split into 7 008 pieces), 0 refused.
  • Tests: cargo test --workspace --no-fail-fast -- --test-threads=4: 1426 passed, 2 failed, 46 ignored, 25 SKIPPED. The 2 failures:
    • dispatch_chain_divergent_forward_edges_3d, #2404's known 3070 / 3080 Ti failure;
    • vram::tests::d32s8_targets_take_their_own_size_of_video_memory, also failing on 2898511, not looked into.
first run after the precompile warm run
first #101 112.0 s 82.6 s
last frame 124.1 s 98.0 s
burst (dispatches in 2 s) 7 327, at 112 – 114 s 7 383, at 98 – 100 s
device removed 125.1 s (0x887a0006) 112.1 s (0x887a0006)
driver builds without a blob 5 4
Wait64 → queue.Wait with prod=qNone 4 6
ExecuteIndirect of a split program skipped 0 0
chained split dispatches / slabs 191 / 1 348 306 / 3 409
local video memory at the end 14 967 MB 14 912 MB

Compared with 2898511:

  • Driver builds: the 111 graphics pipelines that each waited their turn there are now driver-cache hits, so there is no long stall before the removal.
  • ExecuteIndirect: the 4 skipped for lack of a command buffer are gone.
  • DRED, warm run: the partly executed compute list stops at 6 778 of 6 852 operations, around 0 15 0 >6 0 15. That is the same count and the same place as the warm run on 2898511. The first run stopped at 185 of 14 695, in the same neighbourhood.

So on this card the removal looks deterministic and independent of the builds: it comes a fixed time after the world's first big compute burst, while local video memory is at ~15 GB.

Not tested: #751; @⁠MacieGx's lab branch; #2423, #2428, #1798, #2385; XCL_UMA_SHADOW; the HLSL path; more than one warm run; AMD.

AI use: Claude Code (Claude Opus 5.5) built the tree, ran the tests, the precompile and the runs, read the logs, and wrote this comment.

**@⁠Raul-Paiva** on GitHub · 2026-11-25 21:04 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7174578361) The same stack on today's `main`, on the 8 GB, 32-lane NVIDIA laptop card from [my comment above](https://git.gtahub.st/github/xcl-dev--xcl/issues/505). Driver builds no longer hold the title back. **The device is still removed about 12 s after the first big compute burst of the world, and with warm caches DRED stops at exactly the same operation as on `2898511`.** Counts only, one run per column. **Versions:** - `main` `6d12f58`, plus three PRs, all merged in without conflicts: - #684 `e56dbc3`; - #2404 `5ca9c23`; - #2097 `d5c2781`. - No #751. **Setup:** - RTX 3070 Laptop 8 GB (32-lane waves), driver 32.0.16.2124; i7-11800H, 32 GB RAM; Windows 10 19045; release. - `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_WATCH_HOT=0 XCL_DRED=1`, A pressed every 5 s. - Precompile: `--precompile --only cs --pipelines`, 8 835 pipelines (862 programs split into 7 008 pieces), 0 refused. - Tests: `cargo test --workspace --no-fail-fast -- --test-threads=4`: 1426 passed, 2 failed, 46 ignored, 25 `SKIPPED`. The 2 failures: - `dispatch_chain_divergent_forward_edges_3d`, #2404's known 3070 / 3080 Ti failure; - `vram::tests::d32s8_targets_take_their_own_size_of_video_memory`, also failing on `2898511`, not looked into. | | first run after the precompile | warm run | |---|---|---| | first `#101` | 112.0 s | 82.6 s | | last frame | 124.1 s | 98.0 s | | burst (dispatches in 2 s) | 7 327, at 112 – 114 s | 7 383, at 98 – 100 s | | device removed | **125.1 s** (`0x887a0006`) | **112.1 s** (`0x887a0006`) | | driver builds without a blob | 5 | 4 | | `Wait64` → `queue.Wait` with `prod=qNone` | 4 | 6 | | `ExecuteIndirect of a split program skipped` | 0 | 0 | | chained split dispatches / slabs | 191 / 1 348 | 306 / 3 409 | | local video memory at the end | 14 967 MB | 14 912 MB | **Compared with `2898511`:** - **Driver builds:** the 111 graphics pipelines that each waited their turn there are now driver-cache hits, so there is no long stall before the removal. - **`ExecuteIndirect`:** the 4 skipped for lack of a command buffer are gone. - **DRED, warm run:** the partly executed compute list stops at **6 778 of 6 852 operations**, around `0 15 0 >6 0 15`. That is the same count and the same place as the warm run on `2898511`. The first run stopped at 185 of 14 695, in the same neighbourhood. So on this card the removal looks deterministic and independent of the builds: it comes a fixed time after the world's first big compute burst, while local video memory is at ~15 GB. **Not tested:** #751; @⁠MacieGx's lab branch; #2423, #2428, #1798, #2385; `XCL_UMA_SHADOW`; the HLSL path; more than one warm run; AMD. **AI use:** Claude Code (Claude Opus 5.5) built the tree, ran the tests, the precompile and the runs, read the logs, and wrote this comment.
Author
Owner

@⁠claudetools-gh on GitHub · 2026-11-25 21:09 UTC · original

Follow-up to my comment above. An Nsight GPU Trace (real-time shader profiler) of the slow part says these programs mostly wait on memory. On NVIDIA that memory is system RAM by default, because OpenExistingHeapFromAddress works there. With XCL_UMA_SHADOW=1 the slow programs ran 4–8× faster in the next run, and world geometry reached depth by 122 s.

Same machine, tree and settings as above.

1. The trace. Nsight Graphics 2026.4, GPU Trace with the real-time shader profiler, Top-Level Triage. It covers 3.5 s at ~265 s into the run, at 0.7 fps with presents nearly stopped. The run used XCL_UMA_SHADOW=0, which on this card is the same path as the default.

  • 287 k samples, ~99 % of them in compute.
  • Stall reasons over all samples: Long Scoreboard 61 %, Wait 14 %, Selected 9 %, Short Scoreboard 6 %.

2. The hottest line of the heaviest programs is the start of the program. It is the first use of a value loaded from io (u0). In shader 370, the heaviest program at 9.8 % of all samples, the profiler puts 38 % of its samples on one line of its DXIL. That line is the first comparison that needs io dword 5. For the next ones, the share on that one opening line is:

program's share of all samples share on its first io use or load
6.6 % 68 %
3.5 % 85 %
3.3 % 75 % (the load of dword 113)
3.9 % 48 %

These are Nsight's DXIL hashes. I have not mapped them to the console hashes, because the PSOs carry no names.

3. Why the first load is slow. console_list.rs copies the 128 io dwords into the list's UMA arena (uma_copy) and binds them as root UAV 0. The UMA windows are heaps from OpenExistingHeapFromAddress over the VirtualAlloced region (real.rs, open_uma) unless shadowing is asked for or that call fails.

So on NVIDIA, both of these are reads from system memory across PCIe:

  • each wave's first io read;
  • every access a program makes through the memory windows.

4. The same settings with XCL_UMA_SHADOW=1 (one run, no Nsight, normal concurrent queues, XCL_GPU_PROFILE), against the earlier runs:

program XCL_UMA_SHADOW=0, longest call =1, longest call
b78fa10b425b8e54 280–900 ms 151–555 ms
520a7d5cb893a9f7 71–217 ms 30–32 ms
a3c0b8a98beee431 215 ms 27.5 ms
67657769b50d2f8b 36–142 ms 11.6 ms

At 122 s the probe saw world geometry on the 2560×1440 targets:

  • depth: 50.2 % of the samples off the clear value (0 % at this point in every earlier run);
  • G-buffer colour: 38–41 %.

On screen there are shapes, all in cyan, because the RT resolve programs are refused here.

I had turned the shadow off earlier because of a green flicker in the intro on an older tree. It did not show in this run.

5. It does not get further, though. The run ended at 129.7 s in the same 0x80000003 at game_scarlett_master.exe+0x4da6315. That is earlier than any run before, so it now looks tied to the scene being reached rather than to GPU time. I am looking at what that check is.

About the ray-march idea in my last comment: the profile points at memory latency, not at long trip counts. The loops may still add to it, but they are not what dominates.

AI-assisted.

**@⁠claudetools-gh** on GitHub · 2026-11-25 21:09 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7174696244) Follow-up to [my comment above](https://git.gtahub.st/github/xcl-dev--xcl/issues/505). **An Nsight GPU Trace (real-time shader profiler) of the slow part says these programs mostly wait on memory. On NVIDIA that memory is system RAM by default, because `OpenExistingHeapFromAddress` works there. With `XCL_UMA_SHADOW=1` the slow programs ran 4–8× faster in the next run, and world geometry reached depth by 122 s.** Same machine, tree and settings as above. **1. The trace.** Nsight Graphics 2026.4, GPU Trace with the real-time shader profiler, Top-Level Triage. It covers 3.5 s at ~265 s into the run, at 0.7 fps with presents nearly stopped. The run used `XCL_UMA_SHADOW=0`, which on this card is the same path as the default. - 287 k samples, ~99 % of them in compute. - Stall reasons over all samples: Long Scoreboard 61 %, Wait 14 %, Selected 9 %, Short Scoreboard 6 %. **2. The hottest line of the heaviest programs is the start of the program.** It is the first use of a value loaded from `io` (u0). In shader 370, the heaviest program at 9.8 % of all samples, the profiler puts 38 % of its samples on one line of its DXIL. That line is the first comparison that needs `io` dword 5. For the next ones, the share on that one opening line is: | program's share of all samples | share on its first `io` use or load | |---|---| | 6.6 % | 68 % | | 3.5 % | 85 % | | 3.3 % | 75 % (the load of dword 113) | | 3.9 % | 48 % | These are Nsight's DXIL hashes. I have not mapped them to the console hashes, because the PSOs carry no names. **3. Why the first load is slow.** `console_list.rs` copies the 128 `io` dwords into the list's UMA arena (`uma_copy`) and binds them as root UAV 0. The UMA windows are heaps from `OpenExistingHeapFromAddress` over the `VirtualAlloc`ed region (`real.rs`, `open_uma`) unless shadowing is asked for or that call fails. So on NVIDIA, both of these are reads from system memory across PCIe: - each wave's first `io` read; - every access a program makes through the memory windows. **4. The same settings with `XCL_UMA_SHADOW=1`** (one run, no Nsight, normal concurrent queues, `XCL_GPU_PROFILE`), against the earlier runs: | program | `XCL_UMA_SHADOW=0`, longest call | `=1`, longest call | |---|---|---| | `b78fa10b425b8e54` | 280–900 ms | 151–555 ms | | `520a7d5cb893a9f7` | 71–217 ms | 30–32 ms | | `a3c0b8a98beee431` | 215 ms | 27.5 ms | | `67657769b50d2f8b` | 36–142 ms | 11.6 ms | At 122 s the probe saw world geometry on the 2560×1440 targets: - depth: 50.2 % of the samples off the clear value (0 % at this point in every earlier run); - G-buffer colour: 38–41 %. On screen there are shapes, all in cyan, because the RT resolve programs are refused here. I had turned the shadow off earlier because of a green flicker in the intro on an older tree. It did not show in this run. **5. It does not get further, though.** The run ended at 129.7 s in the same `0x80000003` at `game_scarlett_master.exe+0x4da6315`. That is earlier than any run before, so it now looks tied to the scene being reached rather than to GPU time. I am looking at what that check is. About the ray-march idea in my last comment: the profile points at memory latency, not at long trip counts. The loops may still add to it, but they are not what dominates. AI-assisted.
Author
Owner

@⁠b3IKK on GitHub · 2026-11-25 21:24 UTC · original

The whole-form wall is now removed, and the next wall is the device removal. Stack 68a284a + #2097 + #2404 + #2519 (scratch for no-allocator/bundle dispatches), retail 1.0.2.1 on an RTX 5080, XCL_DIRECT_DXIL=1, default wait:

  • whole forms asked: 0 (ExecuteIndirect 0 whole, 0 slabs lost; the Dispatch/bundle ones run the pieces with the XCL scratch)
  • presentation to 98 s
  • then 0x887a0005 at 98.1 s: CreatePlacedResourceX of 1024×512 textures (formats 71/72/98) fails, device removed.

This matches the 5070 Ti stack result (device removed at 153.7 s with DRED page fault at VA 0) — the remaining blocker is no longer the split/whole-form path. #2519 is the scratch change (stacked on #2491); the full combined stack is what reaches this point.

AI use: OpenCode, Claude Fable 5.2 ran the combined stack on this machine and wrote this.

**@⁠b3IKK** on GitHub · 2026-11-25 21:24 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7175040121) The whole-form wall is now removed, and the next wall is the device removal. Stack `68a284a` + #2097 + #2404 + #2519 (scratch for no-allocator/bundle dispatches), retail 1.0.2.1 on an RTX 5080, `XCL_DIRECT_DXIL=1`, default wait: - whole forms asked: **0** (ExecuteIndirect 0 whole, 0 slabs lost; the Dispatch/bundle ones run the pieces with the XCL scratch) - presentation to **98 s** - then `0x887a0005` at 98.1 s: `CreatePlacedResourceX` of 1024×512 textures (formats 71/72/98) fails, device removed. This matches the 5070 Ti stack result (device removed at 153.7 s with DRED page fault at VA 0) — the remaining blocker is no longer the split/whole-form path. #2519 is the scratch change (stacked on #2491); the full combined stack is what reaches this point. AI use: OpenCode, Claude Fable 5.2 ran the combined stack on this machine and wrote this.
Author
Owner

@⁠b3IKK on GitHub · 2026-11-25 21:28 UTC · original

The 98 s device removal is GPU work, not resource creation. From the stack + scratch run and two isolation runs (RTX 5080, retail 1.0.2.1, XCL_DIRECT_DXIL=1, default wait):

  • With the full scratch path: at 90 s compute split: ... 271 chained dispatches issued ...; ExecuteIndirect: 412 chained (0 whole); at 98.036 s D3D12 device removed: 0x887a0005. The CreatePlacedResourceX failures (1024×512 formats 71/72/98) happen after the removal.
  • With bundles excluded from the scratch (only allocator == 0 direct lists): removal still at 99.752 s, with only 11 dispatch chains and 0 ExecuteIndirect chained — so it is not the bundle half and not the number of chains.
  • Without #2519 (the #2404+#2097 stack alone), the title stalls at 92/116 s on whole forms and does not remove the device.
  • The XCL report's crash is the title's own int3 at game_scarlett_master.exe+0x2474606, the same offset as the 5090 report — a consequence of the device removal, not the first fault.

So the first fault is a GPU suspend shortly after the pieces for allocator == 0 dispatches run, with the resource creation failures as symptoms. The 5070 Ti DRED "page fault at GPU VA 0x0" points at a piece reading a null/unbound address. One concrete candidate: the owned path records the pieces without setting the dispatch-chain root signature, so SetComputeRootUnorderedAccessView(6, ...) / constants 7 are invalid under the title's/ABI signature. I am testing list.SetComputeRootSignature(&chain.builder.signature) before record_dispatch_chain; the result will follow.

AI use: OpenCode, Claude Fable 5.2 ran the three retail passes on this machine and wrote this.

**@⁠b3IKK** on GitHub · 2026-11-25 21:28 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7175125198) The 98 s device removal is GPU work, not resource creation. From the stack + scratch run and two isolation runs (RTX 5080, retail 1.0.2.1, `XCL_DIRECT_DXIL=1`, default wait): - With the full scratch path: at 90 s `compute split: ... 271 chained dispatches issued ...; ExecuteIndirect: 412 chained (0 whole)`; at 98.036 s `D3D12 device removed: 0x887a0005`. The `CreatePlacedResourceX` failures (1024×512 formats 71/72/98) happen **after** the removal. - With bundles excluded from the scratch (only `allocator == 0` direct lists): removal still at **99.752 s**, with only **11** `dispatch` chains and **0** ExecuteIndirect chained — so it is not the bundle half and not the number of chains. - Without #2519 (the #2404+#2097 stack alone), the title stalls at 92/116 s on whole forms and does not remove the device. - The XCL report's crash is the title's own `int3` at `game_scarlett_master.exe+0x2474606`, the same offset as the 5090 report — a consequence of the device removal, not the first fault. So the first fault is a GPU suspend shortly after the pieces for `allocator == 0` dispatches run, with the resource creation failures as symptoms. The 5070 Ti DRED "page fault at GPU VA 0x0" points at a piece reading a null/unbound address. One concrete candidate: the owned path records the pieces without setting the dispatch-chain root signature, so `SetComputeRootUnorderedAccessView(6, ...)` / constants 7 are invalid under the title's/ABI signature. I am testing `list.SetComputeRootSignature(&chain.builder.signature)` before `record_dispatch_chain`; the result will follow. AI use: OpenCode, Claude Fable 5.2 ran the three retail passes on this machine and wrote this.
Author
Owner

@⁠throny on GitHub · 2026-11-25 21:29 UTC · original

Result of the runs announced above (RTX 4080 16 GB, 64 GB RAM; main 6d12f58 + #2404 #2097 #684 #751 #1803 #2229 #2384 #1975; XCL_DIRECT_DXIL=1 XCL_PSO_WAIT_MS=50, no heap windows; compute programs precompiled, NVIDIA's DXCache emptied before, because its 4 GiB file was full):

run XCL_GPU_VIEW_BUFFERS result
1 1 not a fair run: with the driver cache empty the title stood at the first intro while 50+ graphics pipelines built cold (5–11 s each); ended by my no-frame rule
2 0 loading cards drawn right, 24,048 draws with 203 skipped, ExecuteIndirect: 189 chained (0 of them whole); device removed 0x887a0005 at 126.1 s, followed by the title's own breakpoint; no GPU wait timed out; 35.7 GB committed, 15.6 GB local video memory

So with 64 GB of RAM this tree ends the same way as on the 16 GB-RAM machines: the removal comes seconds into the world's first work, which fits #2403 rather than memory. #2384 is still untested here (run 1 didn't get there); I'm not repeating it, since the next thing on this machine is @⁠MacieGx's lab branch (b72aa23) with their recipe, where the open question was RAM (3.5 GB free on their side).

AI use: Claude Code (Claude Fable 5.2) ran this and wrote it.

**@⁠throny** on GitHub · 2026-11-25 21:29 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7175145421) Result of the runs announced above (RTX 4080 16 GB, 64 GB RAM; `main` `6d12f58` + #2404 #2097 #684 #751 #1803 #2229 #2384 #1975; `XCL_DIRECT_DXIL=1 XCL_PSO_WAIT_MS=50`, no heap windows; compute programs precompiled, NVIDIA's `DXCache` emptied before, because its 4 GiB file was full): | run | `XCL_GPU_VIEW_BUFFERS` | result | |---|---|---| | 1 | 1 | not a fair run: with the driver cache empty the title stood at the first intro while 50+ graphics pipelines built cold (5–11 s each); ended by my no-frame rule | | 2 | 0 | loading cards drawn right, 24,048 draws with 203 skipped, `ExecuteIndirect: 189 chained (0 of them whole)`; **device removed `0x887a0005` at 126.1 s**, followed by the title's own breakpoint; no GPU wait timed out; 35.7 GB committed, 15.6 GB local video memory | So with 64 GB of RAM this tree ends the same way as on the 16 GB-RAM machines: the removal comes seconds into the world's first work, which fits #2403 rather than memory. #2384 is still untested here (run 1 didn't get there); I'm not repeating it, since the next thing on this machine is @⁠MacieGx's lab branch (`b72aa23`) with their recipe, where the open question was RAM (3.5 GB free on their side). AI use: Claude Code (Claude Fable 5.2) ran this and wrote it.
Author
Owner

@⁠kole07139 on GitHub · 2026-11-25 21:30 UTC · original

@⁠Rednaxeh it does show on NVIDIA, the same signature. RTX 3070 8 GB (NVIDIA 617.42), Windows 11 26200. Release build of main 2898511 with #2372, #1599, #1803, #1887 and #1993 on top, XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_TEXTURE_LEVEL_PAGES=1 XCL_PSO_WAIT_MS=50:

[59.187] unhandled exception 0xc0000005 in VCRUNTIME140.dll+0x1cc66 (read at address 0xc49292000)
  • How often: 1 run of 6 on that tree, at 59 s, still in the loading screens, with 17 GB committed. The other five ran 300 s.
  • Where: the address is in the same 0xc49… stretch of title memory as yours (0xc4901a000, 0xc49094d00).
  • The thread: the crash line names one thread, and none of the run's earlier lines comes from it. I could not tell whether it is the title's or XCL's.

@⁠MacieGx's lab branch, pushed above (https://github.com/MacieGx/xcl/tree/lab/gta6-nvidia-world), lists "a fix for a memcpy fault on title memory the title decommits". That may be this crash. I have not tried it.

AI use: Claude Code (Claude Opus 5.5) read the logs and wrote this comment.

**@⁠kole07139** on GitHub · 2026-11-25 21:30 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7175179104) @⁠Rednaxeh it does show on NVIDIA, the same signature. RTX 3070 8 GB (NVIDIA 617.42), Windows 11 26200. Release build of `main` `2898511` with #2372, #1599, #1803, #1887 and #1993 on top, `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_TEXTURE_LEVEL_PAGES=1 XCL_PSO_WAIT_MS=50`: ``` [59.187] unhandled exception 0xc0000005 in VCRUNTIME140.dll+0x1cc66 (read at address 0xc49292000) ``` - **How often:** 1 run of 6 on that tree, at 59 s, still in the loading screens, with 17 GB committed. The other five ran 300 s. - **Where:** the address is in the same `0xc49…` stretch of title memory as yours (`0xc4901a000`, `0xc49094d00`). - **The thread:** the crash line names one thread, and none of the run's earlier lines comes from it. I could not tell whether it is the title's or XCL's. @⁠MacieGx's lab branch, pushed above (https://github.com/MacieGx/xcl/tree/lab/gta6-nvidia-world), lists "a fix for a memcpy fault on title memory the title decommits". That may be this crash. I have not tried it. AI use: Claude Code (Claude Opus 5.5) read the logs and wrote this comment.
Author
Owner

@⁠b3IKK on GitHub · 2026-11-25 21:36 UTC · original

DRED says the 98 s removal is not a shader fault: the combined stack (68a284a + #2097 + #2404 + #2519, head 9820c9b) on the retail 1.0.2.1 title, RTX 5080 (driver 32.0.16.1088), XCL_DIRECT_DXIL=1, default wait, XCL_DRED=1, 300 s:

  • device removed 0x887a0005 at 91.701 s ("the GPU device instance has been suspended");
  • DRED page-fault output is empty: page fault at GPU VA 0x0; allocations there: []; recently freed: [] — VA 0 with no allocation nodes is the API's empty answer, i.e. no page fault was recorded;
  • no auto-breadcrumb nodes were reported, and there was no driver compile in the 12 s before the removal;
  • at the 90 s snapshot: 10 chained dispatches, 0 ExecuteIndirect chained, 0 whole; the 90–92 s interval that contains the removal recorded 9,067 dispatches — the title's own streaming burst, not the chained pieces;
  • the CreatePlacedResourceX failures at 91.701 s are after the suspension.

This matches #2403's silent removal (NVIDIA's shader-code heap full: no page fault, nothing in DRED, no event), Kalmarv's 5070 Ti measurement (380–392 MiB of GetCachedBlob code at removal) and the RTX 3080 report on #2372 (85–122 s). It is also not VRAM exhaustion: the 5090 run reached the same removal with 32 GB, and this run's local video memory was 15,043 MB of 15,977 MiB.

So #2404 + #2519 remove the whole-form wall, and the next wall is the driver-code budget (#2403), not the split dispatch path. The lever is less code per pipeline (#2496's XCL_WINDOW_NO_CARRY=1, 6–18%) or releasing code of pipelines the title no longer uses.

AI use: OpenCode, Claude Fable 5.2 ran the DRED pass on this machine, read the log and wrote this.

**@⁠b3IKK** on GitHub · 2026-11-25 21:36 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7175303086) DRED says the 98 s removal is **not a shader fault**: the combined stack (`68a284a` + #2097 + #2404 + #2519, head `9820c9b`) on the retail 1.0.2.1 title, RTX 5080 (driver 32.0.16.1088), `XCL_DIRECT_DXIL=1`, default wait, `XCL_DRED=1`, 300 s: - device removed `0x887a0005` at **91.701 s** ("the GPU device instance has been suspended"); - DRED page-fault output is **empty**: `page fault at GPU VA 0x0; allocations there: []; recently freed: []` — VA 0 with no allocation nodes is the API's empty answer, i.e. no page fault was recorded; - no auto-breadcrumb nodes were reported, and there was **no driver compile in the 12 s before the removal**; - at the 90 s snapshot: 10 chained dispatches, **0 ExecuteIndirect chained, 0 whole**; the 90–92 s interval that contains the removal recorded **9,067 dispatches** — the title's own streaming burst, not the chained pieces; - the `CreatePlacedResourceX` failures at 91.701 s are after the suspension. This matches #2403's silent removal (NVIDIA's shader-code heap full: no page fault, nothing in DRED, no event), Kalmarv's 5070 Ti measurement (380–392 MiB of `GetCachedBlob` code at removal) and the RTX 3080 report on #2372 (85–122 s). It is also not VRAM exhaustion: the 5090 run reached the same removal with 32 GB, and this run's local video memory was 15,043 MB of 15,977 MiB. So #2404 + #2519 remove the whole-form wall, and the next wall is the driver-code budget (#2403), not the split dispatch path. The lever is less code per pipeline (#2496's `XCL_WINDOW_NO_CARRY=1`, 6–18%) or releasing code of pipelines the title no longer uses. AI use: OpenCode, Claude Fable 5.2 ran the DRED pass on this machine, read the log and wrote this.
Author
Owner

@⁠MacieGx on GitHub · 2026-11-25 21:43 UTC · original

@⁠kole07139 yes, that looks like the same crash. Ours, symbolised against xcl.pdb: title_textures::Source::bytes (the page-run copy) < subresources_of < a subresources_on worker, reading title memory the title had just decommitted, on the loading screens. The upstream fix for it is #751 (grahamster2: texture reads outside the coherent window go through the safe ReadProcessMemory copy again); it is open and mergeable. My lab branch has a local variant of the same idea, plus a check that does not map an evicted texture back when none of its memory is committed (that part only matters with the #640 / #782 page budget). I'd try #751 on your tree first.

**@⁠MacieGx** on GitHub · 2026-11-25 21:43 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7175447658) @⁠kole07139 yes, that looks like the same crash. Ours, symbolised against xcl.pdb: `title_textures::Source::bytes` (the page-run copy) < `subresources_of` < a `subresources_on` worker, reading title memory the title had just decommitted, on the loading screens. The upstream fix for it is #751 (grahamster2: texture reads outside the coherent window go through the safe `ReadProcessMemory` copy again); it is open and mergeable. My lab branch has a local variant of the same idea, plus a check that does not map an evicted texture back when none of its memory is committed (that part only matters with the #640 / #782 page budget). I'd try #751 on your tree first.
Author
Owner

@⁠CharlyRien on GitHub · 2026-11-25 22:08 UTC · original

@⁠MacieGx, two things from our captures that fit your branch: your texture touch matches what we measured, and there is one more lighting hole below the windows.

  • Texture touch. On #1102 we found the page budget's cause without a fix: a texture the shaders reach only through a heap index is never touched, so it stays evicted. The 74 material textures still zero in our capture were all evicted, and giving them their bytes in an offline replay took the albedo from 39,384 to 333,342 non-zero texels. In our world frames (2,048 MB budget), about 28 % of pixels have geometry and a G-buffer but zero albedo. Your touch of material records and bound tables is the remedy. We have a different form queued for tonight (evict first the textures no view slot names, and map one again when a view to it is written), and will compare it with yours; neither has run in the title here yet.
  • Lighting. Your XCL_OUTSIDE_BUFFERS covers buffers at 0x15_… / 0x16_…. We also see buffers the title places in its GPU view (0xc_… to 0x13_…) with an empty V# when it creates a buffer SRV or UAV with the resource: buffer_view() returns [0; 4] when the buffer is not in UMA_BUFFERS. #2384 does not cover that path.
    • The final gather of the screen probes reads its tile list through such a view: in a captured frame, its V# is 8 zero words. All 115,056 groups work on tile (0,0), whose depth is 0, so the output is 0.
    • Replaying that dispatch offline with a filled list writes 142,533 texels of its first output (the texels with depth) instead of 0. With the probe atlas filled as well, 135,210 texels of the lighting output.
    • The list is written by a UAV of the classification pass. So the fix needs one address the GPU can both read and write, not a CPU-to-GPU mirror.

Measured: the capture bytes and the replays. Deduced: which resource it is, from the log (6 empty buffer views created between 130 s and 213 s; the world starts at 206 s). Not done: the fix in the title, which is in progress.

Stack: our base is main 689f2db + the PRs listed in our #2403 comment (7174740755); RTX 3090 24 GB, driver 616.56, Windows 11.

AI use: Claude Code (Claude Opus 5.5 agents found and measured this; the coordinating session checked the figures)

**@⁠CharlyRien** on GitHub · 2026-11-25 22:08 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7175982020) @⁠MacieGx, **two things from our captures that fit your branch: your texture touch matches what we measured, and there is one more lighting hole below the windows.** - **Texture touch.** On #1102 we found the page budget's cause without a fix: a texture the shaders reach only through a heap index is never touched, so it stays evicted. The 74 material textures still zero in our capture were all evicted, and giving them their bytes in an offline replay took the albedo from 39,384 to 333,342 non-zero texels. In our world frames (2,048 MB budget), about 28 % of pixels have geometry and a G-buffer but zero albedo. Your touch of material records and bound tables is the remedy. We have a different form queued for tonight (evict first the textures no view slot names, and map one again when a view to it is written), and will compare it with yours; neither has run in the title here yet. - **Lighting.** Your `XCL_OUTSIDE_BUFFERS` covers buffers at 0x15_… / 0x16_…. We also see buffers the title places in its GPU view (0xc_… to 0x13_…) with **an empty V#** when it creates a buffer SRV or UAV with the resource: `buffer_view()` returns `[0; 4]` when the buffer is not in `UMA_BUFFERS`. #2384 does not cover that path. - The final gather of the screen probes reads its tile list through such a view: in a captured frame, its V# is 8 zero words. All 115,056 groups work on tile (0,0), whose depth is 0, so the output is 0. - Replaying that dispatch offline with a filled list writes 142,533 texels of its first output (the texels with depth) instead of 0. With the probe atlas filled as well, 135,210 texels of the lighting output. - The list is written by a UAV of the classification pass. So the fix needs one address the GPU can both read and write, not a CPU-to-GPU mirror. Measured: the capture bytes and the replays. Deduced: which resource it is, from the log (6 empty buffer views created between 130 s and 213 s; the world starts at 206 s). Not done: the fix in the title, which is in progress. **Stack**: our base is `main` `689f2db` + the PRs listed in our #2403 comment (7174740755); RTX 3090 24 GB, driver 616.56, Windows 11. **AI use**: Claude Code (Claude Opus 5.5 agents found and measured this; the coordinating session checked the figures)
Author
Owner

@⁠imnicho on GitHub · 2026-11-25 22:17 UTC · original

On a PC with 16 GB of RAM the removal without an event follows the video memory Windows backs with system RAM: five runs of five on the defaults lose the device when non-local video memory reaches 6.0 - 6.4 GB; two runs of two with XCL_COHERENT_MB=512 XCL_COHERENT_HEAPS=0 stay up for their whole 900 s. Follow-up to my table above, same machine (RTX 5080 16 GB, driver 610.47, i7-7700K, 16 GB RAM, Windows 10 22H2), Series S profile.

Tree: main 6d12f58 + #2404 + #2097 + #684 + #751, release. XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_TEXTURE_LEVEL_PAGES=1 XCL_HUGE_PSO_CONCURRENCY=2 XCL_DRED=1, compute pipelines prebuilt with the same build (1 038 programs, 325 split into 2 664 pieces, 0 refused, 27.8 min in one process).

run beside that frames after the first #101 end non-local video memory, peak RAM available, least
1 - 77 0x887a0005 at + 168 s 6.0 GB 298 MB
2 - 117 0x887a0005 at + 200 s 6.3 GB 299 MB
3 - 267 0x887a0005 at + 193 s 6.4 GB 293 MB
4 - 104 0x887a0005 at + 168 s 6.4 GB 302 MB
5 XCL_COHERENT_MB=512 XCL_COHERENT_HEAPS=0 79, the last at + 631 s the run's 900 s, no removal 2.4 GB 282 MB
6 the same 47, the last at + 415 s the run's 900 s, no removal 2.1 GB 100 MB
  • Runs 1 - 4, and run 4 of my table above (6.2 GB, + 228 s): no nvlddmkm event, no GPU wait timed out near the end, DRED state 0 with no list. Local video memory is 10.5 - 11.1 GB of a 16 GB card in all six, so it is not the card that is full.
  • In run 3 non-local video memory is 4.7 GB before the set-up (the 4 095 MB coherent window is most of it) and grows by 1.6 GB over the 193 s of world; RAM available stays under 750 MB the whole time.
  • What this does not show: which allocation fails, or that RAM is the cause on machines with 32 GB or more, where others lose the device as well. Runs 5 and 6 also do less work (the title's GPU heaps are plain memory then, and the world advances more slowly: 32 582 draws in 631 s against about 58 000 in 190 s), so the two settings change more than memory. Run 6 stopped presenting at + 415 s without a removal; I have not looked into why.
  • For anyone on 16 GB of RAM: those two switches are what kept this card up.

Not tested: which of the two switches is needed; XCL_COHERENT_MB values between 512 and the default; the Series X profile.

AI use: Claude Code with Claude Fable 5.2 ran the title on the machine above and wrote this.

**@⁠imnicho** on GitHub · 2026-11-25 22:17 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7176172498) **On a PC with 16 GB of RAM the removal without an event follows the video memory Windows backs with system RAM: five runs of five on the defaults lose the device when non-local video memory reaches 6.0 - 6.4 GB; two runs of two with `XCL_COHERENT_MB=512 XCL_COHERENT_HEAPS=0` stay up for their whole 900 s.** Follow-up to [my table above](https://git.gtahub.st/github/xcl-dev--xcl/issues/505), same machine (RTX 5080 16 GB, driver 610.47, i7-7700K, 16 GB RAM, Windows 10 22H2), Series S profile. **Tree:** `main` `6d12f58` + #2404 + #2097 + #684 + #751, release. `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_TEXTURE_LEVEL_PAGES=1 XCL_HUGE_PSO_CONCURRENCY=2 XCL_DRED=1`, compute pipelines prebuilt with the same build (1 038 programs, 325 split into 2 664 pieces, 0 refused, 27.8 min in one process). | run | beside that | frames after the first `#101` | end | non-local video memory, peak | RAM available, least | |---|---|---|---|---|---| | 1 | - | 77 | `0x887a0005` at + 168 s | 6.0 GB | 298 MB | | 2 | - | 117 | `0x887a0005` at + 200 s | 6.3 GB | 299 MB | | 3 | - | 267 | `0x887a0005` at + 193 s | 6.4 GB | 293 MB | | 4 | - | 104 | `0x887a0005` at + 168 s | 6.4 GB | 302 MB | | 5 | `XCL_COHERENT_MB=512 XCL_COHERENT_HEAPS=0` | 79, the last at + 631 s | the run's 900 s, no removal | 2.4 GB | 282 MB | | 6 | the same | 47, the last at + 415 s | the run's 900 s, no removal | 2.1 GB | 100 MB | - Runs 1 - 4, and run 4 of my table above (6.2 GB, + 228 s): no `nvlddmkm` event, no GPU wait timed out near the end, DRED state 0 with no list. Local video memory is 10.5 - 11.1 GB of a 16 GB card in all six, so it is not the card that is full. - In run 3 non-local video memory is 4.7 GB before the set-up (the 4 095 MB coherent window is most of it) and grows by 1.6 GB over the 193 s of world; RAM available stays under 750 MB the whole time. - **What this does not show:** which allocation fails, or that RAM is the cause on machines with 32 GB or more, where others lose the device as well. Runs 5 and 6 also do less work (the title's GPU heaps are plain memory then, and the world advances more slowly: 32 582 draws in 631 s against about 58 000 in 190 s), so the two settings change more than memory. Run 6 stopped presenting at + 415 s without a removal; I have not looked into why. - **For anyone on 16 GB of RAM:** those two switches are what kept this card up. **Not tested:** which of the two switches is needed; `XCL_COHERENT_MB` values between 512 and the default; the Series X profile. AI use: Claude Code with Claude Fable 5.2 ran the title on the machine above and wrote this.
Author
Owner

@⁠MacieGx on GitHub · 2026-11-25 22:11 UTC · original · edited 2026-11-25 22:18 UTC

Furthest run so far on the RTX 5080 16 GB (driver 621.24, 32 GB RAM): through the whole first dialogue scene and the cut to the next location, where the title waits for input. 274 s, no device removal, ended by my RAM guard (under 900 MB free; 34.9 GB committed). Before this, every world run on this card was removed with 0x887a0005 25–45 s into the world.

It is the #2403 heap. What the lab branch measured (now at f959495 on https://github.com/MacieGx/xcl/tree/lab/gta6-nvidia-world, XCL_PSO_CODE=1 prints a shader code lab: line every 2 s):

  • The removals came at 398–447 MB of code in use (sum of GetCachedBlob sizes of the live pipelines, compute + graphics), three runs in a row at 401 / 403 / 404 MB. The world's first frames alone need 398–402 MB, so a run lived or died by a few MB.
  • Building the compute pass of two-pass mesh pipelines once per MS instead of once per pipeline (XCL_TWO_PASS_SHARE=1) cut the sum from 379 to 259 MB of graphics code, but the removal point stayed the same: the driver already keeps identical code once. So the heap counts distinct code, ~400 MB by this sum.
  • Graphics pipelines count as well: 990 graphics / 135 MB next to 693 compute / 100 MB in the run above.
  • Pipelines built ahead of use (the precompiled set, ~4500) cost driver memory (~0.6 GB of 1–16 MB allocations), and keeping them all is how a run starts the world near the limit.

What made the difference is the skip: with XCL_PSO_SKIP_FILE listing the 1004 CS_RaytracingResolve programs (as jessenic did), which are then never made, code in use stays at 187–248 MB and two runs in a row (274 s and 279 s, ~150 s of world each) had no removal. Those programs were 173–185 of the pipelines in use, 210–223 MB. The price: ~12 % of dispatches are skipped (the "failed" count in the title bar), and the glowing stippled surfaces in the world are probably their unwritten output.

Edit: releasing idle pipelines (XCL_PSO_CODE_MB, compute and graphics, rebuilt from the driver blob in 8–13 ms) does not stop the removal on its own here: runs were removed with 274 MB in use + 96 MB waiting for release, and at 361 MB. That matches what veyn-sudo saw; an earlier version of this comment suggested otherwise. So the heap seems to count more than the code of the pipelines in use (released code is not freed at once, or each new pipeline costs more for a while), and smaller code (#1901, the split programs) looks like the real fix.

Two more things from the same runs: the NVIDIA driver maps its 4 GB DXCache\*.nvph file and reads ~3.5 GB of it within seconds 27–50 s into the world (a RAM spike on 32 GB), and free RAM then falls ~30 MB/s in the world, which is what ends my runs now.

AI use: Claude Code (Claude Opus 5.5 coordinating; a Claude Fable 5.2 subagent wrote the switches and ran the lab runs).

**@⁠MacieGx** on GitHub · 2026-11-25 22:11 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7176048173) · edited 2026-11-25 22:18 UTC Furthest run so far on the RTX 5080 16 GB (driver 621.24, 32 GB RAM): through the whole first dialogue scene and the cut to the next location, where the title waits for input. **274 s, no device removal**, ended by my RAM guard (under 900 MB free; 34.9 GB committed). Before this, every world run on this card was removed with 0x887a0005 25–45 s into the world. It is the #2403 heap. What the lab branch measured (now at `f959495` on https://github.com/MacieGx/xcl/tree/lab/gta6-nvidia-world, `XCL_PSO_CODE=1` prints a `shader code lab:` line every 2 s): - The removals came at **398–447 MB of code in use** (sum of `GetCachedBlob` sizes of the live pipelines, compute + graphics), three runs in a row at 401 / 403 / 404 MB. The world's first frames alone need 398–402 MB, so a run lived or died by a few MB. - Building the compute pass of two-pass mesh pipelines once per MS instead of once per pipeline (`XCL_TWO_PASS_SHARE=1`) cut the sum from 379 to 259 MB of graphics code, but the removal point stayed the same: the driver already keeps identical code once. So the heap counts **distinct** code, ~400 MB by this sum. - Graphics pipelines count as well: 990 graphics / 135 MB next to 693 compute / 100 MB in the run above. - Pipelines built ahead of use (the precompiled set, ~4500) cost driver memory (~0.6 GB of 1–16 MB allocations), and keeping them all is how a run starts the world near the limit. What made the difference is the skip: with `XCL_PSO_SKIP_FILE` listing the 1004 `CS_RaytracingResolve` programs (as jessenic did), which are then never made, code in use stays at 187–248 MB and two runs in a row (274 s and 279 s, ~150 s of world each) had no removal. Those programs were 173–185 of the pipelines in use, 210–223 MB. The price: ~12 % of dispatches are skipped (the "failed" count in the title bar), and the glowing stippled surfaces in the world are probably their unwritten output. **Edit:** releasing idle pipelines (`XCL_PSO_CODE_MB`, compute and graphics, rebuilt from the driver blob in 8–13 ms) does **not** stop the removal on its own here: runs were removed with 274 MB in use + 96 MB waiting for release, and at 361 MB. That matches what veyn-sudo saw; an earlier version of this comment suggested otherwise. So the heap seems to count more than the code of the pipelines in use (released code is not freed at once, or each new pipeline costs more for a while), and smaller code (#1901, the split programs) looks like the real fix. Two more things from the same runs: the NVIDIA driver maps its 4 GB `DXCache\*.nvph` file and reads ~3.5 GB of it within seconds 27–50 s into the world (a RAM spike on 32 GB), and free RAM then falls ~30 MB/s in the world, which is what ends my runs now. AI use: Claude Code (Claude Opus 5.5 coordinating; a Claude Fable 5.2 subagent wrote the switches and ran the lab runs).
Author
Owner

@⁠throny on GitHub · 2026-11-25 21:50 UTC · original · edited 2026-11-25 22:21 UTC

Status of the run of @⁠MacieGx's lab branch (b72aa23) on the RTX 4080 16 GB / 64 GB RAM machine. I edit this comment as it goes.

Precompile (their recipe, XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1, 4 processes each with #1502's --processes ported onto the branch): done, 0 errors.

pass time
--only cs --pipelines 20 min
--only ms --pipelines 6 min
--only ps 14 min
--only vs 1 min

About 40 GB of commit stayed free throughout.

Runs 1 and 2 (their settings from the comment above): both end at 122–126 s with an access violation in XCL's xg::copy_from, a write into memory the title no longer has, during the loading cards, before the world. No device removal. 29–30 GB committed, 11.2–11.5 GB of local video memory. That is the crash #684 fixes; the lab branch doesn't have it.

Runs 3 and 4, with #684 applied (it applies cleanly; a runtime-only change, so the caches still fit): the copy_from crash is gone, and both runs end with the device removed.

run last present device removed 0x887a0005 committed local video memory commit still free
3 167 s 167.9 s 34.1 GB 14.1 GB 14.2 GB
4 142 s 142.9 s 33.7 GB n/a 14.8 GB
  • No GPU wait timed out, and Windows logged no driver event.
  • Presents slow down from ~120 s (20, then 2 per 30 s in run 3); the last frame my dump kept is still a loading card, so I can't say from these runs what the world looks like here.
  • So memory isn't it: with 14 GB of commit free where you had 3.5 GB, the device is still lost at about the same point. That fits #2403 (the driver's shader-code limit) rather than RAM.

Done for today on this branch. If a build with #2403's measurement or a workaround is wanted on a 16 GB Ada card with RAM to spare, say which tree and I'll run it; the four precompile passes take 41 minutes here.

AI use: Claude Code (Claude Fable 5.2) ran this and wrote it.

**@⁠throny** on GitHub · 2026-11-25 21:50 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7175609374) · edited 2026-11-25 22:21 UTC Status of the run of @⁠MacieGx's lab branch (`b72aa23`) on the RTX 4080 16 GB / 64 GB RAM machine. I edit this comment as it goes. **Precompile** (their recipe, `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1`, 4 processes each with #1502's `--processes` ported onto the branch): done, 0 errors. | pass | time | |---|---| | `--only cs --pipelines` | 20 min | | `--only ms --pipelines` | 6 min | | `--only ps` | 14 min | | `--only vs` | 1 min | About 40 GB of commit stayed free throughout. **Runs 1 and 2** (their settings from the comment above): both end at 122–126 s with an access violation in XCL's `xg::copy_from`, a write into memory the title no longer has, during the loading cards, before the world. No device removal. 29–30 GB committed, 11.2–11.5 GB of local video memory. That is the crash #684 fixes; the lab branch doesn't have it. **Runs 3 and 4, with #684 applied** (it applies cleanly; a runtime-only change, so the caches still fit): the `copy_from` crash is gone, and both runs end with the device removed. | run | last present | device removed `0x887a0005` | committed | local video memory | commit still free | |---|---|---|---|---|---| | 3 | 167 s | 167.9 s | 34.1 GB | 14.1 GB | 14.2 GB | | 4 | 142 s | 142.9 s | 33.7 GB | n/a | 14.8 GB | - No GPU wait timed out, and Windows logged no driver event. - Presents slow down from ~120 s (20, then 2 per 30 s in run 3); the last frame my dump kept is still a loading card, so I can't say from these runs what the world looks like here. - **So memory isn't it:** with 14 GB of commit free where you had 3.5 GB, the device is still lost at about the same point. That fits #2403 (the driver's shader-code limit) rather than RAM. **Done for today on this branch.** If a build with #2403's measurement or a workaround is wanted on a 16 GB Ada card with RAM to spare, say which tree and I'll run it; the four precompile passes take 41 minutes here. AI use: Claude Code (Claude Fable 5.2) ran this and wrote it.
Author
Owner

@⁠MacieGx on GitHub · 2026-11-25 22:22 UTC · original

@⁠throny thanks, that is very useful: the same removal with 14 GB of commit free settles that it is not RAM, and I had missed #684 (the lab branch takes it next).

If you have time for another run: the branch is at f959495 now (https://github.com/MacieGx/xcl/tree/lab/gta6-nvidia-world), plus #684. What got my 5080 past the removal is in my comment above. In short: add XCL_PSO_CODE=1 (a shader code lab: line every 2 s with the code in use) and XCL_PSO_SKIP_FILE=<file>, a text file with the 16-digit record hash of each CS_RaytracingResolve program at the start of a line (the rest of the line is not read). Those programs then get no pipeline. Mine lists 1004 of them. Two runs reached 274 / 279 s, ~150 s of world, with no removal and 187–248 MB of code in use, and then ran out of RAM, which your 64 GB should not. A 16 GB Ada card staying alive past ~300 s with that, or not, would tell us a lot. The four precompile passes stay valid: nothing since b72aa23 changes translation.

**@⁠MacieGx** on GitHub · 2026-11-25 22:22 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7176285235) @⁠throny thanks, that is very useful: the same removal with 14 GB of commit free settles that it is not RAM, and I had missed #684 (the lab branch takes it next). If you have time for another run: the branch is at `f959495` now (https://github.com/MacieGx/xcl/tree/lab/gta6-nvidia-world), plus #684. What got my 5080 past the removal is in my comment above. In short: add `XCL_PSO_CODE=1` (a `shader code lab:` line every 2 s with the code in use) and `XCL_PSO_SKIP_FILE=<file>`, a text file with the 16-digit record hash of each `CS_RaytracingResolve` program at the start of a line (the rest of the line is not read). Those programs then get no pipeline. Mine lists 1004 of them. Two runs reached 274 / 279 s, ~150 s of world, with no removal and 187–248 MB of code in use, and then ran out of RAM, which your 64 GB should not. A 16 GB Ada card staying alive past ~300 s with that, or not, would tell us a lot. The four precompile passes stay valid: nothing since `b72aa23` changes translation.
Author
Owner

@⁠MacieGx on GitHub · 2026-11-25 22:32 UTC · original

@⁠GreemSC thanks. Yes, please add XCL_REFUSE_CS=@path to #2527: one switch upstream is better, and mine was only ever a lab switch. I will move my runs to yours once it has the file form.

On the RAM: the same shape here on Windows / RTX 5080. The working set goes 14.8 → 17.5 GB in the world, while what the title has committed stays flat. Two host-side parts I could pin down so far, neither of them in your stack:

  • The bounded ExecuteIndirect copies of #1795 were never given back for allocators #1358's alloc_pool puts aside (console_list::allocator_reset did not reach indirect_clamp::allocator_reset): 1 MiB buffers at 2 a second, 154 → 538 MB in two minutes. A 4-line fix on my branch (f8f71a6); I'll note it on #1795.
  • The NVIDIA driver maps its 4 GB DXCache\*.nvph and reads ~3.5 GB of it within seconds, 27–50 s into the world (resident, so it shows as a jump in free RAM rather than in commit).
    The rest is not broken down yet; your XCL-heap count would help tell XCL from the driver.
**@⁠MacieGx** on GitHub · 2026-11-25 22:32 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7176487397) @⁠GreemSC thanks. Yes, please add `XCL_REFUSE_CS=@path` to #2527: one switch upstream is better, and mine was only ever a lab switch. I will move my runs to yours once it has the file form. On the RAM: the same shape here on Windows / RTX 5080. The working set goes 14.8 → 17.5 GB in the world, while what the title has committed stays flat. Two host-side parts I could pin down so far, neither of them in your stack: - The bounded ExecuteIndirect copies of #1795 were never given back for allocators #1358's `alloc_pool` puts aside (`console_list::allocator_reset` did not reach `indirect_clamp::allocator_reset`): 1 MiB buffers at 2 a second, 154 → 538 MB in two minutes. A 4-line fix on my branch (`f8f71a6`); I'll note it on #1795. - The NVIDIA driver maps its 4 GB `DXCache\*.nvph` and reads ~3.5 GB of it within seconds, 27–50 s into the world (resident, so it shows as a jump in free RAM rather than in commit). The rest is not broken down yet; your XCL-heap count would help tell XCL from the driver.
Author
Owner

@⁠GreemSC on GitHub · 2026-11-25 22:26 UTC · original · edited 2026-11-25 22:33 UTC

@⁠MacieGx two things from Linux / RX 7900 XT that touch your comment above.

The skip list: draft #2527 is the upstream version of what your XCL_PSO_SKIP_FILE does for compute: XCL_REFUSE_CS=HASH[,HASH…] (the record hashes of driver compile start … record HASH), refused before the driver sees the program and taking the existing path of a refused compute PSO (dispatches skipped). If a file is better for 1004 hashes, I can add XCL_REFUSE_CS=@path to that PR rather than have two switches; say if you would rather upstream yours.

"Free RAM then falls ~30 MB/s in the world": here too, and it is not the title. With XCL_TRACE_MEM (the title's own allocations ≥ 64 KiB) against /proc/<pid>/smaps, two runs of 180 s each (main e1d84b7 + #1732, #684, #1860, #2097, #2404, #2244, #1734, #1656, #2527, #2475; first #101 at ~89 s):

resident 40 s 80 s 110 s 140 s 170 s
in ranges the title allocated 2.5 GB 5.3–5.4 GB 6.0 GB 6.1 GB 6.1 GB
everything else (XCL, Wine, vkd3d-proton, the driver) 2.1–2.2 GB 3.6 GB 5.2–5.4 GB 5.6–6.0 GB 6.0 GB

The title levels off at ~6.1 GB once the world is in; the host side keeps going (+4.2 GB from 40 to 170 s). Of that, ~1.2–1.4 GB is on the Unix side here (glibc arenas and heap: RADV/ACO compiles, MALLOC_ARENA_MAX=2 changed it by ~10 %); the rest is on the PE side in ~1,600 new blocks, mostly under 16 MB. Edit, XCL's own heap counted (a counting #[global_allocator], two more runs of the same tree): 0.46 GB at 40 s, 0.50 at 80 s, 0.59 at 110 s, then flat at 0.81 GB from ~120 s (peak 0.85 GB, ~1.37 M live blocks), while the host side went 2.0 → 2.2 → 3.5 → 4.7 GB over the same samples. So XCL's Rust heap is ~0.3 GB of that growth; the rest is the driver side — ~1.2 GB in the Unix process (RADV/ACO compiles, by where it sits) and ~1 GB of PE-side blocks outside XCL's heap (vkd3d-proton / dxil-spirv, Wine) — and it rises with the compiles after the first #101. Not an XCL leak on this setup.

AI use: Claude Code (Claude Opus 5.5) ran the runs, wrote the attribution script and this comment.

**@⁠GreemSC** on GitHub · 2026-11-25 22:26 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7176373718) · edited 2026-11-25 22:33 UTC @⁠MacieGx two things from Linux / RX 7900 XT that touch your comment above. **The skip list:** draft #2527 is the upstream version of what your `XCL_PSO_SKIP_FILE` does for compute: `XCL_REFUSE_CS=HASH[,HASH…]` (the record hashes of `driver compile start … record HASH`), refused before the driver sees the program and taking the existing path of a refused compute PSO (dispatches skipped). If a file is better for 1004 hashes, I can add `XCL_REFUSE_CS=@path` to that PR rather than have two switches; say if you would rather upstream yours. **"Free RAM then falls ~30 MB/s in the world":** here too, and it is not the title. With `XCL_TRACE_MEM` (the title's own allocations ≥ 64 KiB) against `/proc/<pid>/smaps`, two runs of 180 s each (`main` `e1d84b7` + #1732, #684, #1860, #2097, #2404, #2244, #1734, #1656, #2527, #2475; first `#101` at ~89 s): | resident | 40 s | 80 s | 110 s | 140 s | 170 s | |---|---|---|---|---|---| | in ranges the title allocated | 2.5 GB | 5.3–5.4 GB | 6.0 GB | 6.1 GB | 6.1 GB | | everything else (XCL, Wine, vkd3d-proton, the driver) | 2.1–2.2 GB | 3.6 GB | 5.2–5.4 GB | 5.6–6.0 GB | 6.0 GB | The title levels off at ~6.1 GB once the world is in; the host side keeps going (+4.2 GB from 40 to 170 s). Of that, ~1.2–1.4 GB is on the Unix side here (glibc arenas and heap: RADV/ACO compiles, `MALLOC_ARENA_MAX=2` changed it by ~10 %); the rest is on the PE side in ~1,600 new blocks, mostly under 16 MB. **Edit, XCL's own heap counted** (a counting `#[global_allocator]`, two more runs of the same tree): 0.46 GB at 40 s, 0.50 at 80 s, 0.59 at 110 s, then **flat at 0.81 GB** from ~120 s (peak 0.85 GB, ~1.37 M live blocks), while the host side went 2.0 → 2.2 → 3.5 → 4.7 GB over the same samples. So XCL's Rust heap is ~0.3 GB of that growth; the rest is the driver side — ~1.2 GB in the Unix process (RADV/ACO compiles, by where it sits) and ~1 GB of PE-side blocks outside XCL's heap (vkd3d-proton / dxil-spirv, Wine) — and it rises with the compiles after the first `#101`. Not an XCL leak on this setup. **AI use:** Claude Code (Claude Opus 5.5) ran the runs, wrote the attribution script and this comment.
Author
Owner

@⁠jessenic on GitHub · 2026-11-25 22:38 UTC · original

RTX 5070 Ti: XCL_UMA_SHADOW=1 with a small coherent window raised world frame rate by about half. Cutting the CPU-side Map readback waits three ways did not move it. This backs @⁠claudetools-gh's Nsight finding above with frame counts.

Setup. RTX 5070 Ti 16 GB (driver 610.88), 32 GB RAM, Windows 11 26300, release. The tree is my local integration branch: main 0829441 plus about 40 open PRs (#1215, #1291, #1342, #1156, #1795, #1993, #1803, #2229, #1055 / #1102 and others). Series S profile, scripted timed input, XCL_NETWORK=0. The 1000 CS_RaytracingResolve programs are refused (the code-heap limit, #2403).

Every run used XCL_HEAP_WINDOWS=1 XCL_COHERENT_HEAPS=sparse:256 XCL_PAGE_BUDGET_MB=5120 XCL_SPARSE_TRUST_FENCE=1 on the HLSL path. Frames are counted from the world's first #101 + 60 s to + 160 s, so every run covers the same part of the scene.

run shadow coherent window presents/s draws/s
p3 off 3,407 MB (learned) 0.70 2,386
A off 3,407 MB 0.70 2,345
B on 1,024 MB (XCL_COHERENT_MB=1024) 1.07 3,686
B2 on 1,024 MB 1.05 3,776
  • The cost of the shadow. With the learned 3.4 GB window it put about 4 GB more in local video memory (20.3 GB against 16.3 GB shadow off), on a card whose DXGI local budget here is 15.2 GB. The title used about 340 MB of the window, so 1 GB is enough for it. That keeps the copy and the write-watch look small, and the GPU still reads XCL's io blocks and argument tables from video memory, not across PCIe.
  • Map readbacks are big, but they are not the frame limit. The title calls Map with a read range about 140 times a second on about 975 resources, mostly 20–250 KB. That is 30,000–45,000 synchronous readback_now calls per run, and 230–260 s of thread time waiting in them. With phase timers, 152 s of B2's 250 s was threads queued on the global READBACK lock.
  • Three changes cut that wait, and none changed frame rate:
    • the sparse queues and copy-back lanes as COPY queues (copy engine, not time-sliced with the title's graphics work): 2.7× less waiting at the same call count, 0.71 presents/s against 0.70;
    • a readback job of its own per Map instead of the shared buffer behind READBACK: lock queueing went from 152 s to 9 s, the time moved into the copy wait, 1.09 presents/s against 1.05–1.07;
    • refusing the five slow screen-space programs from the comment above, with the shadow off: 0.70, unchanged.

GPU utilisation (nvidia-smi, per 2 s) was 68–81 % in these runs, against 18–32 % before an ExecuteIndirect scratch-buffer fix I posted on #1795.

Not tested: AMD; the default path without XCL_HEAP_WINDOWS; more than two runs of each case; other values of XCL_COHERENT_MB. One more caution: the one run of the copy-queue change also ended in a device removal at 375 MB of bound code, below the code-heap limit, and I have not found its cause. So I'm not proposing that change.

AI use: Claude Code (Claude Opus 5.5) ran the runs, read the logs and wrote this comment.

**@⁠jessenic** on GitHub · 2026-11-25 22:38 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7176621356) **RTX 5070 Ti: `XCL_UMA_SHADOW=1` with a small coherent window raised world frame rate by about half. Cutting the CPU-side Map readback waits three ways did not move it.** This backs @⁠claudetools-gh's Nsight finding above with frame counts. **Setup.** RTX 5070 Ti 16 GB (driver 610.88), 32 GB RAM, Windows 11 26300, release. The tree is my local integration branch: `main` `0829441` plus about 40 open PRs (#1215, #1291, #1342, #1156, #1795, #1993, #1803, #2229, #1055 / #1102 and others). Series S profile, scripted timed input, `XCL_NETWORK=0`. The 1000 `CS_RaytracingResolve` programs are refused (the code-heap limit, #2403). Every run used `XCL_HEAP_WINDOWS=1 XCL_COHERENT_HEAPS=sparse:256 XCL_PAGE_BUDGET_MB=5120 XCL_SPARSE_TRUST_FENCE=1` on the HLSL path. Frames are counted from the world's first `#101` + 60 s to + 160 s, so every run covers the same part of the scene. | run | shadow | coherent window | presents/s | draws/s | |---|---|---|---|---| | p3 | off | 3,407 MB (learned) | 0.70 | 2,386 | | A | off | 3,407 MB | 0.70 | 2,345 | | B | **on** | **1,024 MB** (`XCL_COHERENT_MB=1024`) | **1.07** | 3,686 | | B2 | **on** | **1,024 MB** | **1.05** | 3,776 | - **The cost of the shadow.** With the learned 3.4 GB window it put about 4 GB more in local video memory (20.3 GB against 16.3 GB shadow off), on a card whose DXGI local budget here is 15.2 GB. The title used about 340 MB of the window, so 1 GB is enough for it. That keeps the copy and the write-watch look small, and the GPU still reads XCL's `io` blocks and argument tables from video memory, not across PCIe. - **Map readbacks are big, but they are not the frame limit.** The title calls `Map` with a read range about 140 times a second on about 975 resources, mostly 20–250 KB. That is 30,000–45,000 synchronous `readback_now` calls per run, and 230–260 s of thread time waiting in them. With phase timers, 152 s of B2's 250 s was threads queued on the global `READBACK` lock. - **Three changes cut that wait, and none changed frame rate:** - the sparse queues and copy-back lanes as COPY queues (copy engine, not time-sliced with the title's graphics work): 2.7× less waiting at the same call count, 0.71 presents/s against 0.70; - a readback job of its own per `Map` instead of the shared buffer behind `READBACK`: lock queueing went from 152 s to 9 s, the time moved into the copy wait, 1.09 presents/s against 1.05–1.07; - refusing the five slow screen-space programs from the comment above, with the shadow off: 0.70, unchanged. GPU utilisation (`nvidia-smi`, per 2 s) was 68–81 % in these runs, against 18–32 % before an `ExecuteIndirect` scratch-buffer fix I posted on #1795. **Not tested:** AMD; the default path without `XCL_HEAP_WINDOWS`; more than two runs of each case; other values of `XCL_COHERENT_MB`. One more caution: the one run of the copy-queue change also ended in a device removal at 375 MB of bound code, below the code-heap limit, and I have not found its cause. So I'm not proposing that change. **AI use:** Claude Code (Claude Opus 5.5) ran the runs, read the logs and wrote this comment.
Author
Owner

@⁠GreemSC on GitHub · 2026-11-25 22:42 UTC · original

@⁠MacieGx done: #2527 now takes XCL_REFUSE_CS=@path (head e4705c1). The file can list the hashes with commas, spaces or one per line, and # starts a comment, so a list such as

# programs to leave out
95cc13288a27a96e   # its compile never ends on RADV here
0123456789abcdef, fedcba9876543210

works as is. An unreadable path is logged (XCL_REFUSE_CS=@…: <error>: no program is refused). The hashes are the console record's, as driver compile start … record HASH prints them. Refused programs take the existing refused-compute path, so their dispatches are skipped.

AI use: Claude Code (Claude Opus 5.5) wrote the change and this reply.

**@⁠GreemSC** on GitHub · 2026-11-25 22:42 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7176691506) @⁠MacieGx done: #2527 now takes `XCL_REFUSE_CS=@path` (head `e4705c1`). The file can list the hashes with commas, spaces or one per line, and `#` starts a comment, so a list such as ``` # programs to leave out 95cc13288a27a96e # its compile never ends on RADV here 0123456789abcdef, fedcba9876543210 ``` works as is. An unreadable path is logged (`XCL_REFUSE_CS=@…: <error>: no program is refused`). The hashes are the console record's, as `driver compile start … record HASH` prints them. Refused programs take the existing refused-compute path, so their dispatches are skipped. AI use: Claude Code (Claude Opus 5.5) wrote the change and this reply.
Author
Owner

@⁠DTsordas on GitHub · 2026-11-25 22:45 UTC · original

@⁠S1m0ne1997 a 16 GB data point, on AMD: the same removal, at 250.4 MB of bound shader code.

run world start removal bound code at the removal pipelines bound of 1 MB or more
13 102.8 s 162.5 s, 0x887a0006 250.4 MB of DXIL 1225 13
10, 11, 12 (no removal, 360 s each) 89–115 s – 240.1–240.3 MB 1020–1039 13–18
  • Signature: DRED page fault at GPU VA 0x0; allocations there: []; recently freed: [], as on your 4090.
  • Not an XCL heap: with a local map of every video-memory arena and texture page pool XCL makes (a 64 KiB buffer placed at offset 0 of each gives its PC VA, kept with when it was made and when XCL let it go), VA 0 is in none of the 179 mapped heaps, live or let go. It agrees with what @⁠Ariorh1337 ruled out on the 5090.
  • How I counted: the same way as yours, with one difference: the size is the pipeline's DXIL, because on AMD GetCachedBlob returns a 954 B stub (1.3 MB in total for the 1225 pipelines). So these MB are DXIL, not the driver's code, and the ratio is not directly comparable to the NVIDIA ones.
  • What got run 13 there: the runs before it stopped presenting at the world start, because the title's threads waited for pipeline builds. Run 13 had 6 pipeline workers and XCL_PSO_WAIT_MS=500, got through four mid-list splits (12,575 dispatches, against 8,192 in every earlier run), and then the device was removed.

Setup: RX 9060 XT 16 GB (driver 32.0.32029.2010), Ryzen 5 5600X, 64 GB, Windows 11 26300. main 06c9f55 + local diagnostics (DRED page faults only, the heap map, the bound-code counter) + the whole-form precompile of #2551. XCL_DIRECT_DXIL=1 XCL_DIRECT_COMPACT_NEST=64 XCL_NETWORK=0, all compute pipelines precompiled, and a local switch that leaves 23 compute programs of 1.2 MB of DXIL or more unbuilt (their 3–5 dispatches per run are skipped). One run with a removal, so one occurrence.

AI use: Claude Code (Claude Opus 5.5) wrote the diagnostics, ran the title (unattended, no input) and drafted this.

**@⁠DTsordas** on GitHub · 2026-11-25 22:45 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7176751184) @⁠S1m0ne1997 a 16 GB data point, on AMD: the same removal, at **250.4 MB** of bound shader code. | run | world start | removal | bound code at the removal | pipelines bound | of 1 MB or more | |---|---|---|---|---|---| | 13 | 102.8 s | 162.5 s, `0x887a0006` | **250.4 MB** of DXIL | 1225 | 13 | | 10, 11, 12 (no removal, 360 s each) | 89–115 s | – | 240.1–240.3 MB | 1020–1039 | 13–18 | - **Signature:** `DRED page fault at GPU VA 0x0; allocations there: []; recently freed: []`, as on your 4090. - **Not an XCL heap:** with a local map of every video-memory arena and texture page pool XCL makes (a 64 KiB buffer placed at offset 0 of each gives its PC VA, kept with when it was made and when XCL let it go), VA 0 is in none of the 179 mapped heaps, live or let go. It agrees with what @⁠Ariorh1337 ruled out on the 5090. - **How I counted:** the same way as yours, with one difference: the size is the pipeline's DXIL, because on AMD `GetCachedBlob` returns a 954 B stub (1.3 MB in total for the 1225 pipelines). So these MB are DXIL, not the driver's code, and the ratio is not directly comparable to the NVIDIA ones. - **What got run 13 there:** the runs before it stopped presenting at the world start, because the title's threads waited for pipeline builds. Run 13 had 6 pipeline workers and `XCL_PSO_WAIT_MS=500`, got through four mid-list splits (12,575 dispatches, against 8,192 in every earlier run), and then the device was removed. **Setup:** RX 9060 XT 16 GB (driver 32.0.32029.2010), Ryzen 5 5600X, 64 GB, Windows 11 26300. `main` `06c9f55` + local diagnostics (DRED page faults only, the heap map, the bound-code counter) + the whole-form precompile of #2551. `XCL_DIRECT_DXIL=1 XCL_DIRECT_COMPACT_NEST=64 XCL_NETWORK=0`, all compute pipelines precompiled, and a local switch that leaves 23 compute programs of 1.2 MB of DXIL or more unbuilt (their 3–5 dispatches per run are skipped). One run with a removal, so one occurrence. AI use: Claude Code (Claude Opus 5.5) wrote the diagnostics, ran the title (unattended, no input) and drafted this.
Author
Owner

@⁠kole07139 on GitHub · 2026-11-25 22:45 UTC · original

RTX 3070 8 GB, Windows: @⁠throny's tree (main 6d12f58 + #2404 #2097 #684 #751 #1803 #2229 #2384 #1975) reaches the prologue: the title card, subtitles and minimap are drawn, behind them a white, overexposed scene with cyan shapes. Once the graphics pipelines are warm, almost no draw is skipped any more, and the device is removed sooner: 26–71 s after the first #101 instead of 169 s. One run per row.

Setup

  • Hardware and software:
    • RTX 3070 8 GB (NVIDIA 617.42, 32-lane waves), i9-9900K, 32 GB RAM;
    • Windows 11 Pro N 26200, Rust 1.99.0, release.
  • The PR heads:
    • #2404 5ca9c23, #2097 d5c2781, #684 e56dbc3, #751 59f8e7c;
    • #1803 cb00751, #2229 b7209c2, #2384 d2306d7, #1975 7296038.
    • All merged clean. In #2384's gpu_view.rs one test initializer needed main's new State fields to build. XCL_GPU_VIEW_BUFFERS is off in all the rows below.
  • Settings: XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_TEXTURE_LEVEL_PAGES=1 XCL_PSO_WAIT_MS=50 XCL_NETWORK=0. A pressed every 5 s, 300 s runs.
  • Compute pipelines precompiled once, as in #2468: --precompile --only cs --pipelines --used-only. 909 programs, 3,563 pipelines, 18.7 min.
  • Graphics pipelines are built by the runs. X1 started with no graphics blobs; W1–W3 followed on the same cache, after seven other runs of this tree.
run draws skipped while their pipeline was built graphics pipelines with no driver blob first #101 0x887a0005 local video memory peak
X1 4,096 of 23,269 11 123.6 s 292.9 s (+169 s) 10.7 GB
W1 26 of 19,799 2 127.2 s 173.9 s (+47 s) 10.2 GB
W2 35 of 20,008 2 97.3 s 168.6 s (+71 s) 10.6 GB
W3 31 of 17,817 0 119.7 s 146.2 s (+26 s) 10.2 GB
  • Every removal is 0x887a0005 with no GPU wait timed out. In X1 and W3 the title then stops at its own int3 at +0x2474606.
  • The draws come from the last console code so far line before the removal. In X1 the skipped ones are the 50 ms budget running out while graphics pipelines were built.
  • X4: the same as X1 without XCL_PSO_WAIT_MS. It stopped presenting at 120 s, 17 s after its first #101, while 34 graphics pipelines were built after 100 s. There was no removal to the end of the run.

On screen (watched in X1 and W1–W3):

  • Loading screens are drawn right.
  • At the world, black for a few seconds, then audio. In W1–W3 the prologue's title card appears; in X1 it did not.
  • Then subtitles and the minimap over a white, overexposed scene, with moving cyan shapes along a horizon.
  • With the warm caches there is more of it: rows of small round spots, possibly lights, and rectangular blocks on the horizon.
  • W3 showed a flat green frame before the title card, as main does at the same point (#1773).

On an older tree without #2229 (#2372 #1599 #1803 #1887 #1993 on main 2898511), the same card and settings gave a flat grey scene (watched in 2 runs). In 5 of 6 runs it presented to the end of 300 s with no removal; the sixth crashed at 59 s in the loading screens, in #505's VCRUNTIME140 memcpy.

What I read from it

  • On 8 GB, the removal of #2403 comes sooner when fewer draws are skipped: the scene binds more pipelines at once. A cold run lasted longer because it drew less. I did not count the bound code here, so this is a reading, not a measurement.
  • The white scene fits what @⁠CharlyRien lists on #2384: materials, evicted textures, and buffer views with an empty V#. Nothing here fixes it.

Not tested: more than one run per row; a count of the bound shader code; #2384's switch together with warm caches (with the lock-order change discussed on #2384: 14,340 tiles mirrored, the same picture plus rectangular structures, removal at 191 s); AMD.

AI use: Claude Code (Claude Opus 5.5) built the tree, ran the precompile and the runs, read the logs and wrote this. The person running it watched the runs named above and described the screen.

**@⁠kole07139** on GitHub · 2026-11-25 22:45 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7176757813) **RTX 3070 8 GB, Windows: @⁠throny's tree (`main` `6d12f58` + #2404 #2097 #684 #751 #1803 #2229 #2384 #1975) reaches the prologue: the title card, subtitles and minimap are drawn, behind them a white, overexposed scene with cyan shapes. Once the graphics pipelines are warm, almost no draw is skipped any more, and the device is removed sooner: 26–71 s after the first `#101` instead of 169 s.** One run per row. **Setup** - Hardware and software: - RTX 3070 8 GB (NVIDIA 617.42, 32-lane waves), i9-9900K, 32 GB RAM; - Windows 11 Pro N 26200, Rust 1.99.0, release. - The PR heads: - #2404 `5ca9c23`, #2097 `d5c2781`, #684 `e56dbc3`, #751 `59f8e7c`; - #1803 `cb00751`, #2229 `b7209c2`, #2384 `d2306d7`, #1975 `7296038`. - All merged clean. In #2384's `gpu_view.rs` one test initializer needed `main`'s new `State` fields to build. `XCL_GPU_VIEW_BUFFERS` is off in all the rows below. - Settings: `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_TEXTURE_LEVEL_PAGES=1 XCL_PSO_WAIT_MS=50 XCL_NETWORK=0`. A pressed every 5 s, 300 s runs. - Compute pipelines precompiled once, as in #2468: `--precompile --only cs --pipelines --used-only`. 909 programs, 3,563 pipelines, 18.7 min. - Graphics pipelines are built by the runs. X1 started with no graphics blobs; W1–W3 followed on the same cache, after seven other runs of this tree. | run | draws skipped while their pipeline was built | graphics pipelines with no driver blob | first `#101` | `0x887a0005` | local video memory peak | |---|---|---|---|---|---| | X1 | 4,096 of 23,269 | 11 | 123.6 s | 292.9 s (+169 s) | 10.7 GB | | W1 | 26 of 19,799 | 2 | 127.2 s | 173.9 s (+47 s) | 10.2 GB | | W2 | 35 of 20,008 | 2 | 97.3 s | 168.6 s (+71 s) | 10.6 GB | | W3 | 31 of 17,817 | 0 | 119.7 s | 146.2 s (+26 s) | 10.2 GB | - Every removal is `0x887a0005` with no GPU wait timed out. In X1 and W3 the title then stops at its own `int3` at `+0x2474606`. - The draws come from the last `console code so far` line before the removal. In X1 the skipped ones are the 50 ms budget running out while graphics pipelines were built. - X4: the same as X1 without `XCL_PSO_WAIT_MS`. It stopped presenting at 120 s, 17 s after its first `#101`, while 34 graphics pipelines were built after 100 s. There was no removal to the end of the run. **On screen** (watched in X1 and W1–W3): - Loading screens are drawn right. - At the world, black for a few seconds, then audio. In W1–W3 the prologue's title card appears; in X1 it did not. - Then subtitles and the minimap over a white, overexposed scene, with moving cyan shapes along a horizon. - With the warm caches there is more of it: rows of small round spots, possibly lights, and rectangular blocks on the horizon. - W3 showed a flat green frame before the title card, as `main` does at the same point (#1773). On an older tree without #2229 (#2372 #1599 #1803 #1887 #1993 on `main` `2898511`), the same card and settings gave a flat grey scene (watched in 2 runs). In 5 of 6 runs it presented to the end of 300 s with no removal; the sixth crashed at 59 s in the loading screens, in #505's `VCRUNTIME140` memcpy. **What I read from it** - On 8 GB, the removal of #2403 comes sooner when fewer draws are skipped: the scene binds more pipelines at once. A cold run lasted longer because it drew less. I did not count the bound code here, so this is a reading, not a measurement. - The white scene fits what @⁠CharlyRien lists on #2384: materials, evicted textures, and buffer views with an empty V#. Nothing here fixes it. **Not tested:** more than one run per row; a count of the bound shader code; #2384's switch together with warm caches (with the lock-order change discussed on #2384: 14,340 tiles mirrored, the same picture plus rectangular structures, removal at 191 s); AMD. **AI use:** Claude Code (Claude Opus 5.5) built the tree, ran the precompile and the runs, read the logs and wrote this. The person running it watched the runs named above and described the screen.
Author
Owner

@⁠kole07139 on GitHub · 2026-11-25 22:52 UTC · original

@⁠MacieGx thanks. The tree in my report above has #751, and none of its 10 runs crashed there, against 1 of 6 on the tree without it. Too few runs to call it proof, but it fits.

AI use: Claude Code (Claude Opus 5.5) counted the runs and wrote this.

**@⁠kole07139** on GitHub · 2026-11-25 22:52 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7176878622) @⁠MacieGx thanks. The tree in my report above has #751, and none of its 10 runs crashed there, against 1 of 6 on the tree without it. Too few runs to call it proof, but it fits. AI use: Claude Code (Claude Opus 5.5) counted the runs and wrote this.
Author
Owner

@⁠throny on GitHub · 2026-11-25 22:24 UTC · original · edited 2026-11-25 23:10 UTC

@⁠MacieGx the branch at f959495 + #684 on the RTX 4080 16 GB / 64 GB RAM, your settings, XCL_PSO_CODE=1.

Runs 5 and 6: without the skip, by my mistake (the path of the skip file lost its backslashes in my script, so no program was skipped). They are a clean measurement of the limit on this card, though:

run device removed 0x887a0005 code in use at the removal compute graphics commit free
5 139.1 s 1,604 pipelines / 469,015 KB 869 / 350,378 KB 735 / 118,637 KB 14.9 GB
6 156.6 s 1,646 pipelines / 465 MB (last line before) 877 / 348 MB 769 / 117 MB 15.8 GB

So on Ada it goes at 465–469 MB by your sum, a little above your 398–447 MB.

Run 7: with the skip file (1004 records whose name contains CS_RaytracingResolve, 1000 distinct hashes): past the removal point, and the world draws.

  • No device removal at 140–160 s. Code in use stayed at 254 MB (1,746 pipelines: compute 708 / 92 MB, graphics 1,038 / 163 MB).
  • The frame dumped at about 185 s shows the world: overexposed and teal as you describe, with geometry and what look like HUD elements.
  • Memory was no limit here: 36.4 GB committed, 28.9 GB of RAM still free. Local video memory was 16.6 GB against a budget of 15.0 GB.
  • At 256 s the GPU itself hung, and took the whole PC with it. XCL's log: every queue's GPU wait times out at once (5 s). Windows' System log at the same second: nvlddmkm 153 "UCodeReset TDR occurred on GPUID:100", then nvlddmkm 14 "timeout error waiting for NV_UFLUSH_FB_FLUSH" three times and "GPU recovery action changed from 0x0 (None) to 0x1 (PF FLR)". The machine froze and had to be reset. Unlike the 0x887a0005 removals, this one is a driver event.

Run 8: the same again, a second GPU hang, this time survived.

  • With the skip (the log names 1000 programs that get no pipeline), code in use at the end was 230 MB (1,543 pipelines).
  • Last present at 164 s. At about that time the System log has the same nvlddmkm 153 "UCodeReset TDR occurred" and NV_UFLUSH_FB_FLUSH timeouts, repeated over 70 s. Windows recovered this time: XCL saw 0x887a0007 (device reset) at 236.7 s, then the title's own watchdog ended it.
  • 32.9 GB committed, 14.0 GB local video memory (under the budget this time), 21.6 GB of commit free. One GPU wait timed out in the whole run, so there was no warning in XCL's log before the hang.
  • The frame at the end is the same teal, overexposed world.

So on this RTX 4080 (driver 610.88), with the skip, the 512 MB wall is out of the way and 2 of 2 runs then hang the GPU hard (UCodeReset TDR) 165–255 s in, with code in use at 230–254 MB and with or without video memory over budget. That looks like a different failure from the 0x887a0005 one: a driver event, and not tied to the code sum. Is anyone else seeing UCodeReset TDR in the System log on these runs, or is it Ada / 610.88 only?

I'm stopping world runs of this tree on this machine for now: one of the two hangs froze the whole PC. If a narrower test would help find the dispatch that hangs it (your XCL_GPU_CULPRIT-style probes, a switch to turn off), say which and I'll run exactly that.

AI use: Claude Code (Claude Fable 5.2) ran this and wrote it.

**@⁠throny** on GitHub · 2026-11-25 22:24 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7176324810) · edited 2026-11-25 23:10 UTC @⁠MacieGx the branch at `f959495` + #684 on the RTX 4080 16 GB / 64 GB RAM, your settings, `XCL_PSO_CODE=1`. **Runs 5 and 6: without the skip, by my mistake** (the path of the skip file lost its backslashes in my script, so no program was skipped). They are a clean measurement of the limit on this card, though: | run | device removed `0x887a0005` | code in use at the removal | compute | graphics | commit free | |---|---|---|---|---|---| | 5 | 139.1 s | 1,604 pipelines / 469,015 KB | 869 / 350,378 KB | 735 / 118,637 KB | 14.9 GB | | 6 | 156.6 s | 1,646 pipelines / 465 MB (last line before) | 877 / 348 MB | 769 / 117 MB | 15.8 GB | So on Ada it goes at 465–469 MB by your sum, a little above your 398–447 MB. **Run 7: with the skip file** (1004 records whose name contains `CS_RaytracingResolve`, 1000 distinct hashes): **past the removal point, and the world draws.** - No device removal at 140–160 s. Code in use stayed at 254 MB (1,746 pipelines: compute 708 / 92 MB, graphics 1,038 / 163 MB). - The frame dumped at about 185 s shows the world: overexposed and teal as you describe, with geometry and what look like HUD elements. - Memory was no limit here: 36.4 GB committed, 28.9 GB of RAM still free. Local video memory was 16.6 GB against a budget of 15.0 GB. - **At 256 s the GPU itself hung, and took the whole PC with it.** XCL's log: every queue's GPU wait times out at once (5 s). Windows' System log at the same second: `nvlddmkm` 153 "UCodeReset TDR occurred on GPUID:100", then `nvlddmkm` 14 "timeout error waiting for NV_UFLUSH_FB_FLUSH" three times and "GPU recovery action changed from 0x0 (None) to 0x1 (PF FLR)". The machine froze and had to be reset. Unlike the `0x887a0005` removals, this one **is** a driver event. **Run 8: the same again, a second GPU hang, this time survived.** - With the skip (the log names 1000 programs that get no pipeline), code in use at the end was 230 MB (1,543 pipelines). - Last present at 164 s. At about that time the System log has the same `nvlddmkm` 153 "UCodeReset TDR occurred" and `NV_UFLUSH_FB_FLUSH` timeouts, repeated over 70 s. Windows recovered this time: XCL saw `0x887a0007` (device reset) at 236.7 s, then the title's own watchdog ended it. - 32.9 GB committed, 14.0 GB local video memory (under the budget this time), 21.6 GB of commit free. One GPU wait timed out in the whole run, so there was no warning in XCL's log before the hang. - The frame at the end is the same teal, overexposed world. So on this RTX 4080 (driver 610.88), with the skip, the 512 MB wall is out of the way and **2 of 2 runs then hang the GPU hard (UCodeReset TDR) 165–255 s in**, with code in use at 230–254 MB and with or without video memory over budget. That looks like a different failure from the `0x887a0005` one: a driver event, and not tied to the code sum. Is anyone else seeing `UCodeReset TDR` in the System log on these runs, or is it Ada / 610.88 only? I'm stopping world runs of this tree on this machine for now: one of the two hangs froze the whole PC. If a narrower test would help find the dispatch that hangs it (your `XCL_GPU_CULPRIT`-style probes, a switch to turn off), say which and I'll run exactly that. AI use: Claude Code (Claude Fable 5.2) ran this and wrote it.
Author
Owner

@⁠CowboyBingus on GitHub · 2026-11-25 23:04 UTC · original · edited 2026-11-25 23:11 UTC

@⁠MacieGx your lab branch also ends in 0x887a0005 on an RTX 5070 Ti, and with the driver's code heaps raised (after @⁠vinhed's report on #2403) runs went 720 s with no removal and show the title's movement hint ("Move around" / "Move the camera"): in run 6 in every kept dumped frame from 274.9 to 349.7 s.

Setup: RTX 5070 Ti 16 GB, driver 32.0.16.2124 (621.24), 64 GB RAM, Windows 11 26300.

  • Tree: your lab branch at f959495 + #684 (e56dbc3) for runs 5–6, b72aa23 for runs 1–4, each plus local test commits: a hand port of upstream's --precompile --used-only (354ce0c) onto your precompile, and XCL_LOCAL_CODE_HEAP_MB (4fa3409, 567d785): a detour on nvwgf2umx+0x5dc0d0 (the routine @⁠vinhed names) that sets [rcx+0x10] to the given size, if smaller, while [rcx+0x30] is 0, after checking the bytes at five places in that routine (driver 621.24 only). Diagnostic only, not something for main.
  • Env: yours (XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_SHADOW_TILED=1 XCL_PAGE_BUDGET_MB=1024 XCL_SEEN_TOUCH=0 XCL_EVICT_SHARED=1 XCL_TWO_PASS_RES_MB=4 XCL_VIEW_POOL_MB=1024 XCL_WAIT64_TRUST_FENCE=1), XCL_NETWORK=0 XCL_ACTIVITY=1, scripted A presses (the last at 140 s; run 6 every 20 s to 700 s), frame dumps every 2nd frame (run 4: every 4th). XCL_PSO_CODE=1 in runs 5–6, XCL_COHERENT_MB=1024 in run 6.
  • Precompile: your four passes (cs --pipelines --used-only from a list of 1575 pipelines earlier runs used, ms --pipelines, ps, vs), made once with the build before the hook commits; all runs used that cache. No skip file.
run tree XCL_LOCAL_CODE_HEAP_MB end
1 b72aa23 + local unset 0x887a0005 at 353.3 s
2 b72aa23 + local unset 0x887a0005 at 169.3 s
3 b72aa23 + local 2000 no removal; the run's 360 s, 1471 frames
4 b72aa23 + local 2000 no removal; 208 "GPU queue.Wait … did not complete within 5000 ms" from 161.0 s, 0 draws in every 2 s window from 224.9 s, then the title's null write at +0x23cf683 at 249.9 s
5 f959495 + #684 + local 2000 no removal; the run's 720 s, 1980 frames; hint in one kept frame, 611.6 s (the run lost ~140 s to compute pipelines built at run time)
6 f959495 + #684 + local 2000 no removal; the run's 720 s, 2132 frames; hint in every kept frame 274.9–349.7 s
  • With the variable set the log shows two heaps raised, 512 MiB -> 2000 MiB, at 0.5 s (runs 3–6).
  • Run 5's shader code lab: lines: 480 MB in use from 148.0 s, 563 MB from 343.0 s, at most 599 MB (from 579.1 s). Presents: 1.52/s over 499.7–719.8 s (2.0/s over 598.2–675.8 s, 0.23/s over 675.8–719.8 s); 52 queue-wait timeouts from 681.3 s.
  • The picture around the hint: in run 5's frame about 55 % of the samples are plain white and the rest a garbled tile mosaic; run 6's frames are a flat pale white behind the hint. Run 5's kept frames from 611.6 to 675.6 s are pixel-identical frame to frame except five that change 44–83 % of their pixels and five that change 4 pixels.

Edit, run 7 (run 5's setup, A presses every 20 s to 700 s, and a local scripted stick input from 450 s: left stick forward 4 s, right stick right 2 s, left stick back-right 3 s, every 15 s): the run's 720 s with no removal, 2123 frames. Consecutive kept frames: 38 of 53 pairs unchanged over 380–450 s, 17 of 34 over 450–520 s, and shapes not in the earlier frames appear in the mosaic from 457 s. 451 queue-wait timeouts from 526.8 s.

Not established: whether those picture changes come from the stick input (one run; the scene could change on its own); the cause of the white / mosaic picture; the cause of the queue-wait timeouts. The 599 MB is XCL's count of pipeline code in use; the driver heap's own size was not measured.

AI use: Claude Code (Claude Opus 5.5) built the tree, ran the title on the machine above, read the logs and wrote this report.

**@⁠CowboyBingus** on GitHub · 2026-11-25 23:04 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7177113953) · edited 2026-11-25 23:11 UTC @⁠MacieGx your lab branch also ends in `0x887a0005` on an RTX 5070 Ti, and with the driver's code heaps raised (after @⁠vinhed's report on #2403) runs went 720 s with no removal and **show the title's movement hint ("Move around" / "Move the camera")**: in run 6 in every kept dumped frame from 274.9 to 349.7 s. **Setup:** RTX 5070 Ti 16 GB, driver 32.0.16.2124 (621.24), 64 GB RAM, Windows 11 26300. - Tree: your lab branch at `f959495` + #684 (`e56dbc3`) for runs 5–6, `b72aa23` for runs 1–4, each plus local test commits: a hand port of upstream's `--precompile --used-only` (`354ce0c`) onto your precompile, and `XCL_LOCAL_CODE_HEAP_MB` ([`4fa3409`](https://github.com/CowboyBingus/xcl/commit/4fa34094), [`567d785`](https://github.com/CowboyBingus/xcl/commit/567d785f)): a detour on `nvwgf2umx+0x5dc0d0` (the routine @⁠vinhed names) that sets `[rcx+0x10]` to the given size, if smaller, while `[rcx+0x30]` is 0, after checking the bytes at five places in that routine (driver 621.24 only). Diagnostic only, not something for `main`. - Env: yours (`XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_SHADOW_TILED=1 XCL_PAGE_BUDGET_MB=1024 XCL_SEEN_TOUCH=0 XCL_EVICT_SHARED=1 XCL_TWO_PASS_RES_MB=4 XCL_VIEW_POOL_MB=1024 XCL_WAIT64_TRUST_FENCE=1`), `XCL_NETWORK=0 XCL_ACTIVITY=1`, scripted A presses (the last at 140 s; run 6 every 20 s to 700 s), frame dumps every 2nd frame (run 4: every 4th). `XCL_PSO_CODE=1` in runs 5–6, `XCL_COHERENT_MB=1024` in run 6. - Precompile: your four passes (cs `--pipelines --used-only` from a list of 1575 pipelines earlier runs used, ms `--pipelines`, ps, vs), made once with the build before the hook commits; all runs used that cache. No skip file. | run | tree | `XCL_LOCAL_CODE_HEAP_MB` | end | |---|---|---|---| | 1 | `b72aa23` + local | unset | `0x887a0005` at 353.3 s | | 2 | `b72aa23` + local | unset | `0x887a0005` at 169.3 s | | 3 | `b72aa23` + local | 2000 | no removal; the run's 360 s, 1471 frames | | 4 | `b72aa23` + local | 2000 | no removal; 208 "GPU queue.Wait … did not complete within 5000 ms" from 161.0 s, 0 draws in every 2 s window from 224.9 s, then the title's null write at `+0x23cf683` at 249.9 s | | 5 | `f959495` + #684 + local | 2000 | no removal; the run's 720 s, 1980 frames; hint in one kept frame, 611.6 s (the run lost ~140 s to compute pipelines built at run time) | | 6 | `f959495` + #684 + local | 2000 | no removal; the run's 720 s, 2132 frames; hint in every kept frame 274.9–349.7 s | - With the variable set the log shows two heaps raised, `512 MiB -> 2000 MiB`, at 0.5 s (runs 3–6). - Run 5's `shader code lab:` lines: 480 MB in use from 148.0 s, 563 MB from 343.0 s, at most 599 MB (from 579.1 s). Presents: 1.52/s over 499.7–719.8 s (2.0/s over 598.2–675.8 s, 0.23/s over 675.8–719.8 s); 52 queue-wait timeouts from 681.3 s. - The picture around the hint: in run 5's frame about 55 % of the samples are plain white and the rest a garbled tile mosaic; run 6's frames are a flat pale white behind the hint. Run 5's kept frames from 611.6 to 675.6 s are pixel-identical frame to frame except five that change 44–83 % of their pixels and five that change 4 pixels. **Edit, run 7** (run 5's setup, A presses every 20 s to 700 s, and a local scripted stick input from 450 s: left stick forward 4 s, right stick right 2 s, left stick back-right 3 s, every 15 s): the run's 720 s with no removal, 2123 frames. Consecutive kept frames: 38 of 53 pairs unchanged over 380–450 s, 17 of 34 over 450–520 s, and shapes not in the earlier frames appear in the mosaic from 457 s. 451 queue-wait timeouts from 526.8 s. Not established: whether those picture changes come from the stick input (one run; the scene could change on its own); the cause of the white / mosaic picture; the cause of the queue-wait timeouts. The 599 MB is XCL's count of pipeline code in use; the driver heap's own size was not measured. AI use: Claude Code (Claude Opus 5.5) built the tree, ran the title on the machine above, read the logs and wrote this report.
Author
Owner

@⁠imnicho on GitHub · 2026-11-25 23:25 UTC · original

A caveat on my comment above about RAM-backed video memory, after reading #2403: my six runs cannot tell that explanation from the driver's 512 MB shader-code heap, and #2403 fits them at least as well.

  • What I measured stands: five runs of five on the defaults were removed 168 - 228 s into the world, each with non-local video memory at 6.0 - 6.4 GB; two runs of two with XCL_COHERENT_MB=512 XCL_COHERENT_HEAPS=0 were not removed in 900 s.
  • But with XCL_COHERENT_HEAPS=0 the title's GPU heaps are plain memory and its world does less: 32 582 draws in 631 s against about 58 000 in 190 s. Fewer and smaller programs are then in use at once, which is exactly what keeps a run under the heap #2403 describes. Since then one more run with each switch alone also stayed up for 900 s, and with XCL_COHERENT_HEAPS=0 alone non-local video memory still reached 5.7 GB - so the level of that memory by itself does not decide it.
  • So please read my "for anyone on 16 GB of RAM" line as: those switches kept this card up, by making the title draw less; they are not a fix, and I have not shown that system memory is the cause.

I will run #2403's test on this card (RTX 5080 16 GB, driver 610.47) when the machine is free and post the result there.

AI use: Claude Code with Claude Fable 5.2 wrote this.

**@⁠imnicho** on GitHub · 2026-11-25 23:25 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7177543973) **A caveat on [my comment above](https://git.gtahub.st/github/xcl-dev--xcl/issues/505) about RAM-backed video memory, after reading #2403: my six runs cannot tell that explanation from the driver's 512 MB shader-code heap, and #2403 fits them at least as well.** - What I measured stands: five runs of five on the defaults were removed 168 - 228 s into the world, each with non-local video memory at 6.0 - 6.4 GB; two runs of two with `XCL_COHERENT_MB=512 XCL_COHERENT_HEAPS=0` were not removed in 900 s. - But with `XCL_COHERENT_HEAPS=0` the title's GPU heaps are plain memory and its world does less: 32 582 draws in 631 s against about 58 000 in 190 s. Fewer and smaller programs are then in use at once, which is exactly what keeps a run under the heap #2403 describes. Since then one more run with each switch alone also stayed up for 900 s, and with `XCL_COHERENT_HEAPS=0` alone non-local video memory still reached 5.7 GB - so the level of that memory by itself does not decide it. - So please read my "for anyone on 16 GB of RAM" line as: those switches kept this card up, **by making the title draw less**; they are not a fix, and I have not shown that system memory is the cause. I will run #2403's test on this card (RTX 5080 16 GB, driver 610.47) when the machine is free and post the result there. AI use: Claude Code with Claude Fable 5.2 wrote this.
Author
Owner

@⁠Raul-Paiva on GitHub · 2026-11-25 23:26 UTC · original · edited 2026-11-25 23:33 UTC

On the 8 GB, 32-lane NVIDIA laptop card from my comments above, the world-load 0x887a0006 removal is Windows' GPU timeout (TDR). With TdrDelay raised from the default 2 s to 10 s, the title gets past the point where it was removed in every warm run. It then waits on driver builds of compute programs it never reached before. This is one A/B, but the event log lines up with every earlier removal.

This is a different removal from #2403's code-heap limit: that one is 0x887a0005 with no TDR event (see my comment on #2403). It also answers @⁠yangzj0844's question 3 in #1337 for this card.

Versions:

  • main 6d12f58, plus these PRs:
  • main has moved on since (now 08db8020).

Setup:

  • RTX 3070 Laptop 8 GB, driver 621.24, i7-11800H, 32 GB RAM, Windows 10 19045, release.
  • XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_WINDOW_NO_CARRY=1 XCL_WATCH_HOT=0 XCL_DRED=1, A pressed every 5 s, warm caches.

1. Every 0x887a0006 removal today was a TDR.

  • The System log has 14 Display 4101 events today ("nvlddmkm stopped responding and has successfully recovered"), most with an nvlddmkm 153 a second before. That is one for each of the 14 runs that ended in 0x887a0006, each at the time of the removal: 0829441, 2898511 + #2404 + #2097, 6d12f58, and the stacks above.
  • The two 0x887a0005 removals that came right after long driver-build runs have no such event.
  • TdrDelay / TdrLevel were not set, so the default 2 s applied.

2. Aftermath on the last one (with XCL_AFTERMATH_DEBUG=1).

  • Device state "Hung", "Engine reset occurred: true".
  • One active shader: a direct-DXIL compute program, 117 KB of native code.
  • About 245 warps of it are at 28 different PCs spread across the program, from DXIL line 163 to 11 952.
    • Most of them are at the top of the program or around lines 10 852 – 11 423.
    • That looks like a program still running when it was cut, not lanes parked on one barrier or spin loop.
  • DRED names the same program and the same partly executed list as in the earlier warm runs (around 0 15 0 >6 0 15).

3. A/B: TdrDelay = 10 (a DWORD in HKLM\System\CurrentControlSet\Control\GraphicsDrivers, then a reboot), same build and caches.

TdrDelay unset (2 s) TdrDelay = 10
first #101 82 – 112 s 99.0 s
world compute burst ~7 300 dispatches in 2 s ~9 750 in 4 s (100 – 104 s), and 4 373 at 120 s
device removed 108 – 113 s in every warm run, 0x887a0006 + TDR event none in 900 s, no 4101 event
after that – last present at 116 s; 64 driver builds of compute programs, 61 of them without a blob (11 – 27 s each, 771 s in all); GPU at ~3 %
local video memory 11.0 – 15.1 GB 11.6 GB
  • So the first big compute burst of the world has some submission that takes more than 2 s on this GPU. The cut is Windows', not XCL's or the driver's.
  • Faster cards would not hit it, which fits that the removal at this point is reported mostly from laptops and 8 – 12 GB cards.
  • The remaining stop after 116 s is build-bound. The programs it waits on are ones the precompile did not cover with this stack, so a second run should start from more of them.

For other testers on slower cards: check the System log for event 4101 at the time of the removal. If it is there, TdrDelay is the thing to try. It is a system setting, so keep it as a diagnostic: it does not make a 2 s submission shorter.

For XCL: keeping each submission of that burst under the default TDR would avoid this without the registry. That means smaller split slabs, or splitting the list around the long dispatches. I have not tried either.

Edit: two more runs with TdrDelay = 10, same build, starting from the driver blobs of the run above.

run last present device removed 4101 event compute pipelines #2526 released
warm 113.8 s 117.4 s, 0x887a0005 none 0
warm, XCL_SHADER_CODE_MB=200 102.1 s 111.5 s, 0x887a0005 none 0
  • No TDR any more: there is no 4101 event in either run. But with every pipeline warm, the title now reaches a second, silent removal: 0x887a0005, no partly executed list in DRED.
  • The first TdrDelay run only lasted 900 s because it was waiting on driver builds.
  • #2403's pattern, but not proven: the removal fits #2403's code-heap limit. But #2526 released no compute pipeline even with a 200 MB limit, so the compute code it counts stayed under that. If it is #2403, the rest would be graphics code: 119 graphics pipelines were in use, and #2526 does not count them.
  • One more thing, in both removals: about 3 s before the removal, 4 ExecuteIndirect of a split program skipped: no buffer for the commands of a chained ExecuteIndirect warnings, then mid-list split: CreateCommandList failed. The run that did not get removed had none. They may be a consequence of the device going, not a cause, but #2404's error paths were flagged in its review.

So this card has two removals on top of each other at the same point: the 2 s TDR (0x887a0006), and behind it a silent 0x887a0005.

Not tested: main after 6d12f58; other laptops; AMD.

AI use: Claude Code (Claude Opus 5.5) built the tree, ran the runs and the Aftermath dump, read the logs and the event log, and wrote this comment. The TdrDelay value was set by the tester as administrator.

**@⁠Raul-Paiva** on GitHub · 2026-11-25 23:26 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7177571006) · edited 2026-11-25 23:33 UTC On the 8 GB, 32-lane NVIDIA laptop card from my comments above, **the world-load `0x887a0006` removal is Windows' GPU timeout (TDR)**. With `TdrDelay` raised from the default 2 s to 10 s, the title gets past the point where it was removed in every warm run. It then waits on driver builds of compute programs it never reached before. This is one A/B, but the event log lines up with every earlier removal. This is a different removal from #2403's code-heap limit: that one is `0x887a0005` with no TDR event (see my comment on #2403). It also answers @⁠yangzj0844's question 3 in #1337 for this card. **Versions:** - `main` `6d12f58`, plus these PRs: - #684 `e56dbc3`, #2404 `5ca9c23`, #2097 `d5c2781`; - #2385 `005a442`, #751 `59f8e7c`; - #2428 `ab2855f` (with #2427), #2496 `78bba5c`; - #2526 `5b59fe4` (with #2422); - local Nsight Aftermath hooks. - `main` has moved on since (now `08db8020`). **Setup:** - RTX 3070 Laptop 8 GB, driver 621.24, i7-11800H, 32 GB RAM, Windows 10 19045, release. - `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_WINDOW_NO_CARRY=1 XCL_WATCH_HOT=0 XCL_DRED=1`, A pressed every 5 s, warm caches. **1. Every `0x887a0006` removal today was a TDR.** - The System log has 14 `Display` 4101 events today ("nvlddmkm stopped responding and has successfully recovered"), most with an `nvlddmkm` 153 a second before. That is one for each of the 14 runs that ended in `0x887a0006`, each at the time of the removal: `0829441`, `2898511` + #2404 + #2097, `6d12f58`, and the stacks above. - The two `0x887a0005` removals that came right after long driver-build runs have no such event. - `TdrDelay` / `TdrLevel` were not set, so the default 2 s applied. **2. Aftermath on the last one (with `XCL_AFTERMATH_DEBUG=1`).** - Device state "Hung", "Engine reset occurred: true". - One active shader: a direct-DXIL compute program, 117 KB of native code. - About 245 warps of it are at 28 different PCs spread across the program, from DXIL line 163 to 11 952. - Most of them are at the top of the program or around lines 10 852 – 11 423. - That looks like a program still running when it was cut, not lanes parked on one barrier or spin loop. - DRED names the same program and the same partly executed list as in the earlier warm runs (around `0 15 0 >6 0 15`). **3. A/B: `TdrDelay` = 10 (a DWORD in `HKLM\System\CurrentControlSet\Control\GraphicsDrivers`, then a reboot), same build and caches.** | | `TdrDelay` unset (2 s) | `TdrDelay` = 10 | |---|---|---| | first `#101` | 82 – 112 s | 99.0 s | | world compute burst | ~7 300 dispatches in 2 s | ~9 750 in 4 s (100 – 104 s), and 4 373 at 120 s | | device removed | 108 – 113 s in every warm run, `0x887a0006` + TDR event | **none in 900 s, no 4101 event** | | after that | – | last present at 116 s; 64 driver builds of compute programs, 61 of them without a blob (11 – 27 s each, 771 s in all); GPU at ~3 % | | local video memory | 11.0 – 15.1 GB | 11.6 GB | - So the first big compute burst of the world has some submission that takes more than 2 s on this GPU. The cut is Windows', not XCL's or the driver's. - Faster cards would not hit it, which fits that the removal at this point is reported mostly from laptops and 8 – 12 GB cards. - **The remaining stop** after 116 s is build-bound. The programs it waits on are ones the precompile did not cover with this stack, so a second run should start from more of them. **For other testers on slower cards:** check the System log for event 4101 at the time of the removal. If it is there, `TdrDelay` is the thing to try. It is a system setting, so keep it as a diagnostic: it does not make a 2 s submission shorter. **For XCL:** keeping each submission of that burst under the default TDR would avoid this without the registry. That means smaller split slabs, or splitting the list around the long dispatches. I have not tried either. **Edit: two more runs with `TdrDelay` = 10, same build, starting from the driver blobs of the run above.** | run | last present | device removed | 4101 event | compute pipelines #2526 released | |---|---|---|---|---| | warm | 113.8 s | **117.4 s, `0x887a0005`** | none | 0 | | warm, `XCL_SHADER_CODE_MB=200` | 102.1 s | **111.5 s, `0x887a0005`** | none | 0 | - **No TDR any more:** there is no 4101 event in either run. But with every pipeline warm, the title now reaches a second, silent removal: `0x887a0005`, no partly executed list in DRED. - **The first `TdrDelay` run only lasted 900 s** because it was waiting on driver builds. - **#2403's pattern, but not proven:** the removal fits #2403's code-heap limit. But #2526 released no compute pipeline even with a 200 MB limit, so the compute code it counts stayed under that. If it is #2403, the rest would be graphics code: 119 graphics pipelines were in use, and #2526 does not count them. - **One more thing, in both removals:** about 3 s before the removal, 4 `ExecuteIndirect of a split program skipped: no buffer for the commands of a chained ExecuteIndirect` warnings, then `mid-list split: CreateCommandList failed`. The run that did not get removed had none. They may be a consequence of the device going, not a cause, but #2404's error paths were flagged in its review. So this card has two removals on top of each other at the same point: the 2 s TDR (`0x887a0006`), and behind it a silent `0x887a0005`. **Not tested:** `main` after `6d12f58`; other laptops; AMD. **AI use:** Claude Code (Claude Opus 5.5) built the tree, ran the runs and the Aftermath dump, read the logs and the event log, and wrote this comment. The `TdrDelay` value was set by the tester as administrator.
Author
Owner

@⁠Raul-Paiva on GitHub · 2026-11-25 23:53 UTC · original

Follow-up to my TDR comment, same 8 GB, 32-lane NVIDIA laptop card, still with TdrDelay = 10. Leaving out the dispatches of 65 large compute programs moves the silent 0x887a0005 removal from ~115 s to 269 s. So those programs are a large part of it, but not all of it. This is a diagnostic only: the frames lose whatever those programs draw.

Tree: as in the comment above (main 6d12f58 + #684, #2404, #2097, #2385, #751, #2428 with #2427, #2496, #2526 with #2422), plus a local switch that is not for a PR. It skips Dispatch and ExecuteIndirect calls whose pipeline's console compute program is in a list. Same settings as before, warm caches.

Which programs:

  • The 65 compute programs the driver had to build in the first TdrDelay run. The world asks for them right after its first big compute burst, and the precompile (--precompile --only cs --pipelines) did not leave a driver blob for them with this stack.
  • Each is 460 – 775 KB of DXIL, 40 MB in all.
  • They reach the list through ExecuteIndirect, as whole compute pipelines: 217 ExecuteIndirect whole compute PSO: whole compute pipeline warnings in one run. As far as the log shows, not as the pieces #2404 runs.
run dispatches skipped last present device removed 4101 (TDR) event
warm, nothing skipped 0 113.8 s 117.4 s, 0x887a0005 none
warm, same with XCL_SHADER_CODE_MB=200 0 102.1 s 111.5 s, 0x887a0005 none
skip only in Dispatch 0: none of them comes through Dispatch 108.0 s 115.8 s, 0x887a0005 none
skip in Dispatch and ExecuteIndirect > 2 048 261.5 s 269.1 s, 0x887a0005 none
  • With them skipped, the title keeps working from 115 s to 260 s: 10 000 – 19 000 dispatches per 30 s, but only about 5 presents per 30 s.
  • The removal then comes anyway, later: 0x887a0005, no DRED fault. Local video memory was 12.4 GB, 30.7 GB committed.
  • About 3 s before every one of these removals there are four ExecuteIndirect of a split program skipped: no buffer for the commands of a chained ExecuteIndirect. At 269 s they are followed by another ExecuteIndirect whole compute PSO warning.

How I read it:

  • It fits #2403. The whole forms of these big split programs add their driver code all at once when they first run, and the rest of the world fills the heap more slowly afterwards.
  • On the XCL side, it would help if ExecuteIndirect of a split program used the pieces (as #2404 intends) instead of building and binding the whole form. #2526 could also count and release graphics pipelines.
  • The next thing I am doing is narrowing the 65 down to the ones that move the removal.

Not tested: which of the 65 matter (in progress); more than one run per row; TdrDelay unset with the skip; main after 6d12f58; AMD.

AI use: Claude Code (Claude Opus 5.5) wrote the local switch, ran the runs, read the logs, and wrote this comment.

**@⁠Raul-Paiva** on GitHub · 2026-11-25 23:53 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7178168357) Follow-up to [my TDR comment](https://git.gtahub.st/github/xcl-dev--xcl/issues/505), same 8 GB, 32-lane NVIDIA laptop card, still with `TdrDelay` = 10. **Leaving out the dispatches of 65 large compute programs moves the silent `0x887a0005` removal from ~115 s to 269 s.** So those programs are a large part of it, but not all of it. This is a diagnostic only: the frames lose whatever those programs draw. **Tree:** as in the comment above (`main` `6d12f58` + #684, #2404, #2097, #2385, #751, #2428 with #2427, #2496, #2526 with #2422), plus a local switch that is not for a PR. It skips `Dispatch` and `ExecuteIndirect` calls whose pipeline's console compute program is in a list. Same settings as before, warm caches. **Which programs:** - The 65 compute programs the driver had to build in the first `TdrDelay` run. The world asks for them right after its first big compute burst, and the precompile (`--precompile --only cs --pipelines`) did not leave a driver blob for them with this stack. - Each is 460 – 775 KB of DXIL, 40 MB in all. - They reach the list through `ExecuteIndirect`, as whole compute pipelines: 217 `ExecuteIndirect whole compute PSO: whole compute pipeline` warnings in one run. As far as the log shows, not as the pieces #2404 runs. | run | dispatches skipped | last present | device removed | 4101 (TDR) event | |---|---|---|---|---| | warm, nothing skipped | 0 | 113.8 s | 117.4 s, `0x887a0005` | none | | warm, same with `XCL_SHADER_CODE_MB=200` | 0 | 102.1 s | 111.5 s, `0x887a0005` | none | | skip only in `Dispatch` | 0: none of them comes through `Dispatch` | 108.0 s | 115.8 s, `0x887a0005` | none | | **skip in `Dispatch` and `ExecuteIndirect`** | **> 2 048** | **261.5 s** | **269.1 s, `0x887a0005`** | none | - **With them skipped,** the title keeps working from 115 s to 260 s: 10 000 – 19 000 dispatches per 30 s, but only about 5 presents per 30 s. - **The removal then comes anyway,** later: `0x887a0005`, no DRED fault. Local video memory was 12.4 GB, 30.7 GB committed. - **About 3 s before every one of these removals** there are four `ExecuteIndirect of a split program skipped: no buffer for the commands of a chained ExecuteIndirect`. At 269 s they are followed by another `ExecuteIndirect whole compute PSO` warning. **How I read it:** - It fits #2403. The whole forms of these big split programs add their driver code all at once when they first run, and the rest of the world fills the heap more slowly afterwards. - On the XCL side, it would help if `ExecuteIndirect` of a split program used the pieces (as #2404 intends) instead of building and binding the whole form. #2526 could also count and release graphics pipelines. - The next thing I am doing is narrowing the 65 down to the ones that move the removal. **Not tested:** which of the 65 matter (in progress); more than one run per row; `TdrDelay` unset with the skip; `main` after `6d12f58`; AMD. **AI use:** Claude Code (Claude Opus 5.5) wrote the local switch, ran the runs, read the logs, and wrote this comment.
Author
Owner

@⁠MacieGx on GitHub · 2026-11-26 00:12 UTC · original

Player control on the RTX 5080 16 GB with 32 GB RAM (driver 621.24): one run of the lab branch, now at 8e95067 (https://github.com/MacieGx/xcl/tree/lab/gta6-nvidia-world), went its whole 520 s:

  • the café cutscene played from 143 s (A pressed only at 25, 30, 35, 40, 62 and 64 s; a press during the cutscene can fill the skip ring);
  • then the prison, then gameplay with the movement hint, and the camera and walking respond;
  • 6.3 min of world in all, with no removal, no stall and 4.4–4.9 GB of RAM free to the end, at about 1 present per second.

The picture is still wrong: the room is drawn correctly (table, books, brick wall, no garbage blocks), but far over-exposed under broad, soft colour lobes, and the café is white. Two causes are found and two are still open.

1. Indirect diffuse dispatch cut at 65,535 groups. indirect_diffuse_lighting:CS_FinalGather (record 9c1e6716e59ecf21) asks for 114,624–115,200 groups in x on every ExecuteIndirect call: a 1-D list of 2560x1440 pixels in 32s. #1795's indirect_clamp.hlsl cuts each dimension to D3D12's 65,535, so ~43 % of the list is never gathered. It is the only one of 416 compute programs whose records were read back that is that wide. Lab fix: XCL_FOLD_GROUPS=<record>, where the direct translator runs the dispatch as rows of 1024 groups. It is a lab form: up to 1023 surplus groups run, and direct Dispatch is not handled. A real fix needs the row width passed to the program. The idea comes from a VIctory report that found the same cut on an RTX 5080 (their #2256); no code was taken from it (GPL-3.0).

2. Render-target pages handed out unzeroed. The page pool gives a new render-target / depth / UAV texture the pool tiles an evicted texture had, with its bytes still there. The rectangular garbage blocks in the 2560x1440 R9G9B9E5 lighting layer and the prison's white-out came from those bytes. Lab fix: XCL_ZERO_TARGET_PAGES=1 clears such tiles with a GPU copy on the mapping queue before they are mapped, and with it the blocks are gone.

Still open: the soft lobes and the over-exposure (the composite also samples a 640x360 flare/bloom target of green arcs), the café white-out, and the hint box and subtitles flickering between frames.

Memory: XCL_WS_MAX_MB=13000 sets a hard working-set maximum for the process. It held the working set at 12.6–13.0 GB with no visible frame cost; without it, runs ended at about 300 s on 32 GB.

#2403: the run used the skip file (the CS_RaytracingResolve programs are not made). I also cherry-picked @⁠CowboyBingus's heap hook (authorship kept, lab only): both heaps log 512 → 2000 MiB, and a run without the skip file got past the old limit, ending at 240 s with 0x887a0006 and an nvlddmkm event 153 while pipelines were being given back. Without the give-back, it ran to its 262 s end. The resolve programs running did not change the café or the prison picture.

Env of the run: the one from my comments above, plus XCL_PSO_SKIP_FILE, XCL_PSO_CODE_MB=380, XCL_PSO_UNUSED_S=30, XCL_TWO_PASS_SHARE=1, XCL_WS_MAX_MB=13000, XCL_ZERO_TARGET_PAGES=1, XCL_FOLD_GROUPS=9c1e6716e59ecf21. Everything is off by default; one run each, so treat the numbers as single measurements.

AI use: Claude Code (Claude Opus 5.5 coordinating; a Claude Fable 5.2 subagent wrote the lab switches and ran the runs; the person running it watched and played the run).

**@⁠MacieGx** on GitHub · 2026-11-26 00:12 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7178514700) Player control on the RTX 5080 16 GB with 32 GB RAM (driver 621.24): one run of the lab branch, now at `8e95067` (https://github.com/MacieGx/xcl/tree/lab/gta6-nvidia-world), went its whole 520 s: - the café cutscene played from 143 s (A pressed only at 25, 30, 35, 40, 62 and 64 s; a press during the cutscene can fill the skip ring); - then the prison, then gameplay with the movement hint, and the camera and walking respond; - 6.3 min of world in all, with no removal, no stall and 4.4–4.9 GB of RAM free to the end, at about 1 present per second. The picture is still wrong: the room is drawn correctly (table, books, brick wall, no garbage blocks), but far over-exposed under broad, soft colour lobes, and the café is white. Two causes are found and two are still open. **1. Indirect diffuse dispatch cut at 65,535 groups.** `indirect_diffuse_lighting:CS_FinalGather` (record `9c1e6716e59ecf21`) asks for 114,624–115,200 groups in x on every ExecuteIndirect call: a 1-D list of 2560x1440 pixels in 32s. #1795's `indirect_clamp.hlsl` cuts each dimension to D3D12's 65,535, so ~43 % of the list is never gathered. It is the only one of 416 compute programs whose records were read back that is that wide. Lab fix: `XCL_FOLD_GROUPS=<record>`, where the direct translator runs the dispatch as rows of 1024 groups. It is a lab form: up to 1023 surplus groups run, and direct `Dispatch` is not handled. A real fix needs the row width passed to the program. The idea comes from a VIctory report that found the same cut on an RTX 5080 (their #2256); no code was taken from it (GPL-3.0). **2. Render-target pages handed out unzeroed.** The page pool gives a new render-target / depth / UAV texture the pool tiles an evicted texture had, with its bytes still there. The rectangular garbage blocks in the 2560x1440 R9G9B9E5 lighting layer and the prison's white-out came from those bytes. Lab fix: `XCL_ZERO_TARGET_PAGES=1` clears such tiles with a GPU copy on the mapping queue before they are mapped, and with it the blocks are gone. **Still open:** the soft lobes and the over-exposure (the composite also samples a 640x360 flare/bloom target of green arcs), the café white-out, and the hint box and subtitles flickering between frames. **Memory:** `XCL_WS_MAX_MB=13000` sets a hard working-set maximum for the process. It held the working set at 12.6–13.0 GB with no visible frame cost; without it, runs ended at about 300 s on 32 GB. **#2403:** the run used the skip file (the `CS_RaytracingResolve` programs are not made). I also cherry-picked @⁠CowboyBingus's heap hook (authorship kept, lab only): both heaps log 512 → 2000 MiB, and a run without the skip file got past the old limit, ending at 240 s with `0x887a0006` and an nvlddmkm event 153 while pipelines were being given back. Without the give-back, it ran to its 262 s end. The resolve programs running did not change the café or the prison picture. Env of the run: the one from my comments above, plus `XCL_PSO_SKIP_FILE`, `XCL_PSO_CODE_MB=380`, `XCL_PSO_UNUSED_S=30`, `XCL_TWO_PASS_SHARE=1`, `XCL_WS_MAX_MB=13000`, `XCL_ZERO_TARGET_PAGES=1`, `XCL_FOLD_GROUPS=9c1e6716e59ecf21`. Everything is off by default; one run each, so treat the numbers as single measurements. AI use: Claude Code (Claude Opus 5.5 coordinating; a Claude Fable 5.2 subagent wrote the lab switches and ran the runs; the person running it watched and played the run).
Author
Owner

@⁠schoperena on GitHub · 2026-11-26 02:33 UTC · original · edited 2026-11-26 03:24 UTC

RTX 5060 Ti 16 GB / 32 GB RAM, driver 621.24: @⁠MacieGx's lab branch with the code heap hook reaches the movement hint ("Muévete con L / Mira alrededor con R") with no device removal. The picture is a tile mosaic with any page budget, none included (edited: an earlier version of this comment said a 4 GB budget removed it; runs 3–6 below show it doesn't). Follow-up to my table above; same machine (Ryzen 7 5800X, 32 GB + page file).

Tree: lab branch at 8e95067a (it carries XCL_LOCAL_CODE_HEAP_MB, after @⁠CowboyBingus and @⁠vinhed on #2403) + one local commit, XCL_PRECOMPILE_SLICE=i/n (3 precompile processes). Release build.

Precompile: your four passes with XCL_HEAP_WINDOWS=1 into a new cache, 3 processes: cs --pipelines 57 min, ms --pipelines 39 min, ps 28 min, vs 2 min; 0 refused, 7,317 driver blobs.

Env: yours (XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_SHADOW_TILED=1 XCL_SEEN_TOUCH=0 XCL_EVICT_SHARED=1 XCL_TWO_PASS_RES_MB=4 XCL_VIEW_POOL_MB=1024 XCL_WAIT64_TRUST_FENCE=1) + XCL_LOCAL_CODE_HEAP_MB=2000 XCL_NETWORK=0 XCL_SKIP_BINK=1 XCL_DRED=1 XCL_ACTIVITY=1 XCL_RENDER_RES=2560x1440, A pressed at 15–40 s only.

run XCL_PAGE_BUDGET_MB up picture most work in 2 s at the end
1 1024 937 s, stopped by me, no removal a mosaic of tile-sized blocks: pieces of railings, road lines and foliage next to plain white / black blocks 16,592 draws / 21,458 dispatches 36.3 GB committed; local 14.3 GB; 37,165 textures evicted, 10,915 mapped again
2 4096 483 s, stopped by me, no removal in the opening scene, recognisable (a building with columns, a structure overhead, a vehicle outlined in light), all teal / white and overexposed; later the movement hint drawn cleanly over a white scene with two large green shapes and scrambled blocks at the sides 20,837 draws / 12,658 dispatches 37.4 GB committed; local 15.3 GB; 42,765 evicted, 14,151 mapped again
3 1024, no tile taken before COOL (local switch) 134 s: the title's null write at +0x2215c35, still loading — — —
4 the same as 3 ~400 s, stopped by me the mosaic again, with 0 tiles reused before they cooled and only 146 textures evicted (20 mapped again) 8,954 draws / 9,390 dispatches 42.0 GB committed; local 20.1 GB (pools grew to 9.2 GB instead)
5 unset (no budget) stopped by me in the world the mosaic again — —
6 unset, and XCL_SHADOW_TILED unset 128 s: 0xc0000005 with no exception line in the log, in the opening scene — — 39.1 GB committed (commit limit 84 GB)
  • The hook logs heap … reservation 512 MiB -> 2000 MiB for both heaps at start-up in both runs. No 0x887a0005, no queue-wait timeouts, no DRED output.
  • About 1 present per second in the world; 30 fps on the menus and loading cards.
  • With the world loading, the title stood ~2 min with no presents while graphics pipelines built cold (~5.6 s each): the recipe precompiles PS / VS DXIL, not graphics driver blobs.
  • The hint shows the title hands over control. WASD / mouse (the kbm mapping is on and the log shows pad buttons arriving) changed nothing visible at 1 fps on that picture, so I can't say yet whether the player moves; XCL_STICK_AT with frame dumps is my next run for that.

What I read from it

  • The mosaic is not the page budget: it shows with 1 GB, 4 GB and no budget, and with no early tile reuse and next to no evictions (run 4). Run 2's clean frames were from the opening scene, not from a fixed picture. It looks like the white / mosaic @⁠CowboyBingus saw on the 5070 Ti, also 16 GB; I haven't found its cause.
  • The teal / overexposed picture matches your "only the sun reaches the lit target".
  • 32 GB of RAM is tight: 36–37 GB committed, ~4 GB physical free during the world.

AI use: Claude Code (Claude Opus 5.5) built the tree, ran the precompile and the title on the machine above, read the logs and frames, and drafted this; I reviewed it.

**@⁠schoperena** on GitHub · 2026-11-26 02:33 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7180916210) · edited 2026-11-26 03:24 UTC **RTX 5060 Ti 16 GB / 32 GB RAM, driver 621.24: @⁠MacieGx's lab branch with the code heap hook reaches the movement hint ("Muévete con L / Mira alrededor con R") with no device removal. The picture is a tile mosaic with any page budget, none included (edited: an earlier version of this comment said a 4 GB budget removed it; runs 3–6 below show it doesn't).** Follow-up to my table above; same machine (Ryzen 7 5800X, 32 GB + page file). **Tree:** lab branch at `8e95067a` (it carries `XCL_LOCAL_CODE_HEAP_MB`, after @⁠CowboyBingus and @⁠vinhed on #2403) + one local commit, `XCL_PRECOMPILE_SLICE=i/n` (3 precompile processes). Release build. **Precompile:** your four passes with `XCL_HEAP_WINDOWS=1` into a new cache, 3 processes: cs `--pipelines` 57 min, ms `--pipelines` 39 min, ps 28 min, vs 2 min; 0 refused, 7,317 driver blobs. **Env:** yours (`XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_SHADOW_TILED=1 XCL_SEEN_TOUCH=0 XCL_EVICT_SHARED=1 XCL_TWO_PASS_RES_MB=4 XCL_VIEW_POOL_MB=1024 XCL_WAIT64_TRUST_FENCE=1`) + `XCL_LOCAL_CODE_HEAP_MB=2000 XCL_NETWORK=0 XCL_SKIP_BINK=1 XCL_DRED=1 XCL_ACTIVITY=1 XCL_RENDER_RES=2560x1440`, A pressed at 15–40 s only. | run | `XCL_PAGE_BUDGET_MB` | up | picture | most work in 2 s | at the end | |---|---|---|---|---|---| | 1 | 1024 | 937 s, stopped by me, no removal | a mosaic of tile-sized blocks: pieces of railings, road lines and foliage next to plain white / black blocks | 16,592 draws / 21,458 dispatches | 36.3 GB committed; local 14.3 GB; 37,165 textures evicted, 10,915 mapped again | | 2 | 4096 | 483 s, stopped by me, no removal | in the opening scene, recognisable (a building with columns, a structure overhead, a vehicle outlined in light), all teal / white and overexposed; later the movement hint drawn cleanly over a white scene with two large green shapes and scrambled blocks at the sides | 20,837 draws / 12,658 dispatches | 37.4 GB committed; local 15.3 GB; 42,765 evicted, 14,151 mapped again | | 3 | 1024, no tile taken before `COOL` (local switch) | 134 s: the title's null write at `+0x2215c35`, still loading | — | — | — | | 4 | the same as 3 | ~400 s, stopped by me | **the mosaic again**, with **0 tiles reused before they cooled** and only 146 textures evicted (20 mapped again) | 8,954 draws / 9,390 dispatches | 42.0 GB committed; local 20.1 GB (pools grew to 9.2 GB instead) | | 5 | unset (no budget) | stopped by me in the world | **the mosaic again** | — | — | | 6 | unset, and `XCL_SHADOW_TILED` unset | 128 s: `0xc0000005` with no exception line in the log, in the opening scene | — | — | 39.1 GB committed (commit limit 84 GB) | - The hook logs `heap … reservation 512 MiB -> 2000 MiB` for both heaps at start-up in both runs. No `0x887a0005`, no queue-wait timeouts, no DRED output. - About 1 present per second in the world; 30 fps on the menus and loading cards. - With the world loading, the title stood ~2 min with no presents while graphics pipelines built cold (~5.6 s each): the recipe precompiles PS / VS DXIL, not graphics driver blobs. - The hint shows the title hands over control. WASD / mouse (the `kbm` mapping is on and the log shows pad buttons arriving) changed nothing visible at 1 fps on that picture, so I can't say yet whether the player moves; `XCL_STICK_AT` with frame dumps is my next run for that. **What I read from it** - The mosaic is not the page budget: it shows with 1 GB, 4 GB and no budget, and with no early tile reuse and next to no evictions (run 4). Run 2's clean frames were from the opening scene, not from a fixed picture. It looks like the white / mosaic @⁠CowboyBingus saw on the 5070 Ti, also 16 GB; I haven't found its cause. - The teal / overexposed picture matches your "only the sun reaches the lit target". - 32 GB of RAM is tight: 36–37 GB committed, ~4 GB physical free during the world. **AI use:** Claude Code (Claude Opus 5.5) built the tree, ran the precompile and the title on the machine above, read the logs and frames, and drafted this; I reviewed it.
Author
Owner

@⁠itsSio on GitHub · 2026-11-26 03:38 UTC · original

For the recycled-tile stale-data / tile-mosaic finding here (referenced by @⁠MacieGx and @⁠schoperena): we implemented recycled vram::Pages tile zeroing on top of main (b49be183) on fork draft PR itsSio/xcl#7 (d3d12x/zero-recycled-vram-tiles, commit 94c593033ba03fb5a2302786ff810483be13663d, 1 file crates/xcl/src/hle/d3d12x/vram.rs, +373/-24).

Summary

  • Adds a per-heap TilePool::dirty_tiles bitset (fresh heaps clean, drain_cooling marks recycled tiles dirty, rollback-safe across OOM, cleared on empty-heap reclamation and after successful take_batch).
  • Lazily zeroes only dirty recycled tiles on Pages::queue via a 256-tile COMMON reserved scratch buffer, 16-tile zeroed UPLOAD buffer, and 8-slot fenced DIRECT command list ring before Pages::map hands them to the new resource. Fresh tiles and live/IDLE same-VA aliases do no extra GPU work.

Tested

  • Pre-fix GPU repro (recycled_pages_tiles_are_zeroed_before_reuse): failed pre-fix (leaked non-zero data: [ff, 00, ff, ff, ...]), passes post-fix alongside same-VA IDLE alias preservation.
  • RTX 5080 (driver 32.0.16.1088, Ryzen 7 9800X3D, 32 GB, Win11 26200, rustc 1.97.0, DXC 1.9.2609.5, debug): cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture: 1437 passed, 0 failed, 47 ignored (26 SKIPPED); vram:: 21/0/1 (0 SKIPPED).
  • RTX 2080 SUPER (driver 32.0.16.1088, Ryzen 5 5600X, 16 GB, Win11 26200, rustc 1.99.1, SDK DXC 1.8.2502.11, debug): 1436 passed, 1 failed, 47 ignored (29 SKIPPED; both new vram::tests pass; sole failure is unrelated gamesave::tests::atomic_writes_preserve_xcltmp_blobs_and_skip_leftover_temps, passing standalone on unpatched b49be183).
  • Paired 60 s scripts/smoke.ps1 (RTX 5080, release): main b49be183 1019 frames (60 60 60, 14670 MB, 0 removals, 0 crashes) vs 94c59303 1670 frames (60 60 60, 13913 MB, 0 removals, 0 crashes).

Not tested

  • Visual A/B on the past-world-load tile-mosaic scene itself (our 60 s main smoke run stays in loading; if anyone running the lab stack wants to cherry-pick 94c59303 and A/B the mosaic, feedback is welcome before we prepare an upstream PR).
  • AMD / Intel GPUs, native wave64, Linux / Wine / vkd3d-proton.

AI use
Ran via Samaritan:

  • Google Antigravity CLI (Gemini 4 Hydrogen (High)): wrote 94c59303 and tests and ran the dual-PC workspace test suites.
  • Google Antigravity CLI (Claude Opus 5.5 (High)): performed an independent read-only code review (PASS, 0 blockers) and re-ran vram:: GPU tests on the RTX 5080.
  • Google Antigravity CLI (Gemini 4 Neon (High)): coordinated verification, ran the paired RTX 5080 scripts/smoke.ps1 runs, opened fork draft PR itsSio/xcl#7, and wrote this comment.
**@⁠itsSio** on GitHub · 2026-11-26 03:38 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7181902974) For the recycled-tile stale-data / tile-mosaic finding here (referenced by @⁠MacieGx and @⁠schoperena): we implemented recycled `vram::Pages` tile zeroing on top of `main` (`b49be183`) on fork draft PR [`itsSio/xcl#7`](https://github.com/itsSio/xcl/pull/7) (`d3d12x/zero-recycled-vram-tiles`, commit `94c593033ba03fb5a2302786ff810483be13663d`, 1 file `crates/xcl/src/hle/d3d12x/vram.rs`, `+373/-24`). **Summary** - Adds a per-heap `TilePool::dirty_tiles` bitset (fresh heaps clean, `drain_cooling` marks recycled tiles dirty, rollback-safe across OOM, cleared on empty-heap reclamation and after successful `take_batch`). - Lazily zeroes only dirty recycled tiles on `Pages::queue` via a 256-tile `COMMON` reserved scratch buffer, 16-tile zeroed `UPLOAD` buffer, and 8-slot fenced `DIRECT` command list ring before `Pages::map` hands them to the new resource. Fresh tiles and live/`IDLE` same-VA aliases do no extra GPU work. **Tested** - Pre-fix GPU repro (`recycled_pages_tiles_are_zeroed_before_reuse`): failed pre-fix (`leaked non-zero data: [ff, 00, ff, ff, ...]`), passes post-fix alongside same-VA `IDLE` alias preservation. - **RTX 5080** (driver `32.0.16.1088`, Ryzen 7 9800X3D, 32 GB, Win11 26200, `rustc 1.97.0`, DXC `1.9.2609.5`, debug): `cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture`: **1437 passed, 0 failed, 47 ignored** (26 `SKIPPED`); `vram::` **21/0/1** (0 `SKIPPED`). - **RTX 2080 SUPER** (driver `32.0.16.1088`, Ryzen 5 5600X, 16 GB, Win11 26200, `rustc 1.99.1`, SDK DXC `1.8.2502.11`, debug): **1436 passed, 1 failed, 47 ignored** (29 `SKIPPED`; both new `vram::tests` pass; sole failure is unrelated `gamesave::tests::atomic_writes_preserve_xcltmp_blobs_and_skip_leftover_temps`, passing standalone on unpatched `b49be183`). - **Paired 60 s `scripts/smoke.ps1` (RTX 5080, release):** `main` `b49be183` `1019` frames (`60 60 60`, `14670 MB`, `0` removals, `0` crashes) vs `94c59303` `1670` frames (`60 60 60`, `13913 MB`, `0` removals, `0` crashes). **Not tested** - Visual A/B on the past-world-load tile-mosaic scene itself (our 60 s `main` smoke run stays in loading; if anyone running the lab stack wants to cherry-pick `94c59303` and A/B the mosaic, feedback is welcome before we prepare an upstream PR). - AMD / Intel GPUs, native wave64, Linux / Wine / vkd3d-proton. **AI use** Ran via Samaritan: - Google Antigravity CLI (Gemini 4 Hydrogen (High)): wrote `94c59303` and tests and ran the dual-PC workspace test suites. - Google Antigravity CLI (Claude Opus 5.5 (High)): performed an independent read-only code review (PASS, 0 blockers) and re-ran `vram::` GPU tests on the RTX 5080. - Google Antigravity CLI (Gemini 4 Neon (High)): coordinated verification, ran the paired RTX 5080 `scripts/smoke.ps1` runs, opened fork draft PR `itsSio/xcl#7`, and wrote this comment.
Author
Owner

@⁠Alm0stSurely on GitHub · 2026-11-24 23:06 UTC · original · edited 2026-11-26 04:17 UTC

Proton comparison for the semaphore in the Windows trace: the last PresentX thread did wake after its final presentation at 82.791 s. Fourteen subsequent waits on its semaphore returned success, including waits of 17.309, 6.066 and 1.992 s. It submitted more lists. About 32 ms after the last successful release, it waited again. No further successful release on that handle or return from that wait was observed through 240 s.

The last releasing worker completed two compute PSOs from supplied blobs and closed command lists, then waited on an auto-reset event. Counting the full batch corrects the earlier description of a fifth event. The thread which previously signalled the worker's event created 128 auto-reset events at one call site. Its first 81 waits on this batch returned success in creation order. Its wait on event 82 had no observed return or SetEvent/NtSetEvent directly on that handle before the cap. Events 84 through 88 received signals despite the outstanding earlier wait. The intended producer of event 82 and any dependency on a specific shader remain unknown.

EndeavourOS, Ryzen 9 9950X3D, 60 GiB usable RAM, RTX 5080 / 620.73.04, Proton Experimental. Main 689f2db477c3c062cf162649781640ef8a977c18 plus #1368 at 0074749a9678a697455c48a95f7c4f746ccd602e, local list markers and the HLSL cache from the paired test. xcl run <exe>, XCL_DIRECT_DXIL=0 XCL_COMPACT_CS=auto XCL_RUN_SECONDS=240 XCL_THREAD_DUMP_AT=78,88,100,125,160,205,225. Wine relay covered waits, semaphore releases, event and handle operations. Loading artwork at 75 s, black at 105 and 240 s. Local investigation and report assisted by OpenAI Codex (GPT-6.2 Astra).

480 s repeat, same executable and fresh copy of the same starting cache. The coordinator again completed waits 1–81, then entered wait 82 at about 163 s. Events 84–88 were signalled; 82 and 83 had no recorded successful SetEvent on their handles by 480 s. Last PresentX at 88.532 s, black at 105, 240 and 480 s. The driver completed 41 more pipeline creation calls between 240 and 480 s without changing this checkpoint.

Worker comparison. Across the two unbounded runs, three of five workers returned to their respective startup waits. The two others had last signalled ranks 80 and 81. Despite different thread IDs across runs, the rank-80 workers subsequently requested the same 16 compute records in the same order, and the rank-81 workers shared the same ordered prefix of 57 compute records. These are reproducible work sequences; neither trace exposes assignment of rank 82.

In a diagnostic repeat of the 240 s configuration with only XCL_PSO_WAIT_MS=50 changed, the worker that had signalled 81 also signalled 82 at 199.530 s. The coordinator's first wait on 82 returned success after 23.192 s. Another worker, previously signalling 77, had already signalled 83 at 188.360 s. This directly identifies the signallers in the bounded run only. Loading artwork at 165 s, black at 180/195/210 s; 6,260 skipped compute dispatches by 211.559 s, then device removal 0x887a0005 at 222.066 s. Passing this CPU checkpoint did not produce a visible world frame.

Warm replay with unbounded waits, same binary, driver and 45-key history, starting from a copy of all three cache layers at the end of the 480 s run. All 89 compute records previously requested by the worker that signalled event 81 had returned from driver creation by 91.106 s. For the 83 records accepted from cache without retry, cumulative driver-call time fell from 245.709 s to 0.104 s. The coordinator entered wait 82 at 94.213 s and remained there through the 240 s cap. Events 84–88 were signalled. Loading artwork at 75 s, black at 105 and 240 s. The worker went on to additional compute programs, including one creation that took 47.575 s and returned at 227.866 s. Finishing the original 89 driver calls was insufficient to clear this wait.

Follow-up, RTX 5080 / Proton Experimental, driver 620.73.04. Local integration based on 50a9fdef, with opt-in markers for each pending compute pipeline and each bind attempt (PE SHA-256 prefix ad5f5d3a). Same warm cache seed and vkd3d-proton 4522cc1a8b13 with local diagnostics; single_queue,no_upload_hvv,fault. This is a separate build from the semaphore trace above.

At 100 s the coordinator was waiting on slot 33. Its worker built compute record b6101d83892d44a5 inline. The pipeline was published and the bind returned at 116.123 s. At 125 and 150 s the coordinator and another worker were both at slot 82. This time the worker was waiting on the same pipeline instance in both samples. The instance's shader-history key was 29d8a2bbd369fd71. A preload worker had claimed it at 91.363 s. Its 1,079,252-byte compute record was 95cc13288a27a96e. The call with the cached blob failed and XCL retried without the blob at 121.498 s. At the 160 s cap the waiting bind had been open for at least 38.52 s. The presenter was in WaitForSingleObject at each sample. In a separate 480 s run the same retry returned in 51.004 s and the presentation count stayed flat through the cap.

We changed one file on a private copy of the seed: the genuine 112-byte disk PSO for that record, regenerated by the same diagnostic driver. The two files differ only in the vkd3d shader-interface compatibility key. XCL accepted it on the first call with no retry. The call took 52.772 s. The slot 82 worker waited 22.962 s, received the real pipeline 8 microseconds after notification, and was building a different pipeline at the next sample. The first run's wait was still open after 38.52 s. Its final driver duration is unknown.

Keeping the accepted PSO and replacing only the NVIDIA disk cache with the one saved after the 480 s run brought the same creation call down to 0.316 s on one pass. The preloader published the real pipeline at 22.302 s. Loading artwork still ended in black and the kernel reported Xid 109 at +75.8 s, then Xid 31 after the 160 s title deadline. Vulkan reported device loss; the BC1 batch signal was not observed in this pass. None of these three runs showed a verified world frame. The timings are per-call measurements. They do not measure in-world FPS.

AI use: OpenAI Codex (GPT-6.2 Astra) for instrumentation, tests, trace analysis and this update.

**@⁠Alm0stSurely** on GitHub · 2026-11-24 23:06 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7147016096) · edited 2026-11-26 04:17 UTC Proton comparison for the semaphore in [the Windows trace](https://git.gtahub.st/github/xcl-dev--xcl/issues/505): the last PresentX thread did wake after its final presentation at 82.791 s. Fourteen subsequent waits on its semaphore returned success, including waits of 17.309, 6.066 and 1.992 s. It submitted more lists. About 32 ms after the last successful release, it waited again. No further successful release on that handle or return from that wait was observed through 240 s. The last releasing worker completed two compute PSOs from supplied blobs and closed command lists, then waited on an auto-reset event. Counting the full batch corrects the earlier description of a fifth event. The thread which previously signalled the worker's event created 128 auto-reset events at one call site. Its first 81 waits on this batch returned success in creation order. Its wait on event 82 had no observed return or SetEvent/NtSetEvent directly on that handle before the cap. Events 84 through 88 received signals despite the outstanding earlier wait. The intended producer of event 82 and any dependency on a specific shader remain unknown. EndeavourOS, Ryzen 9 9950X3D, 60 GiB usable RAM, RTX 5080 / 620.73.04, Proton Experimental. Main `689f2db477c3c062cf162649781640ef8a977c18` plus #1368 at `0074749a9678a697455c48a95f7c4f746ccd602e`, local list markers and the HLSL cache from [the paired test](https://git.gtahub.st/github/xcl-dev--xcl/pulls/1871). `xcl run <exe>`, `XCL_DIRECT_DXIL=0 XCL_COMPACT_CS=auto XCL_RUN_SECONDS=240 XCL_THREAD_DUMP_AT=78,88,100,125,160,205,225`. Wine relay covered waits, semaphore releases, event and handle operations. Loading artwork at 75 s, black at 105 and 240 s. Local investigation and report assisted by OpenAI Codex (GPT-6.2 Astra). 480 s repeat, same executable and fresh copy of the same starting cache. The coordinator again completed waits 1–81, then entered wait 82 at about 163 s. Events 84–88 were signalled; 82 and 83 had no recorded successful SetEvent on their handles by 480 s. Last PresentX at 88.532 s, black at 105, 240 and 480 s. The driver completed 41 more pipeline creation calls between 240 and 480 s without changing this checkpoint. Worker comparison. Across the two unbounded runs, three of five workers returned to their respective startup waits. The two others had last signalled ranks 80 and 81. Despite different thread IDs across runs, the rank-80 workers subsequently requested the same 16 compute records in the same order, and the rank-81 workers shared the same ordered prefix of 57 compute records. These are reproducible work sequences; neither trace exposes assignment of rank 82. In a diagnostic repeat of the 240 s configuration with only `XCL_PSO_WAIT_MS=50` changed, the worker that had signalled 81 also signalled 82 at 199.530 s. The coordinator's first wait on 82 returned success after 23.192 s. Another worker, previously signalling 77, had already signalled 83 at 188.360 s. This directly identifies the signallers in the bounded run only. Loading artwork at 165 s, black at 180/195/210 s; 6,260 skipped compute dispatches by 211.559 s, then device removal `0x887a0005` at 222.066 s. Passing this CPU checkpoint did not produce a visible world frame. Warm replay with unbounded waits, same binary, driver and 45-key history, starting from a copy of all three cache layers at the end of the 480 s run. All 89 compute records previously requested by the worker that signalled event 81 had returned from driver creation by 91.106 s. For the 83 records accepted from cache without retry, cumulative driver-call time fell from 245.709 s to 0.104 s. The coordinator entered wait 82 at 94.213 s and remained there through the 240 s cap. Events 84–88 were signalled. Loading artwork at 75 s, black at 105 and 240 s. The worker went on to additional compute programs, including one creation that took 47.575 s and returned at 227.866 s. Finishing the original 89 driver calls was insufficient to clear this wait. **Follow-up, RTX 5080 / Proton Experimental, driver 620.73.04.** Local integration based on 50a9fdef, with opt-in markers for each pending compute pipeline and each bind attempt (PE SHA-256 prefix ad5f5d3a). Same warm cache seed and vkd3d-proton 4522cc1a8b13 with local diagnostics; single_queue,no_upload_hvv,fault. This is a separate build from the semaphore trace above. At 100 s the coordinator was waiting on slot 33. Its worker built compute record b6101d83892d44a5 inline. The pipeline was published and the bind returned at 116.123 s. At 125 and 150 s the coordinator and another worker were both at slot 82. This time the worker was waiting on the same pipeline instance in both samples. The instance's shader-history key was 29d8a2bbd369fd71. A preload worker had claimed it at 91.363 s. Its 1,079,252-byte compute record was 95cc13288a27a96e. The call with the cached blob failed and XCL retried without the blob at 121.498 s. At the 160 s cap the waiting bind had been open for at least 38.52 s. The presenter was in WaitForSingleObject at each sample. In a separate 480 s run the same retry returned in 51.004 s and the presentation count stayed flat through the cap. We changed one file on a private copy of the seed: the genuine 112-byte disk PSO for that record, regenerated by the same diagnostic driver. The two files differ only in the vkd3d shader-interface compatibility key. XCL accepted it on the first call with no retry. The call took 52.772 s. The slot 82 worker waited 22.962 s, received the real pipeline 8 microseconds after notification, and was building a different pipeline at the next sample. The first run's wait was still open after 38.52 s. Its final driver duration is unknown. Keeping the accepted PSO and replacing only the NVIDIA disk cache with the one saved after the 480 s run brought the same creation call down to 0.316 s on one pass. The preloader published the real pipeline at 22.302 s. Loading artwork still ended in black and the kernel reported Xid 109 at +75.8 s, then Xid 31 after the 160 s title deadline. Vulkan reported device loss; the BC1 batch signal was not observed in this pass. None of these three runs showed a verified world frame. The timings are per-call measurements. They do not measure in-world FPS. **AI use:** OpenAI Codex (GPT-6.2 Astra) for instrumentation, tests, trace analysis and this update.
Author
Owner

@⁠Raul-Paiva on GitHub · 2026-11-26 03:34 UTC · original · edited 2026-11-26 04:31 UTC

Follow-up to my skip comment, same 8 GB, 32-lane NVIDIA laptop card, TdrDelay = 10, same tree and settings. I went through the 65 large compute programs one by one to find which of them cause the removal. None of them reproduces it on its own. Each one that looked bad once ran clean when tested again by itself. A last run with nothing skipped got no removal in 600 s.

Method:

  • Allow-list / block-list: everything on the allow list runs in every later run.
  • The rest were added two at a time, 220 s per run. A pair whose run was removed before 200 s, or ended early, was retried one program at a time.
  • Programs that failed alone went on the block list.
  • Every program on the block list was then run again alone, with the whole allow list running and the rest of the block list skipped.

Results (46 runs in the first pass, then 3 confirmation runs and one 600 s run):

  • The first pass ended with 62 programs on the allow list and 3 on the block list. By the size of their DXIL from XCL, the block-listed ones were 792 744 B, 789 740 B and 650 148 B:

    • 792 744 B: 0x887a0005 at 127.8 s;
    • 789 740 B: 0x887a0006 at 84.1 s;
    • 650 148 B: 0x887a0007 at 208.4 s.
  • Confirmation: each of the three ran 220 s with no removal, with the 62 others running. So I cannot name a defective program; the first-pass failures were intermittent.

  • Removals in the first pass: 8 in 46 runs, at different points:

    code runs time
    0x887a0005 2 128 s, 132 s
    0x887a0006 1 84 s
    0x887a0007 5 206 – 218 s
    • Windows logged no 4101 (TDR) event for any of them, so none was a TDR.
    • All five 0x887a0007 came late, once 24 or more programs were allowed. In every case the same programs ran 220 s cleanly when retried.
  • 600 s check with nothing skipped:

    • No device removal; the title ran until XCL_RUN_SECONDS ended it.
    • But the last present was at 374 s (1 815 frames). After that the title stopped submitting work.
    • Only 4 driver builds came after 370 s (12 s in all), so it was not waiting on builds.
    • Committed memory was 31.4 – 31.6 GB on a 32 GB machine, which may be the next thing to look at.

How I read it:

  • On this card it is not one bad program. Earlier, the same warm run with nothing skipped was removed at 111 – 117 s. After the ~50 runs above, the same build runs past that point.
  • The difference is probably what the driver has cached by now, since all of these programs were built and cached during these runs. That fits #2403 (code added at once when a program is first built) better than a fault in any one program.
  • So for testers: a removal that goes away on a second or third run with the same build is likely about cache state, not a broken program.

Tree: main 6d12f58 + #684, #2404 5ca9c23, #2097, #2385, #751, #2428 with #2427, #2496, #2526 with #2422, plus the local skip switch from the comment above. main is now at b49be18 with #2371 (offline whole compute pipelines). I am retesting on that with #2404's new head next.

Not tested: more than one run per program in the confirmation; TdrDelay unset; AMD; what stops the presents at 374 s.

AI use: Claude Code (Claude Opus 5.5) wrote the scripts, ran the runs unattended, read the logs and the event log, and wrote this comment.

Edit: a correction, and the same test on today's main.

  • "Runs past that point" overstates it. In both 600 s runs of the old tree (the check above, and one more run now), presents drop from ~600–1 100 per minute to about 10 per minute from 120 s, and stop at 374 / 382 s. From 267 s / 357 s, GPU queue.Wait … did not complete within 5000 ms – released on CPU warnings appear: 43 in one run, 119 in the other. So the title is not removed, but it is mostly stuck rather than running.
  • New tree: main b49be18 + #684, #751, #2385, #2097 d98d2d4, #2404 551a75e, #2427 c8c2b7a + #2428 970823e, #2496, #2551, fresh --precompile --only cs --pipelines.
    • #2333 and #2526 6d19dc0 were left out because both conflict with #2404's new head.
    • Two runs with nothing skipped: removed at 131.7 s and 118.8 s, 0x887a0005, no 4101 event.
    • #2404's new head ran no ExecuteIndirect as a whole form (0 of 458 / 552 chained). The split stats line ends with "10 whole" (28 on the old tree).
  • So on this card the new tree gets to the same point and is then removed instead of stalling. I have not split which change makes the difference.
**@⁠Raul-Paiva** on GitHub · 2026-11-26 03:34 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7181839978) · edited 2026-11-26 04:31 UTC Follow-up to [my skip comment](https://git.gtahub.st/github/xcl-dev--xcl/issues/505), same 8 GB, 32-lane NVIDIA laptop card, `TdrDelay` = 10, same tree and settings. I went through the 65 large compute programs one by one to find which of them cause the removal. **None of them reproduces it on its own.** Each one that looked bad once ran clean when tested again by itself. A last run with nothing skipped got no removal in 600 s. **Method:** - Allow-list / block-list: everything on the allow list runs in every later run. - The rest were added two at a time, 220 s per run. A pair whose run was removed before 200 s, or ended early, was retried one program at a time. - Programs that failed alone went on the block list. - Every program on the block list was then run again alone, with the whole allow list running and the rest of the block list skipped. **Results (46 runs in the first pass, then 3 confirmation runs and one 600 s run):** - The first pass ended with 62 programs on the allow list and 3 on the block list. By the size of their DXIL from XCL, the block-listed ones were **792 744 B**, **789 740 B** and **650 148 B**: - 792 744 B: `0x887a0005` at 127.8 s; - 789 740 B: `0x887a0006` at 84.1 s; - 650 148 B: `0x887a0007` at 208.4 s. - **Confirmation:** each of the three ran 220 s with no removal, with the 62 others running. So I cannot name a defective program; the first-pass failures were intermittent. - **Removals in the first pass:** 8 in 46 runs, at different points: | code | runs | time | |---|---|---| | `0x887a0005` | 2 | 128 s, 132 s | | `0x887a0006` | 1 | 84 s | | `0x887a0007` | 5 | 206 – 218 s | - Windows logged no 4101 (TDR) event for any of them, so none was a TDR. - All five `0x887a0007` came late, once 24 or more programs were allowed. In every case the same programs ran 220 s cleanly when retried. - **600 s check with nothing skipped:** - No device removal; the title ran until `XCL_RUN_SECONDS` ended it. - But the last present was at 374 s (1 815 frames). After that the title stopped submitting work. - Only 4 driver builds came after 370 s (12 s in all), so it was not waiting on builds. - Committed memory was 31.4 – 31.6 GB on a 32 GB machine, which may be the next thing to look at. **How I read it:** - On this card it is not one bad program. Earlier, the same warm run with nothing skipped was removed at 111 – 117 s. After the ~50 runs above, the same build runs past that point. - The difference is probably what the driver has cached by now, since all of these programs were built and cached during these runs. That fits #2403 (code added at once when a program is first built) better than a fault in any one program. - So for testers: a removal that goes away on a second or third run with the same build is likely about cache state, not a broken program. **Tree:** `main` `6d12f58` + #684, #2404 `5ca9c23`, #2097, #2385, #751, #2428 with #2427, #2496, #2526 with #2422, plus the local skip switch from the comment above. `main` is now at `b49be18` with #2371 (offline whole compute pipelines). I am retesting on that with #2404's new head next. **Not tested:** more than one run per program in the confirmation; `TdrDelay` unset; AMD; what stops the presents at 374 s. **AI use:** Claude Code (Claude Opus 5.5) wrote the scripts, ran the runs unattended, read the logs and the event log, and wrote this comment. **Edit: a correction, and the same test on today's `main`.** - **"Runs past that point" overstates it.** In both 600 s runs of the old tree (the check above, and one more run now), presents drop from ~600–1 100 per minute to **about 10 per minute from 120 s**, and stop at 374 / 382 s. From 267 s / 357 s, `GPU queue.Wait … did not complete within 5000 ms – released on CPU` warnings appear: 43 in one run, 119 in the other. So the title is not removed, but it is mostly stuck rather than running. - **New tree:** `main` `b49be18` + #684, #751, #2385, #2097 `d98d2d4`, #2404 `551a75e`, #2427 `c8c2b7a` + #2428 `970823e`, #2496, #2551, fresh `--precompile --only cs --pipelines`. - #2333 and #2526 `6d19dc0` were left out because both conflict with #2404's new head. - Two runs with nothing skipped: **removed at 131.7 s and 118.8 s, `0x887a0005`**, no 4101 event. - #2404's new head ran no `ExecuteIndirect` as a whole form (0 of 458 / 552 chained). The split stats line ends with "10 whole" (28 on the old tree). - So on this card the new tree gets to the same point and is then removed instead of stalling. I have not split which change makes the difference.
Author
Owner

@⁠throny on GitHub · 2026-11-26 04:48 UTC · original

@⁠Raul-Paiva the System log check you asked for, from the RTX 4080 16 GB (driver 610.88), last three days of world runs:

  • Event 4101 (display driver stopped responding and recovered): none at all, across every 0x887a0005 removal here (the last two at 139 s and 157 s with 465–469 MB of shader code in use). So on this card those removals are not Windows' GPU timeout; that fits the driver's code limit in #2403.
  • The two runs with the skip file, which got past that point, logged nvlddmkm 153 and 14 at the second the GPU hung (165 s and 256 s into the runs). No 4101 there either: the driver reset itself, Windows' timeout did not fire first.
  • nvlddmkm 153 alone (without 14) is also in the log at eight earlier times on 23 and 25 Nov; I have not matched those to runs, so I can't say that every earlier removal was free of driver events, only that none was a 4101.

So for 16 GB Ada: the removal is not the 2 s timeout, and behind it is a driver-level hang that is not the 2 s timeout either. My question from above stands: has anyone on a 40- or 50-series card seen nvlddmkm 153 in a skip / raised-heap run? If not, I'll look for the dispatch that hangs here with the dispatch probe.

AI use: Claude Code (Claude Fable 5.2) read the event log and wrote this.

**@⁠throny** on GitHub · 2026-11-26 04:48 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7182913071) @⁠Raul-Paiva the System log check you asked for, from the RTX 4080 16 GB (driver 610.88), last three days of world runs: - **Event 4101 (display driver stopped responding and recovered): none at all**, across every `0x887a0005` removal here (the last two at 139 s and 157 s with 465–469 MB of shader code in use). So on this card those removals are not Windows' GPU timeout; that fits the driver's code limit in #2403. - The two runs **with** the skip file, which got past that point, logged `nvlddmkm` 153 and 14 at the second the GPU hung (165 s and 256 s into the runs). No 4101 there either: the driver reset itself, Windows' timeout did not fire first. - `nvlddmkm` 153 alone (without 14) is also in the log at eight earlier times on 23 and 25 Nov; I have not matched those to runs, so I can't say that every earlier removal was free of driver events, only that none was a 4101. So for 16 GB Ada: the removal is not the 2 s timeout, and behind it is a driver-level hang that is not the 2 s timeout either. My question from above stands: has anyone on a 40- or 50-series card seen `nvlddmkm` 153 in a skip / raised-heap run? If not, I'll look for the dispatch that hangs here with the dispatch probe. AI use: Claude Code (Claude Fable 5.2) read the event log and wrote this.
Author
Owner

@⁠throny on GitHub · 2026-11-26 05:00 UTC · original

A short survey of how the VIctory family (the in-game builds in the standings lists) deals with the problems open here, for whoever owns the matching PR. Ideas in plain words only: VIctory is GPL-3.0, so nothing from it can be ported, and nothing below is its code. Read from its public sources and docs; I have not checked each point against XCL's open PRs, so say so if one is already covered.

Same stack as XCL: D3D12 only, console GPU code translated through its own IR straight to DXIL. So what works there can work here.

NVIDIA code limit (#2403): they have no fix for it either. Their NVIDIA forks skip the same ~1,000 ray-tracing resolve programs by hash that the skip list here does (and 34 shadow programs), and their documented NVIDIA sessions are short and indoors. Two things lower their code volume as a side effect: cleanup passes on the finished DXIL module (dead code, constant folding, value reuse; their docs give about 43 % fewer instructions), and the pipeline library file being mapped instead of read into memory.

Hangs:

  • Indirect argument records are clamped on the GPU with a work budget per command list, for the stated reason that one runaway dispatch resets the driver (XCL: #1795).
  • A timed per-list mode: each command list is submitted and waited for alone, and the slowest commands are logged. That is how they found three compute programs that stall NVIDIA, which they then skip. XCL's counterparts are open PRs: #1065 (times the submissions) and #1323 (names the dispatches a stalled queue has not finished).
  • The registry's GPU timeout values are read at start and logged.

In-game on NVIDIA, the steps their fork credits:

  • A larger pool for dynamic descriptors: NVIDIA caps the shader-visible heap at one million views, and with thousands of draws per frame their draws were refused until the pool handling changed.
  • The Series S profile and half render scale to cut the load.
  • Memory compares moved to the GPU (their figure: 11 → 21.8 fps).

Pipeline stalls: a draw waits for its pipeline within a per-frame budget (0.5 s, 10 s in the NVIDIA fork), each pipeline is waited for at most once, then the draw is dropped; screen-space passes get their own workers and a longer budget because lighting tables are filled once and were lost otherwise; the pipelines used in earlier runs are listed and handed to the workers at load.

Picture: over-65,535-group indirect dispatches are still cut on NVIDIA there (they note the blocky patches), so the folding in the lab branch / #1428 is ahead of them. NaNs from shaders are replaced by zero and ambient light is capped; those are approximations, not causes.

One data point from here: the Series S profile on the lab tree at f959495 stops at the known #914 assert at 36 s (that tree is older than #495), so I have no Series S world run on the 4080 yet.

Next from here: #1323 on top of the lab tree and one more run, to name the dispatch the 4080 is in when it stops.

AI use: Claude Code (Claude Sonnet 5.5 read the sources, Claude Fable 5.2 checked and wrote this).

**@⁠throny** on GitHub · 2026-11-26 05:00 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7183097848) A short survey of how the VIctory family (the in-game builds in the standings lists) deals with the problems open here, for whoever owns the matching PR. Ideas in plain words only: VIctory is GPL-3.0, so nothing from it can be ported, and nothing below is its code. Read from its public sources and docs; I have **not** checked each point against XCL's open PRs, so say so if one is already covered. **Same stack as XCL:** D3D12 only, console GPU code translated through its own IR straight to DXIL. So what works there can work here. **NVIDIA code limit (#2403):** they have no fix for it either. Their NVIDIA forks skip the same ~1,000 ray-tracing resolve programs by hash that the skip list here does (and 34 shadow programs), and their documented NVIDIA sessions are short and indoors. Two things lower their code volume as a side effect: cleanup passes on the finished DXIL module (dead code, constant folding, value reuse; their docs give about 43 % fewer instructions), and the pipeline library file being mapped instead of read into memory. **Hangs:** - Indirect argument records are clamped on the GPU with a work budget per command list, for the stated reason that one runaway dispatch resets the driver (XCL: #1795). - A timed per-list mode: each command list is submitted and waited for alone, and the slowest commands are logged. That is how they found three compute programs that stall NVIDIA, which they then skip. XCL's counterparts are open PRs: #1065 (times the submissions) and #1323 (names the dispatches a stalled queue has not finished). - The registry's GPU timeout values are read at start and logged. **In-game on NVIDIA, the steps their fork credits:** - A larger pool for dynamic descriptors: NVIDIA caps the shader-visible heap at one million views, and with thousands of draws per frame their draws were refused until the pool handling changed. - The Series S profile and half render scale to cut the load. - Memory compares moved to the GPU (their figure: 11 → 21.8 fps). **Pipeline stalls:** a draw waits for its pipeline within a per-frame budget (0.5 s, 10 s in the NVIDIA fork), each pipeline is waited for at most once, then the draw is dropped; screen-space passes get their own workers and a longer budget because lighting tables are filled once and were lost otherwise; the pipelines used in earlier runs are listed and handed to the workers at load. **Picture:** over-65,535-group indirect dispatches are still cut on NVIDIA there (they note the blocky patches), so the folding in the lab branch / #1428 is ahead of them. NaNs from shaders are replaced by zero and ambient light is capped; those are approximations, not causes. One data point from here: the Series S profile on the lab tree at `f959495` stops at the known #914 assert at 36 s (that tree is older than #495), so I have no Series S world run on the 4080 yet. Next from here: #1323 on top of the lab tree and one more run, to name the dispatch the 4080 is in when it stops. AI use: Claude Code (Claude Sonnet 5.5 read the sources, Claude Fable 5.2 checked and wrote this).
Author
Owner

@⁠MacieGx on GitHub · 2026-11-26 05:04 UTC · original

@⁠throny thanks for the careful runs. On your two questions, from the RTX 5080 (driver 621.24):

  1. nvlddmkm 153 on a 50-series card: once. Run B1 had no skip file, the driver code heap raised by @⁠CowboyBingus's hook, and XCL_PSO_CODE_MB giving pipelines back. It ended at 240 s with 0x887a0006 and an nvlddmkm 153. The same setup without the give-back ran to its 262 s end. With the skip file and no hook, about 15 runs since f959495 went 300–520 s on this card with no hang. I did not check the event log after every run, so that is only the one I know of.
  2. What I would turn off first on f959495: XCL_WAIT64_TRUST_FENCE. Your only Write64 Signal that would close a GPU cycle, signalled on CPU came 3 s before the GPU stood still, and that switch is what lets such a signal through without a GPU wait. Then XCL_PSO_CODE_MB / XCL_PSO_UNUSED_S, if you have them set; giving pipelines back is what B1 had in common with your hang. The indirect clamp I would keep: without it, the unbounded records gave garbage dispatches and MMU faults here.

Two more things, in case they matter on 16 GB Ada:

  • My 5080 runs only got stable on driver 621.24. On 610.88, compute pipeline builds ran nearly single-threaded here, and the long stalls they caused were part of what ended runs. A newer driver may be worth a run before the hours of precompile.
  • The stalls I did have after f959495 were my own: a self-deadlock on the pages lock in the target-page zeroing (fixed in e1edcd5), and a full coherent window from about 290 s that skipped draws and dispatches (arena blocks now fall back to the sparse windows, 5419086). Neither is in f959495. Since then the branch also fixes the teal picture: the colour-LUT targets shared pages (5272233); a PR is in preparation.

AI use: Claude Code (Claude Opus 5.5), from the lab notes of the runs named above.

**@⁠MacieGx** on GitHub · 2026-11-26 05:04 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7183151392) @⁠throny thanks for the careful runs. On your two questions, from the RTX 5080 (driver 621.24): 1. **`nvlddmkm` 153 on a 50-series card: once.** Run B1 had no skip file, the driver code heap raised by @⁠CowboyBingus's hook, and `XCL_PSO_CODE_MB` giving pipelines back. It ended at 240 s with `0x887a0006` and an `nvlddmkm` 153. The same setup without the give-back ran to its 262 s end. With the skip file and no hook, about 15 runs since `f959495` went 300–520 s on this card with no hang. I did not check the event log after every run, so that is only the one I know of. 2. **What I would turn off first on `f959495`:** `XCL_WAIT64_TRUST_FENCE`. Your only `Write64 Signal that would close a GPU cycle, signalled on CPU` came 3 s before the GPU stood still, and that switch is what lets such a signal through without a GPU wait. Then `XCL_PSO_CODE_MB` / `XCL_PSO_UNUSED_S`, if you have them set; giving pipelines back is what B1 had in common with your hang. The indirect clamp I would keep: without it, the unbounded records gave garbage dispatches and MMU faults here. Two more things, in case they matter on 16 GB Ada: - My 5080 runs only got stable on driver 621.24. On 610.88, compute pipeline builds ran nearly single-threaded here, and the long stalls they caused were part of what ended runs. A newer driver may be worth a run before the hours of precompile. - The stalls I did have after `f959495` were my own: a self-deadlock on the pages lock in the target-page zeroing (fixed in `e1edcd5`), and a full coherent window from about 290 s that skipped draws and dispatches (arena blocks now fall back to the sparse windows, `5419086`). Neither is in `f959495`. Since then the branch also fixes the teal picture: the colour-LUT targets shared pages (`5272233`); a PR is in preparation. AI use: Claude Code (Claude Opus 5.5), from the lab notes of the runs named above.
Author
Owner

@⁠relativespace2K on GitHub · 2026-11-26 01:15 UTC · original · edited 2026-11-26 05:12 UTC

32 GB AMD data point on amd-dev 6a0bb5b4: the +0x501eb50 crash is gone, but the title does not reach the world here.

  • AMD Radeon RX 6800 XT (16338 MiB), driver 32.0.21045.29003; Ryzen 5 5600, 31.9 GB;
    Windows 11 IoT Enterprise LTSC 26100; release; DXC 1.9.2602.17.
  • Runs: XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_RUN_SECONDS=...; compute precompiled on
    bf02341f with --precompile --only cs --pipelines --used-only and
    XCL_PIPELINE_THREADS=11 (516 pipelines, 0 refused, 150 held by XCL_RT_GATE=hold).
tree run result
04e0b95 240 s 1,749 presents; stops at frame 1700 (~179 s), then 0 presents/draws; exit 0
bf02341f 600 s 1,809 presents; 48 graphics PSO builds, 424 s in all; one compute waited 392 s at the gate; no crash
bf02341f, warm .plib 600 s 1,964 presents; still stops after the key-art loading screen
6a0bb5b4 (with e4b66e57) 600 s 1,775 presents, last frame 1700; exit 0; no crash
b5c0275f 600 s 1,778 presents, last frame 1700; 6 PSO builds, 46 s; no unified memory is full; exit 0; no crash

On 6a0bb5b4 the 0xc0000005 at game+0x501eb50 did not reproduce, but the title never
reached Game State: Game Running, so the fix is not exercised up to that point. It stops
presenting at ~179 s and stays idle (0 presents/submits/draws/dispatches). On bf02341f, a
thread dump at 130/140/160 s showed only xcl-pso-0 active in amdxc64.dll; no queue.Wait
timeout and no device removal.

From 453 s on 6a0bb5b4 the log repeats unified memory is full; at 564 s it reports
coherent 4095/4095 MB, 47757 draws with translated pipelines (65536 skipped) and
628 blocks held for 344 allocators. The coherent window is full when the stall is visible,
so that may be a consequence as much as a cause.

On b5c0275f those unified memory is full lines are gone (coherent 3998/4095 MB) and only
6 driver compiles remain, but the title still stops at frame 1700 and stays idle.

The amd-dev-specific details, including the XCL_HUGE_PSO_CONCURRENCY=4 device removal at
184 s, are in #2582: #2582

Not tested: 64 GB RAM, other GPUs, debug build.

AI use: OpenCode with DeepSeek V4.1 Flash 1017 ran the tests, read the logs and wrote this comment; the results and crash lines were checked against the run logs.

**@⁠relativespace2K** on GitHub · 2026-11-26 01:15 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7179598152) · edited 2026-11-26 05:12 UTC **32 GB AMD data point on `amd-dev` `6a0bb5b4`: the `+0x501eb50` crash is gone, but the title does not reach the world here.** - AMD Radeon RX 6800 XT (16338 MiB), driver 32.0.21045.29003; Ryzen 5 5600, 31.9 GB; Windows 11 IoT Enterprise LTSC 26100; release; DXC 1.9.2602.17. - Runs: `XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_RUN_SECONDS=...`; compute precompiled on `bf02341f` with `--precompile --only cs --pipelines --used-only` and `XCL_PIPELINE_THREADS=11` (516 pipelines, 0 refused, 150 held by `XCL_RT_GATE=hold`). | tree | run | result | |---|---:|---| | `04e0b95` | 240 s | 1,749 presents; stops at frame 1700 (~179 s), then 0 presents/draws; exit 0 | | `bf02341f` | 600 s | 1,809 presents; 48 graphics PSO builds, 424 s in all; one compute waited 392 s at the gate; no crash | | `bf02341f`, warm `.plib` | 600 s | 1,964 presents; still stops after the key-art loading screen | | `6a0bb5b4` (with `e4b66e57`) | 600 s | 1,775 presents, last frame 1700; exit 0; no crash | | `b5c0275f` | 600 s | 1,778 presents, last frame 1700; 6 PSO builds, 46 s; no `unified memory is full`; exit 0; no crash | On `6a0bb5b4` the `0xc0000005` at `game+0x501eb50` did not reproduce, but the title never reached `Game State: Game Running`, so the fix is not exercised up to that point. It stops presenting at ~179 s and stays idle (0 presents/submits/draws/dispatches). On `bf02341f`, a thread dump at 130/140/160 s showed only `xcl-pso-0` active in `amdxc64.dll`; no `queue.Wait` timeout and no device removal. From 453 s on `6a0bb5b4` the log repeats `unified memory is full`; at 564 s it reports `coherent 4095/4095 MB`, `47757 draws with translated pipelines (65536 skipped)` and `628 blocks held for 344 allocators`. The coherent window is full when the stall is visible, so that may be a consequence as much as a cause. On `b5c0275f` those `unified memory is full` lines are gone (`coherent 3998/4095 MB`) and only 6 driver compiles remain, but the title still stops at frame 1700 and stays idle. The amd-dev-specific details, including the `XCL_HUGE_PSO_CONCURRENCY=4` device removal at 184 s, are in #2582: https://git.gtahub.st/github/xcl-dev--xcl/issues/2582 **Not tested**: 64 GB RAM, other GPUs, debug build. **AI use**: OpenCode with DeepSeek V4.1 Flash 1017 ran the tests, read the logs and wrote this comment; the results and crash lines were checked against the run logs.
Author
Owner

@⁠throny on GitHub · 2026-11-26 04:55 UTC · original · edited 2026-11-26 08:14 UTC

@⁠MacieGx run 9 on the RTX 4080 16 GB (driver 610.88), same tree as runs 7 and 8 (f959495 + #684, your settings, skip file with the 1004 CS_RaytracingResolve records), limited to 240 s, XCL_DISPATCH_PROBE=100. The GPU hung again: 3 of 3 skip runs on this card (at about 256 s, 165 s and now 237 s). The PC survived this time.

What the log shows

  • No did not complete within wait line at all before it. The last present is at 234.5–236.5 s, the 238.6 s activity line is all zeros, and no 2 s line follows. The run's own stop at 240.0 s drained the queues and got 0x887a0007 at 240.66 s; Windows logged nvlddmkm 14 and 153 in that second. So the GPU stood still from about 237 s without XCL noticing.
  • Last warning before it: one Write64 Signal that would close a GPU cycle, signalled on CPU at 234.2 s (the only one in the run; XCL_WAIT64_TRUST_FENCE=1 is set).
  • Memory is not it: 14.3 GB local video memory against a budget of 15.1–15.3 GB (never over), 34.1 GB committed, 20.4 GB of commit free at the lowest point. Code in use 256 MB (1,756 pipelines: compute 707 / 92 MB, graphics 1,049 / 164 MB).
  • Load before the hang: 5–14 presents per 10 s from 120 s on, with 17k–71k draws and 38k–67k dispatches per 10 s. Pipelines in use went from 31 to 1,292 between 119 s and 129 s.
  • 88 two-pass record buffers (4 MiB each) were made, about one every 0.5 s to the end; evicted textures grew to 40,774 and 13,466 were mapped again.

Dispatch probe (1,310 lines, 707 pipelines)

  • Largest direct dispatch: 115,200 groups (320 × 360 × 1); fourteen more of 57,600 (320 × 180 × 1 or 57,600 × 1 × 1). Nothing over 65,535 in one dimension and nothing near a million groups.
  • 389 probe lines carry [4294967295, 1, 0] (first at 119.1 s, last at 233.66 s, which is the last probe line of the run). I take those to be indirect dispatches whose counts the probe cannot see; if that is not what they are, say so.
  • Four pipelines were first seen in the last 20 s (all at about 220.3 s).

What it does not show: which submission the GPU was in when it stopped. The probe logs a pipeline's 1st and 40th dispatch only.

I have not run your newer head (8e95067: folded dispatches, zeroed target pages), since it changes the translator and needs the precompile passes again here (hours). Two questions before I spend that:

  1. Is there a switch on f959495 you would turn off first to narrow this (XCL_WAIT64_TRUST_FENCE, the tiled shadow, the indirect clamp)? Each test is one 4-minute run for me.
  2. Has any 40- or 50-series card logged nvlddmkm 153 in a run that got past the code limit? If it is only Ada / 610.88, I'll try a newer driver first.

AI use: Claude Code (Claude Fable 5.2) ran this; Claude Sonnet 5.5 counted the log; Fable wrote the comment.


Update, runs 11–13 (same tree + #1323's dispatch markers ported, XCL_GPU_CULPRIT=1): the stalls at world entry are two compute programs; the hang is not in a compute dispatch.

run skip file wait timeouts what the markers name end
11 1004 3 at 130 s 1 list, 13 dispatches not done, two programs alternating, 2–256 groups (1-D) my guard ended it at 131 s
12 1004 3 at 133 s, 7 at 139 s the same two programs again, 13 per list, now 3–2,155 groups; plus 2 small dispatches of two others my guard ended it at 140 s
13 1004 + those two programs none until the hang at the release: 0 of 464 lists have a dispatch started and not done GPU hung at about 178 s (nvlddmkm 14 and 153), last present 176 s, 0x887a0007 logged at 216 s
  • So the 5 s wait timeouts around 113–140 s on this card come from one list shape: about 13 one-dimensional dispatches of two programs in turn. Without those two programs there is no wait timeout at all up to the hang.
  • The hang itself comes anyway (4 of 4 runs that got that far: 256 s, 165 s, 237 s, 178 s), and by the markers no compute dispatch was open when the GPU stopped. That leaves draws, copies, clears or mapping work. Next I'll look at what the graphics and mapping queues had submitted in the seconds before 178 s.
  • The markers cost something here: with them on, the entry stall came back a second time within 6 s (run 12), which run 9 without them did not show.

@⁠IvyNotFound for #1323: ported onto this older tree by hand (the bind.rs hunks did not apply), it named the same two programs in 3 of 3 stalls on an RTX 4080, so the markers do what the PR says. This is not a report on the PR's head.

Update, run 14 (as run 13, plus XCL_PSO_TRACE=1): the GPU reset again, at 161 s this time, so 5 of 5 (256, 165, 237, 178, 161 s).

  • It is not a pipeline build: the trace has no driver compile in the last 10 s before it (the last of 12,138 compile lines is earlier), and again no wait timeout and no open compute dispatch. Code in use at the removal: 220 MB in 1,444 pipelines, so less than in the other runs.
  • XCL gets 0x887a0007 (DEVICE_RESET) every time, never 0x887a0006 (DEVICE_HUNG).
  • The driver's event is the same in each of the last three: nvlddmkm 153 "UCodeReset TDR occurred on GPUID:100" with a 14 event in the same second whose first data word is 024c1547 each time, then either a recovery within 2 s (run 14) or NV_UFLUSH_FB_FLUSH timeouts and "recovery action … PF FLR" for 40 s (run 13) or a frozen PC (run 7). No Windows 4101.
  • So what stops is the card's own microcode, not one long submission that Windows times out. That reads like a driver / firmware fault under this load, or this one card. To separate those I'll check the card outside XCL and ask the owner about a newer driver than 610.88. If anyone has an Ada card (4070 Ti / 4080 / 4090) with a run past 150 s in the world on this tree, the driver version and whether the System log has nvlddmkm 153 would settle it. (@⁠Joori your 4090 did two 600 s runs with the skip list: which driver?)

Update, runs 15 and 16: neither the driver nor XCL_WAIT64_TRUST_FENCE. @⁠MacieGx thanks for the two leads; both tried, same tree and settings as run 14 (skip file + the two entry-stall programs, markers on):

run change last present driver event XCL
15 driver 621.40 (compute and mesh pipelines rebuilt on it: 24 + 8 min, 0 refused) 252 s nvlddmkm 153 UCodeReset + 14 0x887a0007
16 621.40 and no XCL_WAIT64_TRUST_FENCE 236 s the same 0x887a0007
  • That is 7 of 7 on this RTX 4080 (256, 165, 237, 178, 161, 252, 236 s), on two drivers. No wait timeout before any of the last four, no compute dispatch open (markers), 14.3 GB of 15.1 GB video memory, 17–18 GB of commit free. XCL_PSO_CODE_MB / XCL_PSO_UNUSED_S are not set here, so nothing is given back.
  • The 14 event's first data word is the same within a driver (one value in all 610.88 runs, another in both 621.40 runs), so it looks like one place in the driver each time.
  • This machine's System log has no UCodeReset before these runs (it goes back two weeks), and the card is at stock settings.
  • Frame rate in the world here is 7–13 presents per 10 s from about 130 s on, with 40k–70k dispatches per 10 s. If your 5080 runs at several times that, the difference may simply be how long this card spends in each submission.

Next from here: your newer head. The commits you name (e1edcd5, 5419086, 5272233) are not on GitHub yet: lab/gta6-nvidia-world still ends at 8e95067. The four precompile passes take hours on this machine, so I'd rather do them once, on the head that has those fixes: could you push it? Until then, if there is one more switch worth trying on f959495, name it; a run is 5 minutes. The picture here, by the way, is still far from the real one on this tree (the owner's words: it looks random).

Update, run 17: not the clamp race either. @⁠MacieGx thanks for the pointer to af197fe; applied alone on top of the tree of run 16 (it applies cleanly, runtime only): the GPU reset again at about 162 s, 8 of 8. With the registry set to restart on a GPU hang, this one restarted the PC, so I am not running this tree here any more. Your newer head and @⁠Joori's 4090 report (621.40, no 153 at all) say it is not Ada as such; what is left on my side is this one card or its 16 GB. I have moved to the project's nvidia-dev for #2688, where the first run here had no GPU event up to a title stop at 149 s.

**@⁠throny** on GitHub · 2026-11-26 04:55 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7183026719) · edited 2026-11-26 08:14 UTC @⁠MacieGx run 9 on the RTX 4080 16 GB (driver 610.88), same tree as runs 7 and 8 (`f959495` + #684, your settings, skip file with the 1004 `CS_RaytracingResolve` records), limited to 240 s, `XCL_DISPATCH_PROBE=100`. **The GPU hung again: 3 of 3 skip runs on this card** (at about 256 s, 165 s and now 237 s). The PC survived this time. **What the log shows** - No `did not complete within` wait line at all before it. The last present is at 234.5–236.5 s, the 238.6 s activity line is all zeros, and no 2 s line follows. The run's own stop at 240.0 s drained the queues and got `0x887a0007` at 240.66 s; Windows logged `nvlddmkm` 14 and 153 in that second. So the GPU stood still from about 237 s without XCL noticing. - Last warning before it: one `Write64 Signal that would close a GPU cycle, signalled on CPU` at 234.2 s (the only one in the run; `XCL_WAIT64_TRUST_FENCE=1` is set). - Memory is not it: 14.3 GB local video memory against a budget of 15.1–15.3 GB (never over), 34.1 GB committed, 20.4 GB of commit free at the lowest point. Code in use 256 MB (1,756 pipelines: compute 707 / 92 MB, graphics 1,049 / 164 MB). - Load before the hang: 5–14 presents per 10 s from 120 s on, with 17k–71k draws and 38k–67k dispatches per 10 s. Pipelines in use went from 31 to 1,292 between 119 s and 129 s. - 88 two-pass record buffers (4 MiB each) were made, about one every 0.5 s to the end; evicted textures grew to 40,774 and 13,466 were mapped again. **Dispatch probe** (1,310 lines, 707 pipelines) - Largest direct dispatch: 115,200 groups (320 × 360 × 1); fourteen more of 57,600 (320 × 180 × 1 or 57,600 × 1 × 1). Nothing over 65,535 in one dimension and nothing near a million groups. - 389 probe lines carry `[4294967295, 1, 0]` (first at 119.1 s, last at 233.66 s, which is the last probe line of the run). I take those to be indirect dispatches whose counts the probe cannot see; if that is not what they are, say so. - Four pipelines were first seen in the last 20 s (all at about 220.3 s). **What it does not show:** which submission the GPU was in when it stopped. The probe logs a pipeline's 1st and 40th dispatch only. I have not run your newer head (`8e95067`: folded dispatches, zeroed target pages), since it changes the translator and needs the precompile passes again here (hours). Two questions before I spend that: 1. Is there a switch on `f959495` you would turn off first to narrow this (`XCL_WAIT64_TRUST_FENCE`, the tiled shadow, the indirect clamp)? Each test is one 4-minute run for me. 2. Has any 40- or 50-series card logged `nvlddmkm` 153 in a run that got past the code limit? If it is only Ada / 610.88, I'll try a newer driver first. AI use: Claude Code (Claude Fable 5.2) ran this; Claude Sonnet 5.5 counted the log; Fable wrote the comment. --- **Update, runs 11–13 (same tree + #1323's dispatch markers ported, `XCL_GPU_CULPRIT=1`): the stalls at world entry are two compute programs; the hang is not in a compute dispatch.** | run | skip file | wait timeouts | what the markers name | end | |---|---|---|---|---| | 11 | 1004 | 3 at 130 s | 1 list, 13 dispatches not done, two programs alternating, 2–256 groups (1-D) | my guard ended it at 131 s | | 12 | 1004 | 3 at 133 s, 7 at 139 s | the same two programs again, 13 per list, now 3–2,155 groups; plus 2 small dispatches of two others | my guard ended it at 140 s | | 13 | 1004 + those two programs | **none** until the hang | at the release: **0 of 464 lists** have a dispatch started and not done | GPU hung at about 178 s (`nvlddmkm` 14 and 153), last present 176 s, `0x887a0007` logged at 216 s | - So the 5 s wait timeouts around 113–140 s on this card come from one list shape: about 13 one-dimensional dispatches of two programs in turn. Without those two programs there is no wait timeout at all up to the hang. - The hang itself comes anyway (4 of 4 runs that got that far: 256 s, 165 s, 237 s, 178 s), and by the markers no compute dispatch was open when the GPU stopped. That leaves draws, copies, clears or mapping work. Next I'll look at what the graphics and mapping queues had submitted in the seconds before 178 s. - The markers cost something here: with them on, the entry stall came back a second time within 6 s (run 12), which run 9 without them did not show. @⁠IvyNotFound for #1323: ported onto this older tree by hand (the `bind.rs` hunks did not apply), it named the same two programs in 3 of 3 stalls on an RTX 4080, so the markers do what the PR says. This is not a report on the PR's head. **Update, run 14** (as run 13, plus `XCL_PSO_TRACE=1`): the GPU reset again, at 161 s this time, so **5 of 5** (256, 165, 237, 178, 161 s). - It is not a pipeline build: the trace has no driver compile in the last 10 s before it (the last of 12,138 compile lines is earlier), and again no wait timeout and no open compute dispatch. Code in use at the removal: 220 MB in 1,444 pipelines, so less than in the other runs. - XCL gets `0x887a0007` (DEVICE_RESET) every time, never `0x887a0006` (DEVICE_HUNG). - The driver's event is the same in each of the last three: `nvlddmkm` 153 "UCodeReset TDR occurred on GPUID:100" with a 14 event in the same second whose first data word is `024c1547` each time, then either a recovery within 2 s (run 14) or `NV_UFLUSH_FB_FLUSH` timeouts and "recovery action … PF FLR" for 40 s (run 13) or a frozen PC (run 7). No Windows 4101. - So what stops is the card's own microcode, not one long submission that Windows times out. That reads like a driver / firmware fault under this load, or this one card. To separate those I'll check the card outside XCL and ask the owner about a newer driver than 610.88. **If anyone has an Ada card (4070 Ti / 4080 / 4090) with a run past 150 s in the world on this tree, the driver version and whether the System log has `nvlddmkm` 153 would settle it.** (@⁠Joori your 4090 did two 600 s runs with the skip list: which driver?) **Update, runs 15 and 16: neither the driver nor `XCL_WAIT64_TRUST_FENCE`.** @⁠MacieGx thanks for the two leads; both tried, same tree and settings as run 14 (skip file + the two entry-stall programs, markers on): | run | change | last present | driver event | XCL | |---|---|---|---|---| | 15 | driver **621.40** (compute and mesh pipelines rebuilt on it: 24 + 8 min, 0 refused) | 252 s | `nvlddmkm` 153 UCodeReset + 14 | `0x887a0007` | | 16 | 621.40 and **no** `XCL_WAIT64_TRUST_FENCE` | 236 s | the same | `0x887a0007` | - That is **7 of 7** on this RTX 4080 (256, 165, 237, 178, 161, 252, 236 s), on two drivers. No wait timeout before any of the last four, no compute dispatch open (markers), 14.3 GB of 15.1 GB video memory, 17–18 GB of commit free. `XCL_PSO_CODE_MB` / `XCL_PSO_UNUSED_S` are not set here, so nothing is given back. - The 14 event's first data word is the same within a driver (one value in all 610.88 runs, another in both 621.40 runs), so it looks like one place in the driver each time. - This machine's System log has no UCodeReset before these runs (it goes back two weeks), and the card is at stock settings. - Frame rate in the world here is 7–13 presents per 10 s from about 130 s on, with 40k–70k dispatches per 10 s. If your 5080 runs at several times that, the difference may simply be how long this card spends in each submission. Next from here: your newer head. The commits you name (`e1edcd5`, `5419086`, `5272233`) are not on GitHub yet: `lab/gta6-nvidia-world` still ends at `8e95067`. The four precompile passes take hours on this machine, so I'd rather do them once, on the head that has those fixes: could you push it? Until then, if there is one more switch worth trying on `f959495`, name it; a run is 5 minutes. The picture here, by the way, is still far from the real one on this tree (the owner's words: it looks random). **Update, run 17: not the clamp race either.** @⁠MacieGx thanks for the pointer to `af197fe`; applied alone on top of the tree of run 16 (it applies cleanly, runtime only): the GPU reset again at about 162 s, **8 of 8**. With the registry set to restart on a GPU hang, this one restarted the PC, so I am not running this tree here any more. Your newer head and @⁠Joori's 4090 report (621.40, no 153 at all) say it is not Ada as such; what is left on my side is this one card or its 16 GB. I have moved to the project's `nvidia-dev` for #2688, where the first run here had no GPU event up to a title stop at 149 s.
Author
Owner

@⁠CharlyRien on GitHub · 2026-11-26 05:42 UTC · original

@⁠MacieGx on the over-exposure: measured on an RTX 3090, the eye adaptation sits at its floor because its average luminance is 0–0.15, and in 2–3 of 6 captures the luminance writer's descriptor table reaches the GPU all zero. One run per arm.

Measured (captures of the eye-adaptation compute passes in the world, offline decoding)

  • The scene-histogram and average-luminance-from-histogram passes were never dispatched in our runs: no bind of either, up to 44 s into the world.
  • The luminance chain that does run is a min/max downsample. Its final pass writes a 5x1 texture. A lux-compression pass reads that texture's texel 0 about every frame and computes x = 1 + 255·sqrt(saturate((L − 0.1)/299.9)), stored as (x, 1/x, 8, 1/8).
    • L was 0 to 0.15, which gives x = 1 to 4.3.
    • The title sets x = 16 with a fixed-value pass at the world's first frame.
    • L stays low even when the table arrives.
  • The luminance writer's per-dispatch descriptor table is all zero on the GPU in 2–3 of 6 captures, while the CPU's bytes at the bind are full. The table lives in a per-dispatch ring in sparse window 0, and its constant buffer is in the same page.
    • Our tree with none of the fix switches on: 2 of 6 empty.
    • At the bind, the page is mapped and committed, never a hole. In one capture XCL's last-sent hashes already equalled the CPU bytes.
    • Logging every tile map, unmap and zero on that range after 100 s: 0 events (no positive control for that log).
    • Large dispatches (the probe chain) never showed an empty table.
  • Our fix attempts, all unsafe:
    • resending whole written pages: the title quits at 61 s;
    • resending the bound tables' chunks: still empty, and 0x887a0006 in that run (a run with no active fix also lost the device at the same point, right after our capture tool wrote a 300 MB capture, so the removal may be ours, not the fix's);
    • copying the bind-time bytes back over the table inside the list: the title freezes at the start of the world.
    • The sparse audit with _FIX=1 changed nothing.

Deduced, not measured: the table is sent, then overwritten on the GPU by earlier work still in flight. That is #262 (the upload does not wait for the title's queues).

By eye only, no measurement: a port of your XCL_ZERO_TARGET_PAGES=1 removed the big rectangular blocks here too.

Setup

  • RTX 3090 24 GB, driver 616.56, Windows 11 22631, release, direct DXIL.
  • Tree: main e1d84b7d merged with our integrated tree (#1989 at 197b104, #2384 ported), plus local capture and diagnostic switches that are off unless set.
  • Env: XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_NETWORK=0 XCL_GPU_VIEW_BUFFERS=1 XCL_DIRECT_DXIL=1 XCL_PAGE_BUDGET_MB=1024 XCL_GPU_VIEW_MB=1024.

Not tested: other GPUs; whether the histogram passes run on hardware; a fix that waits for the title's queues.

AI use: Claude Code (Claude Opus 5.5, coordinating session and agents). The agents decoded the captures and native shader code, wrote the switches and drafted this; the coordinating session ran the in-title runs.

**@⁠CharlyRien** on GitHub · 2026-11-26 05:42 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7183734319) @⁠MacieGx on the over-exposure: **measured on an RTX 3090, the eye adaptation sits at its floor because its average luminance is 0–0.15, and in 2–3 of 6 captures the luminance writer's descriptor table reaches the GPU all zero.** One run per arm. **Measured** (captures of the eye-adaptation compute passes in the world, offline decoding) - The scene-histogram and average-luminance-from-histogram passes were **never dispatched** in our runs: no bind of either, up to 44 s into the world. - The luminance chain that does run is a min/max downsample. Its final pass writes a 5x1 texture. A lux-compression pass reads that texture's texel 0 about every frame and computes `x = 1 + 255·sqrt(saturate((L − 0.1)/299.9))`, stored as (x, 1/x, 8, 1/8). - L was 0 to 0.15, which gives **x = 1 to 4.3**. - The title sets **x = 16** with a fixed-value pass at the world's first frame. - L stays low even when the table arrives. - **The luminance writer's per-dispatch descriptor table is all zero on the GPU in 2–3 of 6 captures**, while the CPU's bytes at the bind are full. The table lives in a per-dispatch ring in sparse window 0, and its constant buffer is in the same page. - Our tree with none of the fix switches on: 2 of 6 empty. - At the bind, the page is mapped and committed, never a hole. In one capture XCL's last-sent hashes already equalled the CPU bytes. - Logging every tile map, unmap and zero on that range after 100 s: 0 events (no positive control for that log). - Large dispatches (the probe chain) never showed an empty table. - **Our fix attempts, all unsafe:** - resending whole written pages: the title quits at 61 s; - resending the bound tables' chunks: still empty, and `0x887a0006` in that run (a run with no active fix also lost the device at the same point, right after our capture tool wrote a 300 MB capture, so the removal may be ours, not the fix's); - copying the bind-time bytes back over the table inside the list: the title freezes at the start of the world. - The sparse audit with `_FIX=1` changed nothing. **Deduced, not measured:** the table is sent, then overwritten on the GPU by earlier work still in flight. That is #262 (the upload does not wait for the title's queues). **By eye only, no measurement:** a port of your `XCL_ZERO_TARGET_PAGES=1` removed the big rectangular blocks here too. **Setup** - RTX 3090 24 GB, driver 616.56, Windows 11 22631, release, direct DXIL. - Tree: `main` `e1d84b7d` merged with our integrated tree (#1989 at `197b104`, #2384 ported), plus local capture and diagnostic switches that are off unless set. - Env: `XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_NETWORK=0 XCL_GPU_VIEW_BUFFERS=1 XCL_DIRECT_DXIL=1 XCL_PAGE_BUDGET_MB=1024 XCL_GPU_VIEW_MB=1024`. **Not tested:** other GPUs; whether the histogram passes run on hardware; a fix that waits for the title's queues. AI use: Claude Code (Claude Opus 5.5, coordinating session and agents). The agents decoded the captures and native shader code, wrote the switches and drafted this; the coordinating session ran the in-title runs.
Author
Owner

@⁠jessenic on GitHub · 2026-11-26 06:05 UTC · original

RTX 5070 Ti, GPU profile of the world (#1766): one compute program, 5f29d7e51b2c6230, takes about two thirds of the console code's GPU time, and it is a cross-workgroup spin-wait.

Setup. RTX 5070 Ti 16 GB (driver 610.88), 32 GB RAM, Windows 11 26300, release. A local integration tree (main 0829441 + about 40 open PRs, branch jessenic/xcl local/story5-fps) with #1766 ported onto it. Settings:

  • XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_COHERENT_MB=1024 XCL_COHERENT_HEAPS=sparse:256 XCL_PAGE_BUDGET_MB=5120;
  • the per-subresource texture following from my #1514 comments;
  • the RT resolve programs refused.

Without the profile, this setup runs the world at 1.4–1.5 presents/s.

With XCL_GPU_PROFILE=1 timing every op, the run hit a TDR (0x887a0006) 33 s into the world: each timed op waits for its resolve, so a submission takes longer. So I added a local sampling switch that times one op in N (XCL_GPU_PROFILE_EVERY=8, in the branch). That run went its 420 s with no removal.

Since the start, sampled one in eight: 21.1 s of GPU time in 266,028 timed ops.

program GPU time calls longest call shape
CS 5f29d7e51b2c6230 14,256 ms 55 405.6 ms 15×270×1 groups of 32 threads, wave32, 16,696 B of console code
CS with no known hash (split pieces, I assume) 3,756 ms 38,185 33.3 ms
CS 95bc3980ec624295 (indirect) 216 ms 55 9.5 ms
CS 5f264fab4389c7da 60 ms 72 2.8 ms the same 15×270×1, 32 threads, wave32

Allowing for the sampling, 5f29… runs about once a frame at about 260 ms a call. That is roughly a third of a ~700 ms frame on its own. Its near-twin 5f264… has the same shape and takes under 3 ms.

What 5f29… does, from its disassembly, in words (nothing of the program quoted):

  • Each wave runs an outer scalar loop over 32-wide chunks of a flag array up to a bound. Inside it, an inner loop loads each lane's flag with glc dlc and repeats until every flag in the chunk reads 1.
  • The translator's loop budget caps the inner loop at 65,536 tries. The program also stops at 0x10000 itself.
  • So each workgroup waits for the flags of a range of other workgroups. That is a cross-workgroup handoff, like a decoupled look-back.
  • Both translators mark the windows globallycoherent, so a stale cached value alone doesn't explain it.

What I think happens (not established): some waits run to the budget. Either the flag's producer runs later, isn't resident because the GPU is full of waiting groups, or isn't run at all (a skipped or refused program). Then the wave spins 65,536 times and carries on with whatever it read. That would fit 260–400 ms a call. Leaving the program out (XCL_REFUSE_CS) is not a workaround: the title ended 61 s into the world with an access violation in its own code (game_scarlett_master.exe+0x465a75), so it needs this pass's output.

What would settle it:

  • a per-program budget override (as @⁠claudetools-gh did for other programs) to see whether the time scales with the budget;
  • which ops write the flag array: it is read at offset 0x140e200 from the buffer behind the program's first s_load_dwordx4 (user SGPRs), indexed by lane;
  • whether that writer is among the ~19 % of dispatches XCL skips in this run (165,000 of 853,000 by the console code so far line; #2625 would break that down by cause).

Not tested: AMD; the HLSL path's timing of this program; a budget override; anything about who writes the flags.

AI use: Claude Code (Claude Opus 5.5) ported #1766, added the sampling switch, ran the runs, read the program's disassembly locally and wrote this comment.

**@⁠jessenic** on GitHub · 2026-11-26 06:05 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7184080101) **RTX 5070 Ti, GPU profile of the world (#1766): one compute program, `5f29d7e51b2c6230`, takes about two thirds of the console code's GPU time, and it is a cross-workgroup spin-wait.** **Setup.** RTX 5070 Ti 16 GB (driver 610.88), 32 GB RAM, Windows 11 26300, release. A local integration tree (`main` `0829441` + about 40 open PRs, branch [jessenic/xcl `local/story5-fps`](https://github.com/jessenic/xcl/tree/local/story5-fps)) with #1766 ported onto it. Settings: - `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_COHERENT_MB=1024 XCL_COHERENT_HEAPS=sparse:256 XCL_PAGE_BUDGET_MB=5120`; - the per-subresource texture following from my #1514 comments; - the RT resolve programs refused. Without the profile, this setup runs the world at 1.4–1.5 presents/s. With `XCL_GPU_PROFILE=1` timing every op, the run hit a TDR (`0x887a0006`) 33 s into the world: each timed op waits for its resolve, so a submission takes longer. So I added a local sampling switch that times one op in N (`XCL_GPU_PROFILE_EVERY=8`, in the branch). That run went its 420 s with no removal. **Since the start, sampled one in eight:** 21.1 s of GPU time in 266,028 timed ops. | program | GPU time | calls | longest call | shape | |---|---|---|---|---| | CS `5f29d7e51b2c6230` | **14,256 ms** | 55 | **405.6 ms** | 15×270×1 groups of 32 threads, wave32, 16,696 B of console code | | CS with no known hash (split pieces, I assume) | 3,756 ms | 38,185 | 33.3 ms | | | CS `95bc3980ec624295` (indirect) | 216 ms | 55 | 9.5 ms | | | CS `5f264fab4389c7da` | 60 ms | 72 | **2.8 ms** | **the same 15×270×1, 32 threads, wave32** | Allowing for the sampling, `5f29…` runs about once a frame at about 260 ms a call. That is roughly a third of a ~700 ms frame on its own. Its near-twin `5f264…` has the same shape and takes under 3 ms. **What `5f29…` does, from its disassembly, in words** (nothing of the program quoted): - Each wave runs an outer scalar loop over 32-wide chunks of a flag array up to a bound. Inside it, an inner loop loads each lane's flag with `glc dlc` and repeats until every flag in the chunk reads 1. - The translator's loop budget caps the inner loop at 65,536 tries. The program also stops at `0x10000` itself. - So each workgroup waits for the flags of a range of other workgroups. That is a cross-workgroup handoff, like a decoupled look-back. - Both translators mark the windows `globallycoherent`, so a stale cached value alone doesn't explain it. **What I think happens (not established):** some waits run to the budget. Either the flag's producer runs later, isn't resident because the GPU is full of waiting groups, or isn't run at all (a skipped or refused program). Then the wave spins 65,536 times and carries on with whatever it read. That would fit 260–400 ms a call. Leaving the program out (`XCL_REFUSE_CS`) is not a workaround: the title ended 61 s into the world with an access violation in its own code (`game_scarlett_master.exe+0x465a75`), so it needs this pass's output. **What would settle it:** - a per-program budget override (as @⁠claudetools-gh did for other programs) to see whether the time scales with the budget; - which ops write the flag array: it is read at offset `0x140e200` from the buffer behind the program's first `s_load_dwordx4` (user SGPRs), indexed by lane; - whether that writer is among the ~19 % of dispatches XCL skips in this run (165,000 of 853,000 by the `console code so far` line; #2625 would break that down by cause). **Not tested:** AMD; the HLSL path's timing of this program; a budget override; anything about who writes the flags. **AI use:** Claude Code (Claude Opus 5.5) ported #1766, added the sampling switch, ran the runs, read the program's disassembly locally and wrote this comment.
Author
Owner

@⁠brainhay5 on GitHub · 2026-11-26 06:08 UTC · original

On an RTX 5070 Ti 16 GB, skipping the biggest compute programs does not move the present wall — and nvidia-dev itself does get further than main. Three arms, one run each, counts only.

Tree: xcl-dev/xcl nvidia-dev at c044dc6d ("XCL_SKIP_CS_KB leaves the biggest compute programs without a pipeline"), clean, release, no local changes. GPU RTX 5070 Ti 16 GB, driver 32.0.16.1088; Ryzen 7 5800X3D, 64 GB, Windows 11 22631. Defaults otherwise: no XCL_DIRECT_DXIL, no XCL_HEAP_WINDOWS, XCL_NETWORK=0, A every 3 s. The shader cache was fully translated beforehand (26,503 records, so no DXC time in any arm).

arm presents stop frames skipped as failed crash / removal
baseline, XCL_SKIP_CS_KB unset 63.4 s 1,500 0 none / none
XCL_SKIP_CS_KB=512 64.8 s 1,500 209 none / none
XCL_SKIP_CS_KB=256 64.8 s 1,500 209 none / none

What it says. The four programs that cost this card 110–135 s each when they do build — 753e8c2101ee64d0 971 KB, d09cd5060bfa5f94 1.1 MB, ef008c0f04b6261a 1.1 MB, 73fb752d7f62c3a5 1.9 MB — are all above 512 KiB, so =512 removes every one of them from the pipeline table, and =256 removes 209 pipelines in total. The wall moves by 1.4 s, which is inside this machine's run-to-run spread. So on this card the present stall is not a bind waiting on those compiles, at least not through this route.

nvidia-dev against main on the same machine: main b49be183 stops at 47 s with 1,200 frames (13 runs today, 46.3–48.4 s, plus a second mode at 66–86 s); nvidia-dev reaches 1,500 frames at 63.4 s with 82,000 pipelines queued, and no crash or device removal in any arm. That matches what Build 14 does here (1,500 frames at 76.3 s), so the branch's world work is visible on this card even though the world itself is not reached.

Not tested: more than one run per arm (so the 63.4 vs 64.8 difference is not characterised); XCL_SKIP_CS_KB values between 256 and 512; the XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 form; AMD; and a card with enough VRAM to reach the world.

AI use: OpenCode, DeepSeek V4.1 Flash 1017 — ran the three arms and wrote this from XCL's logs. No game data attached.

**@⁠brainhay5** on GitHub · 2026-11-26 06:08 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7184137103) **On an RTX 5070 Ti 16 GB, skipping the biggest compute programs does not move the present wall — and `nvidia-dev` itself does get further than `main`.** Three arms, one run each, counts only. **Tree:** `xcl-dev/xcl` `nvidia-dev` at `c044dc6d` ("XCL_SKIP_CS_KB leaves the biggest compute programs without a pipeline"), clean, release, no local changes. **GPU** RTX 5070 Ti 16 GB, driver 32.0.16.1088; Ryzen 7 5800X3D, 64 GB, Windows 11 22631. Defaults otherwise: no `XCL_DIRECT_DXIL`, no `XCL_HEAP_WINDOWS`, `XCL_NETWORK=0`, A every 3 s. The shader cache was fully translated beforehand (26,503 records, so no DXC time in any arm). | arm | presents stop | frames | skipped as failed | crash / removal | |---|---:|---:|---:|---| | baseline, `XCL_SKIP_CS_KB` unset | **63.4 s** | 1,500 | 0 | none / none | | `XCL_SKIP_CS_KB=512` | 64.8 s | 1,500 | 209 | none / none | | `XCL_SKIP_CS_KB=256` | 64.8 s | 1,500 | 209 | none / none | **What it says.** The four programs that cost this card 110–135 s each when they do build — `753e8c2101ee64d0` 971 KB, `d09cd5060bfa5f94` 1.1 MB, `ef008c0f04b6261a` 1.1 MB, `73fb752d7f62c3a5` 1.9 MB — are all above 512 KiB, so `=512` removes every one of them from the pipeline table, and `=256` removes 209 pipelines in total. The wall moves by **1.4 s**, which is inside this machine's run-to-run spread. So on this card the present stall is **not** a bind waiting on those compiles, at least not through this route. **`nvidia-dev` against `main` on the same machine:** `main` `b49be183` stops at 47 s with 1,200 frames (13 runs today, 46.3–48.4 s, plus a second mode at 66–86 s); `nvidia-dev` reaches **1,500 frames at 63.4 s** with 82,000 pipelines queued, and no crash or device removal in any arm. That matches what Build 14 does here (1,500 frames at 76.3 s), so the branch's world work is visible on this card even though the world itself is not reached. **Not tested:** more than one run per arm (so the 63.4 vs 64.8 difference is not characterised); `XCL_SKIP_CS_KB` values between 256 and 512; the `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1` form; AMD; and a card with enough VRAM to reach the world. AI use: OpenCode, DeepSeek V4.1 Flash 1017 — ran the three arms and wrote this from XCL's logs. No game data attached.
Author
Owner

@⁠Joori on GitHub · 2026-11-26 06:49 UTC · original

Thanks for the lab branch – on an RTX 4090 it draws the world too. The three runs that reached it then ended in a GPU hang, and the driver events look like what @⁠throny sees on the 4080. Details below in case they help, with an answer to throny's question at the end.

Setup

  • NVIDIA GeForce RTX 4090 24 GB, driver 621.40; Ryzen 9 5950X with one CCD disabled (8c/16t); 64 GB RAM; Windows 10 Pro 19045; release build.
  • lab/gta6-nvidia-world at 8e95067, no local changes. Retail 1.0.2.1, save already past the prologue's first part (starts at "nine months ago").
  • Precompiled into its own cache (--precompile --only cs|ms --pipelines, then ps and vs): 2,689 cs and 9,282 ms pipelines, 0 refused.
  • Env: XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_SHADOW_TILED=1 XCL_PAGE_BUDGET_MB=1024 XCL_SEEN_TOUCH=0 XCL_EVICT_SHARED=1 XCL_TWO_PASS_RES_MB=4 XCL_VIEW_POOL_MB=1024 XCL_WAIT64_TRUST_FENCE=1 XCL_PSO_CODE_MB=380 XCL_PSO_UNUSED_S=30 XCL_TWO_PASS_SHARE=1 XCL_WS_MAX_MB=13000 XCL_ZERO_TARGET_PAGES=1 XCL_FOLD_GROUPS=9c1e6716e59ecf21, no skip file. Instead of skipping the RT resolve programs, the NVIDIA profile for xcl.exe sets 0x001ABC0F (shader heap VA reserve) to 1 GiB, as suggested on #2403.

What it shows

  • The loading stills draw without the flicker other branches have.
  • The world draws: the prison from above, the café (a cup and saucer while Lucia talks to the waitress), the yard (tables, chairs, fence, guard tower), and the cell (bunk and table). The geometry looks right; the colours are teal / white with contour-like bands, as if the brightness wraps around – I take it that's the picture you say 5272233 fixes.

The hangs

run change world from hang XCL driver events at the hang
38 env above ~390 s ~397 s 0x887a0007 14 (02575b7c …), then 153 UCodeReset / Resetting / Reset / Restarting TDR, 4101
39 the same, warmer caches ~225 s ~303 s 0x887a0006 ~75 × 13 in one second: Graphics SM Warp Exception on (GPC n, TPC n, SM n): MMU Fault and Multiple Warp Errors on every GPC, Graphics Exception: ESR 0x556730=0x8010017 0x556734=0x4 0x556728=0xf812b60 0x55672c=0x1104; then 153, 4101
40b without XCL_PSO_CODE_MB / XCL_PSO_UNUSED_S, after a reboot ~154 s ~341 s 0x887a0007 14 (02575b7c …, as in run 38), then 153 UCodeReset … Restarting TDR, 4101; no MMU fault lines
  • Not the shader heap, as far as I can tell: your shader code lab line said 388 MB (run 38) and 433 MB (run 39) in use at the removal, under the 1 GiB.
  • Not video memory: 11.6–14.7 GB local of 24 GB.
  • No Write64 Signal … signalled on CPU line in any of the three logs.
  • Without the give-back the world lasted ~185 s, against ~7–80 s with it. That is one run, so I can't say the give-back is the cause.
  • One more run (XCL_PAGE_BUDGET_MB unset) hung at 62 s in the intro with a lone 153, right after the two resets above. I rebooted after it and don't count it.
Screenshots (4)

run 38: 18

prison from above: 22

café cup and saucer: 23

cell: 24

@⁠throny, on your question: the two 600 s runs with the skip list were on driver 621.40, on #2057 (4df1e6e + one local commit + #2527 applied by hand), with XCL_PSO_WAIT_MS=50 XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_COHERENT_HEAPS=sparse:16 XCL_LOOK_SKIP=1. Neither logged any nvlddmkm event. A third 600 s run with no skip list but the 1 GiB shader-heap profile didn't either (where runs without the profile were removed within 94–260 s). The one skip run that hung (0x887a0006 at 493 s, about 70 s into the world) logged an nvlddmkm 153. So an Ada card on a newer driver than 610.88 does show the 14 + 153 UCodeReset, on the lab branch, and rarely on #2057.

AI use: Claude Code with Claude Opus 5.5 ran the runs, read the logs and driver events, and wrote this; I played the runs and took the screenshots.

**@⁠Joori** on GitHub · 2026-11-26 06:49 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7184816401) Thanks for the lab branch – on an RTX 4090 it draws the world too. The three runs that reached it then ended in a GPU hang, and the driver events look like what @⁠throny sees on the 4080. Details below in case they help, with an answer to throny's question at the end. **Setup** - NVIDIA GeForce RTX 4090 24 GB, driver 621.40; Ryzen 9 5950X with one CCD disabled (8c/16t); 64 GB RAM; Windows 10 Pro 19045; release build. - `lab/gta6-nvidia-world` at `8e95067`, no local changes. Retail 1.0.2.1, save already past the prologue's first part (starts at "nine months ago"). - Precompiled into its own cache (`--precompile --only cs|ms --pipelines`, then ps and vs): 2,689 cs and 9,282 ms pipelines, 0 refused. - Env: `XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_SHADOW_TILED=1 XCL_PAGE_BUDGET_MB=1024 XCL_SEEN_TOUCH=0 XCL_EVICT_SHARED=1 XCL_TWO_PASS_RES_MB=4 XCL_VIEW_POOL_MB=1024 XCL_WAIT64_TRUST_FENCE=1 XCL_PSO_CODE_MB=380 XCL_PSO_UNUSED_S=30 XCL_TWO_PASS_SHARE=1 XCL_WS_MAX_MB=13000 XCL_ZERO_TARGET_PAGES=1 XCL_FOLD_GROUPS=9c1e6716e59ecf21`, no skip file. Instead of skipping the RT resolve programs, the NVIDIA profile for xcl.exe sets `0x001ABC0F` (shader heap VA reserve) to 1 GiB, as suggested on #2403. **What it shows** - The loading stills draw without the flicker other branches have. - The world draws: the prison from above, the café (a cup and saucer while Lucia talks to the waitress), the yard (tables, chairs, fence, guard tower), and the cell (bunk and table). The geometry looks right; the colours are teal / white with contour-like bands, as if the brightness wraps around – I take it that's the picture you say `5272233` fixes. **The hangs** | run | change | world from | hang | XCL | driver events at the hang | |---|---|---|---|---|---| | 38 | env above | ~390 s | ~397 s | `0x887a0007` | 14 (`02575b7c …`), then 153 UCodeReset / Resetting / Reset / Restarting TDR, 4101 | | 39 | the same, warmer caches | ~225 s | ~303 s | `0x887a0006` | ~75 × 13 in one second: `Graphics SM Warp Exception on (GPC n, TPC n, SM n): MMU Fault` and `Multiple Warp Errors` on every GPC, `Graphics Exception: ESR 0x556730=0x8010017 0x556734=0x4 0x556728=0xf812b60 0x55672c=0x1104`; then 153, 4101 | | 40b | without `XCL_PSO_CODE_MB` / `XCL_PSO_UNUSED_S`, after a reboot | ~154 s | ~341 s | `0x887a0007` | 14 (`02575b7c …`, as in run 38), then 153 UCodeReset … Restarting TDR, 4101; no MMU fault lines | - Not the shader heap, as far as I can tell: your `shader code lab` line said 388 MB (run 38) and 433 MB (run 39) in use at the removal, under the 1 GiB. - Not video memory: 11.6–14.7 GB local of 24 GB. - No `Write64 Signal … signalled on CPU` line in any of the three logs. - Without the give-back the world lasted ~185 s, against ~7–80 s with it. That is one run, so I can't say the give-back is the cause. - One more run (`XCL_PAGE_BUDGET_MB` unset) hung at 62 s in the intro with a lone 153, right after the two resets above. I rebooted after it and don't count it. <details><summary>Screenshots (4)</summary> run 38: <img width="1283" height="753" alt="18" src="https://github.com/user-attachments/assets/a070ed40-6e89-4d71-9a32-e8b16970309a" /> prison from above: <img width="1278" height="751" alt="22" src="https://github.com/user-attachments/assets/b50ed600-da0d-4301-9774-2aeb724bf551" /> café cup and saucer: <img width="1281" height="748" alt="23" src="https://github.com/user-attachments/assets/7eaa81a3-6fe2-4ff4-9a2f-f1b893e0fb92" /> cell: <img width="1283" height="749" alt="24" src="https://github.com/user-attachments/assets/b87d75d5-61e7-4850-a97e-0c85604210d2" /> </details> **@⁠throny, on your question:** the two 600 s runs with the skip list were on driver **621.40**, on #2057 (`4df1e6e` + one local commit + #2527 applied by hand), with `XCL_PSO_WAIT_MS=50 XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_COHERENT_HEAPS=sparse:16 XCL_LOOK_SKIP=1`. Neither logged any `nvlddmkm` event. A third 600 s run with no skip list but the 1 GiB shader-heap profile didn't either (where runs without the profile were removed within 94–260 s). The one skip run that hung (`0x887a0006` at 493 s, about 70 s into the world) logged an `nvlddmkm` 153. So an Ada card on a newer driver than 610.88 does show the 14 + 153 UCodeReset, on the lab branch, and rarely on #2057. AI use: Claude Code with Claude Opus 5.5 ran the runs, read the logs and driver events, and wrote this; I played the runs and took the screenshots.
Author
Owner

@⁠MacieGx on GitHub · 2026-11-26 06:55 UTC · original

@⁠Joori thanks, a very useful report, and it shows an error in the env I posted: it is missing XCL_OUTSIDE_BUFFERS=1, and so was every one of my own runs from about f959495 on. @⁠throny, @⁠CowboyBingus, this concerns your runs too.

What that switch does, and what goes wrong without it. The title places compute buffers at 0x147…–0x152…, outside XCL's memory windows; one run logged 81 of them. Without the switch they are separate resources with an empty V#: shaders read zeros and their writes are dropped (the log says "empty V#" hundreds of times). One of them is the tile list indirect_diffuse_lighting:CS_FinalGather reads. With it empty, the gather wrote nothing, and its two output targets kept whatever other textures had left in their pages. Bloom and flare turned that into the white-outs, colour lobes and stippled blocks. With the switch on, "empty V#" is logged 0 times, no fills or workarounds are needed, and the first lit close-up of a character shows in the café scene.

Since 8e95067 the branch (now 4ae4e70, https://github.com/MacieGx/xcl/tree/lab/gta6-nvidia-world) has:

  • 4ae4e70: outside buffers on by default (off only with XCL_OUTSIDE_BUFFERS=0), so no env can lose it again.
  • 5272233: the teal / banded colours. The title's thirteen 33³ colour-LUT targets sit 512 KiB apart. XG gives no size for 3-D render targets, so each LUT took 18 tiles of 64 KiB, and neighbours shared 10 of them: one LUT's bake overwrote the next one's rows, and black mapped to cyan. A PR for main is ready.
  • e1edcd5: a self-deadlock on the pages lock in XCL_ZERO_TARGET_PAGES (submits stop, then the title's watchdog). You had that switch on.
  • 5419086: when the coherent window is full, arena blocks fall back to the sparse windows. Before that, draws and dispatches were skipped from ~290 s on.
  • af197fe: GPU waits around the indirect clamp's dispatch. It fixed a race in my record readback. Whether real indirect calls ever ran a half-written bounded record before that is not known, but it would fit an MMU fault on every GPC like your run 39. That is a guess, not a measurement.
    As far as I can see nothing since 8e95067 changes translation (only gpu/uma.rs, the arena fallback), so your precompiled caches should stay valid.

What I see on the RTX 5080 (621.24) with outside buffers on and the skip file: one 640 s run with no removal, the world from ~520 s at only 0.5–0.7 presents a second (the gather and its readers now do their full work), 25 queue-wait timeouts and 8.4 GB of RAM free at the end. I have not had a 14 + 153 TDR in a skip-file run here; the one 153 I know of was the no-skip run with the code-heap hook and the give-back. With outside buffers on, the skip file off and your 1 GiB heap profile, the RT resolves would get real inputs for the first time, so it is worth one run on your 4090.

AI use: Claude Code (Claude Opus 5.5 coordinating; a Claude Fable 5.2 subagent found and fixed these in the lab runs).

**@⁠MacieGx** on GitHub · 2026-11-26 06:55 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7184909731) @⁠Joori thanks, a very useful report, and it shows an error in the env I posted: it is missing `XCL_OUTSIDE_BUFFERS=1`, and so was every one of my own runs from about `f959495` on. @⁠throny, @⁠CowboyBingus, this concerns your runs too. **What that switch does, and what goes wrong without it.** The title places compute buffers at 0x147…–0x152…, outside XCL's memory windows; one run logged 81 of them. Without the switch they are separate resources with an empty V#: shaders read zeros and their writes are dropped (the log says "empty V#" hundreds of times). One of them is the tile list `indirect_diffuse_lighting:CS_FinalGather` reads. With it empty, the gather wrote nothing, and its two output targets kept whatever other textures had left in their pages. Bloom and flare turned that into the white-outs, colour lobes and stippled blocks. With the switch on, "empty V#" is logged 0 times, no fills or workarounds are needed, and the first lit close-up of a character shows in the café scene. **Since `8e95067`** the branch (now `4ae4e70`, https://github.com/MacieGx/xcl/tree/lab/gta6-nvidia-world) has: - `4ae4e70`: outside buffers on by default (off only with `XCL_OUTSIDE_BUFFERS=0`), so no env can lose it again. - `5272233`: the teal / banded colours. The title's thirteen 33³ colour-LUT targets sit 512 KiB apart. XG gives no size for 3-D render targets, so each LUT took 18 tiles of 64 KiB, and neighbours shared 10 of them: one LUT's bake overwrote the next one's rows, and black mapped to cyan. A PR for `main` is ready. - `e1edcd5`: a self-deadlock on the pages lock in `XCL_ZERO_TARGET_PAGES` (submits stop, then the title's watchdog). You had that switch on. - `5419086`: when the coherent window is full, arena blocks fall back to the sparse windows. Before that, draws and dispatches were skipped from ~290 s on. - `af197fe`: GPU waits around the indirect clamp's dispatch. It fixed a race in my record readback. Whether real indirect calls ever ran a half-written bounded record before that is not known, but it would fit an MMU fault on every GPC like your run 39. That is a guess, not a measurement. As far as I can see nothing since `8e95067` changes translation (only `gpu/uma.rs`, the arena fallback), so your precompiled caches should stay valid. **What I see on the RTX 5080 (621.24)** with outside buffers on and the skip file: one 640 s run with no removal, the world from ~520 s at only 0.5–0.7 presents a second (the gather and its readers now do their full work), 25 queue-wait timeouts and 8.4 GB of RAM free at the end. I have not had a 14 + 153 TDR in a skip-file run here; the one 153 I know of was the no-skip run with the code-heap hook and the give-back. With outside buffers on, the skip file off and your 1 GiB heap profile, the RT resolves would get real inputs for the first time, so it is worth one run on your 4090. AI use: Claude Code (Claude Opus 5.5 coordinating; a Claude Fable 5.2 subagent found and fixed these in the lab runs).
Author
Owner

@⁠Joori on GitHub · 2026-11-26 07:23 UTC · original

@⁠MacieGx thanks for the quick fix – here is the run you asked for. On 4ae4e70 the 4090 shows the world in its real colours, with no TDR, but it is too slow for the title's watchdog.

Setup: as in my report above (RTX 4090, 621.40, 1 GiB shader-heap profile, no skip file, same precompiled cache), lab branch at 4ae4e70, no local changes, release. Env as run 40b there plus XCL_OUTSIDE_BUFFERS=1: XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_SHADOW_TILED=1 XCL_PAGE_BUDGET_MB=1024 XCL_SEEN_TOUCH=0 XCL_EVICT_SHARED=1 XCL_TWO_PASS_RES_MB=4 XCL_VIEW_POOL_MB=1024 XCL_WAIT64_TRUST_FENCE=1 XCL_TWO_PASS_SHARE=1 XCL_WS_MAX_MB=13000 XCL_ZERO_TARGET_PAGES=1 XCL_FOLD_GROUPS=9c1e6716e59ecf21 XCL_OUTSIDE_BUFFERS=1 (no XCL_PSO_CODE_MB / XCL_PSO_UNUSED_S). One run, 1,200 s limit.

Picture

  • First two are during the end of the café scene.
  • The last white image is when I'm able to play the game from within the cell I believe, as I hear the inmates talking briefly.

Run

  • World from about 148 s. 16 outside buffers placed; empty V# logged once.
  • No device removal and no nvlddmkm / 4101 event at all – the first of my lab runs to reach the world without a TDR.
  • But 546 queue-wait timeouts of 5 s, from 153 s on (waiters: 228 q1/ty0, 88 q4/ty2, 87 q2/ty2, 80 q3/ty2), against the 25 in your 640 s run. 0–1 presents per 2 s, 1,691 presents in all; the sound stalled with them.
  • The last submit was at 417.7 s. At 431.7 s the title stopped itself (0xc0000005 write at 0 in game_scarlett_master.exe+0x23cf683, GPU Loc Sig – the watchdog of #846).
  • Coherent window full by 393 s (coherent 4095/4095 MB), 0 dispatches and 10 draws skipped. Video memory up to 17.4 GB of 24 GB; page budget: 32318 textures evicted, 8599 mapped again.

So I can't tell yet whether af197fe fixed the hangs of runs 38–40b, or this run ended before one could come.

Screenshots (3) 29 30 31

AI use: Claude Code with Claude Opus 5.5 ran the run, read the log and wrote this; I played it and took the screenshots.

**@⁠Joori** on GitHub · 2026-11-26 07:23 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7185411604) @⁠MacieGx thanks for the quick fix – here is the run you asked for. **On `4ae4e70` the 4090 shows the world in its real colours, with no TDR, but it is too slow for the title's watchdog.** **Setup:** as in my report above (RTX 4090, 621.40, 1 GiB shader-heap profile, no skip file, same precompiled cache), lab branch at `4ae4e70`, no local changes, release. Env as run 40b there plus `XCL_OUTSIDE_BUFFERS=1`: `XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_SHADOW_TILED=1 XCL_PAGE_BUDGET_MB=1024 XCL_SEEN_TOUCH=0 XCL_EVICT_SHARED=1 XCL_TWO_PASS_RES_MB=4 XCL_VIEW_POOL_MB=1024 XCL_WAIT64_TRUST_FENCE=1 XCL_TWO_PASS_SHARE=1 XCL_WS_MAX_MB=13000 XCL_ZERO_TARGET_PAGES=1 XCL_FOLD_GROUPS=9c1e6716e59ecf21 XCL_OUTSIDE_BUFFERS=1` (no `XCL_PSO_CODE_MB` / `XCL_PSO_UNUSED_S`). One run, 1,200 s limit. **Picture** - First two are during the end of the café scene. - The last white image is when I'm able to play the game from within the cell I believe, as I hear the inmates talking briefly. **Run** - World from about 148 s. 16 outside buffers placed; `empty V#` logged once. - **No device removal and no `nvlddmkm` / 4101 event at all** – the first of my lab runs to reach the world without a TDR. - But **546 queue-wait timeouts** of 5 s, from 153 s on (waiters: 228 `q1/ty0`, 88 `q4/ty2`, 87 `q2/ty2`, 80 `q3/ty2`), against the 25 in your 640 s run. 0–1 presents per 2 s, 1,691 presents in all; the sound stalled with them. - The last submit was at 417.7 s. At 431.7 s the title stopped itself (`0xc0000005` write at 0 in `game_scarlett_master.exe+0x23cf683`, `GPU Loc Sig` – the watchdog of #846). - Coherent window full by 393 s (`coherent 4095/4095 MB`), 0 dispatches and 10 draws skipped. Video memory up to 17.4 GB of 24 GB; `page budget: 32318 textures evicted, 8599 mapped again`. So I can't tell yet whether `af197fe` fixed the hangs of runs 38–40b, or this run ended before one could come. <details><summary>Screenshots (3)</summary> <img width="1280" height="716" alt="29" src="https://github.com/user-attachments/assets/054603e1-1c0e-4dc9-8e8b-57ba2dca320a" /> <img width="1281" height="718" alt="30" src="https://github.com/user-attachments/assets/7a0b7572-d2a3-4473-ad5b-3cb32330c0da" /> <img width="1277" height="715" alt="31" src="https://github.com/user-attachments/assets/4a0613d7-8da8-4407-8844-9d6eefd586c7" /> </details> AI use: Claude Code with Claude Opus 5.5 ran the run, read the log and wrote this; I played it and took the screenshots.
Author
Owner

@⁠MacieGx on GitHub · 2026-11-26 07:24 UTC · original

@⁠Joori thanks, good to see the real colours and no TDR on the 4090. Two things from my runs that may help with the speed:

  • Run with the skip file again. On the 5080, a run with outside buffers on and no skip file (code-heap hook instead) also stayed up, 700 s with 11 queue-wait timeouts. But the picture was worse than with the skip file: heads and skin glowed blue-white in every shot and bodies went black. With the skip file, the café close-up had natural skin. So the 1004 CS_RaytracingResolve programs shade from wrong ray inputs at the moment, and they are a large share of the GPU time. With the skip file, my runs do 0.7–0.8 presents a second in the world with outside buffers on, and 25 timeouts in 640 s, all at the first world frames and the cut to the prison.
  • Your 546 timeouts are far more than I see without the skip file (11 in 700 s), so something else may differ. The coherent window was full by 393 s in your run; the fallback to the sparse windows (5419086) is in 4ae4e70, and you logged only 10 skipped draws, so that part seems to work. I ran with XCL_PSO_CODE_MB=380 XCL_PSO_UNUSED_S=30 and Windows 11; I don't know yet whether either matters here.

The stop at +0x23cf683 is the title's own watchdog: 30 s with no frame (#846). It fires at the first long gap, so anything that shortens the worst frame keeps the run alive.

AI use: Claude Code (Claude Opus 5.5), from the lab notes of the runs named above.

**@⁠MacieGx** on GitHub · 2026-11-26 07:24 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7185420462) @⁠Joori thanks, good to see the real colours and no TDR on the 4090. Two things from my runs that may help with the speed: - **Run with the skip file again.** On the 5080, a run with outside buffers on and no skip file (code-heap hook instead) also stayed up, 700 s with 11 queue-wait timeouts. But the picture was worse than with the skip file: heads and skin glowed blue-white in every shot and bodies went black. With the skip file, the café close-up had natural skin. So the 1004 `CS_RaytracingResolve` programs shade from wrong ray inputs at the moment, and they are a large share of the GPU time. With the skip file, my runs do 0.7–0.8 presents a second in the world with outside buffers on, and 25 timeouts in 640 s, all at the first world frames and the cut to the prison. - **Your 546 timeouts are far more than I see without the skip file** (11 in 700 s), so something else may differ. The coherent window was full by 393 s in your run; the fallback to the sparse windows (`5419086`) is in `4ae4e70`, and you logged only 10 skipped draws, so that part seems to work. I ran with `XCL_PSO_CODE_MB=380 XCL_PSO_UNUSED_S=30` and Windows 11; I don't know yet whether either matters here. The stop at `+0x23cf683` is the title's own watchdog: 30 s with no frame (#846). It fires at the first long gap, so anything that shortens the worst frame keeps the run alive. AI use: Claude Code (Claude Opus 5.5), from the lab notes of the runs named above.
Author
Owner

@⁠Joori on GitHub · 2026-11-26 07:42 UTC · original

@⁠MacieGx thanks, tried it: same as my run above plus XCL_PSO_SKIP_FILE with the 1,004 CS_RaytracingResolve records ("1000 console compute programs get no pipeline"). The picture got better, the speed didn't.

without the skip file with it
world from 148 s 141 s
queue-wait timeouts (5 s) 546 by 418 s 453 by 351 s
presents in all 1,691 1,704
title's watchdog stop (+0x23cf683) 431.7 s 378.7 s
nvlddmkm / 4101 events none none
  • Picture: the café now has warm, natural light (the counter, shelves and a red chair; screenshot below), and the over-the-shoulder shot with the waitress shows real hair texture, though under a white haze. A few blue / red speckles are still there in the dark areas.
  • Speed: still 0–1 presents per 2 s. The last submit was at 350.7 s, and the watchdog fired 28 s later during the cut to the prison.
  • What the timeouts are, from the log lines: each is one queue waiting on another, graphics on compute (q1/ty0 <- q2/q3/q4 ty2) and compute on graphics (q0/q2/q3/q4 ty2 <- q1/ty0), and in every one the producer had only 1–2 submissions not yet completed. So nothing looks lost: single submissions seem to take more than 5 s on this card. That fits @⁠throny's thought that it is how long Ada spends in each submission.
  • Video memory up to 15.9 GB of 24 GB; 16,384 dispatches skipped by 316 s (the skip file), 0 draws skipped.
  • Windows 10 19045 with hardware-accelerated GPU scheduling on (HwSchMode=2), default TDR settings. I haven't tried XCL_PSO_CODE_MB=380 XCL_PSO_UNUSED_S=30 on this head yet.
Screenshots

café interior (warm): 34

over-the-shoulder with the waitress: 35

AI use: Claude Code with Claude Opus 5.5 ran the run, read the log and wrote this; I played it and took the screenshots.

**@⁠Joori** on GitHub · 2026-11-26 07:42 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7185745600) @⁠MacieGx thanks, tried it: same as my run above plus `XCL_PSO_SKIP_FILE` with the 1,004 `CS_RaytracingResolve` records ("1000 console compute programs get no pipeline"). **The picture got better, the speed didn't.** | | without the skip file | with it | |---|---|---| | world from | 148 s | 141 s | | queue-wait timeouts (5 s) | 546 by 418 s | 453 by 351 s | | presents in all | 1,691 | 1,704 | | title's watchdog stop (`+0x23cf683`) | 431.7 s | 378.7 s | | `nvlddmkm` / 4101 events | none | none | - **Picture:** the café now has warm, natural light (the counter, shelves and a red chair; screenshot below), and the over-the-shoulder shot with the waitress shows real hair texture, though under a white haze. A few blue / red speckles are still there in the dark areas. - **Speed:** still 0–1 presents per 2 s. The last submit was at 350.7 s, and the watchdog fired 28 s later during the cut to the prison. - **What the timeouts are**, from the log lines: each is one queue waiting on another, graphics on compute (`q1/ty0 <- q2/q3/q4 ty2`) and compute on graphics (`q0/q2/q3/q4 ty2 <- q1/ty0`), and in every one the producer had only 1–2 submissions not yet completed. So nothing looks lost: single submissions seem to take more than 5 s on this card. That fits @⁠throny's thought that it is how long Ada spends in each submission. - Video memory up to 15.9 GB of 24 GB; 16,384 dispatches skipped by 316 s (the skip file), 0 draws skipped. - Windows 10 19045 with hardware-accelerated GPU scheduling on (`HwSchMode=2`), default TDR settings. I haven't tried `XCL_PSO_CODE_MB=380 XCL_PSO_UNUSED_S=30` on this head yet. <details><summary>Screenshots</summary> café interior (warm): <img width="1282" height="749" alt="34" src="https://github.com/user-attachments/assets/0c1d776c-cda9-4dff-a472-92995fc4a67d" /> over-the-shoulder with the waitress: <img width="1280" height="747" alt="35" src="https://github.com/user-attachments/assets/a3795d95-91a8-4140-a565-c2a23f473ef5" /> </details> AI use: Claude Code with Claude Opus 5.5 ran the run, read the log and wrote this; I played it and took the screenshots.
Author
Owner

@⁠CharlyRien on GitHub · 2026-11-26 07:51 UTC · original

@⁠MacieGx confirmation of your 3-D LUT page fix (5272233) on an RTX 3090, one run per arm: with it, the cyan cast and the blown-out picture are gone. The cyan comes from the overlapping 33³ LUT targets, as you found.

Measured with captures of the LUT bake and of the composite draw that samples the LUTs, plus the presented frames (9 frames per arm, world + 20 to + 45 s):

without (XCL_VOLUME_BYTES=0) with
33³ LUT right after the identity bake pass identity 1.000, black → black identity 1.000, black → black
the same LUT at the composite identity 0.734, black → (0, 1, 1) identity 1.000, black → black
a second 33³ LUT at the composite identity 0.734, black → cyan identity 1.000, black → black
presented frames, mean (G+B)/2 − R +56.5 +3.9
presented pixels classed cyan 55.6 % 0.7 %
presented mean luminance (of 255), per frame 152-213 10-40
  • With the fix, the log shows 13 lines "33x33x33 format 10 flags 0x5 has no console size: taken as 287496 bytes".
  • One change in our port: the texel size comes from our format table (format_element_bytes). Yours counted RGB32, RG32 and BC formats as 4 bytes, so a BC1 volume would get 8x too many pages and overlap again. The 33³ RGBA16F LUTs come out the same.
  • The picture is now neutral but dark and soft (by eye, no numbers yet). Our measured scene luminance is still low, so that is the next part for us.

Setup: RTX 3090 24 GB, driver 616.56, Windows 11 22631, release. main e1d84b7d merged with our integrated tree (#2384 ported, #1989 at 197b104, #2229 ported, #2496 ported), plus local switches. Both arms used the same binary and env; only XCL_VOLUME_BYTES differed. Env included XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_DIRECT_DXIL=1 XCL_PAGE_BUDGET_MB=1024 XCL_GPU_VIEW_MB=1024 and the depth-twin copy at use (XCL_LOCAL_TWIN_AT_USE=1, local).

AI use: Claude Code (Claude Opus 5.5, coordinating session and agents). An agent ported the commit and wrote the run and capture scripts; the coordinating session ran both arms and checked the numbers.

**@⁠CharlyRien** on GitHub · 2026-11-26 07:51 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7185906496) @⁠MacieGx confirmation of your 3-D LUT page fix (`5272233`) on an RTX 3090, one run per arm: **with it, the cyan cast and the blown-out picture are gone.** The cyan comes from the overlapping 33³ LUT targets, as you found. Measured with captures of the LUT bake and of the composite draw that samples the LUTs, plus the presented frames (9 frames per arm, world + 20 to + 45 s): | | without (`XCL_VOLUME_BYTES=0`) | with | |---|---|---| | 33³ LUT right after the identity bake pass | identity 1.000, black → black | identity 1.000, black → black | | the same LUT at the composite | identity 0.734, **black → (0, 1, 1)** | identity 1.000, black → black | | a second 33³ LUT at the composite | identity 0.734, black → cyan | identity 1.000, black → black | | presented frames, mean (G+B)/2 − R | +56.5 | +3.9 | | presented pixels classed cyan | 55.6 % | 0.7 % | | presented mean luminance (of 255), per frame | 152-213 | 10-40 | - With the fix, the log shows 13 lines "33x33x33 format 10 flags 0x5 has no console size: taken as 287496 bytes". - One change in our port: the texel size comes from our format table (`format_element_bytes`). Yours counted RGB32, RG32 and BC formats as 4 bytes, so a BC1 volume would get 8x too many pages and overlap again. The 33³ RGBA16F LUTs come out the same. - The picture is now neutral but dark and soft (by eye, no numbers yet). Our measured scene luminance is still low, so that is the next part for us. **Setup:** RTX 3090 24 GB, driver 616.56, Windows 11 22631, release. `main` `e1d84b7d` merged with our integrated tree (#2384 ported, #1989 at `197b104`, #2229 ported, #2496 ported), plus local switches. Both arms used the same binary and env; only `XCL_VOLUME_BYTES` differed. Env included `XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_DIRECT_DXIL=1 XCL_PAGE_BUDGET_MB=1024 XCL_GPU_VIEW_MB=1024` and the depth-twin copy at use (`XCL_LOCAL_TWIN_AT_USE=1`, local). AI use: Claude Code (Claude Opus 5.5, coordinating session and agents). An agent ported the commit and wrote the run and capture scripts; the coordinating session ran both arms and checked the numbers.
Author
Owner

@⁠claudetools-gh on GitHub · 2026-11-26 07:51 UTC · original

@⁠MacieGx @⁠Joori on speed: what moved the world from about 1 to about 4 presents a second on an RTX 5070 Ti 16 GB (driver 621.x, Ryzen 7 9700X, 62 GB RAM, Windows 11), with the real colours of 4ae4e70. One run per step, same scene (the first interior after the intro), counted from frames presented in the world.

Tree: main 08db802 + your lab branch (up to 4ae4e70) + local changes listed below. Release build, caches precompiled (whole pack, --pipelines), 1,004 CS_RaytracingResolve refused.

run change on top of the previous presents/s in the world what it changed
147 base: default coherent window (see note 1) 1.0 – 1.8 world drawn, colours still white / teal
148 XCL_WINDOW_NO_CARRY=1 (+ a local exchange plan, note 4) ~1.4 GPU time per call: b78fa10b425b8e54 (DepthProcessingHBO) 114 → 44 ms, 5a29b696095f77ac (ped blend shapes) 22 → 10.5 ms
149 XCL_LOOK_SKIP=1 ~2.0 CPU per ExecuteCommandLists 20 → 6 ms (its write-watch look 9–13 → 2 ms)
151 XCL_RENDER_RES=1920x1080 (#735, with note 2) ~3.2 the 3-D passes at 1280x720 instead of 2560x1440
153 your 4ae4e70 + a pool fix (note 3) ~3.5 real colours; record buffers made 18,176 → 96
157 XCL_WATCH_HOT left at its default (we had =0) ~4.2 each look takes the hot 2 MiB blocks instead of walking 8–11 GiB

Env of run 157: XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_SHADOW_TILED=1 XCL_PAGE_BUDGET_MB=4096 XCL_SEEN_TOUCH=0 XCL_EVICT_SHARED=1 XCL_TWO_PASS_RES_MB=4 XCL_VIEW_POOL_MB=1024 XCL_WAIT64_TRUST_FENCE=1 XCL_PSO_PRELOAD=1 XCL_PSO_WAIT_MS=50 XCL_HUGE_PSO_CONCURRENCY=4 XCL_WINDOW_NO_CARRY=1 XCL_LOOK_SKIP=1 XCL_RENDER_RES=1920x1080 XCL_FOLD_GROUPS=9c1e6716e59ecf21 XCL_NETWORK=0, plus the skip list.

Notes

  1. XCL_COHERENT_MB=1024 breaks the world. With it, 8,000–16,000 buffers the title places on its own CPU-committed memory fall outside the windows (empty V#), the two-pass ExecuteIndirect argument buffers are never written, and every world frame is black. Details in #2092: #2092
  2. #735 rewrites only the largest mode. With a size below 2560x1440, the title then picks its 2560x1440 mode, and nothing gets smaller. Every larger mode has to become the render size too (the change is on #735).
  3. The two-pass buffer pool kept 16 entries and filled with small argument copies, so every freed 4 MiB record buffer was dropped: 72 GB of CreateCommittedResource in 270 s. The fix is in #2092: #2092
  4. The exchange plan (local, behind a switch) exchanges between the two wave32 halves only the mask words the other half reads.
    • Driver compile measured cold: 73fb752d7f62c3a5 43.4 → 26.7 s, 062468c09af883b9 36.7 → 22.9 s.
    • Over the whole pack: 28,569 → 18,102 exchanges in 783 split programs.
    • It shortens compile time; I don't count it in the fps above.
  5. XCL_LOOK_AHEAD=5 darkened the picture (most texels black in the same scene) while it ran at about the same rate. Leave it off.

Where the time goes now (run 154, XCL_GPU_PROFILE=1): the GPU is busy about 56 % of the time. About 19 submits, 4,900 draws and 4,100 dispatches a frame. The top GPU costs are ped skinning: 5a29b696095f77ac 4.7 ms a call, and 44ca55bfefe67bd5 0.08 ms × ~2,000 calls a frame.
Thread samples of the submitting thread: about 40 % in title_textures::refresh_parts → GetWriteWatch, the rest waiting in the title for the GPU. So the frame is bound by CPU–GPU waits, not by either side's throughput.

Not tested: more than one run per step; AMD; other cards; whether XCL_WATCH_HOT at its default misses writes elsewhere in the game (the picture in this scene matched run 153).

AI-assisted.

**@⁠claudetools-gh** on GitHub · 2026-11-26 07:51 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7185907286) @⁠MacieGx @⁠Joori on speed: what moved the world from about 1 to about 4 presents a second on an **RTX 5070 Ti 16 GB** (driver 621.x, Ryzen 7 9700X, 62 GB RAM, Windows 11), with the real colours of `4ae4e70`. One run per step, same scene (the first interior after the intro), counted from `frames presented` in the world. **Tree:** `main` `08db802` + your lab branch (up to `4ae4e70`) + local changes listed below. Release build, caches precompiled (whole pack, `--pipelines`), 1,004 `CS_RaytracingResolve` refused. | run | change on top of the previous | presents/s in the world | what it changed | |---|---|---|---| | 147 | base: default coherent window (see note 1) | 1.0 – 1.8 | world drawn, colours still white / teal | | 148 | `XCL_WINDOW_NO_CARRY=1` (+ a local exchange plan, note 4) | ~1.4 | GPU time per call: `b78fa10b425b8e54` (DepthProcessingHBO) 114 → 44 ms, `5a29b696095f77ac` (ped blend shapes) 22 → 10.5 ms | | 149 | `XCL_LOOK_SKIP=1` | ~2.0 | CPU per `ExecuteCommandLists` 20 → 6 ms (its write-watch look 9–13 → 2 ms) | | 151 | `XCL_RENDER_RES=1920x1080` (#735, with note 2) | ~3.2 | the 3-D passes at 1280x720 instead of 2560x1440 | | 153 | your `4ae4e70` + a pool fix (note 3) | ~3.5 | real colours; record buffers made 18,176 → 96 | | 157 | `XCL_WATCH_HOT` left at its default (we had `=0`) | **~4.2** | each look takes the hot 2 MiB blocks instead of walking 8–11 GiB | Env of run 157: `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_SHADOW_TILED=1 XCL_PAGE_BUDGET_MB=4096 XCL_SEEN_TOUCH=0 XCL_EVICT_SHARED=1 XCL_TWO_PASS_RES_MB=4 XCL_VIEW_POOL_MB=1024 XCL_WAIT64_TRUST_FENCE=1 XCL_PSO_PRELOAD=1 XCL_PSO_WAIT_MS=50 XCL_HUGE_PSO_CONCURRENCY=4 XCL_WINDOW_NO_CARRY=1 XCL_LOOK_SKIP=1 XCL_RENDER_RES=1920x1080 XCL_FOLD_GROUPS=9c1e6716e59ecf21 XCL_NETWORK=0`, plus the skip list. **Notes** 1. **`XCL_COHERENT_MB=1024` breaks the world.** With it, 8,000–16,000 buffers the title places on its own CPU-committed memory fall outside the windows (empty V#), the two-pass `ExecuteIndirect` argument buffers are never written, and every world frame is black. Details in #2092: https://git.gtahub.st/github/xcl-dev--xcl/pulls/2092 2. **#735 rewrites only the largest mode.** With a size below 2560x1440, the title then picks its 2560x1440 mode, and nothing gets smaller. Every larger mode has to become the render size too (the change is on #735). 3. **The two-pass buffer pool** kept 16 entries and filled with small argument copies, so every freed 4 MiB record buffer was dropped: 72 GB of `CreateCommittedResource` in 270 s. The fix is in #2092: https://git.gtahub.st/github/xcl-dev--xcl/pulls/2092 4. **The exchange plan** (local, behind a switch) exchanges between the two wave32 halves only the mask words the other half reads. - Driver compile measured cold: `73fb752d7f62c3a5` 43.4 → 26.7 s, `062468c09af883b9` 36.7 → 22.9 s. - Over the whole pack: 28,569 → 18,102 exchanges in 783 split programs. - It shortens compile time; I don't count it in the fps above. 5. **`XCL_LOOK_AHEAD=5` darkened the picture** (most texels black in the same scene) while it ran at about the same rate. Leave it off. **Where the time goes now** (run 154, `XCL_GPU_PROFILE=1`): the GPU is busy about 56 % of the time. About 19 submits, 4,900 draws and 4,100 dispatches a frame. The top GPU costs are ped skinning: `5a29b696095f77ac` 4.7 ms a call, and `44ca55bfefe67bd5` 0.08 ms × ~2,000 calls a frame. Thread samples of the submitting thread: about 40 % in `title_textures::refresh_parts` → `GetWriteWatch`, the rest waiting in the title for the GPU. So the frame is bound by CPU–GPU waits, not by either side's throughput. **Not tested:** more than one run per step; AMD; other cards; whether `XCL_WATCH_HOT` at its default misses writes elsewhere in the game (the picture in this scene matched run 153). AI-assisted.
Author
Owner

@⁠MacieGx on GitHub · 2026-11-26 07:54 UTC · original

@⁠CharlyRien thanks for the careful A/B, and you are right about the element size: the lab commit's 4-byte rule would give a BC1 volume far too many pages. The version prepared for main takes the size from xg::element, so BC formats count by 4x4 blocks (8 or 16 bytes) and the 96-bit formats keep the old behaviour, which matches your port. Same 287,496 bytes for the 33³ RGBA16F LUTs.

@⁠claudetools-gh thanks, that is exactly the breakdown I was missing. Our lab's GPU timestamps agree with you: the title's compute dispatches are only ~4 % of the frame here, so the time is in waits and CPU work. I'll try XCL_WINDOW_NO_CARRY, XCL_LOOK_SKIP, XCL_WATCH_HOT at its default and the #2092 pool fix on the 5080, and report the numbers.

AI use: Claude Code (Claude Opus 5.5).

**@⁠MacieGx** on GitHub · 2026-11-26 07:54 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7185970563) @⁠CharlyRien thanks for the careful A/B, and you are right about the element size: the lab commit's 4-byte rule would give a BC1 volume far too many pages. The version prepared for `main` takes the size from `xg::element`, so BC formats count by 4x4 blocks (8 or 16 bytes) and the 96-bit formats keep the old behaviour, which matches your port. Same 287,496 bytes for the 33³ RGBA16F LUTs. @⁠claudetools-gh thanks, that is exactly the breakdown I was missing. Our lab's GPU timestamps agree with you: the title's compute dispatches are only ~4 % of the frame here, so the time is in waits and CPU work. I'll try `XCL_WINDOW_NO_CARRY`, `XCL_LOOK_SKIP`, `XCL_WATCH_HOT` at its default and the #2092 pool fix on the 5080, and report the numbers. AI use: Claude Code (Claude Opus 5.5).
Author
Owner

@⁠CowboyBingus on GitHub · 2026-11-26 08:37 UTC · original

@⁠MacieGx, here are some findings from our runs on your lab branch that may help.

  • Hardware: RTX 5070 Ti 16 GB, driver 621.24, 64 GB RAM.
  • Builds: every run cited here used your 8e95067 plus our local test commits and #2009 (XCL_COHERENT_HEAPS=sparse:1024 in every run). Runs 40–42 also had #802 and the two sampler commits in section 4. That branch is now rebased onto your 4ae4e70.
  • Method: measured facts only, one run per arm unless stated.

1. Colour LUTs (the textures your 52722335 describes)

  • The textures: the title creates 13 33³ RGBA16F 3-D textures, each a render target + UAV, with console layout 0x105 (4KB_S) and flags 0x300005, 0x80000 apart.
  • Missing console size: XG returns none for them (console bytes None in our log), because volume() returns E_NOTIMPL when the render-target flag is set.
  • Without a size: in a run whose build gives no console size to a 3-D render target, we took one of the composite's 33³ LUT inputs. That run did not log which placement this LUT is.
    • Its slice 0 matches a model in which PC tile t holds the identity texels of tile t+8, then t+16. The model uses tiles of 32×16×16 texels with index tx + 2·ty + 6·tz. Where the source texel lies outside the 33³ texture, a texel keeps its own identity.
    • The match is within 1/32 per channel in 1089/1089 texels, and equals the 8-bit dump encoding of the model in all 1089.
    • Texel (0,0) dumps as (0, 180, 180), which is the dump's 8-bit value for 1.0.
  • With our sizing: our build sizes these as 4KB_S volumes (layout 0x105 → mode 5), which is 512,000 bytes, or 8 pages of 64 KiB.
    • With it, that LUT's slice 0 is (x/32, y/32, 0) in all 1089 texels, equal at the dump's 8-bit encoding, and texel (0,0) is (0,0,0).
    • This is one run, and it also differs from the earlier run in other env settings.
  • Your texel-bytes approach: it gives 287,496 bytes here, which is 5 owned 64 KiB pages, inside the 512 KiB between neighbours. We computed this from the code and have not run it.
  • Happy to test your PR when it is up.

2. Outside buffers: lazy vs XCL_OUTSIDE_LAZY=0

Both runs used XCL_OUTSIDE_BUFFERS=1 and the same binary. The second run sets XCL_OUTSIDE_LAZY=0 and also drops two lab probes: a LUT probe, and a pixel-shader skip that dropped no draws in the lazy run. Dump times and run length also differ.

  • Lazy run (the default placement):
    • Long stretched triangles cross the frame, for example at 330.9 s.
    • The pixel-shader skip dropped no draws (no skip line in the log). The draw counter's last line (427.1 s) shows 0 skipped.
  • XCL_OUTSIDE_LAZY=0 run:
    • Its 47 frames from 299.0 to 539.4 s show none of the long triangles across the character seen in the lazy run. At 479.6 s, flat polygons cover the top edge. Where the character is visible, its outline is whole.
    • 23 of the 47 have under 5 % of pixels with any channel above 16 (of 255). 3 (399.9, 444.6 and 535.1 s) are bright white blocky noise.
  • Both runs: the character is a dark silhouette.
Lazy run XCL_OUTSIDE_LAZY=0 run
Presents/s, 300 s to the last log line 0.26 0.76
Presents/s, same 300–539 s window 0.30 0.77
"GPU queue.Wait … did not complete within 5000 ms … released on CPU" lines 407 in total, 381 of them from 426.5 s on. Frames dumped at 426.9–483.2 s show the scene. 31, all between 203.5 and 236.7 s. That is before 299.0 s, the first frame after a run of black frames (249.6–283.9 s).

3. A compute pass cut by the indirect clamp

  • What we saw: in one run with ei peek, cs 8fb86b3fabf5f9a2 asked for 104,836 groups in x on one ExecuteIndirect record. The 65,535 clamp drops 39,301 of them.
  • What we tried: in runs 40–42 we added it and the seven programs of the same family (95b76bccec68771d, 38adb41015ea774d, 5fd4ff6e71b61023, 012f15bcd917e0a1, 76419bf9eadb983c, 520ff08275a3365e, 41c2a423efb25d69) to XCL_FOLD_GROUPS.
  • Not isolated: we have not measured the effect.

4. Samplers in the composite

  • The fault: this holds for your 8e95067/4ae4e70 translation, which has neither fix below. In the composite pixel shader (ps 4adcdc125462510a), three samples go through sampler-heap entry 0 (s31 & 0xFFF with s31 = 0) instead of the shader's constant sampler.
    • What they read: two of the LUTs and a 1x1 texture at +0x460.
    • Why: constant_samplers forgets known S# words at the block start after the s_cbranch_scc1 at 0xf18.
  • A second case: the sample at 0x00f4, whose S# word is built with s_brev_b32, also used heap entry 0.
  • The fixes:
    • Commit 82e4a9bb (#2624, merged into nvidia-dev; VS/PS only) gives the three the constant sampler.
    • Upstream 253bc79d covers 0x00f4.
    • Runs 40–42 ran with both commits cherry-picked. We did not compare against a run without them.

5. Kept textures written by compute

  • How GPU writes are tracked: title_textures marks a kept texture as GPU-written only when it is a copy destination (note_gpu_write from copy_texture_region_x / copy_resource_x).
  • Composite inputs at risk: in one run, six composite inputs were kept, all logged "gpu-written false". Three of them are:
    • the 5x1 texture the composite loads at +0x80;
    • two 4096x1 R32_FLOAT textures.
  • Who writes them: that run's dispatch probe lists them at t1[8] for 6a2d29656b574336 and at t1[1] for 99f7ab0875eac257 / 7b5c00dc0a9756fe. Each program's image_store takes its T# from offset 0x100 (resp. 0x20) of the table it reads from s5. We have not checked that the probe's t1 is that table.
  • The risk: a CPU write that changes their bytes, or a re-map after a page-budget eviction (which also sets pending), would upload the CPU bytes over the GPU result.
  • Evidence so far: we have no log showing that this happens.

6. Frame time

  • The line: in one run, the 2-second timing line at 129.9 s reads "refresh 129 looks held 2499 ms … write-watch 2053 ms".
    • The 2499 ms is the sum over 129 refreshes.
    • Write-watch runs under the same lock.
  • A second line: at 34.4 s it reads 2672 / 2637 ms.

AI use: Claude Code (Claude Opus 5.5) ran the runs, analysed the logs and dumps with sub-agents, and drafted this. Separate agents checked each statement against the logs, frames, dumps and code.

**@⁠CowboyBingus** on GitHub · 2026-11-26 08:37 UTC · [original](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7186817119) @⁠MacieGx, here are some findings from our runs on your lab branch that may help. - **Hardware:** RTX 5070 Ti 16 GB, driver 621.24, 64 GB RAM. - **Builds:** every run cited here used your `8e95067` plus our local test commits and #2009 (`XCL_COHERENT_HEAPS=sparse:1024` in every run). Runs 40–42 also had #802 and the two sampler commits in section 4. That branch is now rebased onto your `4ae4e70`. - **Method:** measured facts only, one run per arm unless stated. **1. Colour LUTs (the textures your `52722335` describes)** - **The textures:** the title creates 13 33³ RGBA16F 3-D textures, each a render target + UAV, with console layout `0x105` (4KB_S) and flags `0x300005`, 0x80000 apart. - **Missing console size:** XG returns none for them (`console bytes None` in our log), because `volume()` returns E_NOTIMPL when the render-target flag is set. - **Without a size:** in a run whose build gives no console size to a 3-D render target, we took one of the composite's 33³ LUT inputs. That run did not log which placement this LUT is. - Its slice 0 matches a model in which PC tile t holds the identity texels of tile t+8, then t+16. The model uses tiles of 32×16×16 texels with index tx + 2·ty + 6·tz. Where the source texel lies outside the 33³ texture, a texel keeps its own identity. - The match is within 1/32 per channel in 1089/1089 texels, and equals the 8-bit dump encoding of the model in all 1089. - Texel (0,0) dumps as (0, 180, 180), which is the dump's 8-bit value for 1.0. - **With our sizing:** our build sizes these as 4KB_S volumes (layout 0x105 → mode 5), which is 512,000 bytes, or 8 pages of 64 KiB. - With it, that LUT's slice 0 is (x/32, y/32, 0) in all 1089 texels, equal at the dump's 8-bit encoding, and texel (0,0) is (0,0,0). - This is one run, and it also differs from the earlier run in other env settings. - **Your texel-bytes approach:** it gives 287,496 bytes here, which is 5 owned 64 KiB pages, inside the 512 KiB between neighbours. We computed this from the code and have not run it. - Happy to test your PR when it is up. **2. Outside buffers: lazy vs `XCL_OUTSIDE_LAZY=0`** Both runs used `XCL_OUTSIDE_BUFFERS=1` and the same binary. The second run sets `XCL_OUTSIDE_LAZY=0` and also drops two lab probes: a LUT probe, and a pixel-shader skip that dropped no draws in the lazy run. Dump times and run length also differ. - **Lazy run (the default placement):** - Long stretched triangles cross the frame, for example at 330.9 s. - The pixel-shader skip dropped no draws (no skip line in the log). The draw counter's last line (427.1 s) shows 0 skipped. - **`XCL_OUTSIDE_LAZY=0` run:** - Its 47 frames from 299.0 to 539.4 s show none of the long triangles across the character seen in the lazy run. At 479.6 s, flat polygons cover the top edge. Where the character is visible, its outline is whole. - 23 of the 47 have under 5 % of pixels with any channel above 16 (of 255). 3 (399.9, 444.6 and 535.1 s) are bright white blocky noise. - **Both runs:** the character is a dark silhouette. | | Lazy run | `XCL_OUTSIDE_LAZY=0` run | |---|---|---| | Presents/s, 300 s to the last log line | 0.26 | 0.76 | | Presents/s, same 300–539 s window | 0.30 | 0.77 | | "GPU queue.Wait … did not complete within 5000 ms … released on CPU" lines | 407 in total, 381 of them from 426.5 s on. Frames dumped at 426.9–483.2 s show the scene. | 31, all between 203.5 and 236.7 s. That is before 299.0 s, the first frame after a run of black frames (249.6–283.9 s). | **3. A compute pass cut by the indirect clamp** - **What we saw:** in one run with ei peek, cs `8fb86b3fabf5f9a2` asked for 104,836 groups in x on one ExecuteIndirect record. The 65,535 clamp drops 39,301 of them. - **What we tried:** in runs 40–42 we added it and the seven programs of the same family (`95b76bccec68771d`, `38adb41015ea774d`, `5fd4ff6e71b61023`, `012f15bcd917e0a1`, `76419bf9eadb983c`, `520ff08275a3365e`, `41c2a423efb25d69`) to `XCL_FOLD_GROUPS`. - **Not isolated:** we have not measured the effect. **4. Samplers in the composite** - **The fault:** this holds for your `8e95067`/`4ae4e70` translation, which has neither fix below. In the composite pixel shader (ps `4adcdc125462510a`), three samples go through sampler-heap entry 0 (`s31 & 0xFFF` with s31 = 0) instead of the shader's constant sampler. - **What they read:** two of the LUTs and a 1x1 texture at +0x460. - **Why:** `constant_samplers` forgets known S# words at the block start after the `s_cbranch_scc1` at 0xf18. - **A second case:** the sample at 0x00f4, whose S# word is built with `s_brev_b32`, also used heap entry 0. - **The fixes:** - Commit `82e4a9bb` (#2624, merged into `nvidia-dev`; VS/PS only) gives the three the constant sampler. - Upstream `253bc79d` covers 0x00f4. - Runs 40–42 ran with both commits cherry-picked. We did not compare against a run without them. **5. Kept textures written by compute** - **How GPU writes are tracked:** `title_textures` marks a kept texture as GPU-written only when it is a copy destination (`note_gpu_write` from `copy_texture_region_x` / `copy_resource_x`). - **Composite inputs at risk:** in one run, six composite inputs were kept, all logged "gpu-written false". Three of them are: - the 5x1 texture the composite loads at +0x80; - two 4096x1 R32_FLOAT textures. - **Who writes them:** that run's dispatch probe lists them at t1[8] for `6a2d29656b574336` and at t1[1] for `99f7ab0875eac257` / `7b5c00dc0a9756fe`. Each program's `image_store` takes its T# from offset 0x100 (resp. 0x20) of the table it reads from s5. We have not checked that the probe's t1 is that table. - **The risk:** a CPU write that changes their bytes, or a re-map after a page-budget eviction (which also sets `pending`), would upload the CPU bytes over the GPU result. - **Evidence so far:** we have no log showing that this happens. **6. Frame time** - **The line:** in one run, the 2-second timing line at 129.9 s reads "refresh 129 looks held 2499 ms … write-watch 2053 ms". - The 2499 ms is the sum over 129 refreshes. - Write-watch runs under the same lock. - **A second line:** at 34.4 s it reads 2672 / 2637 ms. AI use: Claude Code (Claude Opus 5.5) ran the runs, analysed the logs and dumps with sub-agents, and drafted this. Separate agents checked each statement against the logs, frames, dumps and code.
This discussion has been locked. Commenting is limited to contributors.
No description provided.