D3D12.X: a refused driver blob is recompiled in the big-compile queue #774
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!774
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/774/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?
@CuteBooty on GitHub · 2026-11-24 05:06 UTC · original
fix/refused-blob-admission→main· +85 −17 · 1 files · 1 commits · closed without mergingA compute program of 256 KB of DXIL or more is compiled on the background workers one at a time (
BIG_COMPILES), after a check for 3 GiB of free commit. Since #636 / #634 that slot is taken only when there is no kept driver blob. When the driver refuses the blob, the program is compiled in full without it. A driver update can refuse many kept blobs in one run, and then several workers can compile at once. Found by reading the merged code; it was not seen in a run.I searched the open PRs: #567 bounds the commit wait, #214 the number of driver compiles, #714 and #744 change the kept files. None of them changes this path. #214 and #744 touch the same function.
What is in it
hle/d3d12x/real.rs:build_reusingbuilds from the blob first and admits the compile if one is needed, now also after a refusal. The refused blob is dropped before the wait. The slot is held to the end of the function, as before; a title thread and a blob the driver takes still skip it.a_refused_blob_is_compiled_under_the_admission_of_a_compile: the order of the steps with and without a blob, refused or not. It fails with main's order put into the helper and passes with the change.A title thread that binds a program whose refused blob a worker is waiting to recompile now waits for that worker's turn, as it already does for a program with no blob.
Tested
cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4: 699 passed, 3 failed, 41 ignored on this tree; 702 passed, 0 failed, 41 ignored on the same tree before one comment was reworded.placed_title_textures_share_vram_and_preserve_pixels("cubemap extra_pages must be reused at same va", the one #447 is about) and two tests that then find its lock poisoned. It is on main too:cargo test -p xcl --lib -- --test-threads=4fails there the same way in 4 of 6 runs on64b3f35, and in 5 of 6 with this change.gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.Regression run
Second of two runs of each build, no input. An earlier pair of runs of this change was discarded because a button was pressed during it, so it went on to another scene.
main:
this PR:
Not tested
AI use
🤖 Generated with Claude Code
@MesshM on GitHub · 2026-11-24 05:15 UTC · original
Test run of
b1fe786c4ca350e96e8bcf067861b7bafa0b1093on AMD RDNA4. I merged it onto currentmain6025201locally (clean merge).Tested
stable-x86_64-pc-windows-msvc, debugcargo build --workspace+cargo test --workspace -- --test-threads=4on the merge: 705 passed, 0 failed, 41 ignored, exit code 0;xcllib tests 664 passed, 0 failed, 21 ignoredSKIPPED;a_refused_blob_is_compiled_under_the_admission_of_a_compileand the otherbuild_reusing_testspass.Review:
build_reusingtries the kept blob first and, only when the driver refuses it, takes theBIG_COMPILESslot and the commit check before the full compile, so a refused blob no longer compiles outside the slot (the gap #636's reuse path left). I found nothing to change.Not tested: no retail title or regression run (I have no unpacked game), no
XCL_SAMPLE_*tests, release build; the PR's head on its old base was not run, only its merge ontomain.Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
@mastrr9 on GitHub · 2026-11-24 05:20 UTC · original
Independent native Windows NVIDIA RTX 5080 build/test run and code review at head
b1fe786c4ca350e96e8bcf067861b7bafa0b1093.Code Review
build_reusingabstraction: tries the cached driver blob without blocking onBIG_COMPILES/wait_for_commit(), and if the blob is absent or refused by the driver, acquires the big-compile admission slot before recompiling and holds it untilkeep_compute_blobcompletes. Prevents concurrent ~1.5 GB driver compile bursts after driver updates. No issues found.Tested
617.42/32.0.16.1742), Windows 11 Pro 25H2 (26200.9974),rustc 1.100.0 (0ef1bc386 2026-11-09)MSVC, DXC from Windows SDK10.0.26100.0, debug build.cargo build --workspace && cargo test --workspace -- --test-threads=4placed_title_textures_share_vram_and_preserve_pixelspassed on the first run).ok):hle::d3d12x::real::build_reusing_tests::a_refused_blob_is_compiled_under_the_admission_of_a_compilegpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask(no wave64)gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware(no wave64)Not tested
AI use: Antigravity (Gemini 4 Neon) performed the code review, ran the RTX 5080 workspace tests, and drafted this comment.
@CuteBooty on GitHub · 2026-11-24 21:08 UTC · original
Closing: #1524, merged today, covers this. On
maina refused blob's retry goes throughdriver_compile_identifiedwithgate_compute_driver_compile(false), so it takes a slot as a build without a blob does (gate cold retries after rejected cache blobs,724b9e2), and that PR has a test of the gate. Thanks @MesshM and @mastrr9 for the test runs here.AI use: Claude Code (Claude Opus 5.5) compared the code and wrote this.
Pull request closed