D3D12.X: defer compute driver_cache path hashing until RAM cache miss #2909

Open
github-bot wants to merge 1 commit from github-bot/gh-2909 into main AGit
Owner

@⁠real-alponzo on GitHub · 2026-11-26 22:50 UTC · original
real-alponzo:fix/2883-defer-compute-disk-hash → main · +84 −17 · 1 files · 1 commits · open

Defer driver_cache::path_for / driver_cache::path (which hashes the full DXIL buffer with fnv64) in compute_container and the compute pass of finish_two_pass until compute_blob(key) misses in COMPUTE_BLOBS, avoiding unnecessary full-buffer FNV-1a hashing on warm RAM-cache hits.

Fixes #2883.

What is in it

  • Added resolve_compute_blob in crates/xcl/src/hle/d3d12x/real.rs to check the RAM cache first and only compute/load the on-disk driver_cache path on a RAM miss.
  • On a rejected RAM-cached blob that falls back to a cold compile, computes driver_cache::path_for / driver_cache::path lazily during writeback so the newly compiled blob is still persisted to disk.
  • Added unit tests compute_blob_cache_tests::resolve_compute_blob_skips_disk_hash_on_ram_hit and compute_blob_cache_tests::resolve_compute_blob_loads_from_disk_on_ram_miss.

Regression run

Base (main):

xcl-smoke v1
commit: 8b957bec6f82495aec940944c6bf47faa02db590
gpu: AMD Radeon RX 6800
title: 6ca5cab7
seconds: 60
exit: 0x0
frames shown: 1525 (PresentX 1525)
presents per 2 s (last 3): 60 61 59
device removals: 0
crashes: 0
peak commit: 14867 MB

PR head (67c26e28):

xcl-smoke v1
commit: 67c26e28f4d5d148595923ebb254205b07164b83
gpu: AMD Radeon RX 6800
title: 6ca5cab7
seconds: 60
exit: 0x0
frames shown: 1527 (PresentX 1528)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14867 MB

Tested

  • Hardware: Windows 11 Pro for Workstations x64 (Build 26300), Intel Core i9-9900K, 32 GB RAM, AMD Radeon RX 6800 (Driver 32.0.21045.29003), rustc 1.100.0, DXC 1.9.2602.17.
  • cargo test -p xcl --lib compute_blob_cache_tests -- --nocapture: 2 passed; 0 failed; 0 ignored; 1345 filtered out.
  • .\scripts\smoke.ps1 -Game "C:\VIctory-SSD-test\game" -Seconds 60 on 8b957bec and 67c26e28 (blocks above).

Not tested

  • Full cargo test --workspace on this exact branch (verified targeted unit tests and paired 60 s retail smoke; CI covers the full suite).
  • Warm multi-minute open-world CPU profiling beyond the 60 s smoke run.

AI use

  • Antigravity (Gemini 4 Neon) implemented the lazy disk-path resolution, wrote the unit tests, ran the tests and paired smoke runs, and drafted this PR description.
