D3D12.X: a bind does not wait for a pipeline behind the workers' queue #1273

Closed
github-bot wants to merge 1 commit from gh-pr/1273/head into gh-pr/1273/base
Owner

@⁠427001 on GitHub · 2026-11-24 14:04 UTC · original
427001:pso-wait-behind-queue → main · +90 −4 · 1 files · 1 commits · closed without merging

With XCL_PSO_WAIT_MS a compute bind waited its whole budget for every pipeline not built yet, also for one whose build stood behind others in the workers' queue and could not start in that time. At a retail title's world start this held the title's threads for about 20 s, with a 30 s hang watchdog. A bind now waits only when a worker has started the build or is free to start it; otherwise the pipeline is late at once, as after a wait that ran out. Without XCL_PSO_WAIT_MS nothing changes. Part of #505.

What is in it

  • crates/xcl/src/hle/d3d12x/pso_async.rs: the workers' queue counts the builds no worker has taken yet and the workers at a build (send, BACKLOG, BUSY); resolve_within asks worth_waiting before it waits, and logs the pipelines it does not wait for (the first 4, then at powers of two). Tests: binds_of_pipelines_behind_the_workers_queue_do_not_wait (fails without the change: six binds wait 6 x 300 ms, 1.84 s measured) and a_bind_waits_only_for_a_build_a_worker_has_or_can_start.

Tested

  • NVIDIA GeForce RTX 3080 10 GB (32-lane waves), driver 616.92; Intel Core i9-10900K; 16 GB RAM; Windows 11 Pro 26200; rustc 1.100.0 stable-x86_64-pc-windows-msvc; tests in debug, runs in release
  • cargo build --workspace + cargo test --workspace --no-fail-fast -- --test-threads=4 on be8d052: 753 passed, 0 failed, 41 ignored; SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware
  • Retail title 1.0.2.1, Series S profile (device_type = "lockhart"), 300 s runs with XCL_NETWORK=0 XCL_PSO_WAIT_MS=50 XCL_COHERENT_MB=512 and scripted A presses, from the same saved state. These runs are not of this head: main does not reach the world on this profile, so they are of a local merge of 47efa2e + #605 + #495 + #615, without this change and with it applied on top (as it was before its rebase onto 930e8b4; the same condition in resolve_within).
without (2 runs) with (2 runs)
time for the first 513 pipelines not built at their bind 10.4 s, 10.9 s (each waited 50 ms) 0.3 s, 0.2 s (not waited for)
2 s activity windows with no submit at the world's start 154 – 172 s, 150 – 168 s none in the 4 s and the 16 s that follow it
how the run ended +0x32648e1 at 174.9 s, +0x43c5d59 at 171.7 s +0x5228010 at 165.7 s, +0x27c195d at 193.2 s
  • In the second run without the change (XCL_THREAD_DUMP_AT every 4 s) three of the title's threads are in bind.rs:710 → resolve_for_bind → resolve_wait → the condvar wait of resolve_within in the dumps of the stall.
  • The title does not get into the world with this change: it goes on submitting, then crashes at another address in each run. In the last run nothing is submitted from 176 s on, with GPU queue.Wait … did not complete within 5000 ms lines from 171 s; that is not this wait (17 to 32 binds ran out of their 50 ms in the whole run).

Regression run

main (930e8b4):

xcl-smoke v1
commit: 930e8b49c1c2ec683d22c724a398b39111cd0e56
gpu: NVIDIA GeForce RTX 3080
title: retail-title-1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1621 (PresentX 1621)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15879 MB

this PR's head (be8d052):

xcl-smoke v1
commit: be8d05252aeb123245b620a074e652ae268fbd81
gpu: NVIDIA GeForce RTX 3080
title: retail-title-1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1582 (PresentX 1583)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16173 MB

Both with the default (Series X) profile and without XCL_PSO_WAIT_MS: 60 s stay in the title's first screens and do not reach the changed code.

Not tested

  • This head itself at the title's world start (see Tested); AMD; the Series X profile past the first screens.
  • Whether not waiting costs skipped dispatches that a 50 ms wait would have saved when the queue is short and its builds are quick (driver cache hits). The skipped counts of the four runs cannot be compared: each run builds more pipelines ahead than the one before (150, 1089, 1092, 1101 shader sets of earlier runs).
  • What the crashes after the world's start come from.

AI use

  • Claude Code with Claude Fable 5.2: found the stall in the thread dumps, wrote the change, its tests and this description, and made the test and title runs reported here.

🤖 Generated with Claude Code

