D3D12.X: compute pipelines are built ahead of their first bind #883

Closed
isaacwingate wants to merge 1 commit from upstream-pr/889 into main
isaacwingate commented 2026-11-24 07:39:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by isaacwingate on 2026-11-24T07:39:14Z.


A lazy compute pipeline is built at its first bind, on the title's thread. The bind has to wait (a skipped dispatch corrupts what it computes), and on an NVIDIA GPU the driver takes seconds for a big translated compute shader. #690 preloads only the shaders an earlier run used, so every compute pipeline new to a run is still compiled in the middle of a frame. With this change every compute pipeline goes to the preload workers when the title makes it, queued behind the earlier run's ones. Graphics pipelines stay lazy. XCL_PRELOAD_COMPUTE=0 turns this off and keeps #690's preload. Part of #505: testers' runs on several GPUs (below) show it moves early compute builds off the title's threads, but the world load still stops on pipelines the title makes and binds at once.

Open PRs that change pso_async.rs too: #828 (the same preload function: a textual conflict), #533, #267, #754, #628. Each limits or reorders waits; none builds a pipeline before its first use.

What is in it

  • crates/xcl/src/hle/d3d12x/pso_async.rs:
    • submit_lazy sends compute pipelines to the preload queue too. The queue has two lines: an earlier run's pipelines first, then the other compute ones.
    • A bind that comes first still builds or waits as before.
    • XCL_PRELOAD_COMPUTE=0 leaves compute pipelines to their first bind, as before this PR. XCL_PSO_PRELOAD=0 would also turn off #690's preload.
    • Tests:
      • a_compute_pipeline_is_built_ahead_of_its_first_bind. It fails without the change: the compute pipeline is still pending after 10 s.
      • xcl_preload_compute_0_leaves_compute_pipelines_to_their_first_bind, which runs itself as a child process with the variable set.
  • Since the first version: rebased onto main 1d027e5, and the XCL_PRELOAD_COMPUTE switch added (@frozht's request, for its memory cost).

Tested

  • NVIDIA GeForce RTX 5080, driver 32.0.16.2124, i9-12900K, Windows 11 build 26300, rustc 1.100.0; tests in debug, runs in release.
  • cargo test --workspace -- --test-threads=4 on a39c399: 961 passed, 0 failed, 43 ignored. The 23 SKIPPED lines:
    • no wave64: the wave64 forms of the lower / lower_dxil GPU tests, gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware
    • refused: the wave32 per-lane cases of f16_programs_on_the_gpu / f32_programs_on_the_gpu
    • heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows
    • pso_measurement_compiles_an_exact_synthetic_record: cannot disable the driver cache
  • The retail title of #505, XCL_NETWORK=0, 240 s timed runs, with #899's wait counter (on the first version, main e50836b / 1ec4c98):
    • without this, 16 compute binds built their pipeline on a title thread. They took 3–23 s each, 92.7 s in all, on five threads within 10 s, and the title's hang watchdog ended the run at 125 s.
    • with this, 1 compute bind waited, for 2 ms.
  • Testers' reports in this thread:
    • RTX 4080, 5070 Ti, 5080, 5090, 3060, 3070 Laptop, 5060 Laptop; RX 9060 XT; RX 7900 XT under Wine.
    • They agree that the early builds leave the title's threads.
    • None of them got past the world load: there the title makes and binds new compute pipelines at once. On the 3070 Laptop, the three preload workers were held by big_compile_turn.

Regression run
Both with XCL_COHERENT_MB=4095, one after the other, with no input, so both stay in the title's menus.

main:

xcl-smoke v1
commit: 1d027e5c76c9a86a7ee2ca1cc677edf0be95d331
gpu: NVIDIA GeForce RTX 5080
title: 8a66b2b2
seconds: 90
exit: 0x0
frames shown: 2535 (PresentX 2535)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16900 MB

PR:

xcl-smoke v1
commit: a39c3992c7a45baf73e374616e4e9c718f533887
gpu: NVIDIA GeForce RTX 5080
title: 8a66b2b2
seconds: 90
exit: 0x0
frames shown: 2512 (PresentX 2512)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 17943 MB

Not tested

  • AMD and Intel GPUs myself (see the testers' reports above); other titles.
  • A run that gets through the world load: this is one part of #505, not all of it.
  • Memory cost:
    • Compute pipelines built ahead stay in the driver. Commit went up 1 GB in the regression run, and 2.3 GB at the world load in an RTX 4080 report.
    • Under Wine/RADV, @frozht measured 7–10 GB more host memory over 10 minutes.
    • XCL_PRELOAD_COMPUTE=0 turns the build-ahead off. There is no byte or count budget: the size is only known after DXC.
  • A run with XCL_PRELOAD_COMPUTE=0 on the retail title: the switch is covered by its test only.

AI use

  • Claude Code with Claude Opus 5.5: found the cause (profiling the title's threads and the counter on resolve_wait), wrote the change and the tests, ran the tests and the runs, and wrote this description.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5468085415 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/889). Originally posted by [isaacwingate](https://github.com/isaacwingate) on 2026-11-24T07:39:14Z. --- A lazy compute pipeline is built at its first bind, on the title's thread. The bind has to wait (a skipped dispatch corrupts what it computes), and on an NVIDIA GPU the driver takes seconds for a big translated compute shader. #690 preloads only the shaders an earlier run used, so every compute pipeline new to a run is still compiled in the middle of a frame. With this change every compute pipeline goes to the preload workers when the title makes it, queued behind the earlier run's ones. Graphics pipelines stay lazy. `XCL_PRELOAD_COMPUTE=0` turns this off and keeps #690's preload. Part of #505: testers' runs on several GPUs (below) show it moves early compute builds off the title's threads, but the world load still stops on pipelines the title makes and binds at once. Open PRs that change `pso_async.rs` too: #828 (the same `preload` function: a textual conflict), #533, #267, #754, #628. Each limits or reorders waits; none builds a pipeline before its first use. **What is in it** - `crates/xcl/src/hle/d3d12x/pso_async.rs`: - `submit_lazy` sends compute pipelines to the preload queue too. The queue has two lines: an earlier run's pipelines first, then the other compute ones. - A bind that comes first still builds or waits as before. - `XCL_PRELOAD_COMPUTE=0` leaves compute pipelines to their first bind, as before this PR. `XCL_PSO_PRELOAD=0` would also turn off #690's preload. - Tests: - `a_compute_pipeline_is_built_ahead_of_its_first_bind`. It fails without the change: the compute pipeline is still pending after 10 s. - `xcl_preload_compute_0_leaves_compute_pipelines_to_their_first_bind`, which runs itself as a child process with the variable set. - Since the first version: rebased onto `main` `1d027e5`, and the `XCL_PRELOAD_COMPUTE` switch added (@frozht's request, for its memory cost). **Tested** - NVIDIA GeForce RTX 5080, driver 32.0.16.2124, i9-12900K, Windows 11 build 26300, rustc 1.100.0; tests in debug, runs in release. - `cargo test --workspace -- --test-threads=4` on a39c399: 961 passed, 0 failed, 43 ignored. The 23 SKIPPED lines: - `no wave64`: the wave64 forms of the `lower` / `lower_dxil` GPU tests, `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` - refused: the wave32 per-lane cases of `f16_programs_on_the_gpu` / `f32_programs_on_the_gpu` - `heap_window_out_of_memory_falls_back_to_the_switch_form`: no heap windows - `pso_measurement_compiles_an_exact_synthetic_record`: cannot disable the driver cache - The retail title of #505, `XCL_NETWORK=0`, 240 s timed runs, with #899's wait counter (on the first version, main e50836b / 1ec4c98): - without this, 16 compute binds built their pipeline on a title thread. They took 3–23 s each, 92.7 s in all, on five threads within 10 s, and the title's hang watchdog ended the run at 125 s. - with this, 1 compute bind waited, for 2 ms. - Testers' reports in this thread: - RTX 4080, 5070 Ti, 5080, 5090, 3060, 3070 Laptop, 5060 Laptop; RX 9060 XT; RX 7900 XT under Wine. - They agree that the early builds leave the title's threads. - None of them got past the world load: there the title makes and binds new compute pipelines at once. On the 3070 Laptop, the three preload workers were held by `big_compile_turn`. **Regression run** Both with `XCL_COHERENT_MB=4095`, one after the other, with no input, so both stay in the title's menus. main: ``` xcl-smoke v1 commit: 1d027e5c76c9a86a7ee2ca1cc677edf0be95d331 gpu: NVIDIA GeForce RTX 5080 title: 8a66b2b2 seconds: 90 exit: 0x0 frames shown: 2535 (PresentX 2535) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16900 MB ``` PR: ``` xcl-smoke v1 commit: a39c3992c7a45baf73e374616e4e9c718f533887 gpu: NVIDIA GeForce RTX 5080 title: 8a66b2b2 seconds: 90 exit: 0x0 frames shown: 2512 (PresentX 2512) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 17943 MB ``` **Not tested** - AMD and Intel GPUs myself (see the testers' reports above); other titles. - A run that gets through the world load: this is one part of #505, not all of it. - Memory cost: - Compute pipelines built ahead stay in the driver. Commit went up 1 GB in the regression run, and 2.3 GB at the world load in an RTX 4080 report. - Under Wine/RADV, @frozht measured 7–10 GB more host memory over 10 minutes. - `XCL_PRELOAD_COMPUTE=0` turns the build-ahead off. There is no byte or count budget: the size is only known after DXC. - A run with `XCL_PRELOAD_COMPUTE=0` on the retail title: the switch is covered by its test only. **AI use** - Claude Code with Claude Opus 5.5: found the cause (profiling the title's threads and the counter on `resolve_wait`), wrote the change and the tests, ran the tests and the runs, and wrote this description. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Xeltax commented 2026-11-24 09:07:09 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Xeltax on 2026-11-24T08:44:56Z.


NVIDIA test report for e1d3b9d (this PR's head, merged without conflicts onto main 077ce40), the retail title of #505.

Tested

  • NVIDIA GeForce RTX 4080 16 GB (driver 621.01, 32-lane waves); Ryzen 9 9900X; 32 GB RAM, 59 GB commit limit; Windows 11 Pro 26200; rustc 1.100.0; DXC 1.9.2609.5; release builds.
  • One run each, same session, warm DXIL and driver-blob caches from earlier runs of the day:
    • XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_RUN_SECONDS=240
    • A pressed through XCL_PRESS_AT every 4 s from 20 s (first-run setup already done)
main 077ce40 077ce40 + this PR
first ListX #101 call 66.1 s 76.8 s
last 2 s window with presents 80.0 s 78.0 s
ends with +0x23cf683 at 109.4 s +0x23cf683 at 107.5 s
peak commit 30 378 MB 32 677 MB
compute PSOs built on title threads after 60 s 146 builds, 14.6 s in all 125 builds, 1.9 s in all
compute PSOs built by xcl-pso-pre-* after 60 s 5 builds, 202.6 s in all 8 builds, 59.2 s in all
  • The PR does what it says on this card: the compute builds' time on the title's threads drops from 14.6 s to 1.9 s. The stall and the abort do not move.
  • One preload build took a worker for a long time: 786 056 B of DXIL, 56 469 ms in the driver, on xcl-pso-pre-0, done at 61 s.
  • At the abort (XCL's crash-time dump, frames resolved with the build's PDB), one title thread is still waiting inside XCL for a build on another thread: game+0x248d19f → bind::execute_indirect (bind.rs:238) → pso_async::resolve_wait (pso_async.rs:387) → Condvar::wait. This looks like the wait emusynths saw in #505 with #533 (resolve_for_indirect, graphics branch). This PR leaves graphics pipelines lazy.

Not tested

  • More than one run per build, a cold cache, AMD.
  • The test suite on this merge.
  • Which pipeline that execute_indirect wait was for. XCL logs a build only when it ends.

AI use

  • Claude Code (Claude Opus 5.5) ran the builds and the title on my machine, read the logs, resolved the frames and wrote this report.
<!-- greyfinch-sync:ivall/xcl:comment:7126513624 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/889#issuecomment-7126513624). Originally posted by [Xeltax](https://github.com/Xeltax) on 2026-11-24T08:44:56Z. --- NVIDIA test report for `e1d3b9d` (this PR's head, merged without conflicts onto `main` `077ce40`), the retail title of #505. **Tested** - NVIDIA GeForce RTX 4080 16 GB (driver 621.01, 32-lane waves); Ryzen 9 9900X; 32 GB RAM, 59 GB commit limit; Windows 11 Pro 26200; rustc 1.100.0; DXC 1.9.2609.5; release builds. - One run each, same session, warm DXIL and driver-blob caches from earlier runs of the day: - `XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_RUN_SECONDS=240` - A pressed through `XCL_PRESS_AT` every 4 s from 20 s (first-run setup already done) | | `main` `077ce40` | `077ce40` + this PR | |---|---|---| | first `ListX #101` call | 66.1 s | 76.8 s | | last 2 s window with presents | 80.0 s | 78.0 s | | ends with | `+0x23cf683` at 109.4 s | `+0x23cf683` at 107.5 s | | peak commit | 30 378 MB | 32 677 MB | | compute PSOs built on title threads after 60 s | 146 builds, 14.6 s in all | 125 builds, **1.9 s** in all | | compute PSOs built by `xcl-pso-pre-*` after 60 s | 5 builds, 202.6 s in all | 8 builds, 59.2 s in all | - The PR does what it says on this card: the compute builds' time on the title's threads drops from 14.6 s to 1.9 s. The stall and the abort do not move. - One preload build took a worker for a long time: 786 056 B of DXIL, 56 469 ms in the driver, on `xcl-pso-pre-0`, done at 61 s. - At the abort (XCL's crash-time dump, frames resolved with the build's PDB), one title thread is still waiting inside XCL for a build on another thread: `game+0x248d19f` → `bind::execute_indirect` (`bind.rs:238`) → `pso_async::resolve_wait` (`pso_async.rs:387`) → `Condvar::wait`. This looks like the wait `emusynths` saw in #505 with #533 (`resolve_for_indirect`, graphics branch). This PR leaves graphics pipelines lazy. **Not tested** - More than one run per build, a cold cache, AMD. - The test suite on this merge. - Which pipeline that `execute_indirect` wait was for. XCL logs a build only when it ends. **AI use** - Claude Code (Claude Opus 5.5) ran the builds and the title on my machine, read the logs, resolved the frames and wrote this report.
isaacwingate commented 2026-11-24 09:07:09 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by isaacwingate on 2026-11-24T08:46:01Z.


Thanks both – this matches what I see on an RTX 5080: #889 takes the pipelines made early off the title's threads, and the world load still stalls on pipelines the title makes and binds at once.

@Xeltax the wait at the abort, bind::execute_indirect → resolve_wait, is for a graphics pipeline: draws and ExecuteIndirect wait for graphics builds, although pso_async means graphics pipelines to go on with their stand-in. I have a separate change that lets them (compute is still waited for); on my machine it took the graphics waits during the world load from 25 (33 s in all) to 0. I'll open it as its own PR.

The commit going up (30.4 → 32.7 GB) fits the compute pipelines built ahead staying in the driver; I'll add it to the description.

<!-- greyfinch-sync:ivall/xcl:comment:7126536654 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/889#issuecomment-7126536654). Originally posted by [isaacwingate](https://github.com/isaacwingate) on 2026-11-24T08:46:01Z. --- Thanks both – this matches what I see on an RTX 5080: #889 takes the pipelines made early off the title's threads, and the world load still stalls on pipelines the title makes and binds at once. @Xeltax the wait at the abort, `bind::execute_indirect` → `resolve_wait`, is for a graphics pipeline: draws and ExecuteIndirect wait for graphics builds, although `pso_async` means graphics pipelines to go on with their stand-in. I have a separate change that lets them (compute is still waited for); on my machine it took the graphics waits during the world load from 25 (33 s in all) to 0. I'll open it as its own PR. The commit going up (30.4 → 32.7 GB) fits the compute pipelines built ahead staying in the driver; I'll add it to the description.
emirduran707 commented 2026-11-24 09:07:10 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by emirduran707 on 2026-11-24T08:31:31Z.


AMD RDNA4 test report for e1d3b9d (this PR's head, on main 1ec4c98).

Correction: an earlier version of this comment described a retail-title run as made with this PR. My run script pointed at a main build (d5442d2), so that run did not test this PR. I removed it. The run below is with this PR's build (xcl.exe built from e1d3b9d in its own worktree; I checked the path before launching).

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4, wave64), driver 32.0.31044.16; Ryzen 5 5600, 32 GB; Windows 11 Pro 26300; rustc 1.100.0 x86_64-pc-windows-msvc; DXC 1.9.2602.17; debug for the suite, release for the run.
  • cargo test --workspace -- --test-threads=4 on e1d3b9d: 716 passed, 0 failed, 41 ignored; no SKIPPED lines. a_compute_pipeline_is_built_ahead_of_its_first_bind passes.
  • Retail title of #505: one run, XCL_NETWORK=0 XCL_ACTIVITY=1, menus by hand to world loading, then no input.
    • In practice the caches were cold for this build. main changed the recompiler between d5442d2, which my DXIL cache and driver blobs came from, and 1ec4c98 (#798 and others). So no translated program matched, and 0 driver blobs were reused.

What the log shows:

  • Built ahead (this PR): the preload workers xcl-pso-pre-0/1 built 512 pipelines ahead of their first use.
    • They made 21 of the run's 25 compute builds that took ≥ 1 s in the driver: 43–829 KB of DXIL, 1.1–18.1 s each, between 5 s and 116 s.
    • These ran while I was in the menus, and the title kept presenting 57–61 frames per 2 s throughout.
    • On main, builds like these ran on the title's threads at their bind (see my runs in #505).
  • World loading (presents drop from ~116 s): the other 4 long builds ran on title threads (70–100 KB, 1.2–3.9 s, at 142–172 s). Presents fell to 0–19 per 2 s.
  • No presents from 172 s; the title's watchdog ends it at 197.7 s (+0x23cf683).
    • At that point three title threads wait in SetPipelineState → pso_async::resolve_wait (bind.rs:710 → pso_async.rs:387/398), and one thread is inside amdxc64.dll, the driver's compiler.
    • Both preload workers were idle.

So on AMD, with cold caches, this PR moves most of the long driver builds off the title's threads and into the menu time. What is left is the pipelines the title makes during loading: they are still built at their bind, and one of them was still being built when the watchdog fired.

Not tested: more than one run; the same build with warm caches; with #533 / #891; NVIDIA.

Tested and written with Claude Code (Claude Opus 5.5). The runs were made on my machine.

<!-- greyfinch-sync:ivall/xcl:comment:7126240349 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/889#issuecomment-7126240349). Originally posted by [emirduran707](https://github.com/emirduran707) on 2026-11-24T08:31:31Z. --- AMD RDNA4 test report for e1d3b9d (this PR's head, on `main` 1ec4c98). **Correction:** an earlier version of this comment described a retail-title run as made with this PR. My run script pointed at a `main` build (d5442d2), so that run did not test this PR. I removed it. The run below is with this PR's build (`xcl.exe` built from e1d3b9d in its own worktree; I checked the path before launching). **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4, wave64), driver 32.0.31044.16; Ryzen 5 5600, 32 GB; Windows 11 Pro 26300; rustc 1.100.0 `x86_64-pc-windows-msvc`; DXC 1.9.2602.17; debug for the suite, release for the run. - `cargo test --workspace -- --test-threads=4` on e1d3b9d: 716 passed, 0 failed, 41 ignored; no `SKIPPED` lines. `a_compute_pipeline_is_built_ahead_of_its_first_bind` passes. - **Retail title of #505:** one run, `XCL_NETWORK=0 XCL_ACTIVITY=1`, menus by hand to world loading, then no input. - In practice the caches were cold for this build. `main` changed the recompiler between d5442d2, which my DXIL cache and driver blobs came from, and 1ec4c98 (#798 and others). So no translated program matched, and 0 driver blobs were reused. What the log shows: - **Built ahead (this PR):** the preload workers `xcl-pso-pre-0/1` built 512 pipelines ahead of their first use. - They made **21 of the run's 25 compute builds that took ≥ 1 s in the driver**: 43–829 KB of DXIL, 1.1–18.1 s each, between 5 s and 116 s. - These ran while I was in the menus, and the title kept presenting 57–61 frames per 2 s throughout. - On `main`, builds like these ran on the title's threads at their bind (see my runs in #505). - **World loading (presents drop from ~116 s):** the other 4 long builds ran on title threads (70–100 KB, 1.2–3.9 s, at 142–172 s). Presents fell to 0–19 per 2 s. - **No presents from 172 s; the title's watchdog ends it at 197.7 s** (`+0x23cf683`). - At that point three title threads wait in `SetPipelineState` → `pso_async::resolve_wait` (`bind.rs:710` → `pso_async.rs:387/398`), and one thread is inside `amdxc64.dll`, the driver's compiler. - Both preload workers were idle. So on AMD, with cold caches, this PR moves most of the long driver builds off the title's threads and into the menu time. What is left is the pipelines the title makes during loading: they are still built at their bind, and one of them was still being built when the watchdog fired. **Not tested:** more than one run; the same build with warm caches; with #533 / #891; NVIDIA. Tested and written with Claude Code (Claude Opus 5.5). The runs were made on my machine.
IvyNotFound commented 2026-11-24 10:04:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by IvyNotFound on 2026-11-24T09:19:53Z.


Second RTX 5080, same driver: with this PR the title still ends in "GPU Loc Sig", at 96 s; two compute builds take 21 s and 32 s on the workers

Update: the same run with #899's wait log applied on top (e1d3b9d + c3d5429's diff, uncommitted): binds do wait, from 63 s on, mostly building the pipeline themselves

  • Up to 60 s: 6 compute binds found their pipeline not built, 13 ms in all (longest 4 ms).
  • At 63.4–63.6 s the count goes from 9 to 64 compute waits in 0.2 s, 44 of them "built in the call", i.e. no worker had taken them yet.
  • Then 15 compute waits of a second or more on four threads between 66 and 93 s, 98.3 s in all: 2.1–7.7 s each up to 78 s, then 15.5, 13.8, 14.3 and 13.1 s; all "built in the call". Two graphics binds waited for a worker for 2.9 s and 8.8 s.
  • Meanwhile two other threads were in the biggest builds: 994 KB of DXIL in 47.7 s (done at 52.7 s) and 606 KB in 63.4 s (done at 68.8 s).
  • Presents stop at 64 s, the abort is at 93.5 s (+0x23cf683), as in the run below.

My reading: on this machine the build-ahead does not reach these pipelines in time; the title binds them in one burst at 63 s, before a worker has started them, and the binds build them on its threads. Whether the workers were held up by the 48 s and 63 s builds I cannot tell from the log. One run.


Setup: NVIDIA GeForce RTX 5080 16 GB, driver 621.24 (32.0.16.2124); Ryzen 7 7800X3D; Windows 11 25H2 (26200.9974); rustc 1.100.0 MSVC, release; DXC 1.9.2602.17. scripts/smoke.ps1 -Seconds 300 (XCL_NETWORK=0, XCL_ACTIVITY=1), A pressed by hand at the title screen. PR head e1d3b9d as it is (base 1ec4c98), warm DXIL and driver-blob caches from earlier runs.

build last present ends skipped draws / dispatches peak commit
main 09940bb, warm cache 62 s +0x23cf683 ("GPU Loc Sig") at 90 s 0 / 0 28943 MB
#891 8cada26, XCL_PSO_WAIT_MS=50 116 s +0x23cf683 at 145 s 2048 / 8474 28923 MB
this PR e1d3b9d 68 s +0x23cf683 at 96 s 0 / 0 29632 MB
  • The build-ahead works: the pipelines of 1109 shader sets of earlier runs were queued at 2 s and over 1024 were built by 20.4 s (the counter logs powers of two only), and 128 compute pipelines were built on 9 threads in all (118.7 s of builds).
  • The slow ones: 809 KB of DXIL in 21.4 s (done at 38.1 s), 354 KB in 31.7 s (done at 54.5 s), 409 KB in 6.5 s (73.0 s), then 2.2 to 3.6 s each up to 94.6 s. Presents stop at 68 s and the abort follows at 96 s, as on main.
  • I did not have the resolve_wait counter from your runs, so I cannot say whether a bind waited for one of these builds or for something else. No Wait64BitValueX timeout in this run, no device removal.
  • Your run on the same GPU and driver got past the watchdog to #585 at 137 s; here it did not. Differences I know of: CPU (7800X3D, 8 cores, against your i9-12900K), and base (main 09940bb for my main row, the PR's own base for the PR run).

Not tested

  • with #631; a cold driver-blob cache; several runs of each build (one run each)

AI use

  • Claude Code, Claude Opus 5.5: ran the builds and the run, read the log and wrote this report. The numbers come from that run.
<!-- greyfinch-sync:ivall/xcl:comment:7127265155 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/889#issuecomment-7127265155). Originally posted by [IvyNotFound](https://github.com/IvyNotFound) on 2026-11-24T09:19:53Z. --- **Second RTX 5080, same driver: with this PR the title still ends in "GPU Loc Sig", at 96 s; two compute builds take 21 s and 32 s on the workers** **Update: the same run with #899's wait log applied on top (`e1d3b9d` + `c3d5429`'s diff, uncommitted): binds do wait, from 63 s on, mostly building the pipeline themselves** - Up to 60 s: 6 compute binds found their pipeline not built, 13 ms in all (longest 4 ms). - At 63.4–63.6 s the count goes from 9 to 64 compute waits in 0.2 s, 44 of them "built in the call", i.e. no worker had taken them yet. - Then 15 compute waits of a second or more on four threads between 66 and 93 s, 98.3 s in all: 2.1–7.7 s each up to 78 s, then 15.5, 13.8, 14.3 and 13.1 s; all "built in the call". Two graphics binds waited for a worker for 2.9 s and 8.8 s. - Meanwhile two other threads were in the biggest builds: 994 KB of DXIL in 47.7 s (done at 52.7 s) and 606 KB in 63.4 s (done at 68.8 s). - Presents stop at 64 s, the abort is at 93.5 s (`+0x23cf683`), as in the run below. My reading: on this machine the build-ahead does not reach these pipelines in time; the title binds them in one burst at 63 s, before a worker has started them, and the binds build them on its threads. Whether the workers were held up by the 48 s and 63 s builds I cannot tell from the log. One run. --- **Setup:** NVIDIA GeForce RTX 5080 16 GB, driver 621.24 (32.0.16.2124); Ryzen 7 7800X3D; Windows 11 25H2 (26200.9974); rustc 1.100.0 MSVC, release; DXC 1.9.2602.17. `scripts/smoke.ps1 -Seconds 300` (`XCL_NETWORK=0`, `XCL_ACTIVITY=1`), A pressed by hand at the title screen. PR head `e1d3b9d` as it is (base `1ec4c98`), warm DXIL and driver-blob caches from earlier runs. | build | last present | ends | skipped draws / dispatches | peak commit | |---|---|---|---|---| | `main` `09940bb`, warm cache | 62 s | `+0x23cf683` ("GPU Loc Sig") at 90 s | 0 / 0 | 28943 MB | | #891 `8cada26`, `XCL_PSO_WAIT_MS=50` | 116 s | `+0x23cf683` at 145 s | 2048 / 8474 | 28923 MB | | this PR `e1d3b9d` | 68 s | `+0x23cf683` at 96 s | 0 / 0 | 29632 MB | - The build-ahead works: the pipelines of 1109 shader sets of earlier runs were queued at 2 s and over 1024 were built by 20.4 s (the counter logs powers of two only), and 128 compute pipelines were built on 9 threads in all (118.7 s of builds). - The slow ones: 809 KB of DXIL in 21.4 s (done at 38.1 s), 354 KB in 31.7 s (done at 54.5 s), 409 KB in 6.5 s (73.0 s), then 2.2 to 3.6 s each up to 94.6 s. Presents stop at 68 s and the abort follows at 96 s, as on `main`. - I did not have the `resolve_wait` counter from your runs, so I cannot say whether a bind waited for one of these builds or for something else. No `Wait64BitValueX` timeout in this run, no device removal. - Your run on the same GPU and driver got past the watchdog to #585 at 137 s; here it did not. Differences I know of: CPU (7800X3D, 8 cores, against your i9-12900K), and base (`main` `09940bb` for my `main` row, the PR's own base for the PR run). **Not tested** - with #631; a cold driver-blob cache; several runs of each build (one run each) **AI use** - Claude Code, Claude Opus 5.5: ran the builds and the run, read the log and wrote this report. The numbers come from that run.
frozht commented 2026-11-24 11:05:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by frozht on 2026-11-24T10:23:03Z.


Test report: retail GTA6 under Wine, with a memory cost.

  • Head tested: e1d3b9d, on main 077ce40 plus other open PRs (#684 #891 #551 #455 #681 #609 #674 #628 #688 #567 #501), release build.
  • Hardware: RX 7900 XT, RADV (Mesa 26.2.6), Wine 11.22 Staging, Ryzen 9 5900X, 31 GiB RAM. Each run had a 22 GB memory cap.
  • What improved: background pipeline builds kept going (950 done at 885 s; without #889 they stop at about 520 from 385 s), and only 3 pipelines were late at their bind.
  • The memory cost: resident memory was 17.5 GB at 600 s and 21.1 GB at 720 s. The same stack without #889 used 9.5 GB at both times, and video memory was the same in both runs. So the extra 7-10 GB is on the host, probably the driver's copies of the 498 compute pipelines built ahead of time; I have not proven that. The 22 GB cap ended the game at about 930 s.
  • XCL_PSO_PRELOAD=0 is no workaround: preload() then returns None, which also turns off the earlier run's preload from #690.
  • Suggestion: cap how many compute pipelines are preloaded (a budget in bytes or in count), or let them be turned off on their own.
  • Not tested: Windows, NVIDIA.
  • Report written with Claude Code (Claude Opus 5.5) from our runs' logs.
<!-- greyfinch-sync:ivall/xcl:comment:7128703263 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/889#issuecomment-7128703263). Originally posted by [frozht](https://github.com/frozht) on 2026-11-24T10:23:03Z. --- Test report: retail GTA6 under Wine, with a memory cost. - Head tested: e1d3b9d, on main 077ce40 plus other open PRs (#684 #891 #551 #455 #681 #609 #674 #628 #688 #567 #501), release build. - Hardware: RX 7900 XT, RADV (Mesa 26.2.6), Wine 11.22 Staging, Ryzen 9 5900X, 31 GiB RAM. Each run had a 22 GB memory cap. - What improved: background pipeline builds kept going (950 done at 885 s; without #889 they stop at about 520 from 385 s), and only 3 pipelines were late at their bind. - The memory cost: resident memory was 17.5 GB at 600 s and 21.1 GB at 720 s. The same stack without #889 used 9.5 GB at both times, and video memory was the same in both runs. So the extra 7-10 GB is on the host, probably the driver's copies of the 498 compute pipelines built ahead of time; I have not proven that. The 22 GB cap ended the game at about 930 s. - `XCL_PSO_PRELOAD=0` is no workaround: `preload()` then returns `None`, which also turns off the earlier run's preload from #690. - Suggestion: cap how many compute pipelines are preloaded (a budget in bytes or in count), or let them be turned off on their own. - Not tested: Windows, NVIDIA. - Report written with Claude Code (Claude Opus 5.5) from our runs' logs.
SlopTart commented 2026-11-24 11:05:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-24T10:37:17Z.


Linux / AMD RDNA3 datapoint.

Merged state: head e1d3b9d onto main 6efdabc, clean merge.

Full suite, cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 721 passed, 7 failed, 41 ignored; failures are the known Wine-lane set from my #42 rows. build-ahead-of-bind compute pipeline tests green (late rerun of the PR dropped from an earlier sweep list).

Not tested: retail titles (none here), Windows, RDNA4.
Counts only, no game data.

Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross x86_64-pc-windows-gnu, XCL_NETWORK=0, release profile, --test-threads=4. My Linux rows: #42 / #718.

AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7129023405 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/889#issuecomment-7129023405). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-24T10:37:17Z. --- Linux / AMD RDNA3 datapoint. **Merged state:** head `e1d3b9d` onto main `6efdabc`, clean merge. **Full suite, `cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4`:** **721 passed, 7 failed, 41 ignored**; failures are the known Wine-lane set from my #42 rows. build-ahead-of-bind compute pipeline tests green (late rerun of the PR dropped from an earlier sweep list). **Not tested:** retail titles (none here), Windows, RDNA4. Counts only, no game data. **Machine:** RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross `x86_64-pc-windows-gnu`, `XCL_NETWORK=0`, release profile, `--test-threads=4`. My Linux rows: #42 / #718. AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
Filip722 commented 2026-11-24 13:03:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Filip722 on 2026-11-24T12:41:00Z.


I tested e1d3b9d on an RTX 5060 Laptop GPU (8 GB, NVIDIA 615.78.08), Intel Core 7 240H and 16 GB RAM, Bazzite 44 and Proton Experimental 11.0-20261112. The private test stack was main 47efa2e plus #640/#782/#793/#820/#1123, vkd3d-proton v3.1 with #257 and dxil-spirv 1dc543f, and the nonlocal texture-pool experiment from #175. Both runs used the same prefix and driver cache, temporary NVMe swap and XCL_PSO_WAIT_MS=5000.

Adding this PR gave 2,444 sampled presents and 80,736 DirectStorage executions with zero storage failures. The last pipeline checkpoint recorded 21,185 draws and 4,096 dispatches with zero skips. The title still exited at its watchdog-associated exception site after 14 consecutive two-second samples without a present. The comparison run reached 2,207 sampled presents and the same exception. This is one pair of sequential Wine runs. I did not isolate the effect of the progressively warmed cache.

OpenAI Codex with GPT-6.2-Sol high assisted with the build, tests and report.

<!-- greyfinch-sync:ivall/xcl:comment:7131776440 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/889#issuecomment-7131776440). Originally posted by [Filip722](https://github.com/Filip722) on 2026-11-24T12:41:00Z. --- I tested `e1d3b9d` on an RTX 5060 Laptop GPU (8 GB, NVIDIA 615.78.08), Intel Core 7 240H and 16 GB RAM, Bazzite 44 and Proton Experimental `11.0-20261112`. The private test stack was main `47efa2e` plus #640/#782/#793/#820/#1123, vkd3d-proton v3.1 with #257 and dxil-spirv `1dc543f`, and the nonlocal texture-pool experiment from #175. Both runs used the same prefix and driver cache, temporary NVMe swap and `XCL_PSO_WAIT_MS=5000`. Adding this PR gave 2,444 sampled presents and 80,736 DirectStorage executions with zero storage failures. The last pipeline checkpoint recorded 21,185 draws and 4,096 dispatches with zero skips. The title still exited at its watchdog-associated exception site after 14 consecutive two-second samples without a present. The comparison run reached 2,207 sampled presents and the same exception. This is one pair of sequential Wine runs. I did not isolate the effect of the progressively warmed cache. OpenAI Codex with GPT-6.2-Sol high assisted with the build, tests and report.
Kalmarv commented 2026-11-24 19:07:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Kalmarv on 2026-11-24T18:44:39Z.


Test report for #889 at e1d3b9d, merged on main b7aa9f3 (local merge 44097dc), against b7aa9f3 alone. The title is the newer retail one, at its world load; one run each.

Tested

  • RTX 5070 Ti 16 GB (driver 610.74), Ryzen 9 9950X (16 cores, 32 threads), 31 GB RAM (57 GB commit limit), Windows 11 Pro 26200, rustc 1.99.0, release, DXC 1.7.2308 (the Windows SDK's).
  • scripts/smoke.ps1, 300 s, XCL_NETWORK=0, A presses at 14/17/21 s and every 6 s from 125 s, no XCL_PSO_WAIT_MS.
  • Each run had its own new, empty XCL_DXIL_CACHE: no DXIL, no translations, no used-pipelines.txt, no XCL driver blobs.
  • The NVIDIA driver's own shader cache (%USERPROFILE%\AppData\LocalLow\NVIDIA\DXCache) is shared and was not cleared. Programs that earlier runs had built came out of it in milliseconds (see the reading).
b7aa9f3 + #889
first #101 64.1 s 170.6 s
last 2 s window with a present 68.0 s 184.2 s
end null write at game+0x23cf683 (the title's watchdog), 96.4 s the same, 212.9 s
compute pipelines built before #101 9 on the title's threads 213 by the preload workers (188 s in the driver, 24 of them ≥ 1 s), 6 on the title's threads
after #101 94 on the title's threads, 0.6 s in the driver 97 on the title's threads (0.6 s), 12 by the preload workers (23.9 s)
DXIL built, in all 7.8 MB 30.8 MB
peak commit 28.5 GB 28.9 GB

No device removal in either run.

Read

  • #889 does what it says: the preload built 213 compute pipelines that no bind had asked for, before the world loaded.
  • It did not get the title past its watchdog here.
    • In the thread dump at the end, four of the title's threads wait in resolve_wait (pso_async.rs:520, from bind::execute_indirect).
    • All four xcl-pso-pre workers and one title thread are in dxc::compile.
    • 26 of the 31 xcl-dxc workers are idle.
  • So, with a cold DXIL cache, what the title waits for is DXC. Each preload worker translates, compiles and builds one pipeline at a time. At ~1.3 pipelines a second, all of the title's ~2 700 compute programs would take ~35 min.
  • b7aa9f3's run without #889 shows the same thing. Its builds after #101 took 0.6 s in the driver in all, because the NVIDIA driver's own shader cache served them. At the end, four of its threads were in dxc::compile.
  • The late #101 is not #889 by itself. In the run of #889 + #1288 (reported on #1288), the title took the 14 s press and reached #101 at 68.3 s. Here the title screen came after the 14/17/21 s presses, and the run went on only at the 125 s presses. The preload was building in the driver at that time (188 s before #101), and that may have slowed the start; one run does not tell.

Not tested

  • More than one run each.
  • A warm DXIL cache with #889.
  • AMD.
  • DXC 1.9.
  • A cleared NVIDIA driver cache: it was warm for the programs earlier runs had built.

AI use

  • Claude Code (Claude Opus 5.5) built the binaries, ran the runs on this PC, read the logs and thread dumps and wrote this report.
<!-- greyfinch-sync:ivall/xcl:comment:7141089514 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/889#issuecomment-7141089514). Originally posted by [Kalmarv](https://github.com/Kalmarv) on 2026-11-24T18:44:39Z. --- Test report for #889 at `e1d3b9d`, merged on `main` `b7aa9f3` (local merge `44097dc`), against `b7aa9f3` alone. The title is the newer retail one, at its world load; one run each. **Tested** - RTX 5070 Ti 16 GB (driver 610.74), Ryzen 9 9950X (16 cores, 32 threads), 31 GB RAM (57 GB commit limit), Windows 11 Pro 26200, rustc 1.99.0, release, DXC 1.7.2308 (the Windows SDK's). - `scripts/smoke.ps1`, 300 s, `XCL_NETWORK=0`, A presses at 14/17/21 s and every 6 s from 125 s, no `XCL_PSO_WAIT_MS`. - Each run had its own new, empty `XCL_DXIL_CACHE`: no DXIL, no translations, no `used-pipelines.txt`, no XCL driver blobs. - The NVIDIA driver's own shader cache (`%USERPROFILE%\AppData\LocalLow\NVIDIA\DXCache`) is shared and was not cleared. Programs that earlier runs had built came out of it in milliseconds (see the reading). | | `b7aa9f3` | + #889 | |---|---|---| | first `#101` | 64.1 s | 170.6 s | | last 2 s window with a present | 68.0 s | 184.2 s | | end | null write at `game+0x23cf683` (the title's watchdog), 96.4 s | the same, 212.9 s | | compute pipelines built before `#101` | 9 on the title's threads | 213 by the preload workers (188 s in the driver, 24 of them ≥ 1 s), 6 on the title's threads | | after `#101` | 94 on the title's threads, 0.6 s in the driver | 97 on the title's threads (0.6 s), 12 by the preload workers (23.9 s) | | DXIL built, in all | 7.8 MB | 30.8 MB | | peak commit | 28.5 GB | 28.9 GB | No device removal in either run. **Read** - #889 does what it says: the preload built 213 compute pipelines that no bind had asked for, before the world loaded. - It did not get the title past its watchdog here. - In the thread dump at the end, four of the title's threads wait in `resolve_wait` (`pso_async.rs:520`, from `bind::execute_indirect`). - All four `xcl-pso-pre` workers and one title thread are in `dxc::compile`. - 26 of the 31 `xcl-dxc` workers are idle. - So, with a cold DXIL cache, what the title waits for is DXC. Each preload worker translates, compiles and builds one pipeline at a time. At ~1.3 pipelines a second, all of the title's ~2 700 compute programs would take ~35 min. - `b7aa9f3`'s run without #889 shows the same thing. Its builds after `#101` took 0.6 s in the driver in all, because the NVIDIA driver's own shader cache served them. At the end, four of its threads were in `dxc::compile`. - The late `#101` is not #889 by itself. In the run of #889 + #1288 (reported on #1288), the title took the 14 s press and reached `#101` at 68.3 s. Here the title screen came after the 14/17/21 s presses, and the run went on only at the 125 s presses. The preload was building in the driver at that time (188 s before `#101`), and that may have slowed the start; one run does not tell. **Not tested** - More than one run each. - A warm DXIL cache with #889. - AMD. - DXC 1.9. - A cleared NVIDIA driver cache: it was warm for the programs earlier runs had built. **AI use** - Claude Code (Claude Opus 5.5) built the binaries, ran the runs on this PC, read the logs and thread dumps and wrote this report.
pvfreis commented 2026-11-24 21:30:02 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by pvfreis on 2026-11-24T21:21:26Z.


Test report for e1d3b9d (this PR's head) merged onto main 4178e88 (git auto-merged pso_async.rs, no conflict), on an RTX 3060 with XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1. @Anon64 reported on #1269 that on main with these two the title waits on compute builds one after another and suggested parallel builds. This PR does that; in these runs the title's last present came no later (94 s and 92 s, main 96 s). (Edited: see the correction under the table.)

Tested

  • RTX 3060 12 GB (driver 617.14), Ryzen 9 5900XT, 32 GB, Windows 11 26H2 (10.0.26300), Rust 1.100.0, release for the runs, XCL_PSO_PRELOAD on
  • cargo test --workspace --locked --offline --no-fail-fast -- --test-threads=4 on the merge (debug, session-0 sandbox): 891 passed, 1 failed, 42 ignored. The failure is the e2e presents test, which cannot pass there (no display). SKIPPED: the two wave64 tests and heap_window_out_of_memory_falls_back_to_the_switch_form
  • Retail title, XCL_NETWORK=0, A pressed every 4 s from 20 s; one run per column, cold runs each from an empty XCL_DXIL_CACHE, the warm run on the cold PR run's folder:
main, 300 s this PR, 300 s this PR, warm, 600 s
last 2 s window with a present 96 s 94 s 92 s
crash, device removal none none none
compute builds logged 423 620 875
of which in the first 60 s 3 209 227
their driver time 280 s 416 s 1071 s
builds at once after 95 s 1 or 2 1 or 2 mostly 2
builds of 5 s or more 15 23 60
driver time in programs of 512 KB to 1 MB of DXIL 202 s (13 builds) 255 s (28) 891 s (90)
builds from the driver's blob 2 2 83
  • Correction: the NVIDIA driver's shader cache was not cleared: an earlier main run had partly filled it, and it carried over in column order. The rows from "compute builds logged" down don't compare between columns. Of programs of 256 KB or more (the log names the record only for those), 56 built in the first two columns (same record and size, no XCL blob) took 230.9 s and 3.0 s; 33 that took 1.7 s in main took 342.8 s in that earlier main run. That it is the driver's cache is inferred.
  • direct DXIL fallback: 0 in all three runs.

Not tested

  • an emptied driver cache; more than one run per column; AMD; #1798; a run that reaches gameplay (none did); main after 4178e88 (#1321, #1745, #1791)

Run and written with Claude Code (Claude Opus 5.5) on the hardware above; the tests ran in a separate sandbox user, the title runs on the desktop. Numbers checked by a second agent (Claude Sonnet 5.5) against the logs. The correction's numbers were recomputed from the logs by another agent (Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7144821718 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/889#issuecomment-7144821718). Originally posted by [pvfreis](https://github.com/pvfreis) on 2026-11-24T21:21:26Z. --- Test report for `e1d3b9d` (this PR's head) merged onto `main` `4178e88` (git auto-merged `pso_async.rs`, no conflict), on an RTX 3060 with `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1`. @Anon64 reported on #1269 that on `main` with these two the title waits on compute builds one after another and suggested parallel builds. This PR does that; in these runs the title's last present came no later (94 s and 92 s, `main` 96 s). (Edited: see the correction under the table.) **Tested** - RTX 3060 12 GB (driver 617.14), Ryzen 9 5900XT, 32 GB, Windows 11 26H2 (10.0.26300), Rust 1.100.0, release for the runs, `XCL_PSO_PRELOAD` on - `cargo test --workspace --locked --offline --no-fail-fast -- --test-threads=4` on the merge (debug, session-0 sandbox): 891 passed, 1 failed, 42 ignored. The failure is the e2e `presents` test, which cannot pass there (no display). SKIPPED: the two wave64 tests and `heap_window_out_of_memory_falls_back_to_the_switch_form` - Retail title, `XCL_NETWORK=0`, A pressed every 4 s from 20 s; one run per column, cold runs each from an empty `XCL_DXIL_CACHE`, the warm run on the cold PR run's folder: | | `main`, 300 s | this PR, 300 s | this PR, warm, 600 s | |---|---|---|---| | last 2 s window with a present | 96 s | 94 s | 92 s | | crash, device removal | none | none | none | | compute builds logged | 423 | 620 | 875 | | of which in the first 60 s | 3 | 209 | 227 | | their driver time | 280 s | 416 s | 1071 s | | builds at once after 95 s | 1 or 2 | 1 or 2 | mostly 2 | | builds of 5 s or more | 15 | 23 | 60 | | driver time in programs of 512 KB to 1 MB of DXIL | 202 s (13 builds) | 255 s (28) | 891 s (90) | | builds from the driver's blob | 2 | 2 | 83 | - **Correction:** the NVIDIA driver's shader cache was not cleared: an earlier `main` run had partly filled it, and it carried over in column order. The rows from "compute builds logged" down don't compare between columns. Of programs of 256 KB or more (the log names the record only for those), 56 built in the first two columns (same record and size, no XCL blob) took 230.9 s and 3.0 s; 33 that took 1.7 s in `main` took 342.8 s in that earlier `main` run. That it is the driver's cache is inferred. - `direct DXIL fallback`: 0 in all three runs. **Not tested** - an emptied driver cache; more than one run per column; AMD; #1798; a run that reaches gameplay (none did); `main` after `4178e88` (#1321, #1745, #1791) Run and written with Claude Code (Claude Opus 5.5) on the hardware above; the tests ran in a separate sandbox user, the title runs on the desktop. Numbers checked by a second agent (Claude Sonnet 5.5) against the logs. The correction's numbers were recomputed from the logs by another agent (Claude Opus 5.5).
JRamos1993 commented 2026-11-24 22:06:51 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JRamos1993 on 2026-11-24T21:48:17Z.


Test report for e1d3b9d on an RTX 5090, four runs back to back with warm caches: the world-load stop stays. In the dumps, the stall is still title threads building compute pipelines in their binds, for programs the preload has not reached yet.

Setup: RTX 5090 32 GB (driver 621.24), i9-14900KF, 64 GB RAM, Windows 11 Pro 26200, rustc 1.97.1 x86_64-pc-windows-msvc, release. This PR merged onto main c160d86 (clean merge). Retail 1.0.2.1, setup done in earlier runs. Each run: XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PRESS_AT=25:A, 300 s cap. The DXIL and driver-blob caches were warm from earlier c160d86 runs, and each run adds its own blobs.

run compute PSOs: from disk / built last presents stop at +0x23cf683 builds of 1 s or more that ended after the last presents −10 s
1 339 / 133 80 s 109.2 s 1 (10.9 s)
2 344 / 167 84 s 113.1 s 1 (17.5 s)
3 343 / 169 86 s 116.0 s 1 (12.1 s)
4 (with dumps) 353 / 172 76 s 105.2 s 1 (13.8 s)
  • Every run logged "1024 pipelines built ahead of their first use" within about 5 s, and 2048 never.
  • In run 4 the title submitted nothing from 78 s until the stop.

Thread dumps in run 4 (XCL_THREAD_DUMP_AT=92,100, plus the one at the stop; XCL frames looked up with the build's xcl.pdb):

  • The thread at +0x43c3d5d waits in all three.
  • At 92 s, one of the ring worker threads #924 describes is in bind::execute_indirect → pso_async::resolve_wait. It got its pipeline at 95.5 s, from disk.
  • An unnamed thread that had logged a 13.8 s build at 89.4 s was, at 92 s, building the next one: build_compute → translated_compute_pso → pso::console_to_dxil_in → dxc::compile, a program not translated yet. At 100 s and at the stop it was in NVIDIA's compiler.
  • Another unnamed thread was in NVIDIA's compiler in all three dumps.
  • Neither of those two builds ended before the stop, so the log never names them.
  • A build job runs on an xcl-pso-* thread, or on the title thread that binds the pipeline. So these are title threads building in their binds: the preload had not started those pipelines.

Reading: with this PR, a thousand or more compute pipelines are ready early, but the ones the world load binds next are still new here. The title builds them one after another in its binds, and each run ends about one of them before the watchdog. So on this machine the stop is still compute builds, now on pipelines the queue has not reached yet. That is probably because the big ones go one at a time at the lowest priority. At this rate, "every compute pipeline built before the world load" would take many more runs. I did not get there.

Not tested: more runs; XCL_BIG_COMPILES (#820) with this PR; XCL_PSO_WAIT_MS.

AI use: Claude Code with Claude Opus 5.5 ran the builds and runs, read the dumps and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7145409904 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/889#issuecomment-7145409904). Originally posted by [JRamos1993](https://github.com/JRamos1993) on 2026-11-24T21:48:17Z. --- **Test report for `e1d3b9d` on an RTX 5090, four runs back to back with warm caches: the world-load stop stays. In the dumps, the stall is still title threads building compute pipelines in their binds, for programs the preload has not reached yet.** **Setup:** RTX 5090 32 GB (driver 621.24), i9-14900KF, 64 GB RAM, Windows 11 Pro 26200, rustc 1.97.1 `x86_64-pc-windows-msvc`, release. This PR merged onto `main` `c160d86` (clean merge). Retail 1.0.2.1, setup done in earlier runs. Each run: `XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PRESS_AT=25:A`, 300 s cap. The DXIL and driver-blob caches were warm from earlier `c160d86` runs, and each run adds its own blobs. | run | compute PSOs: from disk / built | last presents | stop at `+0x23cf683` | builds of 1 s or more that ended after the last presents −10 s | |---|---|---|---|---| | 1 | 339 / 133 | 80 s | 109.2 s | 1 (10.9 s) | | 2 | 344 / 167 | 84 s | 113.1 s | 1 (17.5 s) | | 3 | 343 / 169 | 86 s | 116.0 s | 1 (12.1 s) | | 4 (with dumps) | 353 / 172 | 76 s | 105.2 s | 1 (13.8 s) | - Every run logged "1024 pipelines built ahead of their first use" within about 5 s, and 2048 never. - In run 4 the title submitted nothing from 78 s until the stop. **Thread dumps in run 4** (`XCL_THREAD_DUMP_AT=92,100`, plus the one at the stop; XCL frames looked up with the build's `xcl.pdb`): - The thread at `+0x43c3d5d` waits in all three. - At 92 s, one of the ring worker threads #924 describes is in `bind::execute_indirect` → `pso_async::resolve_wait`. It got its pipeline at 95.5 s, from disk. - An unnamed thread that had logged a 13.8 s build at 89.4 s was, at 92 s, building the next one: `build_compute` → `translated_compute_pso` → `pso::console_to_dxil_in` → `dxc::compile`, a program not translated yet. At 100 s and at the stop it was in NVIDIA's compiler. - Another unnamed thread was in NVIDIA's compiler in all three dumps. - Neither of those two builds ended before the stop, so the log never names them. - A build job runs on an `xcl-pso-*` thread, or on the title thread that binds the pipeline. So these are title threads building in their binds: the preload had not started those pipelines. **Reading:** with this PR, a thousand or more compute pipelines are ready early, but the ones the world load binds next are still new here. The title builds them one after another in its binds, and each run ends about one of them before the watchdog. So on this machine the stop is still compute builds, now on pipelines the queue has not reached yet. That is probably because the big ones go one at a time at the lowest priority. At this rate, "every compute pipeline built before the world load" would take many more runs. I did not get there. **Not tested:** more runs; `XCL_BIG_COMPILES` (#820) with this PR; `XCL_PSO_WAIT_MS`. AI use: Claude Code with Claude Opus 5.5 ran the builds and runs, read the dumps and wrote this report.
JorgeMJM commented 2026-11-24 22:06:54 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JorgeMJM on 2026-11-24T21:44:01Z.


Test report on an 8 GB laptop card, this PR together with #1316: the build-ahead happens, but on this machine the three preload workers are held by the biggest builds and the title builds the mid-size ones itself, one after another, while the 15 xcl-pso-N workers stay idle.

Tested

  • e1d3b9d (this PR) and #1316's 964f5ed merged locally onto main c4d37be (clean merges; local merge commit 03f98d3), release. RTX 3070 Laptop 8 GB, NVIDIA 621.40, Ryzen 7 5800H (8C/16T), 28 GB RAM, Windows 11 Home 26300.
  • Retail title for 300 s with scripts/smoke.ps1, XCL_THREAD_DUMP_AT=120,200,280, one run:
xcl-smoke v1
commit: 03f98d36cf54a73fbfc219295da636cccec2bd94
gpu: NVIDIA GeForce RTX 3070 Laptop GPU
title: d7b197a1
seconds: 300
exit: 0x0
frames shown: 1501 (PresentX 1501)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 0
peak commit: 33287 MB

The intro video plays; presents stop at 90 s, at the world's loading screen, and do not come back.

Compute pipeline builds after the last frame (84–300 s), from the compute PSO with the translated console CS lines, by the thread that built them:

built by builds
title threads (five unnamed threads) 138
xcl-pso-pre-0 / -1 90
xcl-pso-0 … xcl-pso-14 0

Build times: median 80 ms, p90 1.9 s, max 73 s, 410 s in all.

  • The preload workers are held by the biggest programs. The three slowest are on them and all three went through big_compile_turn: 1 050 616 B of DXIL in 62.8 s after waiting 34.5 s for the turn, 768 548 B in 61.3 s after 62.6 s, 914 984 B in 73.1 s after 60.5 s. The process is at 30–33 GB of commit on 28 GB of RAM here, so the turn is slow to come.
  • Meanwhile one title thread builds mid-size programs itself, in series: 180–260 KB of DXIL, 12–20 s each (e.g. 17.3, 13.7, 19.7, 15.3, 12.5, 18.6, 13.9 s), on the same thread, in the dumps at 120 and 280 s inside nvgpucomp64.dll. Another title thread waits in execute_indirect → resolve_wait in all three dumps.
  • The main workers have nothing to do: at most one xcl-pso-N is in the driver or DXC in each dump; the rest wait on their empty queue.

Suggestion, if you want it: let an idle xcl-pso-N worker take from the preload queue (or at least the pipelines that do not go through big_compile_turn), so the mid-size ones are built in parallel while the big ones keep their one-at-a-time turn. On this machine that is up to 15 threads on the 12–20 s builds instead of the title's one. I can write it as a commit on top of yours if that is useful; I would not open a separate PR for it.

Not tested: this PR without #1316 on this machine, more than one run, a machine with enough RAM that big_compile_turn does not hold (the picture may differ there), whether the world renders once the builds catch up.

AI use: Claude Code (Claude Opus 5.5) ran the run and the thread-dump analysis on my machine and drafted this.

Edit: I tried that suggestion locally and it does not help here, so please don't take it as is. Idle xcl-pso-N workers taking from the preload queue (all but two, at the lowest priority, uncommitted, on top of the same merge; a unit test that holds the preload workers passes with it and fails without it). In a 300 s run on the same machine the last frame was again at 90 s; after it 93 compute builds instead of 228, 86 of them on title threads, 0 on the xcl-pso-N workers, and the dumps at 200 and 280 s have 10–11 of those workers in help_ahead → build_compute → translated_compute_pso_once → big_compile_turn. They take the big programs too (the DXIL size is only known after DXC) and wait for the turn, so the mid-size ones are still built on the title's thread. To help on a machine like this, the helper would need to know the size before taking the turn, e.g. compile the DXIL first and hand a big one back to wait for its turn without holding a worker; that is closer to the size-based admission claimed as A19 in #1269 than to this PR.

<!-- greyfinch-sync:ivall/xcl:comment:7145316672 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/889#issuecomment-7145316672). Originally posted by [JorgeMJM](https://github.com/JorgeMJM) on 2026-11-24T21:44:01Z. --- Test report on an 8 GB laptop card, this PR together with #1316: the build-ahead happens, but on this machine the three preload workers are held by the biggest builds and the title builds the mid-size ones itself, one after another, while the 15 `xcl-pso-N` workers stay idle. **Tested** - `e1d3b9d` (this PR) and #1316's `964f5ed` merged locally onto `main` `c4d37be` (clean merges; local merge commit `03f98d3`), release. RTX 3070 Laptop 8 GB, NVIDIA 621.40, Ryzen 7 5800H (8C/16T), 28 GB RAM, Windows 11 Home 26300. - Retail title for 300 s with `scripts/smoke.ps1`, `XCL_THREAD_DUMP_AT=120,200,280`, one run: ``` xcl-smoke v1 commit: 03f98d36cf54a73fbfc219295da636cccec2bd94 gpu: NVIDIA GeForce RTX 3070 Laptop GPU title: d7b197a1 seconds: 300 exit: 0x0 frames shown: 1501 (PresentX 1501) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 0 peak commit: 33287 MB ``` The intro video plays; presents stop at 90 s, at the world's loading screen, and do not come back. **Compute pipeline builds after the last frame (84–300 s)**, from the `compute PSO with the translated console CS` lines, by the thread that built them: | built by | builds | |---|---| | title threads (five unnamed threads) | 138 | | `xcl-pso-pre-0` / `-1` | 90 | | `xcl-pso-0` … `xcl-pso-14` | 0 | Build times: median 80 ms, p90 1.9 s, max 73 s, 410 s in all. - **The preload workers are held by the biggest programs.** The three slowest are on them and all three went through `big_compile_turn`: 1 050 616 B of DXIL in 62.8 s after waiting 34.5 s for the turn, 768 548 B in 61.3 s after 62.6 s, 914 984 B in 73.1 s after 60.5 s. The process is at 30–33 GB of commit on 28 GB of RAM here, so the turn is slow to come. - **Meanwhile one title thread builds mid-size programs itself, in series:** 180–260 KB of DXIL, 12–20 s each (e.g. 17.3, 13.7, 19.7, 15.3, 12.5, 18.6, 13.9 s), on the same thread, in the dumps at 120 and 280 s inside `nvgpucomp64.dll`. Another title thread waits in `execute_indirect → resolve_wait` in all three dumps. - **The main workers have nothing to do:** at most one `xcl-pso-N` is in the driver or DXC in each dump; the rest wait on their empty queue. **Suggestion, if you want it:** let an idle `xcl-pso-N` worker take from the preload queue (or at least the pipelines that do not go through `big_compile_turn`), so the mid-size ones are built in parallel while the big ones keep their one-at-a-time turn. On this machine that is up to 15 threads on the 12–20 s builds instead of the title's one. I can write it as a commit on top of yours if that is useful; I would not open a separate PR for it. **Not tested:** this PR without #1316 on this machine, more than one run, a machine with enough RAM that `big_compile_turn` does not hold (the picture may differ there), whether the world renders once the builds catch up. AI use: Claude Code (Claude Opus 5.5) ran the run and the thread-dump analysis on my machine and drafted this. **Edit: I tried that suggestion locally and it does not help here, so please don't take it as is.** Idle `xcl-pso-N` workers taking from the preload queue (all but two, at the lowest priority, uncommitted, on top of the same merge; a unit test that holds the preload workers passes with it and fails without it). In a 300 s run on the same machine the last frame was again at 90 s; after it 93 compute builds instead of 228, 86 of them on title threads, 0 on the `xcl-pso-N` workers, and the dumps at 200 and 280 s have 10–11 of those workers in `help_ahead → build_compute → translated_compute_pso_once → big_compile_turn`. They take the big programs too (the DXIL size is only known after DXC) and wait for the turn, so the mid-size ones are still built on the title's thread. To help on a machine like this, the helper would need to know the size before taking the turn, e.g. compile the DXIL first and hand a big one back to wait for its turn without holding a worker; that is closer to the size-based admission claimed as A19 in #1269 than to this PR.
isaacwingate commented 2026-11-24 23:08:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by isaacwingate on 2026-11-24T22:10:14Z.


Thanks all for the runs. Pushed a39c399, rebased onto main 1d027e5:

  • @frozht: XCL_PRELOAD_COMPUTE=0 now turns off the compute build-ahead on its own; the #690 preload of an earlier run's pipelines stays on. Test: xcl_preload_compute_0_leaves_compute_pipelines_to_their_first_bind. A byte or count budget would need a size that is only known after DXC, so I left that out; the memory cost is in the description under Not tested.
  • @JorgeMJM: thanks for trying the idle-worker idea and for the edit. I agree with your reading: a worker only learns the DXIL size after DXC, so it takes the big programs and waits for big_compile_turn like the others. Size-based admission (A19 in #1269) is the place for that, so I have not added it here.
  • @Kalmarv @pvfreis @JRamos1993 @Filip722 @Xeltax @IvyNotFound @emirduran707: these runs all agree that this takes the early compute builds off the title's threads, and the world load still stops on pipelines the title creates and binds at once. The description now says this PR is one part of #505, not the fix for it. The graphics waits at the abort (execute_indirect → resolve_wait) are #1798.

Suite and regression runs on the new head are in the description.

<!-- greyfinch-sync:ivall/xcl:comment:7145894156 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/889#issuecomment-7145894156). Originally posted by [isaacwingate](https://github.com/isaacwingate) on 2026-11-24T22:10:14Z. --- Thanks all for the runs. Pushed `a39c399`, rebased onto `main` `1d027e5`: - @frozht: `XCL_PRELOAD_COMPUTE=0` now turns off the compute build-ahead on its own; the #690 preload of an earlier run's pipelines stays on. Test: `xcl_preload_compute_0_leaves_compute_pipelines_to_their_first_bind`. A byte or count budget would need a size that is only known after DXC, so I left that out; the memory cost is in the description under **Not tested**. - @JorgeMJM: thanks for trying the idle-worker idea and for the edit. I agree with your reading: a worker only learns the DXIL size after DXC, so it takes the big programs and waits for `big_compile_turn` like the others. Size-based admission (A19 in #1269) is the place for that, so I have not added it here. - @Kalmarv @pvfreis @JRamos1993 @Filip722 @Xeltax @IvyNotFound @emirduran707: these runs all agree that this takes the early compute builds off the title's threads, and the world load still stops on pipelines the title creates and binds at once. The description now says this PR is one part of #505, not the fix for it. The graphics waits at the abort (`execute_indirect` → `resolve_wait`) are #1798. Suite and regression runs on the new head are in the description.
JRamos1993 commented 2026-11-24 23:08:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JRamos1993 on 2026-11-24T22:10:32Z.


Follow-up to my report above: with 4 big compiles at once on top of this PR, the world load gets 20–40 s further, but the stop stays. In the dumps, the title still waits on compute builds, now for programs whose builds take longer than the watchdog's 30 s. Those never finish within a run, so they never get cached.

Setup: as above (c160d86 + this PR, RTX 5090, MSVC release), plus a local change equivalent to #820: big_compile_turn reads XCL_BIG_COMPILES. I made it locally because #820's branch conflicts with current main. Runs used XCL_BIG_COMPILES=4, six back to back, then one with dumps. Another game was running on the same GPU and CPU during these runs.

last presents stop at +0x23cf683
this PR, runs 1–4 above 76–86 s 105–116 s
with XCL_BIG_COMPILES=4, runs 1–6 96–125 s 124–154 s
same, run 7 (dumps) 124 s 154 s
  • The driver-blob cache stopped growing after run 4. In runs 5–7, no compute build of 1 s or more ended in the whole run.
  • The long builds that did end in runs 2–3 were 0.8–1.2 MB of DXIL and took 60–110 s each (four at once, next to the other game). The preload had started them about 5 s into the run.

Dumps in run 7, at 134 s and 146 s (presents had ended at 124 s; XCL frames looked up with the build's xcl.pdb):

  • The thread at +0x43c3d5d waits in both.
  • A ring worker thread is in bind::execute_indirect → pso_async::resolve_wait in both dumps.
  • An unnamed (title) thread was, at 134 s, in build_compute → translated_compute_pso → pso::console_to_dxil_in → dxc::compile: a program never translated in any earlier run. At 146 s it was in NVIDIA's compiler.
  • Another unnamed thread was in NVIDIA's compiler in both dumps, and 5–6 xcl-pso / xcl-pso-pre threads were in it too.

Reading: the stop is still compute builds on this machine. With more of them in parallel, the title gets further, and at that point it binds programs it has not built before. Some of those take a minute or more here, so a run never finishes them before the watchdog. Each run therefore only moves the point where it stops waiting. Builds that long probably need to be made outside a title run: xcl shaders --precompile --pipelines, which has no watchdog, or similar.

Not tested: a full offline --precompile --pipelines before these runs (it did not finish in 3 h here earlier); runs without the other game running; XCL_BIG_COMPILES other than 4.

AI use: Claude Code with Claude Opus 5.5 ran the builds and runs, read the dumps and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7145900551 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/889#issuecomment-7145900551). Originally posted by [JRamos1993](https://github.com/JRamos1993) on 2026-11-24T22:10:32Z. --- **Follow-up to my report above: with 4 big compiles at once on top of this PR, the world load gets 20–40 s further, but the stop stays.** In the dumps, the title still waits on compute builds, now for programs whose builds take longer than the watchdog's 30 s. Those never finish within a run, so they never get cached. **Setup:** as above (`c160d86` + this PR, RTX 5090, MSVC release), plus a local change equivalent to #820: `big_compile_turn` reads `XCL_BIG_COMPILES`. I made it locally because #820's branch conflicts with current `main`. Runs used `XCL_BIG_COMPILES=4`, six back to back, then one with dumps. Another game was running on the same GPU and CPU during these runs. | | last presents | stop at `+0x23cf683` | |---|---|---| | this PR, runs 1–4 above | 76–86 s | 105–116 s | | with `XCL_BIG_COMPILES=4`, runs 1–6 | 96–125 s | 124–154 s | | same, run 7 (dumps) | 124 s | 154 s | - The driver-blob cache stopped growing after run 4. In runs 5–7, no compute build of 1 s or more ended in the whole run. - The long builds that did end in runs 2–3 were 0.8–1.2 MB of DXIL and took 60–110 s each (four at once, next to the other game). The preload had started them about 5 s into the run. **Dumps in run 7, at 134 s and 146 s** (presents had ended at 124 s; XCL frames looked up with the build's `xcl.pdb`): - The thread at `+0x43c3d5d` waits in both. - A ring worker thread is in `bind::execute_indirect` → `pso_async::resolve_wait` in both dumps. - An unnamed (title) thread was, at 134 s, in `build_compute` → `translated_compute_pso` → `pso::console_to_dxil_in` → `dxc::compile`: a program never translated in any earlier run. At 146 s it was in NVIDIA's compiler. - Another unnamed thread was in NVIDIA's compiler in both dumps, and 5–6 `xcl-pso` / `xcl-pso-pre` threads were in it too. **Reading:** the stop is still compute builds on this machine. With more of them in parallel, the title gets further, and at that point it binds programs it has not built before. Some of those take a minute or more here, so a run never finishes them before the watchdog. Each run therefore only moves the point where it stops waiting. Builds that long probably need to be made outside a title run: `xcl shaders --precompile --pipelines`, which has no watchdog, or similar. **Not tested:** a full offline `--precompile --pipelines` before these runs (it did not finish in 3 h here earlier); runs without the other game running; `XCL_BIG_COMPILES` other than 4. AI use: Claude Code with Claude Opus 5.5 ran the builds and runs, read the dumps and wrote this report.
iggyvilla commented 2026-11-25 02:08:51 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by iggyvilla on 2026-11-25T01:35:20Z.


Test report for #889 on AMD RDNA2 8 GB: it does not move the stop on this card.

Commit tested: origin/main 930e8b4 with #889 at e1d3b9d (the head then; it is now a39c399, not retested) merged clean (local merge 08ae50e, release build; the PR's
only file is pso_async.rs) vs origin/main 930e8b4 itself. Same machine, same day, run back to back: main first (22:38),
then main+#889 (22:44). Hardware: AMD RDNA2 8 GB card (RX 6650 XT, driver 32.0.21045.29003), Windows 11, retail
title of #505/#675, XCL_NETWORK=0, XCL_ACTIVITY=1, XCL_PSO_WAIT_MS unset, auto.ps1 300 s scripted walk (default
later press list), screenshots every 2 s, fresh save. Both runs looked at: PASSED-SETUP (Legal Notices at ~60 s, loading
spinner from ~100 s to the end).

main 930e8b4 main + #889
title crashes (+0x23cf683, write at 0x0) at 227.8 s 229.8 s
compute builds on title threads after 100 s 14, 28.6 s in all, longest 21.2 s 19, 35.8 s in all, longest 25.9 s
compute builds on xcl-pso* workers after 100 s 66, 354.7 s 93, 404.6 s
presents in the last 2 s windows 0 from ~200 s 0 from ~200 s

(Thread class: threads named xcl-pso* in the crash's thread dump are workers; unnamed ones are the title's. Lines:
compute PSO with the translated console CS (N B DXIL, N ms).)

Result on this card: #889 does not move the stop and does not take the compute builds off the title's threads.
The workers are busy: ~600 s of build time in 230 s on the 18 xcl-pso* worker threads (15 build workers + 3 preload), single builds of 10 - 80 s
(0.5 - 1.2 MB DXIL on AMD), so a compute pipeline the title binds is still not built (or started) when it binds it, and
the bind compiles it itself (resolve_wait takes job): the same 278 872 B shader took 21.2 s (main) / 25.9 s (#889) on a
title thread at ~200 - 227 s. Presents stop at ~200 s in both runs and the title's watchdog ends it ~28 - 30 s later.
It is a fix for a GPU where the builds are fast (the PR's RTX 5080 numbers); here the queue is too slow.

Why the builds are this slow here: the logged times are the driver call only, and most big builds load the driver's blob of an earlier run. The same blob that loads in 14 - 26 ms when it is preloaded at ~5.6 s takes 55 - 88 s at ~95 - 111 s, once the world load has taken process commit to 25 - 41 GB (32 GB host) and local video memory to ~14 GB on the 8 GB card. So on this card the build-ahead queue is limited by memory pressure during the world load, not by the number of workers.

Not tested: the NVIDIA case of the PR; one run each (the timings differ by a few seconds between runs, the crash point
and the stall at ~200 s were the same in both and in the three earlier runs on this card); not run with more preload
threads or a different order.

AI use: Claude Code, Claude Sonnet 5.5, ran the builds and the two 300 s runs and wrote the first draft; a second Claude Code session (Claude Sonnet 5.5) re-derived every number above from the two xcl.log files and edited the text.

<!-- greyfinch-sync:ivall/xcl:comment:7149721051 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/889#issuecomment-7149721051). Originally posted by [iggyvilla](https://github.com/iggyvilla) on 2026-11-25T01:35:20Z. --- Test report for #889 on AMD RDNA2 8 GB: it does not move the stop on this card. **Commit tested:** origin/main 930e8b4 with #889 at e1d3b9d (the head then; it is now a39c399, not retested) merged clean (local merge 08ae50e, release build; the PR's only file is pso_async.rs) vs origin/main 930e8b4 itself. Same machine, same day, run back to back: main first (22:38), then main+#889 (22:44). **Hardware:** AMD RDNA2 8 GB card (RX 6650 XT, driver 32.0.21045.29003), Windows 11, retail title of #505/#675, `XCL_NETWORK=0`, `XCL_ACTIVITY=1`, `XCL_PSO_WAIT_MS` unset, `auto.ps1` 300 s scripted walk (default later press list), screenshots every 2 s, fresh save. Both runs looked at: PASSED-SETUP (Legal Notices at ~60 s, loading spinner from ~100 s to the end). | | main 930e8b4 | main + #889 | |---|---|---| | title crashes (+0x23cf683, write at 0x0) at | 227.8 s | 229.8 s | | compute builds on title threads after 100 s | 14, 28.6 s in all, longest 21.2 s | 19, 35.8 s in all, longest 25.9 s | | compute builds on xcl-pso* workers after 100 s | 66, 354.7 s | 93, 404.6 s | | presents in the last 2 s windows | 0 from ~200 s | 0 from ~200 s | (Thread class: threads named `xcl-pso*` in the crash's thread dump are workers; unnamed ones are the title's. Lines: `compute PSO with the translated console CS (N B DXIL, N ms)`.) **Result on this card: #889 does not move the stop and does not take the compute builds off the title's threads.** The workers are busy: ~600 s of build time in 230 s on the 18 `xcl-pso*` worker threads (15 build workers + 3 preload), single builds of 10 - 80 s (0.5 - 1.2 MB DXIL on AMD), so a compute pipeline the title binds is still not built (or started) when it binds it, and the bind compiles it itself (`resolve_wait` takes `job`): the same 278 872 B shader took 21.2 s (main) / 25.9 s (#889) on a title thread at ~200 - 227 s. Presents stop at ~200 s in both runs and the title's watchdog ends it ~28 - 30 s later. It is a fix for a GPU where the builds are fast (the PR's RTX 5080 numbers); here the queue is too slow. Why the builds are this slow here: the logged times are the driver call only, and most big builds load the driver's blob of an earlier run. The same blob that loads in 14 - 26 ms when it is preloaded at ~5.6 s takes 55 - 88 s at ~95 - 111 s, once the world load has taken process commit to 25 - 41 GB (32 GB host) and local video memory to ~14 GB on the 8 GB card. So on this card the build-ahead queue is limited by memory pressure during the world load, not by the number of workers. Not tested: the NVIDIA case of the PR; one run each (the timings differ by a few seconds between runs, the crash point and the stall at ~200 s were the same in both and in the three earlier runs on this card); not run with more preload threads or a different order. **AI use:** Claude Code, Claude Sonnet 5.5, ran the builds and the two 300 s runs and wrote the first draft; a second Claude Code session (Claude Sonnet 5.5) re-derived every number above from the two `xcl.log` files and edited the text.
JJAutoCompare commented 2026-11-25 06:06:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T05:50:47Z.


Empirical test report (a39c3992)

Tested xcl-dev/xcl PR #889 at commit a39c3992c7a45baf73e374616e4e9c718f533887.

Hardware / environment

  • Windows x64 build 26200 on an AMD CPU (family 23, model 113, stepping 0).
  • rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC target. DXC reported 1.9.2609.5 (01b62ad47).
  • Cargo test profile with incremental compilation and debug info disabled. The focused run used XCL_ADAPTER=NONE_CPU_ONLY and RUST_TEST_NOCAPTURE=1 outside the Arc test wrapper. Both fixtures used CPU closures as stand-ins for pipeline creation.

Commands and results

  • cargo test --workspace --no-run exited 0 and built the workspace test binaries.
  • cargo test -p xcl --lib first_bind -- --test-threads=1 exited 0. The harness reported 2 passed, 0 failed, 0 ignored, and 0 SKIPPED lines. The filter selected the two new tests in hle::d3d12x::pso_async::used_tests.

Observed behavior

  • The default path ran the compute job before its first bind for a key without prior-use history. The graphics job submitted alongside it stayed pending until its first bind.
  • The switch fixture validated both configurations in separate child test processes. With XCL_PRELOAD_COMPUTE unset, the compute job completed before bind. With the value set to 0, the job stayed pending and the first bind completed it. The parent fixture verified that both children ran and passed.

Not tested

The full GPU workspace suite and game smoke runs were omitted. The fixtures covered queue and bind behavior with stand-ins. GPU driver pipeline creation and retail-title performance were outside this run.

AI use

Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr889-focused.log and published.

<!-- greyfinch-sync:ivall/xcl:comment:7154194175 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/889#issuecomment-7154194175). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T05:50:47Z. --- ### Empirical test report (a39c3992) Tested xcl-dev/xcl PR #889 at commit `a39c3992c7a45baf73e374616e4e9c718f533887`. **Hardware / environment** - Windows x64 build 26200 on an AMD CPU (family 23, model 113, stepping 0). - `rustc 1.100.0 (0ef1bc386 2026-11-09)`, MSVC target. DXC reported `1.9.2609.5 (01b62ad47)`. - Cargo test profile with incremental compilation and debug info disabled. The focused run used `XCL_ADAPTER=NONE_CPU_ONLY` and `RUST_TEST_NOCAPTURE=1` outside the Arc test wrapper. Both fixtures used CPU closures as stand-ins for pipeline creation. **Commands and results** - `cargo test --workspace --no-run` exited 0 and built the workspace test binaries. - `cargo test -p xcl --lib first_bind -- --test-threads=1` exited 0. The harness reported 2 passed, 0 failed, 0 ignored, and 0 SKIPPED lines. The filter selected the two new tests in `hle::d3d12x::pso_async::used_tests`. **Observed behavior** - The default path ran the compute job before its first bind for a key without prior-use history. The graphics job submitted alongside it stayed pending until its first bind. - The switch fixture validated both configurations in separate child test processes. With `XCL_PRELOAD_COMPUTE` unset, the compute job completed before bind. With the value set to `0`, the job stayed pending and the first bind completed it. The parent fixture verified that both children ran and passed. **Not tested** The full GPU workspace suite and game smoke runs were omitted. The fixtures covered queue and bind behavior with stand-ins. GPU driver pipeline creation and retail-title performance were outside this run. **AI use** Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr889-focused.log` and published.
DavidM1911 commented 2026-11-25 10:10:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T09:42:01Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7158683077 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/889#issuecomment-7158683077). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T09:42:01Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
Foniass commented 2026-12-01 04:25:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:25:16Z.


Triage (#1607) – head a39c399

Main already builds compute pipelines of shaders no earlier run used ahead of their first bind: commit 2ccc646 (D3D12.X: build compute pipelines of new shaders ahead of their first use, merged with #3203) gives them their own lane in pso_async::Backlog (compute), behind the known ones and limited by XCL_PSO_AHEAD and the free-commit check. This PR's two-queue Preload and XCL_PRELOAD_COMPUTE do the same on the old Preload struct, which main has since replaced; the PR conflicts there.
Recommendation: close (superseded by main commit 2ccc646, #3203).

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7300716188 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/889#issuecomment-7300716188). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T04:25:16Z. --- **Triage (#1607)** – head a39c399 Main already builds compute pipelines of shaders no earlier run used ahead of their first bind: commit 2ccc646 (`D3D12.X: build compute pipelines of new shaders ahead of their first use`, merged with #3203) gives them their own lane in `pso_async::Backlog` (`compute`), behind the known ones and limited by `XCL_PSO_AHEAD` and the free-commit check. This PR's two-queue `Preload` and `XCL_PRELOAD_COMPUTE` do the same on the old `Preload` struct, which main has since replaced; the PR conflicts there. Recommendation: close (superseded by main commit 2ccc646, #3203). AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
throny commented 2026-12-01 12:40:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-12-01T12:40:40Z.


Closing as superseded: this change is already on main (2ccc646f). main 2ccc646f builds compute pipelines of new shaders ahead in their own backlog lane after the known ones, under XCL_PSO_AHEAD cap and ahead_room; only the PR's separate XCL_PRELOAD_COMPUTE=0 opt-out is not on main (XCL_PSO_AHEAD=0 turns build-ahead off)

Two independent checks found this: Foniass's close list on #1607 and ours against current main. If something here is still missing on main, say so and reopen it, or ask and I will.

AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents.

<!-- greyfinch-sync:ivall/xcl:comment:7311486723 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/889#issuecomment-7311486723). Originally posted by [throny](https://github.com/throny) on 2026-12-01T12:40:40Z. --- Closing as superseded: this change is already on `main` (2ccc646f). main 2ccc646f builds compute pipelines of new shaders ahead in their own backlog lane after the known ones, under XCL_PSO_AHEAD cap and ahead_room; only the PR's separate XCL_PRELOAD_COMPUTE=0 opt-out is not on main (XCL_PSO_AHEAD=0 turns build-ahead off) Two independent checks found this: Foniass's close list on #1607 and ours against current `main`. If something here is still missing on `main`, say so and reopen it, or ask and I will. AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!883
No description provided.