**@⁠real-alponzo** on GitHub · 2026-11-26 22:50 UTC · [original](https://github.com/xcl-dev/xcl/pull/2909) `real-alponzo:fix/2883-defer-compute-disk-hash` → `main` · +84 −17 · 1 files · 1 commits · open Defer `driver_cache::path_for` / `driver_cache::path` (which hashes the full DXIL buffer with `fnv64`) in `compute_container` and the compute pass of `finish_two_pass` until `compute_blob(key)` misses in `COMPUTE_BLOBS`, avoiding unnecessary full-buffer FNV-1a hashing on warm RAM-cache hits. Fixes #2883. **What is in it** - Added `resolve_compute_blob` in `crates/xcl/src/hle/d3d12x/real.rs` to check the RAM cache first and only compute/load the on-disk `driver_cache` path on a RAM miss. - On a rejected RAM-cached blob that falls back to a cold compile, computes `driver_cache::path_for` / `driver_cache::path` lazily during writeback so the newly compiled blob is still persisted to disk. - Added unit tests `compute_blob_cache_tests::resolve_compute_blob_skips_disk_hash_on_ram_hit` and `compute_blob_cache_tests::resolve_compute_blob_loads_from_disk_on_ram_miss`. **Regression run** Base (`main`): ``` xcl-smoke v1 commit: 8b957bec6f82495aec940944c6bf47faa02db590 gpu: AMD Radeon RX 6800 title: 6ca5cab7 seconds: 60 exit: 0x0 frames shown: 1525 (PresentX 1525) presents per 2 s (last 3): 60 61 59 device removals: 0 crashes: 0 peak commit: 14867 MB ``` PR head (`67c26e28`): ``` xcl-smoke v1 commit: 67c26e28f4d5d148595923ebb254205b07164b83 gpu: AMD Radeon RX 6800 title: 6ca5cab7 seconds: 60 exit: 0x0 frames shown: 1527 (PresentX 1528) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14867 MB ``` **Tested** - Hardware: Windows 11 Pro for Workstations x64 (Build 26300), Intel Core i9-9900K, 32 GB RAM, AMD Radeon RX 6800 (Driver 32.0.21045.29003), `rustc 1.100.0`, DXC 1.9.2602.17. - `cargo test -p xcl --lib compute_blob_cache_tests -- --nocapture`: `2 passed; 0 failed; 0 ignored; 1345 filtered out`. - `.\scripts\smoke.ps1 -Game "C:\VIctory-SSD-test\game" -Seconds 60` on `8b957bec` and `67c26e28` (blocks above). **Not tested** - Full `cargo test --workspace` on this exact branch (verified targeted unit tests and paired 60 s retail smoke; CI covers the full suite). - Warm multi-minute open-world CPU profiling beyond the 60 s smoke run. **AI use** - Antigravity (Gemini 4 Neon) implemented the lazy disk-path resolution, wrote the unit tests, ran the tests and paired smoke runs, and drafted this PR description.
compute_container and the compute pass of finish_two_pass previously computed driver_cache::path_for / driver_cache::path (which hashes the full DXIL buffer with fnv64) eagerly before checking whether compute_blob(key) already hit in COMPUTE_BLOBS.

Defer the disk path lookup until a RAM-cache miss or a cold-compile writeback after a rejected RAM blob.

Fixes #2883.

Assisted-by: Antigravity (Gemini 4 Neon)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 01:15:42 +00:00
Author
Owner

@⁠fromthemoonx on GitHub · 2026-11-26 23:11 UTC · original

Full suite on NVIDIA (listed under Not tested): passes. The new RAM-hit test fails with the old order (hash first). No existing test or the e2e title reaches the RAM-hit branch in compute_container / finish_two_pass, so the helper tests are its only coverage.

Tested: 67c26e2 (its base is current main 8b957be, so head = merged). RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug, Graphics Tools (D3D12 debug layer) installed.

result
cargo test --workspace --no-fail-fast -- --test-threads=4 1448 passed, 0 failed, 47 ignored; 25 SKIPPED lines (no wave64, refused per-lane forms)
compute_blob_cache_tests (2 tests), 3 runs 3 of 3
resolve_compute_blob with disk_path() called before the RAM check (scratch, main's order) resolve_compute_blob_skips_disk_hash_on_ram_hit fails 3 of 3: disk path / fnv64 must not run on a RAM-cache hit
scratch eprintln! in driver_cache::path_for and on each RAM hit, cargo test -p xcl --lib + --test gpu_compute_e2e, main vs head the same on both: path_for 4 times, 0 RAM hits
e2e debug-layer tests, head vs main 8b957be the same messages (3× error id 93, 1× error id 1046, 1× warning id 820, 8× id 0 per run); the title never calls path_for

By reading, the writeback is unchanged: when a RAM blob is refused and the build succeeds, disk is computed before driver_cache::keep, and driver_cache::note(false, …) only runs when from_disk is set, so disk has already been computed there.

Not tested: a warm title run where a RAM hit happens (none of the suite's builds repeat a program), the saved time, AMD / Intel on this run.

AI use: Claude Code (Claude Opus 5.5) ran the tests and scratch checks and wrote this report.

**@⁠fromthemoonx** on GitHub · 2026-11-26 23:11 UTC · [original](https://github.com/xcl-dev/xcl/pull/2909#issuecomment-7205328968) **Full suite on NVIDIA (listed under Not tested): passes. The new RAM-hit test fails with the old order (hash first). No existing test or the e2e title reaches the RAM-hit branch in `compute_container` / `finish_two_pass`, so the helper tests are its only coverage.** **Tested:** `67c26e2` (its base is current `main` `8b957be`, so head = merged). RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug, Graphics Tools (D3D12 debug layer) installed. | | result | |---|---| | `cargo test --workspace --no-fail-fast -- --test-threads=4` | 1448 passed, 0 failed, 47 ignored; 25 `SKIPPED` lines (`no wave64`, refused per-lane forms) | | `compute_blob_cache_tests` (2 tests), 3 runs | 3 of 3 | | `resolve_compute_blob` with `disk_path()` called before the RAM check (scratch, `main`'s order) | `resolve_compute_blob_skips_disk_hash_on_ram_hit` fails 3 of 3: `disk path / fnv64 must not run on a RAM-cache hit` | | scratch `eprintln!` in `driver_cache::path_for` and on each RAM hit, `cargo test -p xcl --lib` + `--test gpu_compute_e2e`, `main` vs head | the same on both: `path_for` 4 times, 0 RAM hits | | `e2e` debug-layer tests, head vs `main` `8b957be` | the same messages (3× error id 93, 1× error id 1046, 1× warning id 820, 8× id 0 per run); the title never calls `path_for` | By reading, the writeback is unchanged: when a RAM blob is refused and the build succeeds, `disk` is computed before `driver_cache::keep`, and `driver_cache::note(false, …)` only runs when `from_disk` is set, so `disk` has already been computed there. **Not tested:** a warm title run where a RAM hit happens (none of the suite's builds repeat a program), the saved time, AMD / Intel on this run. **AI use:** Claude Code (Claude Opus 5.5) ran the tests and scratch checks and wrote this report.
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-26 23:32 UTC · original

Tested: Clean 67c26e28f4d5d148595923ebb254205b07164b83, Windows 11 build 26200, Ryzen 7 3800X, Rust 1.100.0 x64 MSVC, debug. cargo test -p xcl --lib compute_blob_cache_tests -- --nocapture: 2 passed. cargo test -p xcl --lib real::driver_cache::tests -- --nocapture: 4 passed. Both had zero failures, ignores and skips. The RAM-hit case bypassed both disk callbacks, while a miss called each once. The disk fixtures covered cache-key filenames, persistence/readback, refused-file removal, and overlapping writes.

A separate optimized synthetic microbenchmark on the same host measured the disk-filename routine at 1.010 ms for 1 MiB and 4.069 ms for 4 MiB (median of seven alternating rounds), versus 0.200 ms and 0.815 ms for the RAM-key routine that still runs on hits. These are isolated routine costs.

Not tested: GPU, driver rejection of a RAM blob through a live pipeline, retail smoke, world-load timings, or the full workspace suite.

AI use: T3 Code / Codex (gpt-6.2-sol) ran the tests, wrote and ran the isolated benchmark, and drafted the report.

**@⁠JJAutoCompare** on GitHub · 2026-11-26 23:32 UTC · [original](https://github.com/xcl-dev/xcl/pull/2909#issuecomment-7205625606) **Tested:** Clean `67c26e28f4d5d148595923ebb254205b07164b83`, Windows 11 build 26200, Ryzen 7 3800X, Rust 1.100.0 x64 MSVC, debug. `cargo test -p xcl --lib compute_blob_cache_tests -- --nocapture`: 2 passed. `cargo test -p xcl --lib real::driver_cache::tests -- --nocapture`: 4 passed. Both had zero failures, ignores and skips. The RAM-hit case bypassed both disk callbacks, while a miss called each once. The disk fixtures covered cache-key filenames, persistence/readback, refused-file removal, and overlapping writes. A separate optimized synthetic microbenchmark on the same host measured the disk-filename routine at 1.010 ms for 1 MiB and 4.069 ms for 4 MiB (median of seven alternating rounds), versus 0.200 ms and 0.815 ms for the RAM-key routine that still runs on hits. These are isolated routine costs. **Not tested:** GPU, driver rejection of a RAM blob through a live pipeline, retail smoke, world-load timings, or the full workspace suite. **AI use:** T3 Code / Codex (`gpt-6.2-sol`) ran the tests, wrote and ran the isolated benchmark, and drafted the report.
Author
Owner

@⁠upipibi on GitHub · 2026-11-27 00:12 UTC · original

Tested head 67c26e28f4d5d148595923ebb254205b07164b83, merge-base 8b957bec6f82495aec940944c6bf47faa02db590, RTX 3070 (Ampere) driver 616.56, Windows 11, rustc 1.100.0 (0ef1bc386 2026-11-09)

Debug build, no env vars, no game files.

  • PR's tests, cargo test -p xcl --lib compute_blob_cache_tests -- --test-threads=1, 3 runs on head: 2 passed, 0 failed each time (resolve_compute_blob_skips_disk_hash_on_ram_hit, resolve_compute_blob_loads_from_disk_on_ram_miss).
  • Negative control: only the PR's test hunk (the added compute_blob_cache_tests module at the end of real.rs) applied to the merge-base 8b957bec: does not compile, error[E0432]: unresolved import super::resolve_compute_blob``, so the tests cannot run there (the function is the PR's new code).
  • cargo test -p xcl --lib -- --test-threads=4 (whole lib): head 1320 passed, 0 failed (27 ignored); merge-base 1318 passed, 0 failed (27 ignored). The +2 is the two new tests. hle::xaudio2 tests ran normally, nothing skipped for them.
  • SKIPPED lines (25 on both trees, same set): 21 no wave64 (RTX 3070 is wave32-only), 3 per-lane form refused (#1426 f16 forms), 1 pso_measurement_compiles_an_exact_synthetic_record (cannot disable the driver cache / SDK component missing).

Not tested: retail title.

AI-assisted (Claude Code, Claude Sonnet 5.5 ran the tests; Claude Opus 5.5 checked and posted).

**@⁠upipibi** on GitHub · 2026-11-27 00:12 UTC · [original](https://github.com/xcl-dev/xcl/pull/2909#issuecomment-7206272487) Tested head `67c26e28f4d5d148595923ebb254205b07164b83`, merge-base `8b957bec6f82495aec940944c6bf47faa02db590`, RTX 3070 (Ampere) driver 616.56, Windows 11, rustc 1.100.0 (0ef1bc386 2026-11-09) Debug build, no env vars, no game files. - PR's tests, `cargo test -p xcl --lib compute_blob_cache_tests -- --test-threads=1`, 3 runs on head: `2 passed, 0 failed` each time (`resolve_compute_blob_skips_disk_hash_on_ram_hit`, `resolve_compute_blob_loads_from_disk_on_ram_miss`). - Negative control: only the PR's test hunk (the added `compute_blob_cache_tests` module at the end of `real.rs`) applied to the merge-base `8b957bec`: does not compile, `error[E0432]: unresolved import `super::resolve_compute_blob``, so the tests cannot run there (the function is the PR's new code). - `cargo test -p xcl --lib -- --test-threads=4` (whole lib): head `1320 passed, 0 failed` (27 ignored); merge-base `1318 passed, 0 failed` (27 ignored). The +2 is the two new tests. `hle::xaudio2` tests ran normally, nothing skipped for them. - SKIPPED lines (25 on both trees, same set): 21 `no wave64` (RTX 3070 is wave32-only), 3 per-lane form refused (`#1426` f16 forms), 1 `pso_measurement_compiles_an_exact_synthetic_record` (cannot disable the driver cache / SDK component missing). Not tested: retail title. AI-assisted (Claude Code, Claude Sonnet 5.5 ran the tests; Claude Opus 5.5 checked and posted).
Author
Owner

@⁠retrope13 on GitHub · 2026-11-27 00:16 UTC · original

Verified 67c26e28f4d5d148595923ebb254205b07164b83 against main (8b957bec6f82495aec940944c6bf47faa02db590) on NVIDIA Ada Lovelace (debug + --release targeted GPU cache tests and paired full workspace suite).

Hardware / toolchain: Windows 11 26H2 (build 26300.9818), Intel Core i5-14500HX, 24 GB RAM, NVIDIA GeForce RTX 4060 Laptop GPU (8 GB, driver 32.0.16.2140 / 621.40), Intel UHD Graphics (driver 32.0.101.7092), rustc 1.100.0 (stable-x86_64-pc-windows-msvc), Windows SDK 10.0.26100.0 (DXC 1.9.2602.17).

Tested:

  • cargo test --locked -p xcl --lib compute_blob -- --nocapture (XCL_ADAPTER=NVIDIA): 4 passed; 0 failed; 0 ignored in both debug (0.00s) and --release (0.01s) (covers both new compute_blob_cache_tests and existing compute_blob_tests).
  • cargo test --locked -p xcl --test gpu_two_pass_cache_e2e -- --nocapture:
    • XCL_ADAPTER=NVIDIA: 1 passed; 0 failed (no skip) in both debug (8.20s) and --release (7.88s).
    • XCL_ADAPTER=Intel / WARP: capability-skipped (SKIPPED ...: no wave64).
  • Paired full workspace suite (XCL_ADAPTER=NVIDIA, cargo build --workspace --locked, cargo test --workspace --locked --no-fail-fast -- --test-threads=4, debug):
    • Base 8b957bec: 1,446 passed, 0 failed, 47 ignored
    • Head 67c26e28: 1,448 passed, 0 failed, 47 ignored (+2 new tests, zero regressions)

Code review notes (non-blocking):

  • resolve_compute_blob (real.rs:4422–4433), compute_container (real.rs:4446–4497), and finish_two_pass (real.rs:6162–6204) preserve all fallback/writeback behavior (copy.Flags.0 is untouched before lazy driver_cache::path_for at 4489, and graphics PSOs at 5307/6080 already use driver_cache::graphics_path(hash, bytes) without re-hashing DXIL).
  • Minor optional follow-ups (not blockers for this PR):
    1. In the rejected-RAM-blob writeback fallback (real.rs:4488, 6195), gating lazy driver_cache::path_for/path on driver_cache::worth_keeping(in_driver) (matching finish_two_pass's graphics path at 6143–6148) would also skip hashing fast (< 250 ms) retries that driver_cache::keep will not persist.
    2. Pre-existing on main: on a disk-cache hit (reused && from_disk, real.rs:4495–4497 and 6202–6204), the loaded compute blob is not promoted into COMPUTE_BLOBS (unlike remember_graphics_blob at 6139), so a second build of a disk-warm compute PSO still misses RAM and re-hashes/re-reads disk.

Not tested:

  • Retail game smoke runs or warm multi-minute CPU profiling (no retail game files on this machine).

AI use:

  • Antigravity (Gemini 4 Neon, XHigh) reviewed real.rs, ran the paired debug and release tests, and drafted this verification report.
**@⁠retrope13** on GitHub · 2026-11-27 00:16 UTC · [original](https://github.com/xcl-dev/xcl/pull/2909#issuecomment-7206323042) Verified `67c26e28f4d5d148595923ebb254205b07164b83` against `main` (`8b957bec6f82495aec940944c6bf47faa02db590`) on NVIDIA Ada Lovelace (debug + `--release` targeted GPU cache tests and paired full workspace suite). **Hardware / toolchain:** Windows 11 26H2 (build 26300.9818), Intel Core i5-14500HX, 24 GB RAM, NVIDIA GeForce RTX 4060 Laptop GPU (8 GB, driver `32.0.16.2140` / `621.40`), Intel UHD Graphics (driver `32.0.101.7092`), `rustc 1.100.0` (`stable-x86_64-pc-windows-msvc`), Windows SDK `10.0.26100.0` (DXC `1.9.2602.17`). **Tested:** - `cargo test --locked -p xcl --lib compute_blob -- --nocapture` (`XCL_ADAPTER=NVIDIA`): `4 passed; 0 failed; 0 ignored` in both debug (`0.00s`) and `--release` (`0.01s`) (covers both new `compute_blob_cache_tests` and existing `compute_blob_tests`). - `cargo test --locked -p xcl --test gpu_two_pass_cache_e2e -- --nocapture`: - `XCL_ADAPTER=NVIDIA`: `1 passed; 0 failed` (no skip) in both debug (`8.20s`) and `--release` (`7.88s`). - `XCL_ADAPTER=Intel` / `WARP`: capability-skipped (`SKIPPED ...: no wave64`). - Paired full workspace suite (`XCL_ADAPTER=NVIDIA`, `cargo build --workspace --locked`, `cargo test --workspace --locked --no-fail-fast -- --test-threads=4`, debug): - Base `8b957bec`: `1,446 passed, 0 failed, 47 ignored` - Head `67c26e28`: `1,448 passed, 0 failed, 47 ignored` (+2 new tests, zero regressions) **Code review notes (non-blocking):** - `resolve_compute_blob` (`real.rs:4422–4433`), `compute_container` (`real.rs:4446–4497`), and `finish_two_pass` (`real.rs:6162–6204`) preserve all fallback/writeback behavior (`copy.Flags.0` is untouched before lazy `driver_cache::path_for` at `4489`, and graphics PSOs at `5307`/`6080` already use `driver_cache::graphics_path(hash, bytes)` without re-hashing DXIL). - Minor optional follow-ups (not blockers for this PR): 1. In the rejected-RAM-blob writeback fallback (`real.rs:4488`, `6195`), gating lazy `driver_cache::path_for`/`path` on `driver_cache::worth_keeping(in_driver)` (matching `finish_two_pass`'s graphics path at `6143–6148`) would also skip hashing fast (`< 250 ms`) retries that `driver_cache::keep` will not persist. 2. Pre-existing on `main`: on a disk-cache hit (`reused && from_disk`, `real.rs:4495–4497` and `6202–6204`), the loaded compute blob is not promoted into `COMPUTE_BLOBS` (unlike `remember_graphics_blob` at `6139`), so a second build of a disk-warm compute PSO still misses RAM and re-hashes/re-reads disk. **Not tested:** - Retail game smoke runs or warm multi-minute CPU profiling (no retail game files on this machine). **AI use:** - Antigravity (Gemini 4 Neon, XHigh) reviewed `real.rs`, ran the paired debug and release tests, and drafted this verification report.
Author
Owner

@⁠andrewDoing on GitHub · 2026-11-27 00:40 UTC · original

Native ordinary compute driver-cache check

On an RTX 5070 with disk caching enabled, the ordinary compute_container path in PR #2909 accepted a native RAM-cached PSO twice without hashing any DXIL bytes for the disk filename. The second acceptance occurred after deleting the on-disk copy. A deliberately invalid RAM blob then forced a native cold retry, which recreated the missing disk file. After evicting the RAM entry, the driver accepted the regenerated file.

Native create DXIL bytes hashed for disk filename Driver reused blob
Cold 2,908 No
RAM hit 0 Yes
RAM hit after deleting disk entry 0 Yes
Rejected RAM entry, cold retry 2,908 No
Disk hit after RAM eviction 2,908 Yes

This was a local test overlay on 67c26e28f4d5d148595923ebb254205b07164b83, with a counter at driver_cache::name_for and a fresh writable cache. It used actual D3D12 PSO creation and the same program, flags and root signature throughout. The repository's fixture retention switch admitted the small synthetic shader. One test passed, with no skips. The counter covers disk-name hashing only. Two-pass compute, actual world-load RAM-hit frequency, and retail CPU-time savings remain unmeasured. Run log

AI use: OpenAI Codex wrote and ran the fixture, inspected the code, and drafted the report.

**@⁠andrewDoing** on GitHub · 2026-11-27 00:40 UTC · [original](https://github.com/xcl-dev/xcl/pull/2909#issuecomment-7206655708) # Native ordinary compute driver-cache check On an RTX 5070 with disk caching enabled, the ordinary `compute_container` path in [PR #2909](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2909) accepted a native RAM-cached PSO twice without hashing any DXIL bytes for the disk filename. The second acceptance occurred after deleting the on-disk copy. A deliberately invalid RAM blob then forced a native cold retry, which recreated the missing disk file. After evicting the RAM entry, the driver accepted the regenerated file. | Native create | DXIL bytes hashed for disk filename | Driver reused blob | | --- | ---: | --- | | Cold | 2,908 | No | | RAM hit | 0 | Yes | | RAM hit after deleting disk entry | 0 | Yes | | Rejected RAM entry, cold retry | 2,908 | No | | Disk hit after RAM eviction | 2,908 | Yes | This was a local test overlay on `67c26e28f4d5d148595923ebb254205b07164b83`, with a counter at `driver_cache::name_for` and a fresh writable cache. It used actual D3D12 PSO creation and the same program, flags and root signature throughout. The repository's fixture retention switch admitted the small synthetic shader. One test passed, with no skips. The counter covers disk-name hashing only. Two-pass compute, actual world-load RAM-hit frequency, and retail CPU-time savings remain unmeasured. [Run log](xcl-2909-native.log) AI use: OpenAI Codex wrote and ran the fixture, inspected the code, and drafted the report.
Author
Owner

@⁠oni-swr on GitHub · 2026-11-27 02:06 UTC · original

Tested (AMD): clean 67c26e28f4d5d148595923ebb254205b07164b83 (base = main 8b957bec). Windows 11 26200, Ryzen 7 5700X3D, AMD Radeon RX 7800 XT (driver 32.0.31035.1003), Rust 1.100.0 MSVC, DXC 1.8.2502.11 (Windows SDK 10.0.26100), debug.

  • cargo test -j 4 -p xcl --no-fail-fast -- --test-threads=4 then cargo build --workspace + cargo test -p xcl --test e2e: the e2e tests need the workspace-built test title, so the first run failed 3 of them for lack of it and the rerun passed 4 of 4. Lib/other targets: 1 failed, 7 SKIPPED lines (no heap windows, refused V_CVT_F16_F32 / V_MUL_F16 / VOP3-modifier forms), 47 ignored. The one failure, gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 (seed 722: res[30] = 0x1, CPU 0x7fffffff), also fails on main 8b957bec with the same seed on this GPU, so it is not from the PR.
  • Totals: 1447 passed, 1 failed (baseline fuzz seed 722, fails on main too), 47 ignored.
  • PR's own tests: compute_blob_cache_tests (2) pass, as do the 4 driver_cache tests.

Review (by reading, no bugs found): the RAM check now precedes the disk-path hash, and after a refused RAM blob the path is computed before driver_cache::keep, in both compute_container and finish_two_pass, so persistence is unchanged. Agrees with the earlier reports.

Not tested: retail smoke. The scripts/smoke.ps1 run starts with a cold-cache precompile of about 26k shaders, which did not fit this session's time budget, so I did not produce a base/head xcl-smoke pair. No runtime hit-rate or timing was measured either.

AI use: Claude Code (Claude Sonnet 5.5) ran the checks and wrote this.

**@⁠oni-swr** on GitHub · 2026-11-27 02:06 UTC · [original](https://github.com/xcl-dev/xcl/pull/2909#issuecomment-7207835965) **Tested (AMD):** clean `67c26e28f4d5d148595923ebb254205b07164b83` (base = main `8b957bec`). Windows 11 26200, Ryzen 7 5700X3D, AMD Radeon RX 7800 XT (driver 32.0.31035.1003), Rust 1.100.0 MSVC, DXC 1.8.2502.11 (Windows SDK 10.0.26100), debug. - `cargo test -j 4 -p xcl --no-fail-fast -- --test-threads=4` then `cargo build --workspace` + `cargo test -p xcl --test e2e`: the `e2e` tests need the workspace-built test title, so the first run failed 3 of them for lack of it and the rerun passed 4 of 4. Lib/other targets: 1 failed, 7 `SKIPPED` lines (no heap windows, refused V_CVT_F16_F32 / V_MUL_F16 / VOP3-modifier forms), 47 ignored. The one failure, `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` (seed 722: `res[30] = 0x1, CPU 0x7fffffff`), also fails on `main` 8b957bec with the same seed on this GPU, so it is not from the PR. - Totals: 1447 passed, 1 failed (baseline fuzz seed 722, fails on main too), 47 ignored. - PR's own tests: `compute_blob_cache_tests` (2) pass, as do the 4 `driver_cache` tests. **Review (by reading, no bugs found):** the RAM check now precedes the disk-path hash, and after a refused RAM blob the path is computed before `driver_cache::keep`, in both `compute_container` and `finish_two_pass`, so persistence is unchanged. Agrees with the earlier reports. **Not tested:** retail smoke. The `scripts/smoke.ps1` run starts with a cold-cache precompile of about 26k shaders, which did not fit this session's time budget, so I did not produce a base/head `xcl-smoke` pair. No runtime hit-rate or timing was measured either. **AI use:** Claude Code (Claude Sonnet 5.5) ran the checks and wrote this.
Author
Owner

@⁠LocranKing on GitHub · 2026-11-27 10:00 UTC · original

Tested PR #2909 (67c26e28) against main (8b957bec) on Windows 11 (26300), Ryzen 5 5500 (6C/12T), RTX 3060 Ti 8 GiB (driver 621.40), rustc 1.100.0, DXC 1.9.2602.17.

Unit Tests (cargo test --locked -p xcl)

  • hle::d3d12x::real::compute_blob_cache_tests::resolve_compute_blob_skips_disk_hash_on_ram_hit: ok
  • hle::d3d12x::real::compute_blob_cache_tests::resolve_compute_blob_loads_from_disk_on_ram_miss: ok
    (2 passed, 0 failed.)

Paired 180 s Retail Smoke (9cc6a39e, Series S lockhart, XCL_HEAP_WINDOWS=1, XCL_DIRECT_DXIL=all, XCL_DIRECT_SPLIT_INSTRUCTIONS=0, XCL_PSO_WAIT_MS=50)

Both runs started from identical pre-warmed DXIL/driver cache snapshots and reached the 3D world (~60 s in-world):

Build Guest entry / World load Frames shown World presents Peak commit Peak local / non-local VRAM Console stats Crashes / Removals
main (8b957bec) 67.2 s / 188.4 s 1240 14 (28 windows) 29,411 MB 14,281 / 2,241 MB 9,178 draws, 34,068 dispatches 0 / 0 (exit: 0x0)
PR #2909 (67c26e28) 109.8 s / 229.1 s 1247 15 (29 windows) 30,376 MB 14,449 / 2,243 MB 12,981 draws, 51,401 dispatches 0 / 0 (exit: 0x0)

Behavior matched main without regressions (exit: 0x0, 0 crashes, 0 device removals).

Not tested: Instrumented micro-timing / byte counts of COMPUTE_BLOBS RAM hits inside the retail title run (verification aspect from #2883), or full workspace test suite on 67c26e28.

**@⁠LocranKing** on GitHub · 2026-11-27 10:00 UTC · [original](https://github.com/xcl-dev/xcl/pull/2909#issuecomment-7215363690) Tested PR #2909 (`67c26e28`) against `main` (`8b957bec`) on Windows 11 (26300), Ryzen 5 5500 (6C/12T), RTX 3060 Ti 8 GiB (driver `621.40`), `rustc 1.100.0`, DXC `1.9.2602.17`. ### Unit Tests (`cargo test --locked -p xcl`) - `hle::d3d12x::real::compute_blob_cache_tests::resolve_compute_blob_skips_disk_hash_on_ram_hit`: **ok** - `hle::d3d12x::real::compute_blob_cache_tests::resolve_compute_blob_loads_from_disk_on_ram_miss`: **ok** (`2 passed, 0 failed`.) ### Paired 180 s Retail Smoke (`9cc6a39e`, Series S `lockhart`, `XCL_HEAP_WINDOWS=1`, `XCL_DIRECT_DXIL=all`, `XCL_DIRECT_SPLIT_INSTRUCTIONS=0`, `XCL_PSO_WAIT_MS=50`) Both runs started from identical pre-warmed DXIL/driver cache snapshots and reached the 3D world (`~60 s` in-world): | Build | Guest entry / World load | Frames shown | World presents | Peak commit | Peak local / non-local VRAM | Console stats | Crashes / Removals | | --- | --- | --- | --- | --- | --- | --- | --- | | `main` (`8b957bec`) | `67.2 s` / `188.4 s` | `1240` | `14` (`28` windows) | `29,411 MB` | `14,281 / 2,241 MB` | `9,178` draws, `34,068` dispatches | `0 / 0` (`exit: 0x0`) | | PR #2909 (`67c26e28`) | `109.8 s` / `229.1 s` | `1247` | `15` (`29` windows) | `30,376 MB` | `14,449 / 2,243 MB` | `12,981` draws, `51,401` dispatches | `0 / 0` (`exit: 0x0`) | Behavior matched `main` without regressions (`exit: 0x0`, `0` crashes, `0` device removals). **Not tested:** Instrumented micro-timing / byte counts of `COMPUTE_BLOBS` RAM hits inside the retail title run (verification aspect from #2883), or full workspace test suite on `67c26e28`.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2909/head:github-bot/gh-2909'
git switch 'github-bot/gh-2909'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2909'
git switch 'github-bot/gh-2909'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2909'
git switch 'github-bot/gh-2909'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2909'
git switch 'main'
git merge --squash 'github-bot/gh-2909'
git switch 'main'
git merge --ff-only 'github-bot/gh-2909'
git switch 'main'
git merge 'github-bot/gh-2909'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.