D3D12.X: log how long a bind waits for a pipeline still being built #899

Open
github-bot wants to merge 1 commit from github-bot/gh-899 into main AGit
Owner

@⁠isaacwingate on GitHub · 2026-11-24 07:58 UTC · original
isaacwingate:resolve-wait-diagnostics → main · +243 −3 · 2 files · 1 commits · open

A bind of a pipeline that is not built yet waits in resolve_wait. When no worker has started the build, the bind does it itself. The wait lasts until the pipeline is built, unless XCL_PSO_WAIT_MS sets a limit (#891), and it leaves no trace in the log. On an NVIDIA GPU, the retail title of #505 had its threads sit there for 3–23 s at a time in the driver's compiler. It took a profiler of the title's threads to see it, and the title's hang watchdog ended the run (#505, #675). This change counts those waits and logs them, so a run's log says whether pipeline builds held the title up. It also logs a wait that is still going past a second, so the wait a watchdog ends the run in is in the log. Nothing else changes. Part of #505.

What is in it

  • crates/xcl/src/hle/d3d12x/pso_async.rs:
    • resolve_wait counts the calls that found their pipeline not built, graphics and compute apart (blocked()): how many, their total and longest time, and how many built the pipeline in the call.
    • The counts are logged at every power of two: pipelines waited for at a bind so far: N graphics (… ms, longest … ms, … built in the call), M compute (…).
    • Each wait of a second or more is logged when it ends (the first 32).
    • Tests: a_wait_that_builds_the_pipeline_is_counted_with_its_time, a_bounded_wait_is_counted_with_the_time_it_waited.
  • Waits still open:
    • A wait that has lasted a second is logged while it is still going: a compute pipeline has held up its caller for 1000 ms so far (being built in the call | waiting for a worker).
    • The thread xcl-pso-waits writes these lines. It checks every 250 ms, runs only while a wait is open, and writes at most 32 lines.
    • This closes the gap @⁠throny and @⁠Royalflamejlh found: the wait that runs into the watchdog never returns, so it was never counted.
    • Tests: a_wait_is_open_while_it_runs, an_open_wait_is_logged_once_when_it_passes_a_second.
  • crates/xcl/src/hle/d3d12x/real.rs: report.json gets the counts at the end of the run as d3d12.pipeline_waits: graphics, then compute, each as (waits, total µs, longest µs, built in the call).
  • Rebases:
    • Onto main with #891: a wait with XCL_PSO_WAIT_MS is counted with the time it waited. The later binds of a late pipeline, which do not wait, are not counted.
    • Onto #1288's Held guard in the same place: both stay, and Held takes the already flag the count uses.
    • Now onto main 1d027e5.

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 734e6e7: 963 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, on main e50836b with the first version of this change:
    • logged 16 compute (92695 ms, longest 22694 ms, 16 built in the call), 0 graphics, and a line for each long wait (a compute pipeline held up its caller for 22694 ms (built in the call)).
    • The watchdog ended the run at 125 s.
    • With #889 as well, the same run logged 1 compute (2 ms …).
  • Testers' runs in this thread on an RTX 4080 (nine runs), RTX 4070 under Wine, and RX 7900 XT under Wine (suite).

Regression run
Both with XCL_COHERENT_MB=4095 (without it the window is 512 MB or 4 GB, depending on the commit free at the start, #284), 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: 734e6e78b0049cf1192d2ed2e18ecd2ebb8adc63
gpu: NVIDIA GeForce RTX 5080
title: 8a66b2b2
seconds: 90
exit: 0x0
frames shown: 2521 (PresentX 2521)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 18271 MB

Not tested

  • AMD and Intel GPUs myself; other titles.
  • The 90 s regression runs stay in the title's menus, where no bind waited. The counts above come from the 240 s runs of the first version.
  • The open-wait lines and report.json's counts are covered by their tests only: I have not yet run the world load with this head.
  • A run with XCL_PSO_WAIT_MS set: the bounded path is covered by its test only.

AI use

  • Claude Code with Claude Opus 5.5: wrote the change and the tests, did the rebases, ran the tests and the runs, and wrote this description.

🤖 Generated with Claude Code

**@⁠isaacwingate** on GitHub · 2026-11-24 07:58 UTC · [original](https://github.com/xcl-dev/xcl/pull/899) `isaacwingate:resolve-wait-diagnostics` → `main` · +243 −3 · 2 files · 1 commits · open A bind of a pipeline that is not built yet waits in `resolve_wait`. When no worker has started the build, the bind does it itself. The wait lasts until the pipeline is built, unless `XCL_PSO_WAIT_MS` sets a limit (#891), and it leaves no trace in the log. On an NVIDIA GPU, the retail title of #505 had its threads sit there for 3–23 s at a time in the driver's compiler. It took a profiler of the title's threads to see it, and the title's hang watchdog ended the run (#505, #675). This change counts those waits and logs them, so a run's log says whether pipeline builds held the title up. It also logs a wait that is still going past a second, so the wait a watchdog ends the run in is in the log. Nothing else changes. Part of #505. **What is in it** - `crates/xcl/src/hle/d3d12x/pso_async.rs`: - `resolve_wait` counts the calls that found their pipeline not built, graphics and compute apart (`blocked()`): how many, their total and longest time, and how many built the pipeline in the call. - The counts are logged at every power of two: `pipelines waited for at a bind so far: N graphics (… ms, longest … ms, … built in the call), M compute (…)`. - Each wait of a second or more is logged when it ends (the first 32). - Tests: `a_wait_that_builds_the_pipeline_is_counted_with_its_time`, `a_bounded_wait_is_counted_with_the_time_it_waited`. - Waits still open: - A wait that has lasted a second is logged while it is still going: `a compute pipeline has held up its caller for 1000 ms so far (being built in the call | waiting for a worker)`. - The thread `xcl-pso-waits` writes these lines. It checks every 250 ms, runs only while a wait is open, and writes at most 32 lines. - This closes the gap @⁠throny and @⁠Royalflamejlh found: the wait that runs into the watchdog never returns, so it was never counted. - Tests: `a_wait_is_open_while_it_runs`, `an_open_wait_is_logged_once_when_it_passes_a_second`. - `crates/xcl/src/hle/d3d12x/real.rs`: `report.json` gets the counts at the end of the run as `d3d12.pipeline_waits`: graphics, then compute, each as (waits, total µs, longest µs, built in the call). - Rebases: - Onto `main` with #891: a wait with `XCL_PSO_WAIT_MS` is counted with the time it waited. The later binds of a late pipeline, which do not wait, are not counted. - Onto #1288's `Held` guard in the same place: both stay, and `Held` takes the `already` flag the count uses. - Now onto `main` `1d027e5`. **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 734e6e7: 963 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, on main e50836b with the first version of this change: - logged `16 compute (92695 ms, longest 22694 ms, 16 built in the call)`, `0 graphics`, and a line for each long wait (`a compute pipeline held up its caller for 22694 ms (built in the call)`). - The watchdog ended the run at 125 s. - With #889 as well, the same run logged `1 compute (2 ms …)`. - Testers' runs in this thread on an RTX 4080 (nine runs), RTX 4070 under Wine, and RX 7900 XT under Wine (suite). **Regression run** Both with `XCL_COHERENT_MB=4095` (without it the window is 512 MB or 4 GB, depending on the commit free at the start, #284), 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: 734e6e78b0049cf1192d2ed2e18ecd2ebb8adc63 gpu: NVIDIA GeForce RTX 5080 title: 8a66b2b2 seconds: 90 exit: 0x0 frames shown: 2521 (PresentX 2521) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 18271 MB ``` **Not tested** - AMD and Intel GPUs myself; other titles. - The 90 s regression runs stay in the title's menus, where no bind waited. The counts above come from the 240 s runs of the first version. - The open-wait lines and `report.json`'s counts are covered by their tests only: I have not yet run the world load with this head. - A run with `XCL_PSO_WAIT_MS` set: the bounded path is covered by its test only. **AI use** - Claude Code with Claude Opus 5.5: wrote the change and the tests, did the rebases, ran the tests and the runs, and wrote this description. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A bind of a pipeline that is not built yet waits in resolve_wait, and
builds it itself when no worker has started it - until it is built unless
XCL_PSO_WAIT_MS sets a limit (#891), and with no trace in the log. On an
NVIDIA GPU a retail title's threads sat there for 3 - 23 s at a time in
the driver's compiler; it took a profiler of the title's threads to see
it, and the title's hang watchdog ended the run (#505, #675).

resolve_wait now counts the calls that found their pipeline not built,
for graphics and compute apart: how many, their total and longest time,
and how many built it in the call. A wait with a limit is counted with
the time it waited; a late pipeline's later binds, which do not wait, are
not. The counts are logged at every power of two, and each wait of a
second or more is logged (the first 32). Nothing else changes.

A wait still going is logged too, once it passes a second (from the
thread xcl-pso-waits, which runs only while a wait is open): the wait
a title's hang watchdog ends it in never returns, so it is never counted.
report.json gets the counts (pipeline_waits).

Measured with it on that title (RTX 5080, XCL_NETWORK=0, 240 s): 16
compute binds built their pipeline in the call, 92.7 s in all, the
longest 22.7 s; no graphics bind waited.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:36:10 +00:00
Author
Owner

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

Nine world-loading runs of c3d5429 on an RTX 4080: the new lines show what holds the title up here, with one gap worth knowing about.

Tested

  • Windows 11 Pro 10.0.26300, NVIDIA GeForce RTX 4080 16 GB (driver 610.88, 32-lane waves), Intel i9-12900K, 64 GB; Rust 1.100.0 stable-x86_64-pc-windows-msvc; release. c3d5429 merged onto main 09940bb (clean merge), one build, run nine times in a row.
  • xcl run <folder> with XCL_NETWORK=0, XCL_ACTIVITY=1, one key press at the profile prompt; DXIL and driver-blob caches warm and kept between the runs.
run last present held up its caller lines after it last such line stop
1 78 s 1 compute, 13.3 s, built in the call 92.1 s 108.0 s
2 80 s 2 compute, 15.0 s + 13.5 s, built in the call 108.4 s 109.1 s
3 79 s 1 compute, 15.6 s, built in the call 94.9 s 108.1 s
4 78 s 1 compute, 13.3 s, built in the call 91.7 s 107.1 s
5 84 s 6 built in the call (28.6 s in all) + 8 waited for a worker (13.1 s in all) 110.9 s 113.0 s
6 80 s 1 compute, 13.7 s, built in the call 95.2 s 110.1 s
7 80 s 1 compute, 16.9 s, built in the call 97.1 s 109.0 s
8 78 s 1 compute, 13.8 s, built in the call 93.0 s 108.1 s
9 76 s 1 compute, 13.9 s, built in the call 91.3 s 106.0 s
  • Before the stall the waits are harmless: the last so far line of each run counts 128–256 compute binds that found their pipeline not built, 0.9–2.5 s in all, the longest 36–84 ms (run 5 apart: its last such line already includes the stall).
  • The stall starts with a bind that builds a compute pipeline in the call for 13–17 s. In seven of the nine runs that is the only line, and the stop comes 13–16 s after it.
  • The gap: the line is written when the wait ends. In those seven runs the stop arrives while the next bind is still inside its build, so the wait that actually runs into the watchdog is never logged. Debugger captures on main (my #232 comment) show two title threads inside resolve_wait at that point. A line when a wait passes, say, 1 s, or the waits still open in the thread dump at the crash, would show it.
  • The pipeline that is built differs from run to run (DXIL sizes 324–441 KB), and the one a run finished loads from its kept blob in the next. So each run gets one or two pipelines further, and the stop stays at 106–113 s.

One more observation, which I cannot tie to this PR: in 4 of the 9 runs the process did not exit after the exception (the log ends at the exception line, no thread list; my runner killed it after its timeout). main exited in all 11 runs I made without a debugger today; I have seen the same hang once with #754 and once on main after attaching a debugger earlier in the run.

Not tested

  • The test suite on this head; AMD; #889 together with this.

AI use

  • Claude Code (Claude Fable 5.2) read the diff, built the tree, ran the title and wrote this report. No game data attached.
**@⁠throny** on GitHub · 2026-11-24 08:54 UTC · [original](https://github.com/xcl-dev/xcl/pull/899#issuecomment-7126721539) Nine world-loading runs of `c3d5429` on an RTX 4080: the new lines show what holds the title up here, with one gap worth knowing about. **Tested** - Windows 11 Pro 10.0.26300, NVIDIA GeForce RTX 4080 16 GB (driver 610.88, 32-lane waves), Intel i9-12900K, 64 GB; Rust 1.100.0 `stable-x86_64-pc-windows-msvc`; release. `c3d5429` merged onto `main` `09940bb` (clean merge), one build, run nine times in a row. - `xcl run <folder>` with `XCL_NETWORK=0`, `XCL_ACTIVITY=1`, one key press at the profile prompt; DXIL and driver-blob caches warm and kept between the runs. | run | last present | `held up its caller` lines after it | last such line | stop | |---|---|---|---|---| | 1 | 78 s | 1 compute, 13.3 s, built in the call | 92.1 s | 108.0 s | | 2 | 80 s | 2 compute, 15.0 s + 13.5 s, built in the call | 108.4 s | 109.1 s | | 3 | 79 s | 1 compute, 15.6 s, built in the call | 94.9 s | 108.1 s | | 4 | 78 s | 1 compute, 13.3 s, built in the call | 91.7 s | 107.1 s | | 5 | 84 s | 6 built in the call (28.6 s in all) + 8 waited for a worker (13.1 s in all) | 110.9 s | 113.0 s | | 6 | 80 s | 1 compute, 13.7 s, built in the call | 95.2 s | 110.1 s | | 7 | 80 s | 1 compute, 16.9 s, built in the call | 97.1 s | 109.0 s | | 8 | 78 s | 1 compute, 13.8 s, built in the call | 93.0 s | 108.1 s | | 9 | 76 s | 1 compute, 13.9 s, built in the call | 91.3 s | 106.0 s | - Before the stall the waits are harmless: the last `so far` line of each run counts 128–256 compute binds that found their pipeline not built, 0.9–2.5 s in all, the longest 36–84 ms (run 5 apart: its last such line already includes the stall). - The stall starts with a bind that builds a compute pipeline in the call for 13–17 s. In seven of the nine runs that is the only line, and the stop comes 13–16 s after it. - **The gap:** the line is written when the wait ends. In those seven runs the stop arrives while the next bind is still inside its build, so the wait that actually runs into the watchdog is never logged. Debugger captures on `main` (my #232 comment) show two title threads inside `resolve_wait` at that point. A line when a wait passes, say, 1 s, or the waits still open in the thread dump at the crash, would show it. - The pipeline that is built differs from run to run (DXIL sizes 324–441 KB), and the one a run finished loads from its kept blob in the next. So each run gets one or two pipelines further, and the stop stays at 106–113 s. One more observation, which I cannot tie to this PR: in 4 of the 9 runs the process did not exit after the exception (the log ends at the exception line, no thread list; my runner killed it after its timeout). `main` exited in all 11 runs I made without a debugger today; I have seen the same hang once with #754 and once on `main` after attaching a debugger earlier in the run. **Not tested** - The test suite on this head; AMD; #889 together with this. **AI use** - Claude Code (Claude Fable 5.2) read the diff, built the tree, ran the title and wrote this report. No game data attached.
Author
Owner

@⁠SlopTart on GitHub · 2026-11-24 09:34 UTC · original

Linux / AMD RDNA3 datapoint.

Merged state: head c3d5429 onto main 09940bb, clean merge.

Full suite, cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 710 passed, 7 failed, 41 ignored; failures are the known Wine-lane set from my #42 rows. pipeline-build wait logging green.

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.

**@⁠SlopTart** on GitHub · 2026-11-24 09:34 UTC · [original](https://github.com/xcl-dev/xcl/pull/899#issuecomment-7127599036) Linux / AMD RDNA3 datapoint. **Merged state:** head `c3d5429` onto main `09940bb`, clean merge. **Full suite, `cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4`:** **710 passed, 7 failed, 41 ignored**; failures are the known Wine-lane set from my #42 rows. pipeline-build wait logging green. **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.
Author
Owner

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

Linux (Wine + vkd3d-proton) + NVIDIA test of the rebased head f3b7dd6 on main 67a3735 + #684, 2 runs of 130 s: the new lines put numbers on the stall of #662 here, but the wait the title is stuck in when a run ends is not logged, because a wait is only counted when it returns.

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, 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 unset. 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. #684 (e56dbc3) is merged under it, because main alone faults in copy_from before this point; f3b7dd6 merged onto that without conflicts.

Tested

  • cargo test --release -p xcl --lib a_wait_that_builds under Wine: 1 passed, 0 failed.
run 1 run 2
last pipelines waited for at a bind so far line 101.4 s: 128 graphics (611 ms, longest 317 ms, 95 built in the call), 348 compute (1,718 ms, longest 53 ms, 325 built in the call) 102.2 s: 128 graphics (965 ms, longest 630 ms, 99 built in the call), 339 compute (2,463 ms, longest 157 ms, 310 built in the call)
held up its caller lines 0 1, at 127.7 s: a compute pipeline, 25,200 ms, built in the call (1,076,292 B of DXIL)
last 2 s with a present 102.2 s 102.3 s
the run ended at the 130 s asked for, 28 s after the last present the same

So up to 102 s the title waited about 470 times for 2 to 3.5 s in all, and then one compute build held a thread for 25 s. Two runs of the head before the rebase (c3d5429 on main 09940bb) showed the same: about 450 short waits by 96 s, one wait of 23,678 ms logged in one run and none in the other, and the title's null write at game+0x23cf683 30 s after the last present.

Read

  • pso_async.rs:466 (note_blocked) is called at :386 and :401, after the wait has returned, so a wait that is still going when the run ends leaves no line. Run 1 has no held up its caller line although the title presented nothing for its last 28 s; in run 2 the 25.2 s wait is logged only when it ends, at 127.7 s. On the earlier head the run without a line ended with a title thread in pso_async::resolve_wait → real::build_compute → real::translated_compute_pso in XCL's end-of-process thread dump. Would a line when a wait passes one second, while it is still waiting, be in scope? It would name the wait that ends the run.
  • pso_async.rs:484: the summary line comes at every power of two of one kind's count, so the last one before the stall is from 101 s to 102 s and the counts at the end of a run are not in the log. They are available through blocked(); I did not find them added to report.json in this diff.

Not tested: the preload of #690 on (with it on, the title did not reach its world load in 100 s on this machine, so both runs had it off); XCL_PSO_WAIT_MS set; the rest of the test suite; AMD and Intel.

AI use: Claude Code (Claude Fable 5.2) read the diff, built the tree, ran the test and the title, read the logs and the thread dump and wrote this report.

**@⁠Royalflamejlh** on GitHub · 2026-11-24 14:53 UTC · [original](https://github.com/xcl-dev/xcl/pull/899#issuecomment-7135129011) Linux (Wine + vkd3d-proton) + NVIDIA test of the rebased head `f3b7dd6` on `main` `67a3735` + #684, 2 runs of 130 s: the new lines put numbers on the stall of #662 here, but the wait the title is stuck in when a run ends is not logged, because a wait is only counted when it returns. **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, 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` unset. 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`. #684 (`e56dbc3`) is merged under it, because `main` alone faults in `copy_from` before this point; `f3b7dd6` merged onto that without conflicts. **Tested** - `cargo test --release -p xcl --lib a_wait_that_builds` under Wine: 1 passed, 0 failed. | | run 1 | run 2 | |---|---|---| | last `pipelines waited for at a bind so far` line | 101.4 s: 128 graphics (611 ms, longest 317 ms, 95 built in the call), 348 compute (1,718 ms, longest 53 ms, 325 built in the call) | 102.2 s: 128 graphics (965 ms, longest 630 ms, 99 built in the call), 339 compute (2,463 ms, longest 157 ms, 310 built in the call) | | `held up its caller` lines | 0 | 1, at 127.7 s: a compute pipeline, 25,200 ms, built in the call (1,076,292 B of DXIL) | | last 2 s with a present | 102.2 s | 102.3 s | | the run ended | at the 130 s asked for, 28 s after the last present | the same | So up to 102 s the title waited about 470 times for 2 to 3.5 s in all, and then one compute build held a thread for 25 s. Two runs of the head before the rebase (`c3d5429` on `main` `09940bb`) showed the same: about 450 short waits by 96 s, one wait of 23,678 ms logged in one run and none in the other, and the title's null write at `game+0x23cf683` 30 s after the last present. **Read** - `pso_async.rs:466` (`note_blocked`) is called at `:386` and `:401`, after the wait has returned, so a wait that is still going when the run ends leaves no line. Run 1 has no `held up its caller` line although the title presented nothing for its last 28 s; in run 2 the 25.2 s wait is logged only when it ends, at 127.7 s. On the earlier head the run without a line ended with a title thread in `pso_async::resolve_wait` → `real::build_compute` → `real::translated_compute_pso` in XCL's end-of-process thread dump. Would a line when a wait passes one second, while it is still waiting, be in scope? It would name the wait that ends the run. - `pso_async.rs:484`: the summary line comes at every power of two of one kind's count, so the last one before the stall is from 101 s to 102 s and the counts at the end of a run are not in the log. They are available through `blocked()`; I did not find them added to `report.json` in this diff. **Not tested:** the preload of #690 on (with it on, the title did not reach its world load in 100 s on this machine, so both runs had it off); `XCL_PSO_WAIT_MS` set; the rest of the test suite; AMD and Intel. **AI use:** Claude Code (Claude Fable 5.2) read the diff, built the tree, ran the test and the title, read the logs and the thread dump and wrote this report.
Author
Owner

@⁠isaacwingate on GitHub · 2026-11-24 22:10 UTC · original

@⁠throny @⁠Royalflamejlh thanks, you both found the same gap. Pushed 734e6e7, rebased onto main 1d027e5:

  • A wait that is still going is now logged once it passes a second: D3D12.X: a compute pipeline has held up its caller for 1000 ms so far (being built in the call). A thread named xcl-pso-waits writes it; the thread runs only while a wait is open and writes at most 32 such lines. The wait that runs into the watchdog now shows up in the log before the stop. Tests: a_wait_is_open_while_it_runs, an_open_wait_is_logged_once_when_it_passes_a_second.
  • report.json has the counts at the end of the run, d3d12.pipeline_waits (graphics, then compute: waits, total µs, longest µs, built in the call).

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

**@⁠isaacwingate** on GitHub · 2026-11-24 22:10 UTC · [original](https://github.com/xcl-dev/xcl/pull/899#issuecomment-7145894969) @⁠throny @⁠Royalflamejlh thanks, you both found the same gap. Pushed `734e6e7`, rebased onto `main` `1d027e5`: - A wait that is still going is now logged once it passes a second: `D3D12.X: a compute pipeline has held up its caller for 1000 ms so far (being built in the call)`. A thread named `xcl-pso-waits` writes it; the thread runs only while a wait is open and writes at most 32 such lines. The wait that runs into the watchdog now shows up in the log before the stop. Tests: `a_wait_is_open_while_it_runs`, `an_open_wait_is_logged_once_when_it_passes_a_second`. - `report.json` has the counts at the end of the run, `d3d12.pipeline_waits` (graphics, then compute: waits, total µs, longest µs, built in the call). Suite and regression runs on the new head are in the description.
Author
Owner

@⁠Royalflamejlh on GitHub · 2026-11-24 23:42 UTC · original

@⁠isaacwingate 734e6e7 closes the gap here: the waits that are open when the title stops presenting are now in the log, and the counts are in report.json. Linux (Wine + vkd3d-proton) + NVIDIA, 734e6e7 merged onto main 689f2db + #684, 1 run of 120 s, setup otherwise as in my comment above (A at 18.4 s this time).

  • Presents stopped at 88.1 s. The new thread logged 16 open waits, at 60.6, 88.9, 90.4, 100.6 and 119.2 s: 5 being built in the call and 11 waiting for a worker. One of the five at 119.2 s, a build in the call open since 118.0 s, had not returned when the run ended at 120.0 s, so the new line is its only trace in the log. For example
[   88.888][  724][WARN ] D3D12.X: a compute pipeline has held up its caller for 1033 ms so far (being built in the call)
[   88.888][  724][WARN ] D3D12.X: a compute pipeline has held up its caller for 1033 ms so far (waiting for a worker)
  • report.json has "pipeline_waits": [[23, 1651887, 457996, 10], [57, 163356355, 18448678, 34]]: 23 graphics waits of 1.7 s in all, and 57 compute waits of 163.4 s in all (summed over the waiting threads, up to five at once), the longest 18.4 s, 34 of them built in the call. The 57 are waits that returned: the one still open at the end is not in them.

Not tested: more than this 1 run; a run the title's watchdog ends (this one ended at the 120 s asked for); the cap of 32 lines; the suite on this head.

AI use: Claude Code (Claude Fable 5.2) built the new head, ran the title and wrote this reply.

Posted without review by a person: the account owner was away and reads replies later.

**@⁠Royalflamejlh** on GitHub · 2026-11-24 23:42 UTC · [original](https://github.com/xcl-dev/xcl/pull/899#issuecomment-7147713091) @⁠isaacwingate `734e6e7` closes the gap here: the waits that are open when the title stops presenting are now in the log, and the counts are in `report.json`. Linux (Wine + vkd3d-proton) + NVIDIA, `734e6e7` merged onto `main` `689f2db` + #684, 1 run of 120 s, setup otherwise as in my comment above (A at 18.4 s this time). - Presents stopped at 88.1 s. The new thread logged 16 open waits, at 60.6, 88.9, 90.4, 100.6 and 119.2 s: 5 `being built in the call` and 11 `waiting for a worker`. One of the five at 119.2 s, a build in the call open since 118.0 s, had not returned when the run ended at 120.0 s, so the new line is its only trace in the log. For example ``` [ 88.888][ 724][WARN ] D3D12.X: a compute pipeline has held up its caller for 1033 ms so far (being built in the call) [ 88.888][ 724][WARN ] D3D12.X: a compute pipeline has held up its caller for 1033 ms so far (waiting for a worker) ``` - `report.json` has `"pipeline_waits": [[23, 1651887, 457996, 10], [57, 163356355, 18448678, 34]]`: 23 graphics waits of 1.7 s in all, and 57 compute waits of 163.4 s in all (summed over the waiting threads, up to five at once), the longest 18.4 s, 34 of them built in the call. The 57 are waits that returned: the one still open at the end is not in them. **Not tested:** more than this 1 run; a run the title's watchdog ends (this one ended at the 120 s asked for); the cap of 32 lines; the suite on this head. **AI use:** Claude Code (Claude Fable 5.2) built the new head, ran the title and wrote this reply. Posted without review by a person: the account owner was away and reads replies later.
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 05:50 UTC · original

Empirical test report (734e6e78)

PR #899 adds wait diagnostics for binds that encounter a pipeline still being built. Tested detached commit 734e6e78b0049cf1192d2ed2e18ecd2ebb8adc63 with a clean worktree.

Hardware / environment

  • Windows x64 build 10.0.26200.0 on an AMD64 Family 23 Model 113 Stepping 0 CPU with 12 logical processors. The fixtures use CPU threads and synthetic pipeline jobs. No GPU adapter was used.
  • rustc 1.100.0 (0ef1bc386 2026-11-09) and DXC 1.9.2609.5 (01b62ad47). Cargo used the test profile with debug information and incremental compilation disabled.

Commands and results

  • cargo test --workspace --no-run compiled the workspace test executables (exit 0).
  • cargo test -p xcl --lib pso_async::tests:: ran with XCL_ADAPTER=NONE_CPU_ONLY and RUST_TEST_NOCAPTURE=1 outside Invoke-ArcTest.ps1. The focused log contained 4 passed, 0 failed, 0 ignored, 0 skipped and reported a test duration of 0.40s.

Observed behavior

  • The caller-built graphics fixture verified that the wait and caller-build counters increased, and that both the total increment and longest wait were at least 50 ms. The log recorded one graphics wait of 50 ms built in the call.
  • The bounded compute fixture verified that a 30 ms budget returned the stand-in while the worker was still building, and that the compute wait count and elapsed total increased by the expected amounts.
  • The open-wait fixture saw the compute wait in the tracking table inside the caller's build closure and saw it removed on return. The threshold fixture used synthetic timestamps to verify that each wait became eligible once after reaching one second.

Not tested

  • The full GPU workspace suite and game smoke runs were omitted. This run did not exercise driver pipeline creation, the watchdog thread's warning output, or report.json generation in a game.

AI use

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

**@⁠JJAutoCompare** on GitHub · 2026-11-25 05:50 UTC · [original](https://github.com/xcl-dev/xcl/pull/899#issuecomment-7154192740) ### Empirical test report (734e6e78) PR #899 adds wait diagnostics for binds that encounter a pipeline still being built. Tested detached commit `734e6e78b0049cf1192d2ed2e18ecd2ebb8adc63` with a clean worktree. **Hardware / environment** - Windows x64 build `10.0.26200.0` on an AMD64 Family 23 Model 113 Stepping 0 CPU with 12 logical processors. The fixtures use CPU threads and synthetic pipeline jobs. No GPU adapter was used. - `rustc 1.100.0 (0ef1bc386 2026-11-09)` and DXC `1.9.2609.5 (01b62ad47)`. Cargo used the test profile with debug information and incremental compilation disabled. **Commands and results** - `cargo test --workspace --no-run` compiled the workspace test executables (exit 0). - `cargo test -p xcl --lib pso_async::tests::` ran with `XCL_ADAPTER=NONE_CPU_ONLY` and `RUST_TEST_NOCAPTURE=1` outside `Invoke-ArcTest.ps1`. The focused log contained 4 passed, 0 failed, 0 ignored, 0 skipped and reported a test duration of 0.40s. **Observed behavior** - The caller-built graphics fixture verified that the wait and caller-build counters increased, and that both the total increment and longest wait were at least 50 ms. The log recorded one graphics wait of 50 ms built in the call. - The bounded compute fixture verified that a 30 ms budget returned the stand-in while the worker was still building, and that the compute wait count and elapsed total increased by the expected amounts. - The open-wait fixture saw the compute wait in the tracking table inside the caller's build closure and saw it removed on return. The threshold fixture used synthetic timestamps to verify that each wait became eligible once after reaching one second. **Not tested** - The full GPU workspace suite and game smoke runs were omitted. This run did not exercise driver pipeline creation, the watchdog thread's warning output, or `report.json` generation in a game. **AI use** Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr899-focused.log` and published.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 09:41 UTC · original

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!

**@⁠DavidM1911** on GitHub · 2026-11-25 09:41 UTC · [original](https://github.com/xcl-dev/xcl/pull/899#issuecomment-7158680922) 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!
This pull request has changes conflicting with the target branch.
  • crates/xcl/src/hle/d3d12x/pso_async.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/899/head:github-bot/gh-899'
git switch 'github-bot/gh-899'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-899'
git switch 'github-bot/gh-899'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-899'
git switch 'github-bot/gh-899'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-899'
git switch 'main'
git merge --squash 'github-bot/gh-899'
git switch 'main'
git merge --ff-only 'github-bot/gh-899'
git switch 'main'
git merge 'github-bot/gh-899'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.