D3D12.X: keep 128 MiB of compute and 64 MiB of graphics driver blobs, not 768 #3328
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3328"
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:30:33Z.
Requested by Prime
The driver blobs XCL keeps in memory, so that a pipeline made again skips the driver's compile, fill up to 512 MiB (compute and two-pass) and 256 MiB (graphics) of process memory and are never given back. In a retail world on an RTX 3060 Ti with 8 GB, the machine ran out of physical memory at about 225 s and Windows trimmed the process from then on. The stores now keep 128 MiB and 64 MiB.
Since
keep_driver_blob_atdecides the disk save apart from room in memory, a full store does not stop a slow build's blob from reaching the disk cache (the per-kind time thresholds still apply): a pipeline made again after the store fills reads its file, or goes back to the driver and the driver's own cache. On AMD the disk cache is off by default, so there it is always the driver.What is in it
crates/xcl/src/hle/d3d12x/real.rs:COMPUTE_BLOBS_MAX512 -> 128 MiB,GRAPHICS_BLOBS_MAX256 -> 64 MiBTested
cargo test --workspace --no-fail-fast -- --test-threads=4with the threeuma_drivertests below skipped, on750ffb255c: 2605 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): 2466 passed, 0 failed; 2466 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:52Z.
Reviewed and tested at
750ffb25.Clean, minimal change (
COMPUTE_BLOBS_MAX:512 -> 128 MiB,GRAPHICS_BLOBS_MAX:256 -> 64 MiB) that trims up to 576 MiB of in-memory blob commit. Only minor question is whether any long-run measurement confirmed128 / 64 MiBdoesn't increase disk re-reads for titles with large shader working sets (especially alongside #3332).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: 19 passed, 0 failed.AI use
Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-29T22:39:32Z.
Review: COMMENTED
Static review of
750ffb25for the stack in the #3041 comparison.I found no actionable issue in the tested in-memory blob-limit changes. The disk and compile fallbacks remain reachable.
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:28Z.
Review: COMMENTED
Critical review of current head
750ffb25. I found no correctness blocker in the two constant changes: the memory store admits fewer blobs while disk persistence and driver recompilation remain available. The real tradeoff is repeated build latency, especially where disk persistence is disabled (including AMD's default). Before enabling this broadly, please compare repeated world entries on NVIDIA and AMD with blob hit/miss counts, driver-build milliseconds, and peak commit; a reduction of the cap alone cannot establish a net performance win. No local Windows run; this is a nonblocking measurement request.Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-29T22:54:47Z.
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 comparison750ffb25, saintwolf reports 19 passed, 0 failed forcargo test -p xcl --lib hle::d3d12x::real::driver_cache:: -- --test-threads=1. Independent focused runcargo build --workspacepassed on trial merge6044873e, applying the reviewed head tomainat5b0d5fa3. These runs do not measure the effect of the smaller limits on disk rereads. The test binaries 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 Foniass on 2026-12-01T03:58:37Z.
Review (head
750ffb25, diff read, not a merge-check; draft, so not built or run):Fine: the description of
keep_driver_blob_atis accurate (the disk save doesn't depend on room in memory), and the change is just the two constants.AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T16:16:56Z.
Test report (not a merge-check: draft)
base:
b2b1f109d2head:
750ffb255cmerge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2902 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none
review: not repeated here; my review of this same head is at https://github.com/xcl-dev/xcl/pull/3328#issuecomment-7300251735, and its findings stand. This run adds what reading couldn't: whether the change merges, builds and passes the whole suite on current main.
performance: no smoke run.
assessment: merges, builds and passes the whole suite on current main (0 failed); the findings in my review stand
hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5
AI-written and posted by Foniass without a human check of each point.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.