**@⁠427001** on GitHub · 2026-11-24 14:04 UTC · [original](https://github.com/xcl-dev/xcl/pull/1273) `427001:pso-wait-behind-queue` → `main` · +90 −4 · 1 files · 1 commits · closed without merging With `XCL_PSO_WAIT_MS` a compute bind waited its whole budget for every pipeline not built yet, also for one whose build stood behind others in the workers' queue and could not start in that time. At a retail title's world start this held the title's threads for about 20 s, with a 30 s hang watchdog. A bind now waits only when a worker has started the build or is free to start it; otherwise the pipeline is late at once, as after a wait that ran out. Without `XCL_PSO_WAIT_MS` nothing changes. Part of #505. **What is in it** - `crates/xcl/src/hle/d3d12x/pso_async.rs`: the workers' queue counts the builds no worker has taken yet and the workers at a build (`send`, `BACKLOG`, `BUSY`); `resolve_within` asks `worth_waiting` before it waits, and logs the pipelines it does not wait for (the first 4, then at powers of two). Tests: `binds_of_pipelines_behind_the_workers_queue_do_not_wait` (fails without the change: six binds wait 6 x 300 ms, 1.84 s measured) and `a_bind_waits_only_for_a_build_a_worker_has_or_can_start`. **Tested** - NVIDIA GeForce RTX 3080 10 GB (32-lane waves), driver 616.92; Intel Core i9-10900K; 16 GB RAM; Windows 11 Pro 26200; rustc 1.100.0 `stable-x86_64-pc-windows-msvc`; tests in debug, runs in release - `cargo build --workspace` + `cargo test --workspace --no-fail-fast -- --test-threads=4` on `be8d052`: 753 passed, 0 failed, 41 ignored; `SKIPPED` (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` - Retail title 1.0.2.1, Series S profile (`device_type = "lockhart"`), 300 s runs with `XCL_NETWORK=0 XCL_PSO_WAIT_MS=50 XCL_COHERENT_MB=512` and scripted A presses, from the same saved state. **These runs are not of this head:** `main` does not reach the world on this profile, so they are of a local merge of `47efa2e` + #605 + #495 + #615, without this change and with it applied on top (as it was before its rebase onto `930e8b4`; the same condition in `resolve_within`). | | without (2 runs) | with (2 runs) | |---|---|---| | time for the first 513 pipelines not built at their bind | 10.4 s, 10.9 s (each waited 50 ms) | 0.3 s, 0.2 s (not waited for) | | 2 s activity windows with no submit at the world's start | 154 – 172 s, 150 – 168 s | none in the 4 s and the 16 s that follow it | | how the run ended | `+0x32648e1` at 174.9 s, `+0x43c5d59` at 171.7 s | `+0x5228010` at 165.7 s, `+0x27c195d` at 193.2 s | - In the second run without the change (`XCL_THREAD_DUMP_AT` every 4 s) three of the title's threads are in `bind.rs:710` → `resolve_for_bind` → `resolve_wait` → the condvar wait of `resolve_within` in the dumps of the stall. - The title does not get into the world with this change: it goes on submitting, then crashes at another address in each run. In the last run nothing is submitted from 176 s on, with `GPU queue.Wait … did not complete within 5000 ms` lines from 171 s; that is not this wait (17 to 32 binds ran out of their 50 ms in the whole run). **Regression run** `main` (`930e8b4`): ``` xcl-smoke v1 commit: 930e8b49c1c2ec683d22c724a398b39111cd0e56 gpu: NVIDIA GeForce RTX 3080 title: retail-title-1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1621 (PresentX 1621) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15879 MB ``` this PR's head (`be8d052`): ``` xcl-smoke v1 commit: be8d05252aeb123245b620a074e652ae268fbd81 gpu: NVIDIA GeForce RTX 3080 title: retail-title-1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1582 (PresentX 1583) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16173 MB ``` Both with the default (Series X) profile and without `XCL_PSO_WAIT_MS`: 60 s stay in the title's first screens and do not reach the changed code. **Not tested** - This head itself at the title's world start (see **Tested**); AMD; the Series X profile past the first screens. - Whether not waiting costs skipped dispatches that a 50 ms wait would have saved when the queue is short and its builds are quick (driver cache hits). The skipped counts of the four runs cannot be compared: each run builds more pipelines ahead than the one before (150, 1089, 1092, 1101 shader sets of earlier runs). - What the crashes after the world's start come from. **AI use** - Claude Code with Claude Fable 5.2: found the stall in the thread dumps, wrote the change, its tests and this description, and made the test and title runs reported here. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
With XCL_PSO_WAIT_MS a compute bind waits that long for its pipeline and
then goes on without it. It waited the whole time for every pipeline, also
for one whose build stood behind others in the workers' queue and could not
start in that time. A retail title binds hundreds of pipelines for the
first time when its world starts: at 50 ms the first 513 such waits took
10.4 s and 10.9 s in two runs, thread dumps showed its three recording
threads in resolve_within's wait, and nothing was submitted for 20 s (the
title's hang watchdog fires at 30 s).

A bind with a budget now waits only when a worker has started the build or
is free to start it; otherwise the pipeline is late at once, as after a
wait that ran out. Without XCL_PSO_WAIT_MS nothing changes.

In two runs with the change the same 513 pipelines were passed over in
0.3 s and 0.2 s and the title went on submitting. It still crashed 6 s
and 35 s later: this does not get it into the world.

The new test fails without the change (six binds wait 6 x 300 ms).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:49:04 +00:00
github-bot closed this pull request 2026-11-26 04:49:04 +00:00
Author
Owner

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

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

  • lib pso_async: 7 passed, 0 failed.

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-24 14:07 UTC · [original](https://github.com/xcl-dev/xcl/pull/1273#issuecomment-7133883011) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - lib pso_async: 7 passed, 0 failed. Thanks!
Author
Owner

@⁠l0g3n on GitHub · 2026-11-24 15:10 UTC · original

Tested 930e8b4 and be8d052 on an RX 7600 with Adrenalin 26.11.2, Windows 11 build 26300.9974, and XCL_PSO_WAIT_MS=50 on both. The patched build logged at least 513 queued pipeline builds it did not wait for, and I saw slightly more of the first scene. Both runs ended with DXGI_ERROR_DEVICE_HUNG (0x887A0006). One run per build, baseline first, with a shared shader cache.

**@⁠l0g3n** on GitHub · 2026-11-24 15:10 UTC · [original](https://github.com/xcl-dev/xcl/pull/1273#issuecomment-7135577999) Tested 930e8b4 and be8d052 on an RX 7600 with Adrenalin 26.11.2, Windows 11 build 26300.9974, and XCL_PSO_WAIT_MS=50 on both. The patched build logged at least 513 queued pipeline builds it did not wait for, and I saw slightly more of the first scene. Both runs ended with DXGI_ERROR_DEVICE_HUNG (0x887A0006). One run per build, baseline first, with a shared shader cache.
Author
Owner

@⁠Chrysana on GitHub · 2026-11-24 16:03 UTC · original

RDNA4 run of be8d052, adding to l0g3n's RX 7600 report. With XCL_PSO_WAIT_MS=50 the GPU hangs (0x887a0006) on main as well, in every run, so the hang doesn't come from this PR. Without the variable the PR runs the same as main here.

Setup: AMD Radeon RX 9070 XT 16 GB (RDNA4), driver 32.0.32015.2008, Ryzen 7 9800X3D, 31 GB RAM, Windows 11 26200.9974, rustc 1.100.0 MSVC, release. Retail title 1.0.2.1, the same saved state for every run. main 930e8b4 against this PR's head be8d052, which sits directly on it. Every run: XCL_NETWORK=0 XCL_PRESS_A_AT=20,25,30.

With XCL_PSO_WAIT_MS=50: 240 s runs into the world load, XCL_ACTIVITY=1. Run order: main, PR, PR, then main again 20 min later. Driver blobs stay on disk between runs.

run first skipped draw or dispatch skipped draws / dispatches at the last count device hung
main 1 109.4 s 6809 / 10295 at 145.7 s 150.7 s
PR 1 108.4 s 3021 / 1024 at 112.0 s 115.0 s
PR 2 108.5 s 4096 / 1261 at 111.9 s 112.2 s
main 2 110.4 s 2048 / 764 at 137.3 s 141.5 s
  • In all four runs, binds start to be skipped (pipeline not built in time) at 108–110 s, at the world load, and then the GPU hangs. On the PR the skips pile up faster and the hang comes 4–7 s later; on main it comes 31–41 s later. That's two runs each, so it's a pattern, not a measurement.
  • The PR's own log line reaches (513 so far) at 108.5 s and 108.8 s, so it does what it says.
  • Without the variable there are no skips and no hang. In the 240 s runs from my #1248 report (main 47efa2e, same saved state), skipped draws and dispatches stay at 0 and the runs end at the title's own stop at +0x23cf683 at 134–147 s (#534).
  • A guess I haven't checked: a skipped dispatch may be the one that would have written a value that a later GPU wait is waiting for. Just before each hang the log is full of Wait64BitValueX … bridged to GPU queue.Wait (… wait-before-signal …). If that's it, any bind that gives up can hang the GPU (on main after 50 ms, on the PR at once), and the PR only gets there sooner.

A warning for anyone testing this on AMD: back-to-back runs with the variable froze this PC completely. Three runs in a row gave 4 GPU timeouts (LiveKernelEvent 141) in 6 minutes. The driver recovered each time until it didn't, and the machine needed a hard reset. The fourth run above was run on its own, with a script that kills the title as soon as its log says the device was removed: one timeout, and the driver recovered.

Regression (without XCL_PSO_WAIT_MS): scripts/smoke.ps1 -Seconds 60 from each tree, alternating, two rounds. main 1147 / 1134 frames, PR 1178 / 1182 frames; 0 crashes and 0 device removals in all four. First round:

xcl-smoke v1
commit: 930e8b49c1c2ec683d22c724a398b39111cd0e56
gpu: AMD Radeon RX 9070 XT
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1147 (PresentX 1147)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 17523 MB
xcl-smoke v1
commit: be8d05252aeb123245b620a074e652ae268fbd81
gpu: AMD Radeon RX 9070 XT
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1178 (PresentX 1178)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 17423 MB

Tested

  • cargo test -p xcl --lib pso_async -- --test-threads=4 (debug): 7 passed, 0 failed, 0 ignored, including both new tests (binds_of_pipelines_behind_the_workers_queue_do_not_wait, a_bind_waits_only_for_a_build_a_worker_has_or_can_start).

Not tested

  • Why the GPU hangs. No GPU-side tools (DRED, Radeon GPU Detective); everything above comes from XCL's own log.
  • Whether the PR helps the world-start stall from the description: with the variable set, these runs hang before they get there.
  • Other GPUs, and the full test suite.

AI use

  • Claude Code (Claude Opus 5.5) ran the runs and tests, read the logs and drafted this comment. I checked it before posting.
**@⁠Chrysana** on GitHub · 2026-11-24 16:03 UTC · [original](https://github.com/xcl-dev/xcl/pull/1273#issuecomment-7137063265) RDNA4 run of `be8d052`, adding to l0g3n's RX 7600 report. **With `XCL_PSO_WAIT_MS=50` the GPU hangs (`0x887a0006`) on `main` as well, in every run, so the hang doesn't come from this PR. Without the variable the PR runs the same as `main` here.** **Setup:** AMD Radeon RX 9070 XT 16 GB (RDNA4), driver 32.0.32015.2008, Ryzen 7 9800X3D, 31 GB RAM, Windows 11 26200.9974, rustc 1.100.0 MSVC, release. Retail title 1.0.2.1, the same saved state for every run. `main` `930e8b4` against this PR's head `be8d052`, which sits directly on it. Every run: `XCL_NETWORK=0 XCL_PRESS_A_AT=20,25,30`. **With `XCL_PSO_WAIT_MS=50`:** 240 s runs into the world load, `XCL_ACTIVITY=1`. Run order: `main`, PR, PR, then `main` again 20 min later. Driver blobs stay on disk between runs. | run | first skipped draw or dispatch | skipped draws / dispatches at the last count | device hung | |---|---|---|---| | `main` 1 | 109.4 s | 6809 / 10295 at 145.7 s | 150.7 s | | PR 1 | 108.4 s | 3021 / 1024 at 112.0 s | 115.0 s | | PR 2 | 108.5 s | 4096 / 1261 at 111.9 s | 112.2 s | | `main` 2 | 110.4 s | 2048 / 764 at 137.3 s | 141.5 s | - In all four runs, binds start to be skipped (pipeline not built in time) at 108–110 s, at the world load, and then the GPU hangs. On the PR the skips pile up faster and the hang comes 4–7 s later; on `main` it comes 31–41 s later. That's two runs each, so it's a pattern, not a measurement. - The PR's own log line reaches `(513 so far)` at 108.5 s and 108.8 s, so it does what it says. - Without the variable there are no skips and no hang. In the 240 s runs from my #1248 report (`main` `47efa2e`, same saved state), skipped draws and dispatches stay at 0 and the runs end at the title's own stop at `+0x23cf683` at 134–147 s (#534). - A guess I haven't checked: a skipped dispatch may be the one that would have written a value that a later GPU wait is waiting for. Just before each hang the log is full of `Wait64BitValueX … bridged to GPU queue.Wait (… wait-before-signal …)`. If that's it, any bind that gives up can hang the GPU (on `main` after 50 ms, on the PR at once), and the PR only gets there sooner. **A warning for anyone testing this on AMD:** back-to-back runs with the variable froze this PC completely. Three runs in a row gave 4 GPU timeouts (LiveKernelEvent 141) in 6 minutes. The driver recovered each time until it didn't, and the machine needed a hard reset. The fourth run above was run on its own, with a script that kills the title as soon as its log says the device was removed: one timeout, and the driver recovered. **Regression (without `XCL_PSO_WAIT_MS`):** `scripts/smoke.ps1 -Seconds 60` from each tree, alternating, two rounds. `main` 1147 / 1134 frames, PR 1178 / 1182 frames; 0 crashes and 0 device removals in all four. First round: ``` xcl-smoke v1 commit: 930e8b49c1c2ec683d22c724a398b39111cd0e56 gpu: AMD Radeon RX 9070 XT title: retail-title seconds: 60 exit: 0x0 frames shown: 1147 (PresentX 1147) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 17523 MB ``` ``` xcl-smoke v1 commit: be8d05252aeb123245b620a074e652ae268fbd81 gpu: AMD Radeon RX 9070 XT title: retail-title seconds: 60 exit: 0x0 frames shown: 1178 (PresentX 1178) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 17423 MB ``` **Tested** - `cargo test -p xcl --lib pso_async -- --test-threads=4` (debug): 7 passed, 0 failed, 0 ignored, including both new tests (`binds_of_pipelines_behind_the_workers_queue_do_not_wait`, `a_bind_waits_only_for_a_build_a_worker_has_or_can_start`). **Not tested** - Why the GPU hangs. No GPU-side tools (DRED, Radeon GPU Detective); everything above comes from XCL's own log. - Whether the PR helps the world-start stall from the description: with the variable set, these runs hang before they get there. - Other GPUs, and the full test suite. **AI use** - Claude Code (Claude Opus 5.5) ran the runs and tests, read the logs and drafted this comment. I checked it before posting.
Author
Owner

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

Test report on an NVIDIA wave32 card, with where the title's threads wait in both builds. Short version: with this PR the subrender threads no longer wait in resolve_within, as intended, but this machine then skips about 10× more draws and dispatches and ends earlier, twice with 0x887a0006. The sample is small (2 runs vs 3), so I read it as a data point, not a verdict.

Setup

  • RTX 3080 10 GB (32-lane waves, driver 610.88), i7-10700K, Windows 11 Pro 26200, rustc 1.100.0, release, DXC 1.9.2609.
  • Retail 1.0.2.1, Series X profile, XCL_NETWORK=0 XCL_PSO_WAIT_MS=50 XCL_PAGE_BUDGET_MB=4096, A pressed by XCL_PRESS_AT, 420 s cap. DXIL and driver-blob caches warm (earlier runs).
  • Both builds are main 930e8b4 + #640 + #1316 + #1055 + #1102 + #800 (local test tree); "with" adds be8d052. So this is not a clean main A/B.

Results (counts from XCL's own log lines)

without (2 runs) with be8d052 (3 runs)
end watchdog +0x23cf683 at 403 s; no crash in 420 s 0x887a0006 at 194 s and 204 s; watchdog +0x23cf683 at 249 s
last present 374 s, 418 s 186 s, 212 s, 190 s
draws (skipped) 5 684 (256), 5 775 (0) 6 556 (2 926), 7 001 (3 565), 7 345 (3 323)
dispatches (skipped) 8 878 (296), 1 024 (12) 10 757 (487), 20 305 (803), 15 426 (1 024)
queue.Wait … released on CPU 1, 0 4, 12, 7
local video memory at the end 10.2 GB, 9.9 GB 11.9 GB, 11.9 GB, 11.8 GB

Where the threads wait at the watchdog (thread dumps, symbolized against each build's PDB; title RVAs from my own copy of the exe)

  • Main thread: +0x23cf6a0 (called from the state handler at +0x8126a2) is not a fatal routine. It is the main thread's sync with the render thread: an infinite WaitForSingleObject on a semaphore the render thread releases after each frame (stack +0x56a0d < +0x23cf735 < +0x8126a7). The watchdog at +0x2215a60 fires because the main thread sits there for 30 s.
  • Render thread (entry +0x23cefb0, frame +0x23cf4c0): waits at +0x43c3d5d for its five Subrender:%02u worker threads.
  • Without this PR: two title threads in bind.rs dispatch → pso_async::resolve_within (stack … < +0x248c341 < +0x248cb78), 513+ pipelines logged "still being built after 50 ms" by 405 s. That is the chain this PR targets.
  • With this PR (run ending on the watchdog): no title thread in pso_async. The submission thread (+0x24821e3) waits in list_x.rs wait_all_on; the last waits are direct-queue waits on compute queue 4 at completed = recorded − 1 (… >= 0x381 did not complete within 5000 ms).

So on this card the PR does remove the PSO wait from the hang chain; what it leaves behind is more skipped work and the GPU-side waits / device hangs. Whether the extra skips cause the hangs or only coincide with them I cannot tell from five runs; the video-memory difference (11.9 vs ~10 GB on a 10 GB card) is a second possible cause.

Not tested: plain main + this PR alone; AMD; more runs per build.

AI use: Claude Code (Claude Opus 5.5) ran the runs, traced the waits (thread dumps, IDA on my own copy of the title) and wrote this.

**@⁠Krashgamer** on GitHub · 2026-11-24 16:04 UTC · [original](https://github.com/xcl-dev/xcl/pull/1273#issuecomment-7137064542) Test report on an NVIDIA wave32 card, with where the title's threads wait in both builds. Short version: with this PR the subrender threads no longer wait in `resolve_within`, as intended, but this machine then skips about 10× more draws and dispatches and ends earlier, twice with `0x887a0006`. The sample is small (2 runs vs 3), so I read it as a data point, not a verdict. **Setup** - RTX 3080 10 GB (32-lane waves, driver 610.88), i7-10700K, Windows 11 Pro 26200, rustc 1.100.0, release, DXC 1.9.2609. - Retail 1.0.2.1, Series X profile, `XCL_NETWORK=0 XCL_PSO_WAIT_MS=50 XCL_PAGE_BUDGET_MB=4096`, A pressed by `XCL_PRESS_AT`, 420 s cap. DXIL and driver-blob caches warm (earlier runs). - Both builds are `main` `930e8b4` + #640 + #1316 + #1055 + #1102 + #800 (local test tree); "with" adds `be8d052`. So this is not a clean `main` A/B. **Results** (counts from XCL's own log lines) | | without (2 runs) | with `be8d052` (3 runs) | |---|---|---| | end | watchdog `+0x23cf683` at 403 s; no crash in 420 s | `0x887a0006` at 194 s and 204 s; watchdog `+0x23cf683` at 249 s | | last present | 374 s, 418 s | 186 s, 212 s, 190 s | | draws (skipped) | 5 684 (256), 5 775 (0) | 6 556 (2 926), 7 001 (3 565), 7 345 (3 323) | | dispatches (skipped) | 8 878 (296), 1 024 (12) | 10 757 (487), 20 305 (803), 15 426 (1 024) | | `queue.Wait … released on CPU` | 1, 0 | 4, 12, 7 | | local video memory at the end | 10.2 GB, 9.9 GB | 11.9 GB, 11.9 GB, 11.8 GB | **Where the threads wait at the watchdog** (thread dumps, symbolized against each build's PDB; title RVAs from my own copy of the exe) - Main thread: `+0x23cf6a0` (called from the state handler at `+0x8126a2`) is not a fatal routine. It is the main thread's sync with the render thread: an infinite `WaitForSingleObject` on a semaphore the render thread releases after each frame (stack `+0x56a0d < +0x23cf735 < +0x8126a7`). The watchdog at `+0x2215a60` fires because the main thread sits there for 30 s. - Render thread (entry `+0x23cefb0`, frame `+0x23cf4c0`): waits at `+0x43c3d5d` for its five `Subrender:%02u` worker threads. - Without this PR: two title threads in `bind.rs` dispatch → `pso_async::resolve_within` (stack `… < +0x248c341 < +0x248cb78`), 513+ pipelines logged "still being built after 50 ms" by 405 s. That is the chain this PR targets. - With this PR (run ending on the watchdog): no title thread in `pso_async`. The submission thread (`+0x24821e3`) waits in `list_x.rs` `wait_all_on`; the last waits are direct-queue waits on compute queue 4 at `completed = recorded − 1` (`… >= 0x381 did not complete within 5000 ms`). So on this card the PR does remove the PSO wait from the hang chain; what it leaves behind is more skipped work and the GPU-side waits / device hangs. Whether the extra skips cause the hangs or only coincide with them I cannot tell from five runs; the video-memory difference (11.9 vs ~10 GB on a 10 GB card) is a second possible cause. **Not tested**: plain `main` + this PR alone; AMD; more runs per build. AI use: Claude Code (Claude Opus 5.5) ran the runs, traced the waits (thread dumps, IDA on my own copy of the title) and wrote this.
Author
Owner

@⁠Royalflamejlh on GitHub · 2026-11-24 16:17 UTC · original

Linux (Wine + vkd3d-proton) + NVIDIA test of be8d052 on main 930e8b4 + #684 with XCL_PSO_WAIT_MS=50, 5 alternated runs of 140 s each way of a retail title: with it the first few hundred late binds passed in 1.3 to 1.7 s instead of 18 s or more, in 5 of 5 runs. The title did not get further for it: it stopped presenting about 25 s earlier and every run with it ended by 135 s, at the watchdog or a device removal, where no run without it had ended by 140 s.

Setup: Fedora 44 (kernel 7.2.9), Wine 11.21 Staging (Wayland driver), vkd3d-proton v3.1-90-g30b0eb9b with the relaxed-vtable patch from #175 and a local dxil-spirv patch, VKD3D_CONFIG=ignore_shared_fence. RTX 4070 12 GB (driver 615.71.09, 32-lane waves), Ryzen 9 9950X3D (31 pipeline workers), 64 GB RAM. Release, cross-compiled to x86_64-pc-windows-gnu (rustc 1.98.0), DXC 1.9.2609.5, XCL_NETWORK=0, XCL_PSO_PRELOAD=0, XCL_PSO_WAIT_MS=50. Retail title 1.0.2.1, the first-run screens completed once and no story progress, one A press at 44.8 s through XCL_PRESS_AT. be8d052 merged onto main 930e8b4 + #684 (e56dbc3) without conflicts. main is b7aa9f3 now; pso_async.rs is the same in both.

Tested

  • cargo test --release -p xcl --lib for the two tests it adds, under Wine, on the merge: 2 passed, 0 failed.
5 runs each, 140 s 930e8b4 + #684 the same + be8d052
binds not waited for – 257 or more in every run
50 ms waits that ran out 513 or more in every run 33 or more in every run
from the first late bind after 80 s to the last one logged 18.3, 19.0, 18.6, 18.4, 47.7 s 1.5, 1.3, 1.7, 1.4, 1.5 s
last 2 s with a present 135.1, 132.3, 127.0, 131.0, 132.1 s 106.1, 104.1, 104.2, 104.5, 120.2 s
first queue.Wait … did not complete within 5000 ms none, none, 130.2, 134.5, 137.0 s 109.5 s, none, 108.1, 109.7, 123.1 s
D3D12 device removed: 0x887a0005 none by 140 s in 5 of 5 118.2, 134.6, none, 134.6, 129.4 s
how the run ended still running at 140 s in 5 of 5 0x80000003 at game+0x2474606 at 118.2 and 129.4 s; null write at game+0x23cf683 at 134.6, 134.5 and 134.6 s
dispatches (skipped) at the last count 29418 (512), 31813 (589), 16814 (207), 30457 (1024), 20198 (256) 15287 (512), 18426 (512), 13191 (256), 13669 (237), 14609 (271)

The log line of the change in every run with it:

D3D12.X: a pipeline in the workers' queue (1 builds waiting, 31 workers busy) is not waited for: its binds go on without it until it is built (1 so far)

One more run without it, of 175 s, ended the same way later: last present at 137.9 s, the first queue.Wait release at 142.9 s, the device removed and the null write at game+0x23cf683 at 168.6 s. So on this machine the change moves the same end about 34 s earlier (1 long run without it). In the first four runs of each, the title presented 3 to 8 frames between 104 and 140 s without it and 2 or 3 with it.

The fifth run of each tree was later throughout (its late binds started 14 s later than in the other four), and the fourth and fifth with the change had NVIDIA kernel messages during them (312 and 1; the 1 is an Xid 31 from another process on the card). The first three pairs had none and show the same.

This card's video memory was full (9.6 GB local) from about 76 s in every run, so what follows the late binds here may be the card as much as the title. The order of events is the one the RX 9070 XT and RTX 3080 reports above give.

Read

  • pso_async.rs:590 (worth_waiting) and :614: a bind is not waited for when every worker is at a build and it is not this pipeline's. That is what the runs show: 31 workers busy, and each such bind returns at once.
  • pso_async.rs:558: resolve_within is only reached with a budget, so without XCL_PSO_WAIT_MS nothing changes, as the description says. Not run here.
  • A pipeline not waited for is marked late like one whose wait ran out, so the same draws and dispatches are skipped. The runs agree: no more dispatches were skipped with it than without.
  • A question, not a fault in the diff: the 18 s of 50 ms waits were also what kept the title from submitting everything at once. With them gone the queue.Wait releases start 20 to 29 s earlier here. Is the wait worth keeping for a build that is next in the queue, or is the stall after it a separate matter for #505?

Not tested: without XCL_PSO_WAIT_MS; other limits than 50 ms; the preload of #690 on; a card with free video memory at that point; the rest of the test suite; AMD and Intel.

AI use: Claude Code (Claude Fable 5.2) read the diff, built the trees, ran the tests and the eleven runs with XCL_PRESS_AT, compared the logs and wrote this report.

**@⁠Royalflamejlh** on GitHub · 2026-11-24 16:17 UTC · [original](https://github.com/xcl-dev/xcl/pull/1273#issuecomment-7137421759) Linux (Wine + vkd3d-proton) + NVIDIA test of `be8d052` on `main` `930e8b4` + #684 with `XCL_PSO_WAIT_MS=50`, 5 alternated runs of 140 s each way of a retail title: with it the first few hundred late binds passed in 1.3 to 1.7 s instead of 18 s or more, in 5 of 5 runs. The title did not get further for it: it stopped presenting about 25 s earlier and every run with it ended by 135 s, at the watchdog or a device removal, where no run without it had ended by 140 s. **Setup:** Fedora 44 (kernel 7.2.9), Wine 11.21 Staging (Wayland driver), vkd3d-proton v3.1-90-g30b0eb9b with the relaxed-vtable patch from #175 and a local dxil-spirv patch, `VKD3D_CONFIG=ignore_shared_fence`. RTX 4070 12 GB (driver 615.71.09, 32-lane waves), Ryzen 9 9950X3D (31 pipeline workers), 64 GB RAM. Release, cross-compiled to `x86_64-pc-windows-gnu` (rustc 1.98.0), DXC 1.9.2609.5, `XCL_NETWORK=0`, `XCL_PSO_PRELOAD=0`, `XCL_PSO_WAIT_MS=50`. Retail title 1.0.2.1, the first-run screens completed once and no story progress, one A press at 44.8 s through `XCL_PRESS_AT`. `be8d052` merged onto `main` `930e8b4` + #684 (`e56dbc3`) without conflicts. `main` is `b7aa9f3` now; `pso_async.rs` is the same in both. **Tested** - `cargo test --release -p xcl --lib` for the two tests it adds, under Wine, on the merge: 2 passed, 0 failed. | 5 runs each, 140 s | `930e8b4` + #684 | the same + `be8d052` | |---|---|---| | binds not waited for | – | 257 or more in every run | | 50 ms waits that ran out | 513 or more in every run | 33 or more in every run | | from the first late bind after 80 s to the last one logged | 18.3, 19.0, 18.6, 18.4, 47.7 s | 1.5, 1.3, 1.7, 1.4, 1.5 s | | last 2 s with a present | 135.1, 132.3, 127.0, 131.0, 132.1 s | 106.1, 104.1, 104.2, 104.5, 120.2 s | | first `queue.Wait … did not complete within 5000 ms` | none, none, 130.2, 134.5, 137.0 s | 109.5 s, none, 108.1, 109.7, 123.1 s | | `D3D12 device removed: 0x887a0005` | none by 140 s in 5 of 5 | 118.2, 134.6, none, 134.6, 129.4 s | | how the run ended | still running at 140 s in 5 of 5 | `0x80000003` at `game+0x2474606` at 118.2 and 129.4 s; null write at `game+0x23cf683` at 134.6, 134.5 and 134.6 s | | dispatches (skipped) at the last count | 29418 (512), 31813 (589), 16814 (207), 30457 (1024), 20198 (256) | 15287 (512), 18426 (512), 13191 (256), 13669 (237), 14609 (271) | The log line of the change in every run with it: ``` D3D12.X: a pipeline in the workers' queue (1 builds waiting, 31 workers busy) is not waited for: its binds go on without it until it is built (1 so far) ``` One more run without it, of 175 s, ended the same way later: last present at 137.9 s, the first `queue.Wait` release at 142.9 s, the device removed and the null write at `game+0x23cf683` at 168.6 s. So on this machine the change moves the same end about 34 s earlier (1 long run without it). In the first four runs of each, the title presented 3 to 8 frames between 104 and 140 s without it and 2 or 3 with it. The fifth run of each tree was later throughout (its late binds started 14 s later than in the other four), and the fourth and fifth with the change had NVIDIA kernel messages during them (312 and 1; the 1 is an Xid 31 from another process on the card). The first three pairs had none and show the same. This card's video memory was full (9.6 GB local) from about 76 s in every run, so what follows the late binds here may be the card as much as the title. The order of events is the one the RX 9070 XT and RTX 3080 reports above give. **Read** - `pso_async.rs:590` (`worth_waiting`) and `:614`: a bind is not waited for when every worker is at a build and it is not this pipeline's. That is what the runs show: 31 workers busy, and each such bind returns at once. - `pso_async.rs:558`: `resolve_within` is only reached with a budget, so without `XCL_PSO_WAIT_MS` nothing changes, as the description says. Not run here. - A pipeline not waited for is marked late like one whose wait ran out, so the same draws and dispatches are skipped. The runs agree: no more dispatches were skipped with it than without. - A question, not a fault in the diff: the 18 s of 50 ms waits were also what kept the title from submitting everything at once. With them gone the `queue.Wait` releases start 20 to 29 s earlier here. Is the wait worth keeping for a build that is next in the queue, or is the stall after it a separate matter for #505? **Not tested:** without `XCL_PSO_WAIT_MS`; other limits than 50 ms; the preload of #690 on; a card with free video memory at that point; the rest of the test suite; AMD and Intel. **AI use:** Claude Code (Claude Fable 5.2) read the diff, built the trees, ran the tests and the eleven runs with `XCL_PRESS_AT`, compared the logs and wrote this report.
Author
Owner

@⁠chippy01 on GitHub · 2026-11-24 16:51 UTC · original

Test report for be8d052 on an RTX 3070 Ti 8 GB (32-lane waves), with the default (Series X) profile at the world start: the case this PR lists under Not tested.

Tested

  • NVIDIA GeForce RTX 3070 Ti 8 GB (driver 621.24), AMD Ryzen 9 7900X, 32 GB RAM, page file fixed at 32–64 GB (commit limit 63 GB), Windows 11 26200, rustc 1.100.0 MSVC; tests in debug, runs in release.
  • cargo build --workspace + cargo test --workspace -- --test-threads=4 on be8d052: 753 passed, 0 failed, 41 ignored; SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware. Both new tests pass.
  • Retail title 1.0.2.1, default profile, no input, XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PSO_WAIT_MS=50 XCL_FRAME_DUMP=1, scripts\smoke.ps1 -Seconds 360, one run per build: be8d052 first, then main 930e8b4. Both runs got the 4095 MB coherent window.
main 930e8b4 be8d052
world start (local video memory past 12 GB) ~60 s ~100 s
2 s activity windows with under 20 submits at the world start 96 – 116 s none until 151 s
"is not waited for" warnings – 1 → 513 pipelines between 135.41 and 135.63 s
skipped draws / dispatches (last count) 11,476 / 2,093 13,332 / 8,192
Wait64BitValueX timed out at …fe18 (op 7, queue_type=0) none before the run ended 141, 145, 148, 173 s; wants bd1/bd9/bda/be4, memory holds bcf/bd6/bd5/be2
how it ended stopped by me at ~153 s (commit 39 GB, under 8 GB free), no crash yet null write at +0x2215c35 at 208 s; no +0x23cf683 watchdog
  • So on this card the change does what it says: at the world start the title's binds no longer stall for ~20 s, and the run goes on until the counter stop described on #505 (the value at …fe18 goes down while the wanted one goes up, as in that report).
  • Not this PR's change, but worth knowing for anyone testing it on 32 GB: while the queues waited, process commit went from 31 GB (140 s) to 63.5 GB (206 s), and on to 69.6 GB after the crash, when I ended it. With the default system-managed page file an earlier run of this head froze Windows (out of commit).

Not tested

  • More than one run per build; the main run was stopped before it reached the counter stop or the watchdog, and ran second, with warmer caches (its world start came ~40 s earlier).
  • Other XCL_PSO_WAIT_MS values, the Series S profile, AMD and Intel GPUs.

AI use

  • AI assistance: Claude Code (Claude Opus 5.5) read the counts from XCL's logs and drafted this report.
**@⁠chippy01** on GitHub · 2026-11-24 16:51 UTC · [original](https://github.com/xcl-dev/xcl/pull/1273#issuecomment-7138306105) Test report for `be8d052` on an RTX 3070 Ti 8 GB (32-lane waves), with the default (Series X) profile at the world start: the case this PR lists under **Not tested**. **Tested** - NVIDIA GeForce RTX 3070 Ti 8 GB (driver 621.24), AMD Ryzen 9 7900X, 32 GB RAM, page file fixed at 32–64 GB (commit limit 63 GB), Windows 11 26200, rustc 1.100.0 MSVC; tests in debug, runs in release. - `cargo build --workspace` + `cargo test --workspace -- --test-threads=4` on `be8d052`: 753 passed, 0 failed, 41 ignored; `SKIPPED` (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. Both new tests pass. - Retail title 1.0.2.1, default profile, no input, `XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PSO_WAIT_MS=50 XCL_FRAME_DUMP=1`, `scripts\smoke.ps1 -Seconds 360`, one run per build: `be8d052` first, then `main` `930e8b4`. Both runs got the 4095 MB coherent window. | | `main` `930e8b4` | `be8d052` | |---|---|---| | world start (local video memory past 12 GB) | ~60 s | ~100 s | | 2 s activity windows with under 20 submits at the world start | 96 – 116 s | none until 151 s | | "is not waited for" warnings | – | 1 → 513 pipelines between 135.41 and 135.63 s | | skipped draws / dispatches (last count) | 11,476 / 2,093 | 13,332 / 8,192 | | `Wait64BitValueX` timed out at `…fe18` (op 7, `queue_type=0`) | none before the run ended | 141, 145, 148, 173 s; wants `bd1`/`bd9`/`bda`/`be4`, memory holds `bcf`/`bd6`/`bd5`/`be2` | | how it ended | stopped by me at ~153 s (commit 39 GB, under 8 GB free), no crash yet | null write at `+0x2215c35` at 208 s; no `+0x23cf683` watchdog | - So on this card the change does what it says: at the world start the title's binds no longer stall for ~20 s, and the run goes on until the counter stop described on #505 (the value at `…fe18` goes down while the wanted one goes up, as in that report). - Not this PR's change, but worth knowing for anyone testing it on 32 GB: while the queues waited, process commit went from 31 GB (140 s) to 63.5 GB (206 s), and on to 69.6 GB after the crash, when I ended it. With the default system-managed page file an earlier run of this head froze Windows (out of commit). **Not tested** - More than one run per build; the `main` run was stopped before it reached the counter stop or the watchdog, and ran second, with warmer caches (its world start came ~40 s earlier). - Other `XCL_PSO_WAIT_MS` values, the Series S profile, AMD and Intel GPUs. **AI use** - AI assistance: Claude Code (Claude Opus 5.5) read the counts from XCL's logs and drafted this report.
Author
Owner

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

Test report for #1273 (a bind does not wait for a pipeline behind the workers' queue) – PR head be8d052 merged into main b7aa9f3 (local merge 672343c, no conflicts). Written for the stop at game_scarlett_master.exe+0x23cf683 (#846, #675).

Tested

  • RTX 4070 12 GB (driver 32.0.16.1088), i7-13700K, 64 GB RAM, Windows 11 Home 26200, rustc stable stable-x86_64-pc-windows-msvc, release build; DXC 1.9.2609 (XCL_DXC_DIR).
  • Retail 1.0.2.1, own package, XCL_NETWORK=0, warm DXIL and driver-blob caches, first-run setup done; menus walked with XCL_PRESS_A_AT (same script every run). No XCL_PSO_WAIT_MS.
  • Runs, in turn, same machine, same caches: main b7aa9f3 against the merge above, one clean run each (330 s limit, started only after the machine-wide shader precompile had exited); XCL_PRESS_A_AT=30,45,60,90,120, nobody at the controls.
main b7aa9f3 with #1273
end 0xc0000005 write at 0, +0x23cf683, 140.0 s 0xc0000005 write at 0, +0x23cf683, 123.1 s; the process then hung instead of exiting (0 % CPU, killed after 17 min)
presents (report.json) 2315 2260
world load starts (#101) 93.9 s 92.2 s
last 2 s window with presents ends ~110 s ~94 s
longest compute PSO build 14.1 s (252 KB DXIL) 10.3 s (258 KB)
device removal none none
  • With #1273 the title still ends at +0x23cf683 (123 s against 140 s on main). The run is one sample each; main's earlier runs under heavy concurrent shader compilation (not used here) ended at 135 s.
  • In both the #1273 and #1288 runs, three Wait64BitValueX ... bridged to GPU queue.Wait (wait-before-signal, prod=qNone) lines appear at ~92 s, right as presents stop; main shows none in its log.

Not tested

  • One clean run per build, so run-to-run spread is not known. AMD, other NVIDIA cards, the Series S profile.
  • cargo test on the merge (not run).
  • Why presents stop at ~92 s; not investigated.

AI use

  • Claude Code (Claude Sonnet 5.5) ran the title and wrote this report from XCL's logs; the runs are on my hardware. No game data attached.
**@⁠Gruzzberry** on GitHub · 2026-11-24 18:14 UTC · [original](https://github.com/xcl-dev/xcl/pull/1273#issuecomment-7140367864) **Test report for #1273 (a bind does not wait for a pipeline behind the workers' queue)** – PR head `be8d052` merged into `main` `b7aa9f3` (local merge `672343c`, no conflicts). Written for the stop at `game_scarlett_master.exe+0x23cf683` (#846, #675). **Tested** - RTX 4070 12 GB (driver 32.0.16.1088), i7-13700K, 64 GB RAM, Windows 11 Home 26200, rustc stable `stable-x86_64-pc-windows-msvc`, release build; DXC 1.9.2609 (`XCL_DXC_DIR`). - Retail 1.0.2.1, own package, `XCL_NETWORK=0`, warm DXIL and driver-blob caches, first-run setup done; menus walked with `XCL_PRESS_A_AT` (same script every run). No `XCL_PSO_WAIT_MS`. - Runs, in turn, same machine, same caches: `main` `b7aa9f3` against the merge above, one clean run each (330 s limit, started only after the machine-wide shader precompile had exited); `XCL_PRESS_A_AT=30,45,60,90,120`, nobody at the controls. | | main `b7aa9f3` | with #1273 | |---|---|---| | end | `0xc0000005` write at 0, `+0x23cf683`, 140.0 s | `0xc0000005` write at 0, `+0x23cf683`, 123.1 s; the process then hung instead of exiting (0 % CPU, killed after 17 min) | | presents (report.json) | 2315 | 2260 | | world load starts (`#101`) | 93.9 s | 92.2 s | | last 2 s window with presents ends | ~110 s | ~94 s | | longest compute PSO build | 14.1 s (252 KB DXIL) | 10.3 s (258 KB) | | device removal | none | none | - With #1273 the title still ends at `+0x23cf683` (123 s against 140 s on main). The run is one sample each; main's earlier runs under heavy concurrent shader compilation (not used here) ended at 135 s. - In both the #1273 and #1288 runs, three `Wait64BitValueX ... bridged to GPU queue.Wait (wait-before-signal, prod=qNone)` lines appear at ~92 s, right as presents stop; main shows none in its log. **Not tested** - One clean run per build, so run-to-run spread is not known. AMD, other NVIDIA cards, the Series S profile. - `cargo test` on the merge (not run). - Why presents stop at ~92 s; not investigated. **AI use** - Claude Code (Claude Sonnet 5.5) ran the title and wrote this report from XCL's logs; the runs are on my hardware. No game data attached.
Author
Owner

@⁠ThiagoAlexsander on GitHub · 2026-11-24 18:36 UTC · original

Windows + NVIDIA datapoint: with this PR, the title still stops presenting during loading. At that moment the binds wait for pipelines that are already being compiled.

Setup: Windows 11 Pro 26300, RTX 5080 16 GB (driver 32.0.16.1088), Ryzen 7 9800X3D, 62 GB. Rust 1.100.0, release. Retail title 1.0.2.1. The build was a local tree of main b7aa9f3 with this PR (be8d052), #541 and #681 merged, plus an unpublished switch of mine. That switch dumps every thread twice, 1 s apart, once no frame has been presented for 6 s, then ends the run. The run had XCL_NETWORK=0, XCL_SHORT_MOVIES=1, an A press at 10 s, and no XCL_PSO_WAIT_MS.

What the dumps show: presents stopped after frame 947, at about 53 s.

  • Four title threads are in pso_async.rs:550, reached from bind.rs:238 (frames symbolized from the PDB). Three of them had the same stack in both dumps.
  • Five XCL threads (xcl-pso-0, -1, -4, -5 and xcl-pso-pre-0) are inside nvgpucomp64.dll.
  • The title's main thread waits in the watchdog routine at game+0x23cf735, next to the +0x23cf683 end of #846.

Before this PR (main 930e8b4, same switch): the waiting title thread was in resolve_wait, reached from Dispatch (bind.rs:710). So this PR does change where binds wait. On this machine the remaining wait is for builds that are in flight, not queued.

That run compiled 157 compute pipelines fresh: 52 s of driver time, with the slowest at 12.8 s. Seven of them took over 2 s each.

With XCL_PSO_WAIT_MS=50 (also on the older base), presents still stopped at about 50 s. Each pending pipeline still costs one budget on its first bind, and there are many at once: 7,612 dispatches in the 2 s before the stop.

Not tested: this PR on its own, AMD, a fully warm driver-blob cache (in progress), and the regression-run pair.

AI use: Claude Code (Claude Opus 5.5) built and ran this, symbolized the dumps and wrote the report. Posted with my approval.

**@⁠ThiagoAlexsander** on GitHub · 2026-11-24 18:36 UTC · [original](https://github.com/xcl-dev/xcl/pull/1273#issuecomment-7140871134) **Windows + NVIDIA datapoint:** with this PR, the title still stops presenting during loading. At that moment the binds wait for pipelines that are already being compiled. **Setup:** Windows 11 Pro 26300, RTX 5080 16 GB (driver 32.0.16.1088), Ryzen 7 9800X3D, 62 GB. Rust 1.100.0, release. Retail title 1.0.2.1. The build was a local tree of `main` `b7aa9f3` with this PR (`be8d052`), #541 and #681 merged, plus an unpublished switch of mine. That switch dumps every thread twice, 1 s apart, once no frame has been presented for 6 s, then ends the run. The run had `XCL_NETWORK=0`, `XCL_SHORT_MOVIES=1`, an A press at 10 s, and no `XCL_PSO_WAIT_MS`. **What the dumps show:** presents stopped after frame 947, at about 53 s. - Four title threads are in `pso_async.rs:550`, reached from `bind.rs:238` (frames symbolized from the PDB). Three of them had the same stack in both dumps. - Five XCL threads (`xcl-pso-0`, `-1`, `-4`, `-5` and `xcl-pso-pre-0`) are inside `nvgpucomp64.dll`. - The title's main thread waits in the watchdog routine at `game+0x23cf735`, next to the `+0x23cf683` end of #846. **Before this PR** (`main` `930e8b4`, same switch): the waiting title thread was in `resolve_wait`, reached from `Dispatch` (`bind.rs:710`). So this PR does change where binds wait. On this machine the remaining wait is for builds that are in flight, not queued. That run compiled 157 compute pipelines fresh: 52 s of driver time, with the slowest at 12.8 s. Seven of them took over 2 s each. With `XCL_PSO_WAIT_MS=50` (also on the older base), presents still stopped at about 50 s. Each pending pipeline still costs one budget on its first bind, and there are many at once: 7,612 dispatches in the 2 s before the stop. **Not tested:** this PR on its own, AMD, a fully warm driver-blob cache (in progress), and the regression-run pair. **AI use:** Claude Code (Claude Opus 5.5) built and ran this, symbolized the dumps and wrote the report. Posted with my approval.
Author
Owner

@⁠427001 on GitHub · 2026-11-25 13:32 UTC · original

Closing this: the reports above and what main has merged since show it should not go in.

  • It does what it says (the binds of queued pipelines no longer wait; every report confirms that), but the title does not get further for it. In the paired runs here it ended earlier with the change: @⁠Krashgamer (about 10× the skipped draws, two device removals), @⁠Royalflamejlh (5 of 5 runs over by 135 s, none without it by 140 s), @⁠Gruzzberry (123 s against 140 s), @⁠Chrysana (the hang comes 4–7 s after the first skip instead of 31–41 s).
  • The reason is now written down in main (5f4d32f, #2176): leaving out dispatches of pipelines still being built also leaves out passes whose results later work reads, and that hangs the GPU. This change made XCL_PSO_WAIT_MS leave them out sooner.
  • The stall it was written for (the title's 30 s check firing while binds wait) is handled in main without skipping anything: 9cdae10 (#1288) stops the title's Sleep from counting the time a bind waits.

It also conflicts with main in pso_async.rs now, and I see no reason to carry it forward. Thanks to everyone who ran it: the thread dumps and the paired runs are what settled it.

AI use: Claude Code with Claude Fable 5.2 read the reports and the commits named above and wrote this comment.

**@⁠427001** on GitHub · 2026-11-25 13:32 UTC · [original](https://github.com/xcl-dev/xcl/pull/1273#issuecomment-7163914979) Closing this: the reports above and what `main` has merged since show it should not go in. - It does what it says (the binds of queued pipelines no longer wait; every report confirms that), but the title does not get further for it. In the paired runs here it ended earlier with the change: @⁠Krashgamer (about 10× the skipped draws, two device removals), @⁠Royalflamejlh (5 of 5 runs over by 135 s, none without it by 140 s), @⁠Gruzzberry (123 s against 140 s), @⁠Chrysana (the hang comes 4–7 s after the first skip instead of 31–41 s). - The reason is now written down in `main` (5f4d32f, #2176): leaving out dispatches of pipelines still being built also leaves out passes whose results later work reads, and that hangs the GPU. This change made `XCL_PSO_WAIT_MS` leave them out sooner. - The stall it was written for (the title's 30 s check firing while binds wait) is handled in `main` without skipping anything: 9cdae10 (#1288) stops the title's `Sleep` from counting the time a bind waits. It also conflicts with `main` in `pso_async.rs` now, and I see no reason to carry it forward. Thanks to everyone who ran it: the thread dumps and the paired runs are what settled it. AI use: Claude Code with Claude Fable 5.2 read the reports and the commits named above and wrote this comment.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.