shaders: distinguish precompiled PSOs from saved driver blobs #2739

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

@⁠aijazmirzza on GitHub · 2026-11-26 09:30 UTC · original
aijazmirzza:fix/shader-cache-counters → main · +265 −10 · 1 files · 1 commits · open

Add separate counters to Pipelines for successful fresh GPU creations (created), rejected XCL disk blobs (rejected), blobs successfully saved to disk (saved), unavailable blobs (blob_unavailable), failed disk writes (write_failed), disabled caching (cache_disabled), and a whole/chain breakdown (created_whole, created_chain), alongside the existing made/reused/refused counters. created increments only on the successful Ok cold-creation path; rejected fires when the driver refuses a loaded XCL blob (stale or wrong adapter) before the cold retry.

The summary output reports these after the existing made/reused lines, which are preserved for scripts that parse them.

Part of #2737

What is in it

  • new created, rejected, saved, blob_unavailable, write_failed, cache_disabled, created_whole, created_chain fields on Pipelines (crates/xcl/src/shaders.rs)
  • created increments only on the successful Ok cold-creation path (not on Err/refused)
  • rejected increments when an XCL disk blob was loaded but the driver refused it (stale or wrong adapter), including the over-cap stale-blob early-return path
  • cache_disabled distinguishes a successful creation with no cache path from a blob-extraction failure
  • whole/chain breakdown via created_whole and created_chain
  • four new tests: fresh creation counters, persisted blob reuse through a second Pipelines, deterministic write_failed with an unwritable cache directory, cache_disabled with no cache path
  • rejected and created_chain/created_whole assertions added to existing stale-blob and split-program tests
  • in test builds, make() with no cache_dir now gets no path instead of falling through to driver_cache::path_for; tests no longer write into the user's real PSO cache

Tested

  • NVIDIA GeForce RTX 4060 Laptop GPU, Intel Core i7-14650HX, Windows 11 Home, Rust 1.100.0, debug
  • cargo test --workspace -- --test-threads=4: 1311 passed, 0 failed, 27 ignored
  • SKIPPED GPU tests on this adapter: wave64 tests (no wave64), f16 tests (unsupported V_MUL_F16 / V_PK_MUL_F16), debug layer tests (no d3d12SDKLayers.dll), heap window test (no heap windows)
  • cargo test -p xcl pipeline_cap_tests -- --test-threads=1: 7 passed (including 4 new tests), 0 failed

Regression run

main

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 2070 SUPER
title: retail game
seconds: 60
exit: 0x0
frames shown: 1384 (PresentX 1385)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 17805 MB

this PR (e58cd9e)

xcl-smoke v1
commit: e58cd9e7945f11191bd7537203ad1cd1ce6220a1
gpu: NVIDIA GeForce RTX 2070 SUPER
title: retail game
seconds: 60
exit: 0x0
frames shown: 1452 (PresentX 1452)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 17950 MB

104.9 % of main's frames, 100.8 % of its peak commit, no device removal, no crash. Runs by @⁠KOLESNiii on NVIDIA GeForce RTX 2070 SUPER.

