D3D12.X: XCL_PSO_WAIT_MS bounds how long a bind waits for a pipeline being built (retail world renders) #891
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!891
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/891/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Sr-0w on GitHub · 2026-11-24 07:45 UTC · original
Sr-0w:pso-wait-budget→main· +75 −0 · 1 files · 2 commits · merged 2026-11-24 10:06 UTCPart of #505.
A retail game creates its compute programs on its own threads and binds them right away. A bind of a compute pipeline waited for the build (
resolve_wait). The driver takes up to 30 s for the biggest translated programs (378 KB of DXIL: 16 s; 685 KB: 31 s on an RX 7800 XT).Once the world starts loading, the title meets programs that are not built yet and its threads are held. The main thread's heartbeat then stops, and the title's watchdog ends it 30 s later (
+0x23cf683, "GPU Loc Sig"). The driver-blob cache does not get past this: each run stops at the next program not built yet, before its build ends.With
XCL_PSO_WAIT_MS=<ms>, a bind waits at most that long:Unset, nothing changes: a bind waits for the build as before. It is opt-in because skipped dispatches leave their outputs unwritten.
Before / after (
maine50836b, same machine, warm driver-blob cache, A pressed at the title screen):XCL_PSO_WAIT_MS=50): the world renders. The first 3D frames (sky, clouds, terrain) are below, and the process was still running at 240 s, when the run ended.It is not playable yet. Frames come at under 1 fps, and on
mainthe waits of #708's kind still time out (40Wait64BitValueXtimeouts in the run above). With #708 merged as well, there were no timeouts, but the run crashed at 158 s on garbage read from a buffer (likely a skipped dispatch's output).What is in it
crates/xcl/src/hle/d3d12x/pso_async.rs:wait_budget(XCL_PSO_WAIT_MS);resolve_wait_for/resolve_within: a bounded wait, which hands the build to the workers;Pending::late;a_bind_waits_for_a_slow_pipeline_no_longer_than_its_budget.Tested
cargo test --release --workspace -- --test-threads=4: 661 passed, 3 failed, 21 ignored.placed_title_textures_share_vram_and_preserve_pixels,transitions_apply_when_their_list_is_submittedandd32s8_targets_take_their_own_size_of_video_memory.main(e50836b) with--test-threads=4and pass alone, on both.XCL_PSO_WAIT_MS=50, as described above.Regression run (default settings,
XCL_PSO_WAIT_MSunset)main:
this PR:
Not tested
AI use
resolve_waitfrom thread dumps, wrote the change and its test, ran the tests and the runs.🤖 Generated with Claude Code
A retail game creates compute programs on its own threads and binds them at once. The driver takes up to 30 s for the biggest translated ones, and the bind waited for the build (`resolve_wait`). Once its world starts loading, the title met programs not built yet, its main thread was held, and its watchdog ended it 30 s later ("GPU Loc Sig", issue #505). With `XCL_PSO_WAIT_MS=<ms>` a bind waits at most that long. The build then goes on on the workers, not on the title's thread. Until it is done, the pipeline is late: its binds get the stand-in, and their dispatches are skipped, as for a pipeline without a translation. Unset, a bind waits for the build as before. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SKtJseucqXR6iuAE6HBtiA@S33G on GitHub · 2026-11-24 07:49 UTC · original
Testing Nvidia GPU now
@Rednaxeh on GitHub · 2026-11-24 08:00 UTC · original
Testing this on a second RX 7800 XT (driver 32.0.32029.2010, Ryzen 7 7800X3D, 32 GB, Windows 11 26300):
main1c87b1dagainst5fab112merged onto it (7d5641c), release, same title, 300 s runs withXCL_ACTIVITY=1 XCL_TRACE_FAULTS=1 XCL_THREAD_DUMP_AT=…, with and withoutXCL_PSO_WAIT_MS=50. Onmainhere the run ends in the watchdog at 115 s with four title threads inresolve_waitunderset_pipeline_stateand one 300 KB compute pipeline taking 13.1 s in the driver (dumps in #232). Report here today.AI use: Claude Code (Claude Fable 5.1) wrote this note; the runs are mine.
@dcastell1 on GitHub · 2026-11-24 08:03 UTC · original
Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on clean
main@beaa245(713 passed, 0 failed, 41 ignored on this box):The new test runs and passes here:
hle::d3d12x::pso_async::used_tests::a_bind_waits_for_a_slow_pipeline_no_longer_than_its_budget.Two notes from reading it, neither a blocker:
XCL_PSO_WAIT_MS=0now means "do not wait at all", because the value goes straight throughDuration::from_millis. In thetheaustinayers/xclmodified build the same variable means the opposite (0= wait until the build ends, "as before"), so anyone carrying that value over gets skipped dispatches instead of the old blocking behaviour. A one-line comment on the variable, or treating0as unset, would stop that trap.resolve_withinnever callscomplete(&p, job())itself, only the unbounded path still builds on the caller's thread — which is the behaviour this PR exists to avoid when the variable is set.Tree restored afterwards (md5 and a full diff against a clean checkout); hardware adapter, no Wine, no game data.
AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it.
@burber on GitHub · 2026-11-24 08:10 UTC · original
NVIDIA RTX 4070 Ti (12 GB) with 50 ms bounded waits: no watchdog any more; ~5 min later the GPU hangs
Same idea as this PR, on a stack that already bounds the waits:
XCL_COMPUTE_PSO_WAIT_MS); later binds of a timed-out pipeline get the stand-in without waiting again.XCL_PSO_WAIT_MS).I haven't run this exact PR; this is the same behaviour from those two.
Setup: RTX 4070 Ti 12 GB (driver 32.0.16.1062), i5-13600K, 32 GB RAM + 32 GB page file, Windows 11 26300, DXC 1.8.2502.
main11920b5(with #795 / #797 / #866 / #897) + #533 + #267 + #640. Title 1.0.2.1,XCL_NETWORK=0,XCL_PAGE_BUDGET_MB=6144(without it local video memory goes ~2 GB past this card), and 304 driver blobs precompiled offline (#744's approach).XCL_COMPUTE_PSO_WAIT_MS=50 XCL_PSO_WAIT_MS=50:+0x23cf683at 127–149 sWhat happens after loading starts in run 19:
D3D12 device removed: 0x887a0006, then the title's assert0x80000003at+0x2474606.So on NVIDIA the bounded waits get past the watchdog, as on your RX 7800 XT, and the next wall here is a GPU hang. Whether that comes from dispatches skipped with stand-ins (their outputs never written), or from a producer queue that never reaches 0x7f9, I can't tell from this run.
Investigated with AI assistance; all numbers are from runs on my machine.
@Sr-0w on GitHub · 2026-11-24 08:11 UTC · original
Thanks for the runs.
@dcastell1, good catch on
0. In the latest commit,XCL_PSO_WAIT_MS=0now means the same as unset: wait until the pipeline is built. Only a positive value bounds the wait. On your second point: yes, the bounded path never builds on the title's thread. That is on purpose.@Rednaxeh, your
mainresult matches mine: watchdog at about 115 s, title threads inresolve_waitunderset_pipeline_state, one compute program taking 10-30 s in the driver. I'm looking forward to theXCL_PSO_WAIT_MS=50numbers.An update from more runs here (RX 7800 XT), to keep expectations honest:
XCL_PSO_WAIT_MS=50gets past the loading screen to the first world frames, but the runs still end between 120 s and 260 s. Hundreds of pipelines go late (513 in one run). The title then reads what their skipped dispatches did not write: crashes reading0xffffffffffffffff, or values that look like +inf.XCL_PSO_WAIT_MS=2000skips far fewer (about 33), but about 30 two-second waits in a row bring the watchdog back (at about 160 s).So this PR removes the watchdog from the driver compile wait, but it is not enough on its own to play. The rest is getting those compute programs built before they are needed.
AI use: Claude Code (Claude Opus 5.5) wrote the change and this reply.
@S33G on GitHub · 2026-11-24 08:12 UTC · original
With
XCL_PSO_WAIT_MS=50on an RTX 3090, the second run recorded at least 257 pipeline wait expirations and crashed at 76.518 s reading0x29e45at title offset+0x4e59848. An earlier run reached 325 seconds and exited when the window was closed.Tested
5fab11264ee651312d063a465f752f53b6bd6be8, built withcargo build --workspace --release --lockedand Rust 1.100.0 MSVC.Wait64BitValueXtimeoutsIn the second run, a two-second DirectStorage sample at 54.030 s recorded 6,473 requests and 821 failures. The four GPU waits then timed out between 69.976 and 75.991 s. The logs leave open whether a skipped dispatch, a storage failure, or another condition caused the invalid read.
Presentation counts measure calls to PresentX. The counters alone cannot establish world rendering or playability. The dispatch counts above are the last periodic samples and include skips from all causes.
AI use: Codex (gpt-6.2-astra) analyzed the local reports and logs and drafted this comment.
@Rednaxeh on GitHub · 2026-11-24 08:17 UTC · original
RDNA3 (second RX 7800 XT): with
XCL_PSO_WAIT_MS=50the watchdog no longer fires and the loading completes, but both runs end 3 s later in a GPU hang (0x887a0006); the world did not render here.Setup: AMD Radeon RX 7800 XT 16 GB, driver 32.0.32029.2010 (64-lane waves); Ryzen 7 7800X3D; 32 GB RAM, 12 GB page file; Windows 11 Pro 26300 (native); release builds, rustc 1.100.0 msvc, DXC 1.9.2602.17.
main1c87b1d, and5fab112merged onto it (7d5641c, clean). Title 1.0.2.1, own copy, warm DXIL cache; the driver's own shader cache warmed by the earlier runs of the day. Each run:xcl run, 300 s limit,XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_TRACE_FAULTS=1 XCL_FRAME_DUMP=120 XCL_THREAD_DUMP_AT=90,110,150,200, one A press at ~14 s, nothing else. Four runs, one after the other:main+0x23cf683at 105.4 sXCL_PSO_WAIT_MS=500x887a0006at 102.4 sXCL_PSO_WAIT_MS=50, again0x887a0006at 105.1 spso_async::resolve_waitunderbind::set_pipeline_stateat the crash, the longest single build 29.9 s inamdxc64.65536 so fartextures in GPU views by then, twice the 32,768 of the other runs) – furthest screen so far on this card. Then, both times, the driver reported the GPU hung (DXGI_ERROR_DEVICE_HUNG) and the title ended with0x80000003: 102.4 s and 105.1 s, 3 s after the lastconsole code so farline. Presents were at 0 from 82 s in all four runs, budget or not.XCL_FRAME_DUMPhad no frame to dump after 72 s (no presents).So on this RDNA3 the PR turns the watchdog into a GPU hang three seconds later, and the world does not render; it does get the title one screen further. Logs kept if useful.
AI use: Claude Code (Claude Fable 5.1) read the logs and wrote this report; the runs and the input were mine on the hardware above. Counts, times and RVAs only.
@ryosen0 on GitHub · 2026-11-24 08:17 UTC · original
Cross-check on RTX 3060 Ti 8 GB (Ryzen 7 9800X3D, driver 32.0.16.1742, Windows 11, release) of
8cada26withXCL_PSO_WAIT_MS=50, on the other retail title (ScarlettGame), 150 s scripted press-walk (25/35/45/55/65/80/95/110/125/140 s),XCL_NETWORK=0 XCL_ACTIVITY=1:So on a second NVIDIA host the opt-in knob is inert-but-safe in the menu/load phase: no regression, no skipped work. The interesting regime is yours — builds of 16–31 s on RDNA — which this card doesn't reproduce (our biggest programs build in well under a second here). One note for the description:
XCL_PSO_WAIT_MSdidn't exist in main-line trees before this PR, so earlier reports on other threads that set it were setting an inert variable; worth saying explicitly so nobody reads those as evidence about this change.I can't confirm the world-render claim from here within my run window (150 s): this title's world load is blocked by the BCPack refusals regardless of pipeline waits. Once #905 lands I can re-run this pairing deeper into the load.
AI use: GPT-6.2 Astra (API model selector) in DSH built the head, ran the walk, read the log, and drafted this comment; the human contributor reviewed the numbers before posting.
@Prime1997 on GitHub · 2026-11-24 08:28 UTC · original · edited 2026-11-24 08:33 UTC
RTX 3060 Ti 8 GB, Series S profile, player-controlled prologue test at 50 ms
We tested
5fab112on Windows 11 build 26200, driver 617.14, with an i5-10400. Our integration was based on upstream09940bband included #615 and #495. We usedXCL_PSO_WAIT_MS=50,XCL_PSO_PRELOAD=0, and the same starting profile and shader cache as our previous run. I pressed A myself. The later8cada26change affects an explicit zero budget. Exact source tested689ea7b)+0x23cf68306fb44a)0x80000003at+0xb59278The 50 ms run logged at least 16 budget expirations. Its final report counted 3,548 presents. The game’s crash report put it in
INTRO_min / Prestreamwith 793 streaming requests outstanding. We saw no playable world, GPU removal, orWait64BitValueXtimeout. Texture decompression errors also occurred. We have not established what triggered the new breakpoint.The integrations differ by the intervening allocator changes in #897 and #907 as well, so this is a hardware result on the combined build. The local workspace suite passed 856 tests with 48 ignored. Two wave64-only test bodies skipped on this card. Codex helped integrate the commits and analyze the logs and captured frames.
Follow-up on the new breakpoint. In the local title image, the path to +0xb59278 checks a one-byte field at object offset +0x1a and accepts values 1 through 5. The crash registers indicate zero. The matching minidump contains the object. The first 64 bytes of the object were zero. Its allocation base matches the 16 GiB reservation that XCL identified at startup as outside its GPU windows. We have not established which component should have initialized this field or whether a skipped dispatch contributed.
I use a temporary Discord to coordinate my work. Anyone helping test XCL or compare results is welcome. Test coordination on Discord
@Rednaxeh on GitHub · 2026-11-24 08:38 UTC · original
Follow-up to my report above: the budget swept over 50 / 500 / 2000 ms on the same RX 7800 XT, same build (
7d5641c), same command, one A press at ~12–14 s. The question was whether the GPU hang at 50 ms comes from the skipped dispatches or from the video memory going past the card.XCL_PSO_WAIT_MSmaindoes: the stop moves by nothing. Only 50 ms gets past it, by skipping thousands of dispatches, and then the GPU hangs three seconds after the loading ends. So on this card there is no budget that both avoids the watchdog and keeps the GPU alive; a bound on the wait is not enough here, the builds have to leave the title's threads (the direction of #889 / #533).title_textures::refresh→subresources→Chain::detile_level(0xC0000005, a read of the title's memory at a page it had just unmapped): the fault #751 fixes, unrelated to this PR; the run was repeated.Logs of all seven runs kept. AI use: Claude Code (Claude Fable 5.1) read the logs and wrote this; the runs were mine.
mainreaches on Windows; the obstacle is replaced vtables — proposal: proxies #175@throny on GitHub · 2026-11-24 08:54 UTC · original
World-loading run of
5fab112on an RTX 4080 withXCL_PSO_WAIT_MS=50, againstmainon the same machine. One run of the PR, so read it as a data point; the PR has since moved to8cada26, which I have not run.Tested
stable-x86_64-pc-windows-msvc; release builds.5fab112merged ontomain09940bb(clean merge);mainruns on1c87b1d.xcl run <folder>withXCL_NETWORK=0,XCL_ACTIVITY=1, one key press at the profile prompt, 300 s limit, DXIL and driver-blob caches warm from earlier runs ofmain.main1c87b1d(two runs)XCL_PSO_WAIT_MS=50mainrun right after it stopped at 108.1 s as before, so the pipelines this run built in the background did not getmainpast the stall on the next run.Not tested
AI use
@sander110419 on GitHub · 2026-11-24 09:04 UTC · original
Test report: Linux, NVIDIA. This PR also fixes the watchdog crash there.
x86_64-pc-windows-gnurelease build, rustc 1.99.1main09940bb+ this PR (8cada26, merged clean) + the Wine fixes from #175 (vtables of allocators and submitted lists;VKD3D_CONFIG=ignore_shared_fence) + #793, #794, #905 and a few other open PRsBefore (same tree,
XCL_PSO_WAIT_MSunset), two runs: the loading screen renders at 28–30 fps, then presents stop and the title's watchdog ends it at+0x23cf683(write to 0). The thread dump at the crash shows five of the title's threads inpso_async::resolve_wait_for(viacl_set_pipeline_state), waiting on compute builds.After (
XCL_PSO_WAIT_MS=50), one run: no crash in 330 s; the run ended at my timeout. 22 pipelines went late, and 4ExecuteIndirectwith a pipeline still being built were skipped. Frames slowed from 28.8 fps (92 s) to 9.8 fps (139 s); after that fewer than 300 more frames came before the end. I did not capture what the screen showed after 145 s.Not tested: Windows, AMD,
cargo teston this commit, #708 together with this.AI use: Hermes agent with Claude Opus 5.5 (
claude-opus-5-5) ran the builds and runs and wrote this report; I pressed A and checked it.@emirduran707 on GitHub · 2026-11-24 08:57 UTC · original · edited 2026-11-24 09:05 UTC
AMD RDNA4 test report for
8cada26(this PR's head, onmaind5442d2),XCL_PSO_WAIT_MS=50.Tested
x86_64-pc-windows-msvc; DXC 1.9.2602.17; release.XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PSO_WAIT_MS=50, menus by hand to world loading, then no input.d5442d2, and 77 driver blobs were reused.maind5442d2on this machine all ended at the heartbeat abort (+0x23cf683), 30–75 s into world loading. My comment in #505 has three of them.What the log shows with this PR:
Wait64BitValueXtimed out every 2–3 s: 17 times between 97.6 and 134.0 s, the first at0x70417ff68(op 7, want 0x675, memory 0). This looks like the CPU-side wait before submission described in #505, not the pipeline waits.0xc0000005, a read at0xffffffffffffffffat+0x53e64f1(134.9 s), not the heartbeat abort. This is the read of -1 others reported when dispatches were skipped (#505, and #911's 0xFF-filled memory).So on RDNA4 too, the 50 ms budget removes the heartbeat abort. What stops the title next is the
Wait64BitValueXwaits and then a -1 read, as on the other GPUs.Second run: this PR merged onto
main077ce40(local merge, no conflicts; thatmainhas #795, which bridgesWait64BitValueXto GPU queue waits). Same machine, same settings, plusXCL_FRAME_DUMP=120.Wait64BitValueXtimeouts. The log shows the waits "bridged to GPU queue.Wait".0x887a0006(DXGI_ERROR_DEVICE_HUNG) at about 130 s, as on @Rednaxeh's RX 7800 XT.CreateHeapof the sparse windows was refused with0x887a0005.So on RDNA4, with this PR and #795 together, both the heartbeat abort and the 64-bit wait timeouts are gone, and the next stop is a GPU hang soon after loading, with dispatches skipped.
Not tested: the suite on this head; more than one run of each; other budgets (500 / 2000 ms); cold caches.
Tested and written with Claude Code (Claude Opus 5.5). The runs were made on my machine; the run used this PR's build: its log has the PR's "still being built after 50 ms" lines.
@IvyNotFound on GitHub · 2026-11-24 09:11 UTC · original
RTX 5080 with
XCL_PSO_WAIT_MS=50: the compile stalls are gone, but GPU waits time out and the title's watchdog still ends it (145 s)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(soXCL_NETWORK=0,XCL_ACTIVITY=1), the same retail title for every run, A pressed by hand at the title screen.Runs
XCL_PSO_WAIT_MSmain09940bb, cold driver-blob cache+0x23cf683, "GPU Loc Sig")main09940bb, warm cache+0x23cf683)8cada26+0x23cf683)mainthe stall is the one in the description: binds wait for compute pipelines the driver builds in up to 17.6 s (526 KB of DXIL; 1 to 8.4 s for the others, warm run), and each run stops at the next one not built yet. The warm cache did not get further.Wait64BitValueXtimes out instead: 40 times, each after 2000 ms, on consecutive addresses0x70417ff68… with the memory one short of the value wanted (want 0x56e,holds 0x56d). After 116 s the title submits once per 2 s, presents nothing, and the watchdog ends it at the same address as onmain.The
mainruns were made on09940bb; this PR is based one50836band was run as it is, not rebased.AI use
@freemanovec on GitHub · 2026-11-24 09:15 UTC · original
Written by an AI agent (Claude Code, Claude Opus 5.5) on this account, from runs on this machine.
Linux / RDNA3 (RX 7900 XTX, Mesa 26.3.1 RADV, Wine 11.22, patched vkd3d-proton 3.1;
maina1672ef+ #867 + #871 + #684), the retail title of #505: withXCL_PSO_WAIT_MS=50the title's "GPU Loc Sig" abort still came at 174 s and 279 s (two runs). Combined with #433, two runs ended with amdgpu GPU page faults from vkd3d-proton's queue thread and compute ring resets (one with the device removed, 0x887A0005); one of them reached 38.7 GB RSS with 15–16 pipeline builds at once. Without this PR, #433 ran to 539 s without faults. Details: https://github.com/ivall/xcl/pull/433#issuecomment-7127162712. One run per configuration; not run on Windows or NVIDIA.@SlopTart on GitHub · 2026-11-24 09:34 UTC · original
Linux / AMD RDNA3 datapoint.
Merged state: head
8cada26onto main09940bb, clean merge.Full suite,
cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 707 passed, 10 failed, 41 ignored; failures are the known Wine-lane set from my #42 rows plus this rig's title-textures flake family (see #718). PSO-wait bound 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.
@Rednaxeh on GitHub · 2026-11-24 09:34 UTC · original
What the GPU hang at 50 ms looks like in the log, from the two runs in my table (RX 7800 XT,
7d5641c): in both, the last thing before0x887a0006is the title waiting on the GPU for a counter that is one short, and the dispatch that would have advanced it was one of the skipped ones.Run 4 (the one that reached the post-loading movie), seconds from start:
Run 3:
101.169 … 6084 dispatches (4968 skipped)→102.417 device removed→104.423 Wait64BitValueX timed out after 2000 ms at 0x704180100 (want 0x574, memory holds Some(573)).So the title's own sync counters (the
Wait64BitValueX/Write64pairs that #708's kind of waits bridge toqueue.Wait) end up a step behind: a dispatch skipped under the budget was the one writing the next value, the GPU-side wait never completes, and the driver's timeout removes the device a few seconds later. The CPU-side 2 s timeouts are the same counters seen from the other side.main's runs end in the watchdog before any such wait is reached, so there is noWait64line to compare there.That makes the budget's trade-off sharper than "outputs left unwritten": a skipped dispatch can also be a producer in a GPU wait chain, and then the hang is certain, not a visual glitch. A bound on the wait would need to never skip a dispatch whose list carries a
Write64the title later waits on – or the builds have to be done before the bind (#889). Not a fix proposal, just the mechanism; logs kept.AI use: Claude Code (Claude Fable 5.1) read the logs and wrote this; the runs were mine.
@AlexLopezDevelop on GitHub · 2026-11-24 09:36 UTC · original
Tested
8cada26withXCL_PSO_WAIT_MS=50on RTX 2080 Ti (Turing, driver 621.24, 32-wide) + Intel i9-9900K, Windows 11, 32 GB, own retail 1.0.2.1, DXC 1.9.2609, walked through the first-run setup by hand: it gets past the #846 stop.main(09940bb) the same walk ends right after the language screen in the title's fatal-error routine (+0x23cf683, write at 0, about 454 s; #846).+0x23cf683. The log hasa pipeline still being built after 50 ms: its binds go on without it until it is built(129 times by the end), and the counters went to 6,019 draws (128 skipped) and 1,567 dispatches (753 skipped).D3D12 XDXR Error: DestAccelerationStructureData can not have more than 40b of address set, a C++ exception thrown inxboxbvhbuilder.dll, unhandled. Next I'll try this PR together with #631.So on Turing the watchdog in #846 is the bounded-wait problem this PR addresses; nothing else stopped the title before #585.
Not tested: the full
cargo testsuite on this branch, and asmoke.ps1pair (the unattended run stays before the first-run setup, so it doesn't reach this code).AI-assisted (Claude Code, Claude Opus 5.5).
@milas6669 on GitHub · 2026-11-24 09:03 UTC · original · edited 2026-11-24 09:54 UTC
A first NVIDIA Ampere (RTX 3070, 8 GB) result for
XCL_PSO_WAIT_MS=50, plus two measurements of the stall that remains. Not a regression run (noxcl-smokeblocks, and a 30 GB memory watchdog of mine ended one run).Setup: RTX 3070 8 GB (32-lane waves), i9-10900KF, 31.9 GB RAM, Windows 11 Pro 10.0.26200, rustc 1.100.0, release. Build:
main077ce40+ this PR's head8cada26(clean merge).XCL_NETWORK=0, retail title, 4095 MB coherent window, warm caches, no scripted input.Run A (
XCL_PSO_WAIT_MS=50, 300 s limit): without the cap the title stops at about 106 s and ends itself with+0x23cf683(nine runs in #675). With it:+0x2215c35(write at 0x0), not+0x23cf683: about 30 s after the last present (144 s);a pipeline still being built after 50 mslines, the counter at 513 by 124 s; 4Dispatch with a pipeline that has no translated console shader ... skippedlines; no device removal;Run B (this PR + #924,
XCL_TRACE_WAITS=1, thread dumps every 10 s,nvidia-smionce a second, 330 s limit): the same shape. First call of the console method#101at 105.7 s; 6669 dispatches in the window ending 112 s; 0 presents, 0 submits, 0 draws from 116 s to 136 s; recovery at 138 s; last present 144.1 s; my memory watchdog (30 GB private) then ended the run, so the self-kill was not reached.nvidia-smishowed 0–1 % utilisation, the 210 MHz idle clock and 26 W from about 124 s to 136 s, and 100 % as soon as the title recovered at 138 s (the nvidia-smi rows are matched to the log by their order, so they can be off by a few seconds, but the 100 % starts at the recovery). So the wait is on the CPU side, not the GPU working through the burst.WaitForSingleObjectfrom the same site (game_scarlett_master.exe+0x221c3c2, no timeout) since about 110.8 s. I did not symbolise the XCL-side stacks, so I cannot say which thread the stall depends on.What I did not test: other budgets than 50 ms; a run to the end of the stall on
mainwith the new commits; AMD. An earlier combined run (this PR + #924, 200 s limit) stayed on the loading screen at 30 fps the whole time and never reached the world (no#101), which fits how the world-load start moves between 89 s and 241 s in my runs, so it says nothing about the stall.AI use: Claude Code, Claude Sonnet 5.5, ran the commands and wrote this comment.
@ivall on GitHub · 2026-11-24 10:06 UTC · original
Merged (
02bfd1d). Checked on main02bfd1dtogether with #891, #693, #551 and #631:cargo test --workspace -- --test-threads=4green (685 lib tests), and a retail run through the menus and intro into the start of the world load withXCL_PSO_WAIT_MS=50: no crash, no device removal. Thanks to everyone who measured it past #846's stop. It stays opt-in, as the description says: skipped dispatches leave outputs unwritten (Rednaxeh's GPU hang at 50 ms, and freemanovec's Linux runs, are worth following up).@NAbobo101 on GitHub · 2026-11-24 15:56 UTC · original
8 GB NVIDIA data point for
XCL_PSO_WAIT_MS=50onmain67a3735(which has this PR, #634, #690 and #631). It gets the title further on this card, through the end of the loading screen, but the world stays black and the watchdog still ends it, about 100–200 s later than without it.Setup
67a3735.XCL_NETWORK=0 XCL_ACTIVITY=1, menus walked withXCL_PRESS_A_AT=14,17,21,125,131,…,197(the presses from #505). The driver-blob cache was warm from earlier runs. I took a screenshot every 30 s from 150 s on.Runs
XCL_PSO_WAIT_MS+0x23cf683), 185.7 sWith the budget, the screenshots show the loading-screen artwork up to about 270 s, then a black window. The title keeps working after that: at 317 s in run 3, a 2 s activity line has 0 presents but 390 draws and 1293 dispatches. Then the watchdog fires. I saw at most one
Wait64BitValueXtimeout per run, so #708's kind of wait doesn't look like the block here.The memory columns are probably part of it on this card: local video memory goes to 12.8–14.5 GB on an 8 GB GPU, and the process commit reaches 31 GB on a 32 GB machine. A later run in the same session ran the machine low enough on memory that my test script was stopped.
Not tested
AI use
@crosettiremi on GitHub · 2026-11-24 16:51 UTC · original
RX 7900 XT, Windows, retail Series X profile. I compared 1 ms and 50 ms on the same downstream executable, with identical starting DXIL/PSO caches, two DXC workers, and the same scripted Player1 selection at 33 s. This stack includes #1464 and direct texture uploads. One run per setting.
With 50 ms, skips appeared later during world streaming: by 219.145 s XCL logged 265 skipped draws and 7,217 skipped dispatches. Peak process commit was 25,674 MB, with no device removal in this run. Captured frames were still dark after the splash. I could not reproduce the visible terrain on this stack. Early skip counts alone would have missed the later behavior.
@crosettiremi on GitHub · 2026-11-24 17:54 UTC · original · edited 2026-11-24 18:16 UTC
A follow-up on the RX 7900 XT to distinguish queue backlog from a slow compile. I instrumented skipped direct Dispatch calls in a downstream Series X build with XCL_PSO_WAIT_MS=1, two DXC workers, and speculative preload disabled. Immediately after a failed resolution I checked whether the pipeline job still existed in the worker queue, had been taken for building, or had completed. The small race between resolution and observation can only describe the state when sampled.
At 216.803 s, 26,624 skipped calls had been sampled: 26,568 still had an unclaimed build job and 56 had a job already taken. No completed/failed or ABI-binding reason was counted in that sample. These are calls, not unique shaders. The bounded per-shape table overflowed for 317 calls; the reason counters include all calls. The game accepted Player1 and streamed assets, but the last captures were dark and it exited on a guest breakpoint at RVA 0xf2cc4b, with no logged device removal. This run does not identify which missing compute result prevented the scene from drawing.
I am comparing the same executable with only the 16 repeatedly missed shader-set keys seeded for preload. The numbers above are from the control.
Targeted preload follow-up: same executable, same initial DXIL/driver blobs, 16 repeatedly missed compute keys in the isolated used-pipeline manifest. XCL acknowledged all 16 keys and logged 16 pipelines built ahead of first use by 11.356 s. This run stopped before the account picker on a second-chance guest write to zero at RVA 0x2215c35; last activity at 44.156 s, peak sampled process commit 13,372 MB, no device removal. A separate Rust build overlapped part of startup. There is no comparable world-stage dispatch sample in this run.
Queue priority experiment (same base as the diagnostic control, preload off): when a compute pipeline's bounded wait expired, I promoted its unclaimed job. Same worker count; an ordinary FIFO selection after each burst of three promotions. All six async PSO tests passed. One hardware run per build, same initial application caches and job cap; picker input at 47 s and 45 s.
The last priority sample still recorded 16,238 unclaimed jobs out of 16,384 skipped direct calls (counts are calls, not distinct jobs). It ended with device removal at 194.478 s, fault VA 0xdcbe63000 without a named allocation; the last captured frame remained dark. This changes which work gets serviced during the burst, but it did not restore world rendering on this run.
Runs 89/90, RX 7900 XT on Windows. Both started from independent copies of the same cache with 16 late compute pipelines prepared offline. A second native-device pass reused 16/16 driver blobs. Both selected Player1 at about 45 s with speculative preload disabled. With the regular queue (89), 7,537 dispatches had been skipped at 2,048 executed and 18,050 at 4,096. With an opt-in on-demand worker for just those keys (90), the counts were 762 and 7,248. The worker logged 16 completions by 184.426 s. The runs can execute different work at the same count. Both last captures were dark. Run 89 stopped at guest breakpoint +0xf2cc4b. Run 90 stopped at 196.692 s with device-hung 0x887a0006, DRED VA 0x26000, no named allocations. This isolates a measurable queueing effect in these two runs. It did not restore world rendering or player control.