D3D12.X: keep a graphics pipeline's driver blob on disk from a 50 ms build #3332
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3332"
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?
Imported from ivall/xcl. Originally posted by Prime1997 on 2026-11-29T08:48:24Z.
Requested by Prime
Stacked on #3330; only the top commit belongs here.
Graphics, two-pass mesh and stream pipelines kept their driver blob for the next run only when the build took 250 ms or more (compute pipelines: 20 ms since
f303e078). A graphics pipeline that takes a tenth of a second in the driver was compiled again at its first draw in every run, mostly on a thread the title is waiting for. Now from 50 ms;XCL_PSO_DISK_CACHE_MIN_MSstill sets the threshold for every kind.More files are written, so this comes after the disk cap (
XCL_PSO_DISK_CACHE_MAX_MB).What is in it
crates/xcl/src/hle/d3d12x/real.rs: the disk threshold of graphics, two-pass and stream pipelines 250 -> 50 msREADME.md: the thresholdsTested
cargo test --workspace --no-fail-fast -- --test-threads=4with the threeuma_drivertests below skipped, on981bc5aaa2: 2608 passed, 0 failed, 49 ignored (SKIPPED GPU tests: 28 lines: 21no wave64(this card runs wave32), 3 a wave32 per-lane form refused by the translator (#1426), 2no heap windows(opt-inXCL_HEAP_WINDOWS=1), 1no dxc.exe, 1cannot disable the driver cache(needs Windows Developer Mode))cargo test -p xcl --lib -- --test-threads=1 uma_driver::tests::a_refused_gpu_upload_segment_becomes_custom uma_driver::tests::mixed_window_keeps_its_bytes_and_the_gpu_sees_every_segment uma_driver::tests::failed_restore_stops_before_importing_an_unbacked_window): 3 passed, 0 failed. They are left out of the whole run because on this PC's driver they can end the library test process (exit 0x7c10003, "coherent window could not be restored"), onmaintoocargo test -p xcl --lib -- --test-threads=4, same skips): 2469 passed, 0 failed; 2469 passed, 0 failedmainfa204595a4: 2605 passed, 0 failed, 49 ignored, 28SKIPPEDlines (own-prs-20261129 run, same command)scripts/smoke.ps1, no input, copied profile and shader cache): blocks belowRegression run
Not tested
AI use
Optional temporary Discord for coordinating contributor work, testing and comparing results.
🤖 Generated with Claude Code
Imported from ivall/xcl. Originally posted by saintwolf on 2026-11-29T13:47:50Z.
Reviewed and tested at
d89ebb2c.Code review findings
mainand includes both commits from #3330 (829df023+f80f9f8c) in addition to theKEEP = 50 mschange. It should be rebased ontomainand either decoupled from #3330 or explicitly marked as depending on #3330.KEEPfrom250 msto50 mswill persist significantly more.psoblobs on disk, while #3330's latest commit made the disk cap opt-in (Noneby default). It would be helpful to note the observed disk-size growth on a long run (and note the shared feedback on #3330 regardingsweep_onceandload()'smetadata()/touch()path).Tested locally
32.0.16.2140), AMD Ryzen 7 7800X3D,rustc 1.100.0.cargo test -p xcl --lib hle::d3d12x::real::driver_cache:: -- --test-threads=1: 22 passed, 0 failed.AI use
Imported from ivall/xcl. Originally posted by bmjask on 2026-11-29T14:50:21Z.
Current-main audit (2026-11-29): not yet; rebase after the disk-cap dependency is settled.
Lowering the persistence threshold from 250 ms to 50 ms is cache-key safe and can remove repeat-launch compiles, but it creates substantially more files. The branch is conflicted, includes three commits (the #3330 cap, this threshold change, and a cap follow-up), and the PR-description check is red. The cap must be reviewed/landed first or the lower threshold risks unbounded cache growth; the follow-up should belong to the cap PR rather than making this PR a mixed stack.
After #3330 is current-main clean, this should become a tiny one-commit threshold PR with measured file-count/bytes and repeat-launch savings. Note that an enabled size cap can evict old entries and therefore cause later recompilation by design, but the threshold itself does not alter PSO identity.
Disposition: rework stack, then merge candidate.
Review assisted by Codex; exact model name was not exposed in this session. No full cache fill was run.
Imported from ivall/xcl. Originally posted by Aniseto on 2026-11-29T15:03:44Z.
Attempted the xcl library suite at
d89ebb2con an NVIDIA Blackwell desktop part.System
Results
XCL_ADAPTER=NVIDIA cargo test -p xcl --lib --no-fail-fast -- --test-threads=4 --skip a_refused_gpu_upload_segment_becomes_custom --skip mixed_window_keeps_its_bytes_and_the_gpu_sees_every_segment --skip failed_restore_stops_before_importing_an_unbacked_window: exit 101 after 274.4 s. Four tests failed:gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3, withInvalid bitcode signature. The lib test process then exited with0x80004005after a sparse upload retry message, so no full passed/failed totals were emitted. 24 SKIPPED lines were present.What this adds
The PR has no new unit test (it changes two thresholds), so this is a suite attempt rather than a focused verification. The thread has a passing suite on an RTX 3060 Ti; this is the first datapoint from an RTX 5070 Ti on driver 32.0.16.2140. I am reporting the measured outputs, not attributing the failures to this change; the abort happened in the DXIL fuzz group, which this PR does not touch.
Not tested
A retail title, a paired smoke run, the whole workspace suite, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data.
AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - ran the command above on this machine and wrote this report; no game data was used.
Imported from ivall/xcl. Originally posted by Aniseto on 2026-11-29T18:59:52Z.
Re-ran the xcl library suite at
20fb6d57after the head moved fromd89ebb2c(a merge ofmainbc2cbb72); this is a new response in the same thread, not an edit of my earlier report: https://github.com/xcl-dev/xcl/pull/3332#issuecomment-7257789308System
Results
XCL_ADAPTER=NVIDIA cargo test -p xcl --lib --no-fail-fast -- --test-threads=4 --skip a_refused_gpu_upload_segment_becomes_custom --skip mixed_window_keeps_its_bytes_and_the_gpu_sees_every_segment --skip failed_restore_stops_before_importing_an_unbacked_window: exit 101 after 252.9 s, 25 SKIPPED lines. No individualFAILEDline was emitted; the harness ended withInvalid bitcode signatureand a sparse upload retry failure, then the test binary exited with0x80004005. No passed/failed totals were emitted.What this adds
The same kind of abort seen on the previous head, now on the merged head. This PR has no new unit test (it changes a threshold), so this is a suite attempt rather than a focused verification. I am reporting the measured outcome, not attributing the abort to this change; no title run was made.
Not tested
A retail title, a paired smoke run, the whole workspace suite, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data.
AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - ran the command above on this machine and wrote this report; no game data was used.
Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-29T22:39:34Z.
Review: COMMENTED
Static review of
d89ebb2cfor the stack in the #3041 comparison.I found no actionable issue in the tested graphics-only threshold change from 250 ms to 50 ms. The disk-cap behavior is tracked in the review of #3330.
Review assisted by Codex (GPT-6, exact variant unavailable). No new build or GPU run for this review.
Imported from ivall/xcl. Originally posted by bmjask on 2026-11-29T22:43:26Z.
Review: COMMENTED
Critical review of current head
20fb6d57. The 250→50 ms graphics-blob threshold is small and the cache key itself is unchanged, but this PR remains conflicted and carries the #3330 disk-cap work. That cap is opt-in on its current head, so the lower threshold can substantially increase persistent.psocount and bytes with no default limit. Please first settle #3330, then rebase this as a focused threshold change and report a cold/warm pair with file-count, disk bytes, and saved driver-build time. This updates my earlier current-main audit; I did not run Windows tests.Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-29T22:54:48Z.
Test run data for the static review
cargo build --release -p xclbuild4465c886included this PR in the Prime1997 stack. One warm-cache retail run (XCL_PREPARE_ALL=1,XCL_RUN_SECONDS=180) reached the first present in 12,326 s and showed 5,104 frames in the subsequent 180 s, with zero failed or fallback pipelines and no crash. This is combined-build coverage. It cannot isolate this PR's effect. Run report and comparison20fb6d57ended with exit 101 after the test process aborted (0x80004005). It emitted 25 SKIPPED notices and no final totals. The report does not establish that the threshold change caused the abort. Independent suite attemptcargo build --workspacepassed on8f5abe8a, the historical integration of reviewed headd89ebb2cwith the cap from #3330. The newer head20fb6d57conflicts withmain. The test binaries for the historical integration built withcargo test --workspace --no-fail-fast --no-runand the GPU suite is queued.Local system used for these runs was an RTX 2070 SUPER 8 GB (621.40, wave32), Ryzen 5 3600XT, 32 GB RAM, Windows 11 build 26300, and rustc 1.100.1. Claude Code (Claude Opus 5.5) ran the earlier tests. Codex (GPT-6, exact variant unavailable) checked the artifacts and ran the new build.
Imported from ivall/xcl. Originally posted by Prime1997 on 2026-11-30T01:14:29Z.
Superseded by #3449 (
fe348253, "D3D12.X: persist graphics pipelines built in 50 ms"), which landed the same change inmain: graphics and mesh driver blobs are kept from a 50 ms build instead of 250 ms. What this PR adds on top of #3330 is 3 lines of README and 7 lines ofreal.rs(the sameKEEPconstant and its test), so nothing from it is still needed. Closing it, not deleting it; the branch stays.Generated by Claude Code
Pull request closed