Shaders: prebuild split compute dispatch-chain pieces under --pipelines #2338
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!2338
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2338/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?
@ChalanaGimhanaX on GitHub · 2026-11-25 15:33 UTC · original
ChalanaGimhanaX:shaders/precompile-dispatch-chain→main· +313 −21 · 3 files · 1 commits · merged 2026-11-25 18:46 UTCFollow-up to #2080 (
Part of #1833,Part of #2088):xcl shaders --precompile --pipelinesnow prebuilds and caches every piece of a split direct-DXIL compute program (.chain.pso) underdispatch_chain_root_signature, instead of compiling the unused unsplit whole container underabi_root_signature_with(.pso).When direct DXIL translation splits a large compute program into a
DispatchChain(underXCL_DIRECT_DXIL=1, or automatically forenormouscompute shaders on default settings), the runtime (dispatch_chain::build) builds each piece withdispatch_chain_root_signatureand looks up<hash>-<len>-<flags>.chain.psoon disk; even the lazyChain::whole()fallback useschained = true(.chain.pso). Previously,Pipelines::makeignoredCompiled::dispatch_chainand compiled onlyc.dxilto<whole>.pso, leaving 0.chain.psoblobs for the runtime and hitting the slow unsplit compile (orXCL_PIPELINE_MAX_KBcap) offline. On a local retail shader pack (XCL_DIRECT_DXIL=1, wave32), 744 of 2,080 translated compute programs split into 7,100 pieces.What is in it
crates/xcl/src/hle/d3d12x/real.rs: adddriver_cache::name_foranddriver_cache::path_forsoreal::compute_containerand offline precompile share the exact.pso/.chain.psonaming; extenddriver_cache::tests::a_file_is_named_after_its_dxil_and_flags.crates/xcl/src/shaders.rs: keyPipelines::signaturesby(chained, samplers)usingpso::dispatch_chain_root_signaturefor chained pieces; updatePipelines::make_with_cache_path/make_oneto build and cache each piece of a splitDispatchChain(pieces.len() >= 2) as.chain.psoacross up toXCL_PIPELINE_THREADSworkers with per-pieceXCL_PIPELINE_MAX_KBcapping; printsplit compute programs: N (M pieces)when non-zero; add GPU testsplit_compute_program_prebuilds_and_caches_chain_pieces(compilesspace2pieces that onlydispatch_chain_root_signatureaccepts, verifies.chain.psowrite/reuse, runtimeCreateComputePipelineStateacceptance, and per-piece cap enforcement).crates/xcl/tests/gpu_compute_e2e.rs: addoffline_split_compute_pipeline_is_reused_by_a_second_processexercisingxcl shaders --precompile --pipelinesend-to-end on a synthetic wave32 multi-block console CS container (XCL_DIRECT_DXIL=1,XCL_DIRECT_SPLIT_INSTRUCTIONS=12), verifying only.chain.psoblobs are written, warm reuse across processes, and recovery from a corrupted.chain.pso.Tested
32.0.16.1714, wave32 only), Intel Core i5-10400F, 15.9 GB RAM, Windows 11 Pro Build 26200, Rust1.100.0(stable-x86_64-pc-windows-msvc), DXC1.8.2502.11(Windows SDK10.0.26100.0); debug for tests, release for precompile timing and smoke runs..\scripts\test.ps1(cargo build --workspace+cargo test --workspace -- --test-threads=4) on commit2228be7: 1274 passed, 0 failed, 46 ignored. Both new GPU tests (split_compute_program_prebuilds_and_caches_chain_piecesandoffline_split_compute_pipeline_is_reused_by_a_second_process) ran and passed on RTX 3060.SKIPPEDGPU tests (26 notices, unchanged frommain): 21 wave64/no-wave64 tests (dispatch_chain_native_wave64_builds_whole, 4lower::tests, 14lower_dxil::testswave64 cases,gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware), 3 wave32 per-lane unsupported-op refusals inlower_dxil::tests(f16 arithmetic,f16 packed,f32 conversions),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows), andpso_measurement_compiles_an_exact_synthetic_record(cannot disable the driver cache (Windows Developer Mode is required)).dca1b25b44878018: 1,231,896 B whole -> 14 pieces <= 156,380 B;77229ada81e6f03f: 88,704 B whole -> 2 pieces <= 89,940 B;xcl shaders <dir> --precompile --only cs --pipelines --windows 4,XCL_DIRECT_DXIL=1,XCL_PIPELINE_THREADS=4, freshXCL_DXIL_CACHE, NVIDIA implicit cache at OS default, measured on base06c9f55before rebasing onto0829441):main06c9f55:117.0 s(117.18 swall) —2unused unsplit.psofiles written,0 / 16.chain.psofiles.9.2 s(9.50 swall) —16 / 16.chain.psofiles written,0refused,0unsplit.psofiles.0.4 s(0.44 swall) —16 / 16loaded from the driver cache.Regression run
scripts/smoke.ps1 -Game <retail title> -Seconds 60, default settings, clean working trees, back-to-back on the same machine (main0829441then PR head2228be7):main:
PR:
Not tested
--pipelines).0829441(which wideneddispatch_chain_root_signatureroot constants from 4 to 8 dwords ine9ddf17; the unit and e2e GPU tests and smoke run above all ran on2228be7over0829441).XCL_HEAP_WINDOWS=1andXCL_SAMPLE_*test suites.AI use
@Aniseto on GitHub · 2026-11-25 15:46 UTC · original
Ran the two new split-compute prebuild tests at
2228be7(clean PR head onmain0829441):System
XCL_ADAPTER=nvidiaResults
cargo test -p xcl --lib split_compute_program_prebuilds_and_caches_chain_pieces -- --nocapture: 1 passed, 0 failed, 0 ignored, 1229 filtered out (exit 0)cargo test -p xcl --test gpu_compute_e2e offline_split_compute_pipeline_is_reused_by_a_second_process -- --nocapture: 1 passed, 0 failed, 0 ignored, 4 filtered out (exit 0)What this adds
No comments or test reports in the thread yet. The author's run was an Ampere RTX 3060 with DXC 1.8.2502.11; this is a Blackwell wave32 part with DXC/DXIL 1.9.2609.5. Both new tests pass here: the library test checks the per-piece
.chain.psowrite/reuse and cap, and the e2e test covers the offline precompile path across two processes.Not tested
The retail shader pack (including the 744 split programs named in the description), a release-profile timing A/B, a 60 s paired smoke run, AMD and Intel GPUs, native wave64, Wine, and
XCL_HEAP_WINDOWS=1.AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
@DarkPanda69 on GitHub · 2026-11-25 15:49 UTC · original
AMD run with native wave64 (listed as untested), to go with the NVIDIA run above: the new prebuild test passes on an RX 9070 XT, so the AMD driver reuses the prebuilt split pieces in a second process too.
Head
2228be7applied onmain0829441, debug, Windows 11 Pro 26200:cargo test -p xcl --test gpu_compute_e2e: 5 passed, 0 failed.offline_split_compute_pipeline_is_reused_by_a_second_processok, and so areoffline_compute_pipeline_is_reused_by_a_second_processandconsole_wave64_compute_through_the_pso_hook_dispatch_and_read_back. 1 SKIPPED, unrelated to this PR:heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).cargo test -p xcl --lib -- gpu::: 641 passed, 2 failed, 22 ignored; the 2 failures are the AMD fuzz seeds tracked in #2115, the same onmain.gpu_compute_e2e5 passed (same skip);gpu::643 passed, 0 failed.Not tested: a title, the full 744-program prebuild, Intel.
AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
@SlopTart on GitHub · 2026-11-25 16:08 UTC · original
Tested: current PR head merged onto current
origin/main(clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo targetx86_64-pc-windows-gnurun under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29).One red on this lane.
gpu_suite (--release --locked,--test-threads=2): 143 passed / 4 failed / 1 ignored. Three failures are the rig's baseline (fuzz seed 1003 of #2115,gpu_nonfused_mad_and_mac_prevent_fma_contraction,gpu_depth_buffer_created_for_unordered_access_is_placed); the fourth,gpu_geometry_wave32_prefix_count_over_a_mask, is this rig's known flaky family (main reproduces it, solo reruns green).shaders::pipeline_cap_tests::split_compute_program_prebuilds_and_caches_chain_pieces: passes on this lane.offline_split_compute_pipeline_is_reused_by_a_second_process(crates/xcl/tests/gpu_compute_e2e.rs): fails on the Wine lane, deterministic (2/2 test runs). It fails at the first child-process assert (line 189): the spawnedxcl shaders --precompile --pipelines --windows 1(withXCL_DIRECT_DXIL=1,XCL_DIRECT_SPLIT_INSTRUCTIONS=12,XCL_PSO_DISK_CACHE=1) exits with status 5 without printing any error. Reproduced standalone outside the test harness on the same input the test builds: stdout ends afterprecompiling 1 shaders ... (23 compile threads; 1 memory windows)and the DXC version banner, stderr carries only DXVK startup noise, no xcl error line. Thetranslatedcache dir gets created before the child dies.So the piece-prebuild path itself works in-process here, but the offline two-process reuse check does not complete under wine-11.0/vkd3d-proton. Note the child queries
IDXCoreAdapter(interfacef0db4c7f-fe5a-42a2-bd62-f2a6cf6fc83e), which this driver stack answers as unknown before falling back toCreateDXGIFactory2; whether that is related I cannot say from the outside. A diagnostic print on the child's failure path would help pin this down, since exit 5 currently carries no message.Not tested: retail titles (no title data on this lane, counts only).
AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.
@SlopTart on GitHub · 2026-11-25 16:23 UTC · original
Follow-up to my report above, now with the child failure pinned down.
The silent exit 5 is an access violation inside the shim, not a hung or refused start. Re-ran with
WINEDEBUG=warn+seh(the-allI normally use hides wine's own crash report): wine raisesEXCEPTION_ACCESS_VIOLATION(0xc0000005) on the compile threads, and the full unwind is insided3d12core.dll(+0x1AB118, +0x1784EC, +0x1A1676, +0x1A7852, +0x1A9450, +0x0DF8DB). Exit status 5 is 0xC0000005 truncated, hence the message-free failure.Control that keeps this on the PR: running the whole
gpu_compute_e2ebinary on this same tree gives 4 passed / 1 failed / 1 skipped, and the failing test is only this PR'soffline_split_compute_pipeline_is_reused_by_a_second_process; the pre-existingoffline_compute_pipeline_is_reused_by_a_second_processpasses in the same binary. So the environment is fine, the new prebuilt-split-piece path faults.Also worth noting for whoever picks this up: the new
dispatch_chain_transports_live_f16_and_f64_across_cutsin #2344 crashes at the samed3d12core.dlloffsets on this Wine lane (reported there). Two different new split-chain pipeline paths, one fault site in the D3D12core shim, on vkd3d-proton 3.1 (XCL patch) + Mesa 26.2.5 + RADV. Native Windows runs from Aniseto and DarkPanda69 are green, so this only shows up here.AI use: same as above (Hermes agent, local Qwen-class, checked before posting).
@b3IKK on GitHub · 2026-11-25 16:27 UTC · original
This runtime check matches what I see on an RTX 5080: the split pieces named in the offline cache are supplied (66/66 here, 86.2 s → 2.87 s), but the run still builds the other pieces (789 across 90 split programs above), and the world-load stop is unchanged.
The missing part is the records that were never precompiled. On
main, the cold compute compiles after the 96 s stop fall 54 → 24 → 9 → 8 → 7 over five warm runs with disjoint record sets, but each remaining program is a whole 0.99–1.21 MB DXIL compile at 50–105 s, so no frame is presented after 96 s even with only seven left. This PR fixes the storage/naming for split pieces; the next lever is precompiling more of the set (or the whole pack) before the title runs. The warm-run timings are in #1380.AI use: OpenCode, Claude Fable 5.2 compared this check with retail-run logs on this machine and wrote this.
@imnicho on GitHub · 2026-11-25 16:43 UTC · original
A retail-title data point from an RTX 5080, and what is left after the pieces: the whole pipelines of split programs. @b3IKK, I think the 50 – 105 s whole compiles in your world load are these, not records that were never precompiled.
I had written the same change independently this afternoon (pieces made offline with the chain's root signature into
.chain.pso) and claimed it on #2088 five minutes after this PR was opened, without seeing it. This one was first, so I am not opening mine. The measurements below are with my equivalent of it on a local tree, not on this head.Setup: RTX 5080 16 GB (driver 610.47, 32-lane waves), i7-7700K (4 cores / 8 threads), 16 GB RAM, Windows 10 22H2, release. Local tree: #2057 at
4df1e6e+mainat0829441+ the mesh stack.XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1, Series S profile,XCL_NETWORK=0, scripted pad.The pieces work in the title
--precompile --only cs --pipelines --used-onlyin two processes: of the 1 034 compute programs earlier runs used, 295 are split; 3 243 pipelines made (316 of them from blobs of an earlier pass), 0 refused, 15.9 min.What is left: the whole pipeline of a split program, made with the chain's signature
<hash>-<size>-0.chain.pso: they areChain::whole()'s pipelines, the unsplit program built with the chain's root signature when the title dispatches a split program through ExecuteIndirect. Neithermain's offline pass (the whole with the title's signature, in.pso) nor the pieces give the runtime that file, so every split program a title dispatches indirectly costs one such build in its world load. The two runs before had made 1 and 3 of them.What I propose on top of this PR, unless you would rather put it in here:
used-chain-wholes.txtbesideused-pipelines.txt, a hash a line);--pipelinesmakes that whole pipeline too, as the runtime does (chain signature,.chain.pso), after the program's pieces; with--used-onlyonly for the noted programs, without it for every split program.I have that written against
mainwith its tests (170 lines, the whole suite passes) and will rebase it onto this PR'sPipelinesonce this is merged, or stack it now if that is easier for you. Running the title with it to get the before / after of those eleven builds is what my machine is doing now.Not tested: this head (its tests, the suite, a smoke pair).
AI use: Claude Code with Claude Fable 5.2 ran the title and the offline pass on the machine above and wrote this.
@KDenKC on GitHub · 2026-11-25 16:48 UTC · original
Tested on NVIDIA / Windows: both new tests pass, including the offline two-process split reuse test that fails on @SlopTart's Wine/RADV lane.
2228be784e4ebd515b94a34afeaaee068ba865aeas it is (its base ismain0829441), clean tree, release profile.cargo test --release -p xcl --lib split_compute_program_prebuilds_and_caches_chain_pieces -- --test-threads=1: 1 passed, 0 failed, 0 ignored, no SKIPPED.cargo test --release -p xcl --test gpu_compute_e2e offline_ -- --test-threads=1: 2 passed, 0 failed, 0 ignored (offline_split_compute_pipeline_is_reused_by_a_second_process,offline_compute_pipeline_is_reused_by_a_second_process), no SKIPPED.So the exit-5 child on the RADV lane looks specific to that stack (the access violation inside
d3d12core.dllunder Wine that SlopTart traced), not to the PR's cache handling.Not tested: the whole workspace suite on this head; a retail-title run — @b3IKK's and @imnicho's RTX 5080 runs above already show the pieces supplied and the world-load stop unchanged with the whole forms still cold, and I did not repeat that.
AI use: Claude Code (Claude Opus 5.5) built the head, ran the tests and wrote this.
@ChalanaGimhanaX on GitHub · 2026-11-25 16:58 UTC · original
Thanks @imnicho (and everyone who tested across RTX 4090 / 5070 Ti / 5080 / 5090, RX 9070 XT, and Wine)!
Let's keep #2338 scoped to the split dispatch-chain pieces so it stays small and focused on one logical change — please go ahead and stack your
Chain::whole()/used-chain-wholes.txtfollow-up on top (either now or once this lands).AI use: Google Antigravity (Gemini 4 Neon) drafted this reply.
@oni-swr on GitHub · 2026-11-25 17:09 UTC · original
amd-win test report for
2228be78(exact head2228be784e4ebd515b94a34afeaaee068ba865ae) on AMD Radeon RX 7800 XTTested
main; the merged tree was not tested). Merges cleanly intoorigin/main55d64c27(git merge-tree)cargo test -p xcl --lib driver_cache: 4 passed;--lib split_compute_program_prebuilds: 1 passed;cargo test -p xcl --test gpu_compute_e2e: 5 passed, 0 failed (includesoffline_split_compute_pipeline_is_reused_by_a_second_process), 1 SKIPPED (heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows)cargo test --workspace -- --test-threads=4: 1273 passed, 1 failed, 46 ignored (with--no-fail-fast). The failure isgpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1(seed 722:res[30] = 0x1, CPU 0x7fffffff). It is not caused by this PR: it fails identically, deterministically (3 of 3 runs), onmainat08294413and at the currentorigin/main55d64c27on this adapter. 6 SKIPPED lines, alllower_dxilf16 / f16-conversion programs refused as unsupported by the recompiler.Regression run (own test title
tests/testtitle, 60 s, release; same title and time for both. The test title exits with code 2 by design and shows no frames, socrashes: 1is its normal exit and is the same on both)PR head:
main(08294413):Not tested
mainAI use
oni-swr. No code was changed.@Eterst on GitHub · 2026-11-25 17:31 UTC · original
A data point for the "unused whole container" here: on a retail title the whole program under the chain's root signature is used, by
ExecuteIndirect(bind.rs→dispatch_chain::whole), and building it on the title's thread is what stops that title at its world load on NVIDIA (details: #2080).In a thread dump during the stop, one title thread waits on
Chain::build_wholeinExecuteIndirectwhile another builds whole programs withdispatch_chain_root_signatureone after another, with no.chain.psoblob for them: 10,452 / 10,281 / 8,412 ms for 650–780 KB of DXIL (records742a41ceb422beb5,99604bc99eb833eb,cfd8542440a534bb), 28–161 ms where a blob existed. WithXCL_DIRECT_SPLIT_INSTRUCTIONS=0the title goes on.So prebuilding the pieces alone would probably leave this stop in place: the whole program under the chain's root signature may need a
.chain.psotoo (orExecuteIndirectthe unsplit pipeline under the title's root signature, which the precompile already makes).Setup: RTX 4070 SUPER 12 GB, driver 616.92, Windows 10 19045, release; a test tree of
main50a9fdewith #2057 and a few other open PRs, plus #2333;XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1. Not tested: this PR itself.AI use: Claude Code (Claude Opus 5.5) made the runs and wrote this; posted with my OK.
@DavidM1911 on GitHub · 2026-11-25 18:25 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!
@raylitebull on GitHub · 2026-11-25 18:28 UTC · original
Code review on
2228be7(crates/xcl/src/hle/d3d12x/real.rs,crates/xcl/src/shaders.rs,crates/xcl/tests/gpu_compute_e2e.rs):driver_cache::name_for/path_forconsistently separate.chain.psofrom whole-program.pso, andPipelinescaches each split dispatch-chain piece underdispatch_chain_root_signature.MERGEABLE), and native Windows tests pass on both NVIDIA (RTX 5070 Ti / 3060 / 5090 / 4090) and AMD (RX 9070 XT / RX 7800 XT).One open item before merge:
@SlopTarthit a deterministic exit-5 (0xC0000005insided3d12core.dll) crash onoffline_split_compute_pipeline_is_reused_by_a_second_processunder Wine/vkd3d-proton (matching thed3d12core.dllfault offsets seen on#2344). Please confirm whether that is purely an upstream vkd3d-proton issue withspace2/ split-chain PSO creation or if anything in the precompile test setup triggers it.@imnicho on GitHub · 2026-11-25 18:41 UTC · original
@ChalanaGimhanaX thank you. I am holding the whole-pipeline follow-up back: #2404 (an ExecuteIndirect of a split program runs its pieces) removes the case it was for. With it the whole form is no longer made in a title's world load, so a pass that prebuilds it would write files nothing reads, and the pieces this PR makes are what the runtime needs. If #2404 does not land, the follow-up is ready to stack here.
The numbers I promised, for whoever weighs #2372 / #2404 (same machine and tree as my comment above: RTX 5080 16 GB, i7-7700K 4 cores / 8 threads, Series S profile, pieces prebuilt):
So on this card the whole forms were what stood between the set-up and the world's frames once the pieces were there. What ends the runs now is the device loss of #505, not a build.
AI use: Claude Code with Claude Fable 5.2 ran the title and the offline passes on the machine above and wrote this.
@ivall on GitHub · 2026-11-25 18:46 UTC · original
Merging at
2228be7. On the open item: the crash under Wine is not from this PR. The report on #2080 (before this PR) has the fault at0x6ffffca2b118withd3d12core.dllloaded at0x6ffffc880000, which isd3d12core.dll+0x1AB118, the first offset of the report here. #2080 is onmainalready, and the native Windows runs on NVIDIA and AMD pass. What vkd3d-proton trips over is still open and deserves its own issue.Read in full: the pieces are built with the chain root signature and the runtime's
.chain.psonames, per-piece cap included. Both new tests pass here. The whole forms of split programs are still built in the title (#2372, #2404).Tested on AMD RDNA4 (native wave64), Windows, DXC 1.8.2502.11, debug, on
main3f27770with #2420, #2257, #2408, #2247, #2338, #2097 and #2372 merged locally:cargo test --workspace --no-fail-fast -- --test-threads=4: 1367 passed, 2 failed, 46 ignored, 7 SKIPPED lines.mainalone, same command: 1354 passed, 3 failed, 46 ignored. Both failures left (fuzz_validate_and_gpu_1seed 722,_3seed 1599) fail the same way onmain. No title was run on the merged tree.AI use: Claude Code (Claude Opus 5.5) read the diff, ran the tests and wrote this on the maintainer's behalf.
@minimalhipster990 on GitHub · 2026-11-25 15:59 UTC · original · edited 2026-11-25 19:05 UTC
RTX 4090 retail runtime check. On clean PR head
2228be784e4ebd515b94a34afeaaee068ba865ae, the game supplied a precompiled driver blob for all 66 split pieces it requested from the selected records. On the clean parent082944135cd2b96288470a595861fa608eee08dc, the same 66 requests had no blob. All 66 completed on both builds, with zero retries.World loading. Both runs showed loading artwork and ended at the configured cutoff with exit code 0 and no logged device removal. No gameplay HUD or recognizable world geometry appeared in the captures. The first matched piece request came at 201.212 s on the parent and 196.818 s on the PR, well after the last active presentation interval in each. The driver times above sum overlapping calls. Both runs still built 789 pieces across 90 split programs in total.
Method. RTX 4090 24 GB, NVIDIA 621.40, Ryzen 7 5800X3D, 32 GB RAM, Windows 11 build 26300, Rust 1.99.1 MSVC. Each clean tree was built with
cargo build --locked --release -p xcl --bin xcl. I selected 16 records seen in a previous retail run and ranxcl shaders <pack> --precompile --only cs --pipelines --used-only --split 1 --windows 4with an empty driver cache per arm,XCL_DIRECT_DXIL=1,XCL_HEAP_WINDOWS=1and four pipeline and DXC threads. Both builds produced identical translation plans. Eight records split naturally into 85 pieces. Six of those records were requested during both runs, covering the same 66 pieces. Each runtime record hash and DXIL byte length identified exactly one piece in its saved plan.For each 300 s
xcl run <title>, I used the matching build’s offline cache, identical copies of the configured profile, the same 410 graphics blobs and 1,069-key runtime list, identical scripted input,XCL_PSO_TRACE=1,XCL_NETWORK=0and one capture per 12 presents. One run per revision, parent first. NVIDIA’s internal cache was uncontrolled. AI assistance: OpenAI Codex (GPT-6) built and ran the comparison, matched the traces to the offline files, inspected the captures and drafted the report.Follow-up on the last presents. I repeated the 300 s retail run twice on the same clean PR head (
2228be78, RTX 4090, driver 621.40). In the earlier PR trace, 153 compute driver calls started before 100 s. I recovered the exact blobs for 74 of them, including 35 dispatch-chain pieces. These calls accounted for 149.789 of the original 156.102 cumulative driver seconds. The two new runs started with the same profile, scripted input and 520 common cache files. I added only those 74 XCL driver blobs to the second run.All 74 calls completed without a retry in both runs. In the second run, the game kept presenting for another 58 s after the last selected call finished. Neither run resumed presenting by 300 s. The captures showed loading artwork and no gameplay HUD or recognizable world geometry. No compute driver call overlapped the last active interval in either run. The four graphics driver calls overlapping it in the second run each took at most 3 ms.
This narrows the next trace to what the presentation thread was waiting for at the transition out of loading. The control ran first and NVIDIA's internal cache was uncontrolled. The 74 calls were already fast in the new control, so the difference in stop times cannot be attributed to the added files. Driver timings sum overlapping calls and exclude queue waits. AI assistance. OpenAI Codex (GPT-6) ran the comparison, checked the traces and captures, and drafted this update.
What the presenting thread waited for on
2228be78. I repeated the 300 s RTX 4090 run with the same executable and the same 594 initial cache files as the targeted-cache run above. The lastPresentXreturned at approximately 106.58 s. After that, worker 2 (TID 267752, job slot 37) successfully released one count on semaphore0x1020at 110.62 s. The presenting thread (TID 263232) returned from its wait in the same millisecond. Worker 2 then signalled its own completion event, and the coordinator returned from that wait. The presenter entered another infinite wait on0x1020at 110.70 s. No further title release on that semaphore or newPresentXwas observed by cutoff.The coordinator (TID 263228) completed 81 waits and then waited on event
0x1ac8. The event and job descriptor both matched slot 81 on worker 3 (TID 257776). That worker completed 60 calls fromExecuteIndirecttoresolve_waitin 188.65 s, then entered a 61st at 297.44 s. Its job had not returned or signalled completion at cutoff. This identifies the worker responsible for the coordinator’s pending event. Whether completing that job would release the presenter’s semaphore remains open. All 378 Windows samples taken during the final waits confirmed the same semaphore and the same unsignalled auto-reset event. Handles and TIDs are local to this run.The completed run used in-process tracepoints with the release PDB and exited normally at 300 s with 1,437 PresentX calls. A separate breakpoint-debugger attempt slowed presentation and was excluded. AI assistance. OpenAI Codex (GPT-6) ran the trace and verified the event sequence.
Slot 81, extended replay on the same clean head (
2228be78, RTX 4090, NVIDIA 621.40). With the original 594-file cache, I ran the title for 1,200 s. Slot 81 remained open at cutoff after 385 directExecuteIndirect → resolve_waitcalls had returned. The lastPresentXreturned at 104.82 s. The presenter received no further semaphore release during its final wait.I replayed from the first run’s final cache (2,399 files, with all 594 originals unchanged). This time the worker running slot 81 released the presenter’s semaphore, and one new
PresentXfollowed. The job was identified by the same descriptor and callback (+0x15b4aa0) in both runs. The scheduler assigned it to worker 0 in the first run and worker 2 in the second.0x1024. The presenter returned from its 181.18 s wait. Slot 81 then returned, worker 2 signalled completion event0x1a4c, and the coordinator’s 82nd wait returned. These events share a millisecond, with that order recorded by the probes.PresentXat 295.756 s, 388 ms after the release, and returned at 295.828 s. XCL’s activity counter independently counted one presentation. No image of that frame was saved at the one-in-12 capture interval, so its visual contents are unknown.0x887A0005) and an unhandled breakpoint exception (0x80000003). No second presentation followed. The observed trace establishes the wake-up and the next present call. The cause of device removal is still open.Both runs used the same release executable, fresh copies of the same profile, and the same inputs. The second run had a 3,600 s limit and exited on the exception. AI assistance. OpenAI Codex (GPT-6) ran the replays and verified the call sequence against the activity log and Windows wait samples.
First frame after slot 81 and device removal (RTX 4090, 621.40, same
2228be78executable). I replayed from verified copies of the same 2,399-file XCL cache with DRED enabled.PresentXafter the wait completed. A one-shot readback on the presenter thread saved frame 1368 at 135.959 s. All 518,400 sampled texels were0xff000000(960×540 sampled from 3840×2160), identical to frame 1367 before the gap. No HUD or world geometry was visible. XCL counted 28 more submissions in the following two-second interval, then reportedDXGI_ERROR_DEVICE_REMOVEDat 151.063 s, 15.104 s after the readback.PresentXwas called. The failure therefore also reproduces without the resumed present or its readback. In both runs DRED returned VA 0 and empty allocation lists, and XCL printed no incomplete command list. Both reached the same title breakpoint (+0x2474606).D3D12Core!CDevice::UMSetError_(0x88760870)on the presenter thread 24 ms into the resumed call. The stack resolved totitle_textures::refresh_once → sparse::before_execute → State::upload_zeros → State::submit_slot → ExecuteCommandLists. On that stack D3D12 processed the driver error as0x887A0005. This identifies the sparse tile-clear submission as a place to instrument. Which GPU operation originally failed is still open. Submission on the tested headAI assistance. OpenAI Codex (GPT-6) ran the replays and checked the frame counter, bitmap and symbolized call stacks.
Which sparse pages were being cleared? On two more RTX 4090 replays of
2228be78(621.40, identical 2,399-file cache at launch), the first NVIDIA error callback again occurred insideupload_zeros → submit_slot → ExecuteCommandLists. The actual copy destinations matched the requested ranges: 121 × 64 KiB in one run (1,936 pages in 17 intervals), 86 × 64 KiB in the other (1,376 pages in five intervals). The batches had different addresses. In both cases XCL’s sparse-upload fence had already reached its last signalled value before the clear.In the second replay, two submissions on another queue (29 and 30 command lists) had trailing fence signals of 5,425 and 5,426. An independent CPU sampler read 5,424 on both sides of the first driver callback (−0.55 and +0.96 ms). It first saw the two signals complete at +11.14 and +40.79 ms, before the removal sentinel. Neither batch had a captured sparse buffer copy or a tracked buffer binding overlapping the cleared pages. Shader-selected descriptor accesses remain unobserved, so these measurements establish outstanding queue work but do not establish a same-page conflict. The observers added no GPU signals or waits. AI assistance: OpenAI Codex (GPT-6).
Descriptor tables at the sparse-clear callback (RTX 4090, driver 621.40, same
2228be78executable and retained cache). A replay captured one outstanding 29-list submission on another queue when the NVIDIA callback reported0x88760870insideupload_zeros. All 2,752 requested 4 KiB pages matched the recorded copy destinations. The covering fence still read 5,627 at −0.91 and +0.60 ms relative to the callback. It reached 5,628 at +26.20 ms.XCL prepared 245 distinct table bases on 11 of the 29 lists. I sampled up to the first 64 slots per table. All 5,678 distinct slots were readable and byte-identical at submission and on reread in the callback. None of the 947 records matching XCL's buffer encoding overlapped the clear or a reconstructed physical alias. Of 1,182 image-shaped records, 933 resolved to a unique observed host resource and 280 to a title-memory start. No resolved start or known mapped resource matched the clear.
A second replay captured the consecutive 29- and 30-list submissions and the same callback inside a 688-page clear. Their covering fences had already completed 276.72 ms and 245.10 ms before the callback, respectively. The 29-list sample contained 6,133 slots and the 30-list sample 1,899. Neither had a matching canonical buffer range on either read. Fifteen slots changed in the 29-list sample and zero in the 30-list sample. All table-base records retained the same bytes. At this callback, three single-list submissions on other queues still lacked completed covering signals. They fell below the descriptor capture threshold.
The 29/30 pair can therefore retire before this error is reported. The original two-outstanding-batch trace has no descriptor snapshot. Full image extents, dynamically selected indices and accesses through the raw window UAVs remain open. AI assistance: OpenAI Codex (GPT-6).
Three outstanding single-list submissions on the RTX 4090. The original 688-page trace shows that each destination queue had successfully enqueued a GPU-side
Wait(1368)on a different dependency fence before submitting its list. All three dependency fences still read 1367 on both sides of sparse-submit entry and at −0.54 / +0.96 ms around the NVIDIA callback. One other queue supplied the recorded signals for all three fences, up to 1367. The covering signals of 8, 5 and 7 previously reported describe completion of the lists. The earlier waits show that all three lists were still blocked before shader execution during this clear. Their descriptor contents were not captured in the original run. D3D12 queue wait semanticsI extended the descriptor capture to single compute lists on the same executable and retained cache. In a separate replay, three queues had outstanding single-list submissions during a 640-page clear, 815.5 ms before the callback. In submission order I sampled 208, 178 and 178 slots and found 84, 64 and 64 canonical buffer records. None overlapped that clear or a reconstructed physical alias. All three lists bound a raw UAV spanning the affected window. Two image-shaped records remained unresolved. The sampled table prefixes and CPU-side bindings do not identify shader-selected addresses. These three lists had retired by that replay's callback. AI assistance: OpenAI Codex (GPT-6).
Producer side of the three Wait64 dependencies (same RTX 4090, driver 621.40,
2228be78and retained cache). In the original trace, the direct queue signaled 1367 on the three dependency fences as the first three of 18 signals after an eight-list submission. Its last observed native submission returned 116 ms before the NVIDIA callback. The compute queues enqueued their waits for 1368 at −74, −41 and −15 ms. None of those three fences had a recorded successful signal for 1368.I followed the same three guest cells across recording, close and submission in fresh replays. The successful control showed
Write64BitValueBottomOfPipeXrecording the writes, then the closed list appearing in a native batch. AfterExecuteCommandLists,signal_write64_fences → signal_write64_pairsissued all 18 native queue signals. In that replay the worker recorded the next three values (1372) on a single list at −251, −236 and −230 ms. ItsClosesucceeded at −121 ms. That list had no observed reset, mapped batch, native submission or next-value signal attempt before the callback. All three fences still read 1371 at callback entry. A second replay also captured a successful close at −64 ms with no subsequent native submission of that list before the callback.In the fully traced replay, the presenter was processing a different list on the producer queue when texture refresh submitted sparse clear work on another queue and the driver reported
0x88760870. The next point to trace is ownership of the already-closed Write64 list before it reaches a producer submission. The exact 1368 run had no list-close probe; the new runs establish the lifecycle on the same cells at different counter values. XCL submission order · Native signal. AI assistance: OpenAI Codex (GPT-6).Follow-up — who submits the closed three-Write64 list?
Two RTX 4090 replays on
2228be78started from independent, hash-verified copies of the same retained cache. I tracked the title wrapper separately from its active native command list.Close. XCL expanded the wrapper to the expected native list, which occupied the same slot in D3D12ExecuteCommandLists. The three fence signals followed.This locates the last observed copy on the worker side. The callback came sooner than the control cycle's Close-to-submit interval in both runs, so the trace cannot distinguish a delayed handoff from a dropped record. The remaining boundary to instrument is the transfer into the presenter's input records.