Not tested

  • AMD GPUs
  • the --pipelines pass on a retail title (the new counters are exercised only in unit tests)
  • release build (on this machine)
  • the relaunch test uses a second Pipelines in the same process, not a fresh process (#2737 asks for fresh-process verification)

AI use

  • Claude Code with Claude Opus 4.6: wrote the code, the tests and the PR description
**@⁠aijazmirzza** on GitHub · 2026-11-26 09:30 UTC · [original](https://github.com/xcl-dev/xcl/pull/2739) `aijazmirzza:fix/shader-cache-counters` → `main` · +265 −10 · 1 files · 1 commits · open Add separate counters to `Pipelines` for successful fresh GPU creations (`created`), rejected XCL disk blobs (`rejected`), blobs successfully saved to disk (`saved`), unavailable blobs (`blob_unavailable`), failed disk writes (`write_failed`), disabled caching (`cache_disabled`), and a whole/chain breakdown (`created_whole`, `created_chain`), alongside the existing `made`/`reused`/`refused` counters. `created` increments only on the successful `Ok` cold-creation path; `rejected` fires when the driver refuses a loaded XCL blob (stale or wrong adapter) before the cold retry. The summary output reports these after the existing `made`/`reused` lines, which are preserved for scripts that parse them. Part of #2737 **What is in it** - new `created`, `rejected`, `saved`, `blob_unavailable`, `write_failed`, `cache_disabled`, `created_whole`, `created_chain` fields on `Pipelines` (`crates/xcl/src/shaders.rs`) - `created` increments only on the successful `Ok` cold-creation path (not on `Err`/refused) - `rejected` increments when an XCL disk blob was loaded but the driver refused it (stale or wrong adapter), including the over-cap stale-blob early-return path - `cache_disabled` distinguishes a successful creation with no cache path from a blob-extraction failure - whole/chain breakdown via `created_whole` and `created_chain` - four new tests: fresh creation counters, persisted blob reuse through a second `Pipelines`, deterministic `write_failed` with an unwritable cache directory, `cache_disabled` with no cache path - `rejected` and `created_chain`/`created_whole` assertions added to existing stale-blob and split-program tests - in test builds, `make()` with no `cache_dir` now gets no path instead of falling through to `driver_cache::path_for`; tests no longer write into the user's real PSO cache **Tested** - NVIDIA GeForce RTX 4060 Laptop GPU, Intel Core i7-14650HX, Windows 11 Home, Rust 1.100.0, debug - `cargo test --workspace -- --test-threads=4`: 1311 passed, 0 failed, 27 ignored - SKIPPED GPU tests on this adapter: wave64 tests (no wave64), f16 tests (unsupported V_MUL_F16 / V_PK_MUL_F16), debug layer tests (no d3d12SDKLayers.dll), heap window test (no heap windows) - `cargo test -p xcl pipeline_cap_tests -- --test-threads=1`: 7 passed (including 4 new tests), 0 failed **Regression run** **main** ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 2070 SUPER title: retail game seconds: 60 exit: 0x0 frames shown: 1384 (PresentX 1385) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 17805 MB ``` **this PR (`e58cd9e`)** ``` xcl-smoke v1 commit: e58cd9e7945f11191bd7537203ad1cd1ce6220a1 gpu: NVIDIA GeForce RTX 2070 SUPER title: retail game seconds: 60 exit: 0x0 frames shown: 1452 (PresentX 1452) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 17950 MB ``` 104.9 % of main's frames, 100.8 % of its peak commit, no device removal, no crash. Runs by @⁠KOLESNiii on NVIDIA GeForce RTX 2070 SUPER. **Not tested** - AMD GPUs - the `--pipelines` pass on a retail title (the new counters are exercised only in unit tests) - release build (on this machine) - the relaunch test uses a second `Pipelines` in the same process, not a fresh process (#2737 asks for fresh-process verification) **AI use** - Claude Code with Claude Opus 4.6: wrote the code, the tests and the PR description
Add separate counters to Pipelines for successful fresh GPU creations
(created), rejected XCL disk blobs (rejected), blobs saved to disk
(saved), unavailable blobs (blob_unavailable), failed disk writes
(write_failed), disabled caching (cache_disabled), and a whole/chain
breakdown (created_whole, created_chain), alongside the existing
made/reused/refused counters.  created increments only on the
successful Ok cold-creation path; rejected fires when the driver
refuses a loaded XCL blob (stale or wrong adapter) before the cold retry.

The summary output reports these after the existing made/reused lines,
which are preserved for scripts that parse them.

Three new tests: fresh-creation counter tracking, persisted-blob reuse on
a simulated relaunch, and a deterministic write_failed case using an
unwritable cache directory.

Part of #2737

Co-Authored-By: Claude Opus 4.6 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 11:14:31 +00:00
Author
Owner

@⁠luckyteagirl on GitHub · 2026-11-26 09:37 UTC · original · reviewed

On 5803bc4, created is incremented immediately after CreateComputePipelineState in the cold path, before its Result is checked. When native creation returns Err, the later match also increments refused, so one failed attempt is reported as made 0, refused 1, fresh GPU creations 1. No pipeline was created; this conflicts with the new counter's label and #2737's request to count successful fresh creations.

Could created increment only on the successful cold Ok path, independently of whether a cached blob can be saved? A deterministic refused-create test should expect created == 0, refused == 1, and preserve made == created + reused. This is exact-head source review; I did not run a GPU test for this path.

**@⁠luckyteagirl** on GitHub · 2026-11-26 09:37 UTC · [original](https://github.com/xcl-dev/xcl/pull/2739#pullrequestreview-6071669937) · **reviewed** On `5803bc4`, `created` is incremented immediately after `CreateComputePipelineState` in the cold path, before its `Result` is checked. When native creation returns `Err`, the later match also increments `refused`, so one failed attempt is reported as `made 0, refused 1, fresh GPU creations 1`. No pipeline was created; this conflicts with the new counter's label and #2737's request to count successful fresh creations. Could `created` increment only on the successful cold `Ok` path, independently of whether a cached blob can be saved? A deterministic refused-create test should expect `created == 0`, `refused == 1`, and preserve `made == created + reused`. This is exact-head source review; I did not run a GPU test for this path.
Author
Owner

@⁠luckyteagirl on GitHub · 2026-11-26 09:39 UTC · original · reviewed

On 5803bc4, a successful cold creation with XCL_PSO_DISK_CACHE=0 has no cache path, so this branch never calls GetCachedBlob. It still increments blob_unavailable, and the new summary reports a driver blob as unavailable although extraction was never attempted. #2737 lists disabled caching and unavailable blob extraction as distinct causes, so this counter would obscure which one occurred in a supported mode.

Could the no-path outcome be reported separately as disk caching disabled, or explicitly name this combined category blob unavailable or caching disabled? A successful-create fixture with no cache path would pin down the expected summary. This is exact-head source review; I did not run the CLI with a GPU for this case.

**@⁠luckyteagirl** on GitHub · 2026-11-26 09:39 UTC · [original](https://github.com/xcl-dev/xcl/pull/2739#pullrequestreview-6071706578) · **reviewed** On `5803bc4`, a successful cold creation with `XCL_PSO_DISK_CACHE=0` has no cache path, so this branch never calls `GetCachedBlob`. It still increments `blob_unavailable`, and the new summary reports a driver blob as unavailable although extraction was never attempted. #2737 lists disabled caching and unavailable blob extraction as distinct causes, so this counter would obscure which one occurred in a supported mode. Could the no-path outcome be reported separately as disk caching disabled, or explicitly name this combined category `blob unavailable or caching disabled`? A successful-create fixture with no cache path would pin down the expected summary. This is exact-head source review; I did not run the CLI with a GPU for this case.
Author
Owner

@⁠aijazmirzza on GitHub · 2026-11-26 09:48 UTC · original

I don't have a game title available to run scripts/smoke.ps1 for the regression run blocks. The runtime changes are purely additive (new counter increments and a new summary line; existing made/reused output is unchanged), so existing behaviour should be unaffected.

Could a maintainer or contributor with a game title run the smoke test on main and on this PR's head (5803bc4) and paste the two xcl-smoke blocks here? Happy to rebase or adjust anything needed.

**@⁠aijazmirzza** on GitHub · 2026-11-26 09:48 UTC · [original](https://github.com/xcl-dev/xcl/pull/2739#issuecomment-7188497002) I don't have a game title available to run `scripts/smoke.ps1` for the regression run blocks. The runtime changes are purely additive (new counter increments and a new summary line; existing `made`/`reused` output is unchanged), so existing behaviour should be unaffected. Could a maintainer or contributor with a game title run the smoke test on `main` and on this PR's head (`5803bc4`) and paste the two `xcl-smoke` blocks here? Happy to rebase or adjust anything needed.
Author
Owner

@⁠KOLESNiii on GitHub · 2026-11-26 10:10 UTC · original

Regression runs for this PR, as asked above. Both are clean release builds (cargo build --release -p xcl) of the same retail game for 60 s. Base is main at b49be18 (this PR's merge base), head is 5803bc4.

Hardware: NVIDIA GeForce RTX 2070 SUPER, Windows 11 Home 10.0.26300.

main

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 2070 SUPER
title: retail game
seconds: 60
exit: 0x0
frames shown: 1384 (PresentX 1384)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15701 MB

this PR (5803bc4)

xcl-smoke v1
commit: 5803bc4df616a728893c697c311687537d265e55
gpu: NVIDIA GeForce RTX 2070 SUPER
title: retail game
seconds: 60
exit: 0x0
frames shown: 1412 (PresentX 1412)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16637 MB

The PR run had 102 % of main's frames and 106 % of its peak commit, with no device removal and no crash. xcl run does not reach the changed code (xcl shaders --precompile --pipelines), so this is a regression check only. Not tested: AMD, the --pipelines pass on a retail title.

Test report written with Claude Code (Claude Opus 5.5) from runs on the hardware above.

**@⁠KOLESNiii** on GitHub · 2026-11-26 10:10 UTC · [original](https://github.com/xcl-dev/xcl/pull/2739#issuecomment-7189018794) Regression runs for this PR, as asked above. Both are clean release builds (`cargo build --release -p xcl`) of the same retail game for 60 s. Base is `main` at `b49be18` (this PR's merge base), head is `5803bc4`. Hardware: NVIDIA GeForce RTX 2070 SUPER, Windows 11 Home 10.0.26300. **main** ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 2070 SUPER title: retail game seconds: 60 exit: 0x0 frames shown: 1384 (PresentX 1384) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15701 MB ``` **this PR (5803bc4)** ``` xcl-smoke v1 commit: 5803bc4df616a728893c697c311687537d265e55 gpu: NVIDIA GeForce RTX 2070 SUPER title: retail game seconds: 60 exit: 0x0 frames shown: 1412 (PresentX 1412) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16637 MB ``` The PR run had 102 % of main's frames and 106 % of its peak commit, with no device removal and no crash. `xcl run` does not reach the changed code (`xcl shaders --precompile --pipelines`), so this is a regression check only. Not tested: AMD, the `--pipelines` pass on a retail title. Test report written with Claude Code (Claude Opus 5.5) from runs on the hardware above.
Author
Owner

@⁠KOLESNiii on GitHub · 2026-11-26 10:11 UTC · original · reviewed

Points on 5803bc4 that the reviews above don't already cover (I reviewed the source; none of this comes from a GPU run of these paths):

  1. A rejected disk blob counts as a plain cold creation. In make_one, when driver_cache::load returns a blob but the driver doesn't accept it (from_cache is None) and the program is under the cap, the code falls through to the cold create and increments created. Nothing separates "a stale XCL blob was refused, then retried cold" from "no blob on disk", so the summary can't show whether the blobs on disk are actually being accepted. A rejected counter, incremented when cached.is_some() && from_cache.is_none(), would cover it.

  2. No whole/chain breakdown. #2737 asks for separate whole and chain counts when a run produces both. make_one already has chained, which picks the .chain.pso name, but every new counter is global.

  3. write_failed and the unavailable-blob branches have no test. Both new tests rely on the driver producing a blob. fresh_creation_tracks_created_and_saved_counters only checks saved > 0 || blob_unavailable > 0, so it would pass with either counter wrong. #2737 asks for a deterministic case, for example a cache path inside a missing or read-only directory so that driver_cache::write returns false, which should expect write_failed == 1 and saved == 0.

  4. The relaunch test isn't a relaunch and can pass without checking anything. persisted_blob_is_reused_on_relaunch creates a second Pipelines in the same process, so in-process driver state could hide a blob that doesn't reload on a real relaunch. #2737 asks for a fresh process. And when saved == 0 the test does println! + return, which passes silently instead of reporting a skip through recomp::runner::skip_test.

  5. Nit: the commit subject and the PR title use shaders:. The repo's prefix is Shaders: (CONTRIBUTING.md, "Commits").

Review written with Claude Code (Claude Opus 5.5). I checked each point against the diff.

**@⁠KOLESNiii** on GitHub · 2026-11-26 10:11 UTC · [original](https://github.com/xcl-dev/xcl/pull/2739#pullrequestreview-6072169330) · **reviewed** Points on `5803bc4` that the reviews above don't already cover (I reviewed the source; none of this comes from a GPU run of these paths): 1. **A rejected disk blob counts as a plain cold creation.** In `make_one`, when `driver_cache::load` returns a blob but the driver doesn't accept it (`from_cache` is `None`) and the program is under the cap, the code falls through to the cold create and increments `created`. Nothing separates "a stale XCL blob was refused, then retried cold" from "no blob on disk", so the summary can't show whether the blobs on disk are actually being accepted. A `rejected` counter, incremented when `cached.is_some() && from_cache.is_none()`, would cover it. 2. **No whole/chain breakdown.** #2737 asks for separate whole and chain counts when a run produces both. `make_one` already has `chained`, which picks the `.chain.pso` name, but every new counter is global. 3. **`write_failed` and the unavailable-blob branches have no test.** Both new tests rely on the driver producing a blob. `fresh_creation_tracks_created_and_saved_counters` only checks `saved > 0 || blob_unavailable > 0`, so it would pass with either counter wrong. #2737 asks for a deterministic case, for example a cache path inside a missing or read-only directory so that `driver_cache::write` returns false, which should expect `write_failed == 1` and `saved == 0`. 4. **The relaunch test isn't a relaunch and can pass without checking anything.** `persisted_blob_is_reused_on_relaunch` creates a second `Pipelines` in the same process, so in-process driver state could hide a blob that doesn't reload on a real relaunch. #2737 asks for a fresh process. And when `saved == 0` the test does `println!` + `return`, which passes silently instead of reporting a skip through `recomp::runner::skip_test`. 5. Nit: the commit subject and the PR title use `shaders:`. The repo's prefix is `Shaders:` (CONTRIBUTING.md, "Commits"). Review written with Claude Code (Claude Opus 5.5). I checked each point against the diff.
Author
Owner

@⁠emirduran707 on GitHub · 2026-11-26 10:58 UTC · original

Independent AMD RDNA4 (native wave64) verification of exact PR head 7abc336668ecb5048d18760c2af14afa62616fee on Windows 11 Pro 26300 (AMD Radeon RX 9060 XT 16 GB, driver 32.0.31044.16, Ryzen 5 5600, Rust 1.100.0 MSVC, DXC 1.9.2602.17).

Tested

  • cargo build --workspace (debug): passed (0 errors).
  • cargo test --workspace --no-fail-fast -- --test-threads=4: 1436 passed, 2 failed, 47 ignored (8 SKIPPED: 6 per-lane DXIL forms refused by host adapter/driver, 1 heap_window_out_of_memory_falls_back_to_the_switch_form no heap windows, 1 pso_measurement_compiles_an_exact_synthetic_record Windows Developer Mode off).
    • All 3 new tests passed:
      • shaders::pipeline_cap_tests::fresh_creation_tracks_created_and_saved_counters
      • shaders::pipeline_cap_tests::persisted_blob_is_reused_on_relaunch
      • shaders::pipeline_cap_tests::write_failed_when_cache_dir_is_unwritable
    • The 2 failures (gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 and fuzz_validate_and_gpu_3) are pre-existing on unmodified main on this RX 9060 XT / driver 32.0.31044.16.
  • cargo build --release -p xcl + 60 s retail-title smoke test (scripts/smoke.ps1, offline):
xcl-smoke v1
commit: 7abc336668ecb5048d18760c2af14afa62616fee
gpu: AMD Radeon RX 9060 XT
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1594 (PresentX 1594)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 18636 MB

(Compare against main b49be183 on this machine: 1603 frames, 18576 MB peak, 0 device removals, 0 crashes.)

Not tested

  • NVIDIA / Intel GPUs, Linux / Wine.

AI use

  • Verification run and report prepared with Antigravity (Gemini 4 Neon); all build, test, and smoke results are from live runs on this machine.
**@⁠emirduran707** on GitHub · 2026-11-26 10:58 UTC · [original](https://github.com/xcl-dev/xcl/pull/2739#issuecomment-7190095595) Independent AMD RDNA4 (native wave64) verification of exact PR head `7abc336668ecb5048d18760c2af14afa62616fee` on Windows 11 Pro 26300 (AMD Radeon RX 9060 XT 16 GB, driver `32.0.31044.16`, Ryzen 5 5600, Rust 1.100.0 MSVC, DXC `1.9.2602.17`). **Tested** - `cargo build --workspace` (debug): passed (`0` errors). - `cargo test --workspace --no-fail-fast -- --test-threads=4`: `1436 passed, 2 failed, 47 ignored` (`8 SKIPPED`: 6 per-lane DXIL forms refused by host adapter/driver, 1 `heap_window_out_of_memory_falls_back_to_the_switch_form` no heap windows, 1 `pso_measurement_compiles_an_exact_synthetic_record` Windows Developer Mode off). - All 3 new tests passed: - `shaders::pipeline_cap_tests::fresh_creation_tracks_created_and_saved_counters` - `shaders::pipeline_cap_tests::persisted_blob_is_reused_on_relaunch` - `shaders::pipeline_cap_tests::write_failed_when_cache_dir_is_unwritable` - The 2 failures (`gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` and `fuzz_validate_and_gpu_3`) are pre-existing on unmodified `main` on this RX 9060 XT / driver `32.0.31044.16`. - `cargo build --release -p xcl` + 60 s retail-title smoke test (`scripts/smoke.ps1`, offline): ``` xcl-smoke v1 commit: 7abc336668ecb5048d18760c2af14afa62616fee gpu: AMD Radeon RX 9060 XT title: 21222967 seconds: 60 exit: 0x0 frames shown: 1594 (PresentX 1594) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 18636 MB ``` (Compare against `main` `b49be183` on this machine: `1603 frames, 18576 MB peak, 0 device removals, 0 crashes`.) **Not tested** - NVIDIA / Intel GPUs, Linux / Wine. **AI use** - Verification run and report prepared with Antigravity (Gemini 4 Neon); all build, test, and smoke results are from live runs on this machine.
Author
Owner

@⁠aijazmirzza on GitHub · 2026-11-26 11:00 UTC · original

Squashed into one commit (2402a65) addressing all review feedback. Could you re-run the smoke test on this head so the regression block matches? Thank you for the earlier runs and the review.

**@⁠aijazmirzza** on GitHub · 2026-11-26 11:00 UTC · [original](https://github.com/xcl-dev/xcl/pull/2739#issuecomment-7190129010) Squashed into one commit (2402a65) addressing all review feedback. Could you re-run the smoke test on this head so the regression block matches? Thank you for the earlier runs and the review.
Author
Owner

@⁠KOLESNiii on GitHub · 2026-11-26 11:18 UTC · original

Regression runs for the updated head 2402a65. Both are clean release builds (cargo build --release -p xcl), scripts/smoke.ps1 on the same retail game for 60 s. Base is main at b49be18.

Hardware: NVIDIA GeForce RTX 2070 SUPER, Windows 11 Home 10.0.26300.

main

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 2070 SUPER
title: retail game
seconds: 60
exit: 0x0
frames shown: 1540 (PresentX 1540)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15518 MB

this PR (2402a65)

xcl-smoke v1
commit: 2402a65bc8312fbbcec4c2999f39c6dc2a8d5a9f
gpu: NVIDIA GeForce RTX 2070 SUPER
title: retail game
seconds: 60
exit: 0x0
frames shown: 1492 (PresentX 1492)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14797 MB

96.9 % of main's frames, 95.4 % of its peak commit, no device removal, no crash.

Runs made and report written with Claude Code (Claude Opus 5.5).

**@⁠KOLESNiii** on GitHub · 2026-11-26 11:18 UTC · [original](https://github.com/xcl-dev/xcl/pull/2739#issuecomment-7190568646) Regression runs for the updated head `2402a65`. Both are clean release builds (`cargo build --release -p xcl`), `scripts/smoke.ps1` on the same retail game for 60 s. Base is `main` at `b49be18`. Hardware: NVIDIA GeForce RTX 2070 SUPER, Windows 11 Home 10.0.26300. **main** ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 2070 SUPER title: retail game seconds: 60 exit: 0x0 frames shown: 1540 (PresentX 1540) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15518 MB ``` **this PR (`2402a65`)** ``` xcl-smoke v1 commit: 2402a65bc8312fbbcec4c2999f39c6dc2a8d5a9f gpu: NVIDIA GeForce RTX 2070 SUPER title: retail game seconds: 60 exit: 0x0 frames shown: 1492 (PresentX 1492) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14797 MB ``` 96.9 % of main's frames, 95.4 % of its peak commit, no device removal, no crash. Runs made and report written with Claude Code (Claude Opus 5.5).
Author
Owner

@⁠aijazmirzza on GitHub · 2026-11-26 11:19 UTC · original

Thank you for the AMD verification! Note that 7abc336 was squashed into 2402a65 after the review fixes — the code is identical (same diff against main), only the commit history changed. The CI check expects the current head hash in the smoke block. Would you be able to re-run the smoke test on 2402a65, or should I cherry-pick to produce a new commit that matches?

**@⁠aijazmirzza** on GitHub · 2026-11-26 11:19 UTC · [original](https://github.com/xcl-dev/xcl/pull/2739#issuecomment-7190572414) Thank you for the AMD verification! Note that 7abc336 was squashed into 2402a65 after the review fixes — the code is identical (same diff against main), only the commit history changed. The CI check expects the current head hash in the smoke block. Would you be able to re-run the smoke test on 2402a65, or should I cherry-pick to produce a new commit that matches?
Author
Owner

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

Review of 2402a65. One counting bug, and some tests that are weaker than they look.

Bug

  1. rejected misses stale blobs dropped on the over-cap path (crates/xcl/src/shaders.rs ~L1720). When cached.is_some() && from_cache.is_none() && over_cap, the blob is deleted and the function returns before the rejected increment (~L1737) runs, so these are counted only as capped. After a driver update that invalidates large programs' blobs, the summary prints "XCL disk blobs rejected 0", which hides exactly what the counter is for. stale_blob_cannot_bypass_the_offline_pipeline_cap reaches this path but doesn't check rejected. Suggest incrementing rejected in that branch too, or right after from_cache is computed.

Tests

  1. write_failed_when_cache_dir_is_unwritable asserts write_failed > 0 || blob_unavailable > 0, so it passes even if a failed write gets counted as blob_unavailable. For the "deterministic write_failed" test the description mentions, assert write_failed == 1 and blob_unavailable == 0 when the driver returns a non-empty blob, and skip_test otherwise.
  2. persisted_blob_is_reused_on_relaunch can fail rather than skip: make counts a hit only when the reloaded PSO's GetCachedBlob() size equals the loaded size, and the test hard-asserts reused == 1. On a driver that accepts the blob but re-serializes it to a different size, this turns the GPU suite red. A skip in that case would match how the test already handles "no blob saved".
  3. The same test runs the second Pipelines in the same process on the same adapter, so it isn't a relaunch. The PR notes this under Not tested; the name could say what it checks (reuse through a second Pipelines), or the second half could run in a child process.
  4. rejected, cache_disabled and created_chain have no assertions. For example: rejected == 1 after a corrupt blob under the cap, cache_disabled == 1 with no cache path, created_chain in split_compute_program_prebuilds_and_caches_chain_pieces. A test for rejected would have caught (1).

Not from this PR (FYI)

  1. Under the cap, a rejected blob is only replaced if the fresh creation succeeds and the write succeeds. If the blob is unavailable or the write fails, the stale file stays and is loaded, refused and recompiled on every run. Could be a separate PR.

Regression run

Smoke blocks for 2402a65 and main b49be18 are in #2739 (96.9 % of main's frames, 95.4 % peak commit, no removal or crash). PR checks reads the description, so they need to be pasted under Regression run.

Review done with Claude Code (Claude Opus 5.5); I checked each point against the code at 2402a65.

**@⁠KOLESNiii** on GitHub · 2026-11-26 11:23 UTC · [original](https://github.com/xcl-dev/xcl/pull/2739#pullrequestreview-6073297349) · **reviewed** Review of `2402a65`. One counting bug, and some tests that are weaker than they look. **Bug** 1. **`rejected` misses stale blobs dropped on the over-cap path** (`crates/xcl/src/shaders.rs` ~L1720). When `cached.is_some() && from_cache.is_none() && over_cap`, the blob is deleted and the function returns before the `rejected` increment (~L1737) runs, so these are counted only as `capped`. After a driver update that invalidates large programs' blobs, the summary prints "XCL disk blobs rejected 0", which hides exactly what the counter is for. `stale_blob_cannot_bypass_the_offline_pipeline_cap` reaches this path but doesn't check `rejected`. Suggest incrementing `rejected` in that branch too, or right after `from_cache` is computed. **Tests** 2. **`write_failed_when_cache_dir_is_unwritable`** asserts `write_failed > 0 || blob_unavailable > 0`, so it passes even if a failed write gets counted as `blob_unavailable`. For the "deterministic `write_failed`" test the description mentions, assert `write_failed == 1` and `blob_unavailable == 0` when the driver returns a non-empty blob, and `skip_test` otherwise. 3. **`persisted_blob_is_reused_on_relaunch`** can fail rather than skip: `make` counts a hit only when the reloaded PSO's `GetCachedBlob()` size equals the loaded size, and the test hard-asserts `reused == 1`. On a driver that accepts the blob but re-serializes it to a different size, this turns the GPU suite red. A skip in that case would match how the test already handles "no blob saved". 4. The same test runs the second `Pipelines` in the same process on the same adapter, so it isn't a relaunch. The PR notes this under **Not tested**; the name could say what it checks (reuse through a second `Pipelines`), or the second half could run in a child process. 5. `rejected`, `cache_disabled` and `created_chain` have no assertions. For example: `rejected == 1` after a corrupt blob under the cap, `cache_disabled == 1` with no cache path, `created_chain` in `split_compute_program_prebuilds_and_caches_chain_pieces`. A test for `rejected` would have caught (1). **Not from this PR (FYI)** 6. Under the cap, a rejected blob is only replaced if the fresh creation succeeds *and* the write succeeds. If the blob is unavailable or the write fails, the stale file stays and is loaded, refused and recompiled on every run. Could be a separate PR. **Regression run** Smoke blocks for `2402a65` and `main` `b49be18` are in https://git.gtahub.st/github/xcl-dev--xcl/pulls/2739 (96.9 % of main's frames, 95.4 % peak commit, no removal or crash). `PR checks` reads the description, so they need to be pasted under **Regression run**. Review done with Claude Code (Claude Opus 5.5); I checked each point against the code at `2402a65`.
Author
Owner

@⁠KOLESNiii on GitHub · 2026-11-26 11:25 UTC · original · requested changes

Requesting changes for the counting bug in #2739 (point 1): stale blobs dropped on the over-cap path return before rejected is incremented, so they never show in "XCL disk blobs rejected". Please fix it with a test that checks rejected on that path; points 2, 3 and 5 there are worth tightening at the same time.

Review done with Claude Code (Claude Opus 5.5).

**@⁠KOLESNiii** on GitHub · 2026-11-26 11:25 UTC · [original](https://github.com/xcl-dev/xcl/pull/2739#pullrequestreview-6073322905) · **requested changes** Requesting changes for the counting bug in https://git.gtahub.st/github/xcl-dev--xcl/pulls/2739 (point 1): stale blobs dropped on the over-cap path return before `rejected` is incremented, so they never show in "XCL disk blobs rejected". Please fix it with a test that checks `rejected` on that path; points 2, 3 and 5 there are worth tightening at the same time. Review done with Claude Code (Claude Opus 5.5).
github-bot force-pushed github-bot/gh-2739 from 2402a65bc8 to e58cd9e794 2026-11-26 11:40:59 +00:00 Compare
Author
Owner

@⁠aijazmirzza on GitHub · 2026-11-26 11:38 UTC · original

Addressed all points from the review of 2402a65 in e58cd9e:

  1. rejected counter on the over-cap stale-blob path — added self.rejected.fetch_add(1, …) before the early return, so a stale blob that would have bypassed the cap is counted as rejected. The stale_blob_cannot_bypass_the_offline_pipeline_cap test now asserts rejected == 1.

  2. created_whole / created_chain breakdown — created_whole and created_chain now increment inside the Ok branch based on the chained parameter. The split_compute_program_prebuilds_and_caches_chain_pieces test asserts created_chain == 2, created_whole == 0.

  3. write_failed test tightened — now asserts write_failed == 1 specifically (not > 0), and skips via skip_test if the driver returned no blob (blob_unavailable > 0).

  4. Relaunch test renamed and made robust — renamed to persisted_blob_is_reused_through_a_second_pipelines to reflect what it actually does. Uses skip_test when saved == 0 and when the driver re-serializes the blob to a different size (reused == 0 && rejected > 0).

  5. cache_disabled test — new cache_disabled_when_no_cache_path test: creates a Pipelines with no cache_dir, asserts cache_disabled == 1, saved == 0, write_failed == 0. In test builds, cache_dir: None now returns None for the path (instead of falling through to the system default) so the counter is exercised deterministically.

  6. Stale file cleanup on a failed write noted as separate scope (per the review).

All 7 pipeline_cap_tests pass on NVIDIA RTX 4060 (debug, --test-threads=1). The regression run blocks in the description reference 5803bc4; will need a fresh run on e58cd9e.

Commit prefix fixed to Shaders: (capital S).

**@⁠aijazmirzza** on GitHub · 2026-11-26 11:38 UTC · [original](https://github.com/xcl-dev/xcl/pull/2739#issuecomment-7190994336) Addressed all points from the review of 2402a65 in e58cd9e: 1. **`rejected` counter on the over-cap stale-blob path** — added `self.rejected.fetch_add(1, …)` before the early return, so a stale blob that would have bypassed the cap is counted as rejected. The `stale_blob_cannot_bypass_the_offline_pipeline_cap` test now asserts `rejected == 1`. 2. **`created_whole` / `created_chain` breakdown** — `created_whole` and `created_chain` now increment inside the `Ok` branch based on the `chained` parameter. The `split_compute_program_prebuilds_and_caches_chain_pieces` test asserts `created_chain == 2, created_whole == 0`. 3. **`write_failed` test tightened** — now asserts `write_failed == 1` specifically (not `> 0`), and skips via `skip_test` if the driver returned no blob (`blob_unavailable > 0`). 4. **Relaunch test renamed and made robust** — renamed to `persisted_blob_is_reused_through_a_second_pipelines` to reflect what it actually does. Uses `skip_test` when `saved == 0` and when the driver re-serializes the blob to a different size (`reused == 0 && rejected > 0`). 5. **`cache_disabled` test** — new `cache_disabled_when_no_cache_path` test: creates a `Pipelines` with no `cache_dir`, asserts `cache_disabled == 1`, `saved == 0`, `write_failed == 0`. In test builds, `cache_dir: None` now returns `None` for the path (instead of falling through to the system default) so the counter is exercised deterministically. 6. Stale file cleanup on a failed write noted as separate scope (per the review). All 7 `pipeline_cap_tests` pass on NVIDIA RTX 4060 (debug, `--test-threads=1`). The regression run blocks in the description reference 5803bc4; will need a fresh run on e58cd9e. Commit prefix fixed to `Shaders:` (capital S).
Author
Owner

@⁠KOLESNiii on GitHub · 2026-11-26 11:45 UTC · original · approved these changes

Re-review of e58cd9e. Everything from my review of 2402a65 is addressed; approving.

  • Over-cap stale blob (crates/xcl/src/shaders.rs ~L1767): rejected is now counted before the early return, and stale_blob_cannot_bypass_the_offline_pipeline_cap asserts rejected == 1. On the path under the cap, rejected goes up only when cached.is_some() and the blob gave no hit. So one stale blob counts as rejected exactly once on either path.
  • created / whole / chain: these count only on the Ok arm of the cold create, so a refused create now gives created 0, refused 1. made == created + reused holds on every path that reaches the final match. The split-program test pins created_chain == 2, created_whole == 0.
  • cache_disabled is separate from blob_unavailable, and has a deterministic test.
  • write_failed test: the blocker file makes driver_cache::write fail. The test asserts write_failed == 1 when the driver returned a blob and calls skip_test otherwise.
  • Second-Pipelines test: renamed. It calls skip_test when nothing was saved and when the blob came back at a different size, so it no longer fails or passes silently.

Two notes, neither blocking:

  • The #[cfg(test)] change to path resolution means that in test builds, make() with no cache_dir now gets no path, where it used to fall through to driver_cache::path_for. Tests therefore no longer write into the user's real PSO cache, which is better, but it is a behaviour change outside the counters. It is worth one line in the description.
  • The corrupt over-cap .chain.pso check at the end of split_compute_program_prebuilds_and_caches_chain_pieces asserts rejected >= 1; == 1 would be exact if piece 0 is always a hit there. Nit.

The description still has no xcl-smoke blocks for this head under Regression run, so PR checks fails. I'll run main and e58cd9e and post them.

Review done with Claude Code (Claude Opus 5.5); I checked each point against the code at e58cd9e. I did not run the GPU suite for this review.

**@⁠KOLESNiii** on GitHub · 2026-11-26 11:45 UTC · [original](https://github.com/xcl-dev/xcl/pull/2739#pullrequestreview-6073575226) · **approved these changes** Re-review of `e58cd9e`. Everything from my review of `2402a65` is addressed; approving. - **Over-cap stale blob** (`crates/xcl/src/shaders.rs` ~L1767): `rejected` is now counted before the early return, and `stale_blob_cannot_bypass_the_offline_pipeline_cap` asserts `rejected == 1`. On the path under the cap, `rejected` goes up only when `cached.is_some()` and the blob gave no hit. So one stale blob counts as rejected exactly once on either path. - **`created` / whole / chain**: these count only on the `Ok` arm of the cold create, so a refused create now gives `created 0, refused 1`. `made == created + reused` holds on every path that reaches the final match. The split-program test pins `created_chain == 2`, `created_whole == 0`. - **`cache_disabled`** is separate from `blob_unavailable`, and has a deterministic test. - **`write_failed` test**: the blocker file makes `driver_cache::write` fail. The test asserts `write_failed == 1` when the driver returned a blob and calls `skip_test` otherwise. - **Second-`Pipelines` test**: renamed. It calls `skip_test` when nothing was saved and when the blob came back at a different size, so it no longer fails or passes silently. Two notes, neither blocking: - The `#[cfg(test)]` change to path resolution means that in test builds, `make()` with no `cache_dir` now gets no path, where it used to fall through to `driver_cache::path_for`. Tests therefore no longer write into the user's real PSO cache, which is better, but it is a behaviour change outside the counters. It is worth one line in the description. - The corrupt over-cap `.chain.pso` check at the end of `split_compute_program_prebuilds_and_caches_chain_pieces` asserts `rejected >= 1`; `== 1` would be exact if piece 0 is always a hit there. Nit. The description still has no `xcl-smoke` blocks for this head under **Regression run**, so `PR checks` fails. I'll run `main` and `e58cd9e` and post them. Review done with Claude Code (Claude Opus 5.5); I checked each point against the code at `e58cd9e`. I did not run the GPU suite for this review.
github-bot force-pushed github-bot/gh-2739 from e58cd9e794 to d653c21abd 2026-11-26 11:52:05 +00:00 Compare
Author
Owner

@⁠KOLESNiii on GitHub · 2026-11-26 11:49 UTC · original

Regression runs for head e58cd9e. Both are clean release builds (cargo build --release -p xcl), scripts/smoke.ps1 on the same retail game for 60 s. Base is main at b49be18 (this PR's merge base).

Hardware: NVIDIA GeForce RTX 2070 SUPER, Windows 11 Home 10.0.26300.

main

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 2070 SUPER
title: retail game
seconds: 60
exit: 0x0
frames shown: 1384 (PresentX 1385)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 17805 MB

this PR (e58cd9e)

xcl-smoke v1
commit: e58cd9e7945f11191bd7537203ad1cd1ce6220a1
gpu: NVIDIA GeForce RTX 2070 SUPER
title: retail game
seconds: 60
exit: 0x0
frames shown: 1452 (PresentX 1452)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 17950 MB

104.9 % of main's frames, 100.8 % of its peak commit, no device removal, no crash. xcl run does not reach the changed code (xcl shaders --precompile --pipelines), so this is a regression check only. PR checks reads the description, so please paste both blocks under Regression run.

Runs made and report written with Claude Code (Claude Opus 5.5).

**@⁠KOLESNiii** on GitHub · 2026-11-26 11:49 UTC · [original](https://github.com/xcl-dev/xcl/pull/2739#issuecomment-7191205998) Regression runs for head `e58cd9e`. Both are clean release builds (`cargo build --release -p xcl`), `scripts/smoke.ps1` on the same retail game for 60 s. Base is `main` at `b49be18` (this PR's merge base). Hardware: NVIDIA GeForce RTX 2070 SUPER, Windows 11 Home 10.0.26300. **main** ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 2070 SUPER title: retail game seconds: 60 exit: 0x0 frames shown: 1384 (PresentX 1385) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 17805 MB ``` **this PR (`e58cd9e`)** ``` xcl-smoke v1 commit: e58cd9e7945f11191bd7537203ad1cd1ce6220a1 gpu: NVIDIA GeForce RTX 2070 SUPER title: retail game seconds: 60 exit: 0x0 frames shown: 1452 (PresentX 1452) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 17950 MB ``` 104.9 % of main's frames, 100.8 % of its peak commit, no device removal, no crash. `xcl run` does not reach the changed code (`xcl shaders --precompile --pipelines`), so this is a regression check only. `PR checks` reads the description, so please paste both blocks under **Regression run**. Runs made and report written with Claude Code (Claude Opus 5.5).
github-bot force-pushed github-bot/gh-2739 from d653c21abd to d613e31c73 2026-11-26 11:57:46 +00:00 Compare
github-bot force-pushed github-bot/gh-2739 from d613e31c73 to e58cd9e794 2026-11-26 12:03:12 +00:00 Compare
Author
Owner

@⁠ettehn on GitHub · 2026-11-26 12:18 UTC · original

Fresh-process CLI verification on exact head e58cd9e7945f11191bd7537203ad1cd1ce6220a1 (base b49be183). Windows 11, RTX 5070 Ti Laptop 12 GB, Rust 1.97.1 MSVC, debug. cargo build --locked --offline -p xcl -j 2 passed.

Ran xcl shaders <one synthetic compute record> --precompile --only cs --pipelines --windows 4 --split 1 in six separate processes, with isolated XCL caches. All six exited 0 with zero refusals.

Case Fresh GPU creations XCL disk hits Rejected Saved Write failed Caching disabled
Empty cache 1 0 0 1 0 0
Relaunch with previous process's cache 0 1 0 0 0 0
Invalid blob, cap off 1 0 1 1 0 0
Invalid blob, 16 KiB cap (21,480 B DXIL) 0 0 1 0 0 0
File in place of the cache's driver directory 1 0 0 0 1 0
XCL_PSO_DISK_CACHE=0 1 0 0 0 0 1

The saved blob's SHA-256 stayed the same on relaunch. The over-cap case removed the rejected blob; the uncapped case replaced it. Blob unavailable was zero in all cases. NVIDIA's implicit cache was not controlled. No retail title, split-chain case, AMD, or full-suite run in this check.

AI-assisted verification (OpenAI Codex).

**@⁠ettehn** on GitHub · 2026-11-26 12:18 UTC · [original](https://github.com/xcl-dev/xcl/pull/2739#issuecomment-7191833793) **Fresh-process CLI verification on exact head `e58cd9e7945f11191bd7537203ad1cd1ce6220a1`** (base `b49be183`). Windows 11, RTX 5070 Ti Laptop 12 GB, Rust 1.97.1 MSVC, debug. `cargo build --locked --offline -p xcl -j 2` passed. Ran `xcl shaders <one synthetic compute record> --precompile --only cs --pipelines --windows 4 --split 1` in six separate processes, with isolated XCL caches. All six exited 0 with zero refusals. | Case | Fresh GPU creations | XCL disk hits | Rejected | Saved | Write failed | Caching disabled | | --- | ---: | ---: | ---: | ---: | ---: | ---: | | Empty cache | 1 | 0 | 0 | 1 | 0 | 0 | | Relaunch with previous process's cache | 0 | 1 | 0 | 0 | 0 | 0 | | Invalid blob, cap off | 1 | 0 | 1 | 1 | 0 | 0 | | Invalid blob, 16 KiB cap (21,480 B DXIL) | 0 | 0 | 1 | 0 | 0 | 0 | | File in place of the cache's driver directory | 1 | 0 | 0 | 0 | 1 | 0 | | `XCL_PSO_DISK_CACHE=0` | 1 | 0 | 0 | 0 | 0 | 1 | The saved blob's SHA-256 stayed the same on relaunch. The over-cap case removed the rejected blob; the uncapped case replaced it. Blob unavailable was zero in all cases. NVIDIA's implicit cache was not controlled. No retail title, split-chain case, AMD, or full-suite run in this check. AI-assisted verification (OpenAI Codex).
Author
Owner

@⁠SzczepanGrela on GitHub · 2026-11-26 13:08 UTC · original

Additional RX 9070 / Wine verification on exact head e58cd9e7945f11191bd7537203ad1cd1ce6220a1, against main b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7. Both source trees were unmodified, with full source inventories checked before and after testing.

Environment

RX 9070 16 GB (RADV GFX1201), Ryzen 7 7700, CachyOS kernel 7.3.0-5-cachyos, Mesa 26.3.1-arch3.5, GE-Proton11-12 Wine 11.0 Staging, vkd3d-proton 8293130ebe370b1+ (local asserts-disabled build), DXC/DXIL 1.9.2602.17, Rust 1.97.1, release x86_64-pc-windows-gnu.

Fresh-process CLI results

Seven separate processes per revision, using a directory containing one synthetic compute record adapted from the existing test builders. No title data. The resulting DXIL was 3,640 bytes; the cold saved PSO blob was 112 bytes.

xcl shaders <one-fixture directory> --precompile --only cs --pipelines --windows 4 --split 1
XCL_NETWORK=0
XCL_DIRECT_DXIL=0
XCL_DXIL_CACHE=<private XCL cache>
VKD3D_SHADER_CACHE_PATH=<private enabled native cache>

Cap off (XCL_PIPELINE_MAX_KB=0) except the explicitly capped case. Head counters:

Case Created XCL disk hits Rejected Saved Write failed Disabled Capped
Empty XCL and native caches 1 0 0 1 0 0 0
New process, previous XCL and native caches 0 1 0 0 0 0 0
New process, previous XCL blob, fresh empty native-cache directory 0 1 0 0 0 0 0
Invalid XCL blob, cap off 1 0 1 1 0 0 0
Invalid XCL blob, 1 KiB cap 0 0 1 0 0 0 1
Regular file in place of the private driver directory 1 0 0 0 1 0 0
XCL_PSO_DISK_CACHE=0 1 0 0 0 0 1 0

All 14 CLI processes exited 0, with zero translation errors and zero pipeline refusals. blob unavailable was zero in every head case. The saved blob's SHA-256 stayed unchanged in both relaunch cases. The uncapped invalid blob was replaced; the capped invalid blob was removed without an uncached creation. Every fresh creation was counted as one whole PSO and zero chain PSOs. These hits are the PR's accepted-blob counter, not a timing measurement of the driver's internal cache.

Main produced the same legacy made/refused/reused counts and matching cache-file outcomes for each case; it has no new detailed counters.

Unit checks

Windows libtest binaries through the same Wine prefix, filter shaders::pipeline_cap_tests::, --nocapture, separately with --test-threads=1 and 4, XCL_REQUIRE_GPU=wave64, and a fresh private enabled native cache per invocation:

  • Head: 7 passed / 0 failed / 0 ignored at each thread count, including the split-chain counter assertions.
  • Main: 3 passed / 0 failed / 0 ignored at each thread count.
  • No skip markers. Raw summaries, cache-file hashes and executable hashes were checked after testing.

Not tested

Retail/smoke workloads, native Windows, full workspace suite, graphics PSOs, fresh-process split-chain reuse, performance or FPS. The fresh-process CLI fixture exercises whole compute PSOs only.

AI use

OpenAI Codex (GPT-6; exact serving variant not exposed) reviewed the diff, ran and verified the paired synthetic tests and cache controls, and drafted this report. Publication authorized by the account owner.

**@⁠SzczepanGrela** on GitHub · 2026-11-26 13:08 UTC · [original](https://github.com/xcl-dev/xcl/pull/2739#issuecomment-7192921069) Additional RX 9070 / Wine verification on exact head `e58cd9e7945f11191bd7537203ad1cd1ce6220a1`, against main `b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7`. Both source trees were unmodified, with full source inventories checked before and after testing. **Environment** RX 9070 16 GB (RADV GFX1201), Ryzen 7 7700, CachyOS kernel 7.3.0-5-cachyos, Mesa 26.3.1-arch3.5, GE-Proton11-12 Wine 11.0 Staging, vkd3d-proton `8293130ebe370b1+` (local asserts-disabled build), DXC/DXIL 1.9.2602.17, Rust 1.97.1, release `x86_64-pc-windows-gnu`. **Fresh-process CLI results** Seven separate processes per revision, using a directory containing one synthetic compute record adapted from the existing test builders. No title data. The resulting DXIL was 3,640 bytes; the cold saved PSO blob was 112 bytes. ```text xcl shaders <one-fixture directory> --precompile --only cs --pipelines --windows 4 --split 1 XCL_NETWORK=0 XCL_DIRECT_DXIL=0 XCL_DXIL_CACHE=<private XCL cache> VKD3D_SHADER_CACHE_PATH=<private enabled native cache> ``` Cap off (`XCL_PIPELINE_MAX_KB=0`) except the explicitly capped case. Head counters: | Case | Created | XCL disk hits | Rejected | Saved | Write failed | Disabled | Capped | | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | | Empty XCL and native caches | 1 | 0 | 0 | 1 | 0 | 0 | 0 | | New process, previous XCL and native caches | 0 | 1 | 0 | 0 | 0 | 0 | 0 | | New process, previous XCL blob, fresh empty native-cache directory | 0 | 1 | 0 | 0 | 0 | 0 | 0 | | Invalid XCL blob, cap off | 1 | 0 | 1 | 1 | 0 | 0 | 0 | | Invalid XCL blob, 1 KiB cap | 0 | 0 | 1 | 0 | 0 | 0 | 1 | | Regular file in place of the private `driver` directory | 1 | 0 | 0 | 0 | 1 | 0 | 0 | | `XCL_PSO_DISK_CACHE=0` | 1 | 0 | 0 | 0 | 0 | 1 | 0 | All 14 CLI processes exited 0, with zero translation errors and zero pipeline refusals. `blob unavailable` was zero in every head case. The saved blob's SHA-256 stayed unchanged in both relaunch cases. The uncapped invalid blob was replaced; the capped invalid blob was removed without an uncached creation. Every fresh creation was counted as one whole PSO and zero chain PSOs. These hits are the PR's accepted-blob counter, not a timing measurement of the driver's internal cache. Main produced the same legacy made/refused/reused counts and matching cache-file outcomes for each case; it has no new detailed counters. **Unit checks** Windows libtest binaries through the same Wine prefix, filter `shaders::pipeline_cap_tests::`, `--nocapture`, separately with `--test-threads=1` and `4`, `XCL_REQUIRE_GPU=wave64`, and a fresh private enabled native cache per invocation: - Head: 7 passed / 0 failed / 0 ignored at each thread count, including the split-chain counter assertions. - Main: 3 passed / 0 failed / 0 ignored at each thread count. - No skip markers. Raw summaries, cache-file hashes and executable hashes were checked after testing. **Not tested** Retail/smoke workloads, native Windows, full workspace suite, graphics PSOs, fresh-process split-chain reuse, performance or FPS. The fresh-process CLI fixture exercises whole compute PSOs only. **AI use** OpenAI Codex (GPT-6; exact serving variant not exposed) reviewed the diff, ran and verified the paired synthetic tests and cache controls, and drafted this report. Publication authorized by the account owner.
Author
Owner

@⁠Aniseto on GitHub · 2026-11-26 13:13 UTC · original

Ran the pipeline counter tests at e58cd9e:

Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build.

XCL_ADAPTER=nvidia cargo test -p xcl pipeline_cap_tests -- --test-threads=1 --nocapture
7 passed; 0 failed; 0 ignored; 1333 filtered out      (exit 0)

All seven pass, including the four new counter tests and the stale-blob test, which logs adapter=NVIDIA GeForce RTX 5070 Ti ... rejected=1. These are unit tests with a real D3D12 device for the cap case, not a title run.

What this adds: the author tested an RTX 4060 Laptop and the smoke runs were done on an RTX 2070 SUPER. This is a Blackwell host with a different driver, and the thread has no report from another machine.

Not tested: the full workspace suite, the --pipelines pass on a retail title, a fresh-process relaunch, AMD and Intel GPUs, Wine, release profile, title data.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.

**@⁠Aniseto** on GitHub · 2026-11-26 13:13 UTC · [original](https://github.com/xcl-dev/xcl/pull/2739#issuecomment-7193037783) Ran the pipeline counter tests at `e58cd9e`: Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build. ``` XCL_ADAPTER=nvidia cargo test -p xcl pipeline_cap_tests -- --test-threads=1 --nocapture 7 passed; 0 failed; 0 ignored; 1333 filtered out (exit 0) ``` All seven pass, including the four new counter tests and the stale-blob test, which logs `adapter=NVIDIA GeForce RTX 5070 Ti ... rejected=1`. These are unit tests with a real D3D12 device for the cap case, not a title run. What this adds: the author tested an RTX 4060 Laptop and the smoke runs were done on an RTX 2070 SUPER. This is a Blackwell host with a different driver, and the thread has no report from another machine. Not tested: the full workspace suite, the `--pipelines` pass on a retail title, a fresh-process relaunch, AMD and Intel GPUs, Wine, release profile, title data. AI-assisted (OpenCode), model: **DeepSeek V4.1 Flash Free** - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
This pull request can be merged automatically.
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/2739/head:github-bot/gh-2739'
git switch 'github-bot/gh-2739'

Merge

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