D3D12.X: defer driver cache path hashing on compute RAM hits #2998
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!2998
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2998"
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?
@SalmanBarkat on GitHub · 2026-11-27 10:15 UTC · original
SalmanBarkat:perf/defer-compute-driver-cache-hash→main· +43 −9 · 1 files · 1 commits · draftDefers
driver_cache::path_for/driver_cache::path(and its full-bufferfnv64DXIL hash) until aftercompute_blob(key)misses in RAM or when a newly compiled blob needs to be stored on disk. On compute PSO RAM cache hits where the driver accepts the cached blob, thefnv64pass over the DXIL bytecode is skipped completely.Fixes #2883
What is in it
crates/xcl/src/hle/d3d12x/real.rs:compute_container: computedriver_cache::path_for(dxil, copy.Flags.0, mode == ComputeBuild::Chain)only whencompute_blob(key)returnsNone, or right beforedriver_cache::keep(...)if a new blob is written back after compilation.finish_two_pass: apply the same lazydriver_cache::path(&tp.cs, 0)deferral around the compute-passcompute_blob(ckey)lookup and writeback.driver_cache::tests::deferred_path_is_deterministic: verifypath_forandname_forare deterministic across calls and distinct for.chain.psovs.pso.Tested
rustc 1.100.0 (0ef1bc386 2026-11-09), debug build.cargo build --workspace: succeeded.cargo test --workspace -- --test-threads=4: 1447 passed, 0 failed, 47 ignored (across all 38 workspace test binaries, includinghle::d3d12x::real::driver_cache::tests::*andgpu_two_pass_cache_e2e).Not tested
scripts/smoke.ps1regression run (no retail game package available locally to producexcl-smokeblocks).AI use
@ettehn on GitHub · 2026-11-27 10:23 UTC · original
Tested on clean
3071230e616a25ce66b215dd741a7a87ec6b94dc. Windows 11 26200.9974, Rust 1.97.1 MSVC, debug.cargo test --offline --locked -j 2 -p xcl --lib driver_cache::tests -- --test-threads=1passed 5/5 withXCL_PSO_DISK_CACHE=1. The same test binary in a fresh process withXCL_PSO_DISK_CACHE=0passed 4/5. Onlydeferred_path_is_deterministicfailed:path_forcorrectly returnsNonefor both paths with caching disabled, and the test expects them to differ. Enabling the cache again returned to 5/5.I also compared the exact heads with #2909
67c26e28. Both cover the same RAM-hit fast path incompute_containerand the compute half offinish_two_pass, on the same parent8b957bec. Both merge individually intomain623d02e4and conflict with each other inreal.rs. #2909’s callback tests exercise whether the disk path/load runs. #2998’s new test exercises path identity. No GPU timing or retail run.AI use: OpenAI Codex (GPT-6) ran the Windows tests, compared the diffs, and drafted this report.
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.