Shaders: add selective --replay-chain-whole validation, warming, and reuse test #2819

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

@⁠Decodere on GitHub · 2026-11-26 14:26 UTC · original
Decodere:feat-chain-whole-replay → main · +1902 −2 · 4 files · 1 commits · open

Implements Steps 2–4 of #2741: selective offline validation and native .chain.pso whole-form prewarming (xcl shaders <input> --replay-chain-whole <capture.jsonl> [--replay-cutoff <N>]), plus a fresh-process real-GPU E2E reuse proof across hooked ExecuteIndirect and direct fallback (Dispatch without recording allocator). Regular --precompile, --pipelines, --used-only, chain pieces, and runtime fallback behavior are unchanged. Targets main independently and merges cleanly with #2786 in either order (disjoint hunks in crates/xcl/src/hle/d3d12x/real.rs).

Part of #2741
Part of #2088
Part of #2508

What is in it

  • crates/xcl/src/shaders/chain_whole_replay.rs (new):
    • Strict schema_version: 1 UTF-8 JSONL parser accepting #2786's 12-field translation_options header (validating mem_windows and split_wave64 per demand record), ordered first-demand records, exact min(cli_cutoff, header.sequence_cutoff) selection, and exact FNV-1a 64 chain_root_sig_id digest over ordered static samplers.
    • Deduplicates exact repeated final identities while keeping distinct final identities for the same source_record_hash separate, resolving demanded compute records (FSSM and FSPX/ACCC) in a single pass over the shader input.
    • Rebuilds each demanded record through recomp::pso::console_to_dxil_in, validates ABI version, header/CLI translation options, split-chain eligibility, final whole DXIL hash/length, ordered static samplers and chain_root_sig_id, effective_flags, node_mask == 0, and runtime driver_cache::name_for(..., true) key; rejects disk-key collisions across distinct validated (chain_rs_id, node_mask, effective_flags, whole_dxil) targets as AmbiguousDiskKey and collapses identical whole build targets sharing a disk_cache_name to one first-demand entry so parallel workers never race on one .chain.pso file.
    • Prewarms only validated, collision-free whole-form .chain.pso entries in first-demand order via dispatch_chain_root_signature and recorded effective_flags/node_mask under XCL_PIPELINE_THREADS and XCL_PIPELINE_MAX_KB, reporting distinct native build/persistence outcomes (created_with_supplied_blob, created_fresh, rejected_and_cold_retried, persisted, blob_unavailable, write_failed, cache_disabled, capped, refused) and returning exit code 1 whenever any validation issue, cap, refusal, or unpersisted entry leaves replay incomplete.
    • Adds 6 deterministic unit tests covering CLI arg parsing (including orphan --replay-cutoff exit 2), golden chain_root_sig_id digests, strict JSONL parser rejection, cutoff/dedup/multi-identity planning, validation and disk-key collision rejection, and incomplete-exit accounting when persistence is capped or disabled.
  • crates/xcl/src/shaders.rs:
    • Declares mod chain_whole_replay;, adds --replay-chain-whole <path> and --replay-cutoff <u64> (rejecting orphan --replay-cutoff with exit code 2), tracks explicit --windows, allows single-file inputs for --replay-chain-whole, and dispatches to chain_whole_replay::run(...) without modifying Pipelines or precompile.
  • crates/xcl/src/hle/d3d12x/real.rs:
    • Adds read-only driver_cache::stats() -> (u64, u64, u64) and #[doc(hidden)] pub fn driver_cache_stats() -> (u64, u64, u64) returning (hits, stale_rejections, stored).
  • crates/xcl/tests/gpu_compute_e2e.rs:
    • Adds selective_chain_whole_replay_reuses_blob_in_fresh_process: verifies disabled disk cache returns exit 1 and writes nothing, cold selective replay writes exactly 1 .chain.pso blob for the demanded shader only (not an unselected sibling, split pieces, or .pso), warm replay hits the supplied blob, and 3 fresh Windows child processes prove exact reuse (hits == 1, stale == 0) plus matching 32-lane GPU output on hooked ExecuteIndirect and direct fallback (Dispatch with allocator == 0) while the unselected sibling records (hits == 0, stale == 0).

Tested

  • hardware (GPU + driver, CPU), Rust version, debug / release: NVIDIA GeForce RTX 4060 (8 GB, driver 621.14, 32-lane waves), Intel Core i5-11400F (6C/12T, 32 GB RAM), Windows 11, DXC 1.9.2609.5, rustc 1.100.0, debug + release
  • cargo clippy --all-targets -- -A clippy::approx_constant: 0 new warnings or errors across all 4 modified files (note: plain cargo clippy --all-targets exits 101 due to 3 pre-existing clippy::approx_constant errors in untouched lower_valu.rs, lower_wide.rs, and recomp/lower.rs)
  • XCL_WARP=1 cargo test -p xcl --lib -- shaders::chain_whole_replay:: --nocapture (debug WARP): 6 passed, 0 failed, 0 ignored
  • cargo test --release -p xcl --lib -- shaders:: --test-threads=4 --nocapture: 16 passed, 0 failed, 0 ignored
  • cargo test --release -p xcl --test gpu_compute_e2e -- --test-threads=1 --nocapture: 8 passed, 0 failed, 0 ignored (1 runtime skip: heap_window_out_of_memory_falls_back_to_the_switch_form without XCL_HEAP_WINDOWS=1; selective_chain_whole_replay_reuses_blob_in_fresh_process passed all 3 fresh child processes)
  • cargo test --release --workspace --no-fail-fast -- --test-threads=4 --nocapture: 1442 passed, 0 failed, 47 ignored across 37 workspace test targets (SKIPPED GPU tests/subcases: wave64-only GPU tests on 32-lane RTX 4060, 3 per-lane wave32 driver-refused subcases, heap_window_out_of_memory_falls_back_to_the_switch_form without XCL_HEAP_WINDOWS=1, pso_measurement_compiles_an_exact_synthetic_record without Windows Developer Mode, and 3 debug-layer tests without d3d12SDKLayers.dll)

Regression run

main:

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1571 (PresentX 1571)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13975 MB

PR:

xcl-smoke v1
commit: fd317b9c3124f01f305be9263d46017a14dedd2b
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1561 (PresentX 1561)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13983 MB

Not tested

  • Replaying a full multi-hundred-entry retail capture sidecar end-to-end against a retail shader archive (this PR validates the schema v1 contract, unit tests, and fresh-process GPU reuse on synthetic split-eligible compute shaders; retail capture-to-replay warm A/B measurement follows once #2786 and this PR are combined)
  • AMD / Intel GPUs, native wave64 GPUs, XCL_HEAP_WINDOWS=1, and D3D12 debug layer (d3d12SDKLayers.dll not installed on this host)

AI use

  • Google Antigravity (Gemini 4 Neon) — designed, implemented, and verified the selective --replay-chain-whole parser/validator/prewarmer, driver_cache::stats() reader, unit tests, and fresh-process GPU E2E reuse test
**@⁠Decodere** on GitHub · 2026-11-26 14:26 UTC · [original](https://github.com/xcl-dev/xcl/pull/2819) `Decodere:feat-chain-whole-replay` → `main` · +1902 −2 · 4 files · 1 commits · open Implements Steps 2–4 of #2741: selective offline validation and native `.chain.pso` whole-form prewarming (`xcl shaders <input> --replay-chain-whole <capture.jsonl> [--replay-cutoff <N>]`), plus a fresh-process real-GPU E2E reuse proof across hooked `ExecuteIndirect` and direct fallback (`Dispatch` without recording allocator). Regular `--precompile`, `--pipelines`, `--used-only`, chain pieces, and runtime fallback behavior are unchanged. Targets `main` independently and merges cleanly with #2786 in either order (disjoint hunks in `crates/xcl/src/hle/d3d12x/real.rs`). Part of #2741 Part of #2088 Part of #2508 **What is in it** - `crates/xcl/src/shaders/chain_whole_replay.rs` (new): - Strict `schema_version: 1` UTF-8 JSONL parser accepting #2786's 12-field `translation_options` header (validating `mem_windows` and `split_wave64` per demand record), ordered first-demand records, exact `min(cli_cutoff, header.sequence_cutoff)` selection, and exact FNV-1a 64 `chain_root_sig_id` digest over ordered static samplers. - Deduplicates exact repeated final identities while keeping distinct final identities for the same `source_record_hash` separate, resolving demanded compute records (`FSSM` and `FSPX`/`ACCC`) in a single pass over the shader input. - Rebuilds each demanded record through `recomp::pso::console_to_dxil_in`, validates ABI version, header/CLI translation options, split-chain eligibility, final whole DXIL hash/length, ordered static samplers and `chain_root_sig_id`, `effective_flags`, `node_mask == 0`, and runtime `driver_cache::name_for(..., true)` key; rejects disk-key collisions across distinct validated `(chain_rs_id, node_mask, effective_flags, whole_dxil)` targets as `AmbiguousDiskKey` and collapses identical whole build targets sharing a `disk_cache_name` to one first-demand entry so parallel workers never race on one `.chain.pso` file. - Prewarms only validated, collision-free whole-form `.chain.pso` entries in first-demand order via `dispatch_chain_root_signature` and recorded `effective_flags`/`node_mask` under `XCL_PIPELINE_THREADS` and `XCL_PIPELINE_MAX_KB`, reporting distinct native build/persistence outcomes (`created_with_supplied_blob`, `created_fresh`, `rejected_and_cold_retried`, `persisted`, `blob_unavailable`, `write_failed`, `cache_disabled`, `capped`, `refused`) and returning exit code `1` whenever any validation issue, cap, refusal, or unpersisted entry leaves replay incomplete. - Adds 6 deterministic unit tests covering CLI arg parsing (including orphan `--replay-cutoff` exit `2`), golden `chain_root_sig_id` digests, strict JSONL parser rejection, cutoff/dedup/multi-identity planning, validation and disk-key collision rejection, and incomplete-exit accounting when persistence is capped or disabled. - `crates/xcl/src/shaders.rs`: - Declares `mod chain_whole_replay;`, adds `--replay-chain-whole <path>` and `--replay-cutoff <u64>` (rejecting orphan `--replay-cutoff` with exit code `2`), tracks explicit `--windows`, allows single-file inputs for `--replay-chain-whole`, and dispatches to `chain_whole_replay::run(...)` without modifying `Pipelines` or `precompile`. - `crates/xcl/src/hle/d3d12x/real.rs`: - Adds read-only `driver_cache::stats() -> (u64, u64, u64)` and `#[doc(hidden)] pub fn driver_cache_stats() -> (u64, u64, u64)` returning `(hits, stale_rejections, stored)`. - `crates/xcl/tests/gpu_compute_e2e.rs`: - Adds `selective_chain_whole_replay_reuses_blob_in_fresh_process`: verifies disabled disk cache returns exit `1` and writes nothing, cold selective replay writes exactly 1 `.chain.pso` blob for the demanded shader only (not an unselected sibling, split pieces, or `.pso`), warm replay hits the supplied blob, and 3 fresh Windows child processes prove exact reuse (`hits == 1, stale == 0`) plus matching 32-lane GPU output on hooked `ExecuteIndirect` and direct fallback (`Dispatch` with `allocator == 0`) while the unselected sibling records `(hits == 0, stale == 0)`. **Tested** - hardware (GPU + driver, CPU), Rust version, debug / release: NVIDIA GeForce RTX 4060 (8 GB, driver 621.14, 32-lane waves), Intel Core i5-11400F (6C/12T, 32 GB RAM), Windows 11, DXC 1.9.2609.5, `rustc 1.100.0`, debug + release - `cargo clippy --all-targets -- -A clippy::approx_constant`: 0 new warnings or errors across all 4 modified files (note: plain `cargo clippy --all-targets` exits 101 due to 3 pre-existing `clippy::approx_constant` errors in untouched `lower_valu.rs`, `lower_wide.rs`, and `recomp/lower.rs`) - `XCL_WARP=1 cargo test -p xcl --lib -- shaders::chain_whole_replay:: --nocapture` (debug WARP): 6 passed, 0 failed, 0 ignored - `cargo test --release -p xcl --lib -- shaders:: --test-threads=4 --nocapture`: 16 passed, 0 failed, 0 ignored - `cargo test --release -p xcl --test gpu_compute_e2e -- --test-threads=1 --nocapture`: 8 passed, 0 failed, 0 ignored (1 runtime skip: `heap_window_out_of_memory_falls_back_to_the_switch_form` without `XCL_HEAP_WINDOWS=1`; `selective_chain_whole_replay_reuses_blob_in_fresh_process` passed all 3 fresh child processes) - `cargo test --release --workspace --no-fail-fast -- --test-threads=4 --nocapture`: 1442 passed, 0 failed, 47 ignored across 37 workspace test targets (SKIPPED GPU tests/subcases: wave64-only GPU tests on 32-lane RTX 4060, 3 per-lane wave32 driver-refused subcases, `heap_window_out_of_memory_falls_back_to_the_switch_form` without `XCL_HEAP_WINDOWS=1`, `pso_measurement_compiles_an_exact_synthetic_record` without Windows Developer Mode, and 3 debug-layer tests without `d3d12SDKLayers.dll`) **Regression run** main: ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1571 (PresentX 1571) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13975 MB ``` PR: ``` xcl-smoke v1 commit: fd317b9c3124f01f305be9263d46017a14dedd2b gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1561 (PresentX 1561) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13983 MB ``` **Not tested** - Replaying a full multi-hundred-entry retail capture sidecar end-to-end against a retail shader archive (this PR validates the schema v1 contract, unit tests, and fresh-process GPU reuse on synthetic split-eligible compute shaders; retail capture-to-replay warm A/B measurement follows once #2786 and this PR are combined) - AMD / Intel GPUs, native wave64 GPUs, `XCL_HEAP_WINDOWS=1`, and D3D12 debug layer (`d3d12SDKLayers.dll` not installed on this host) **AI use** - Google Antigravity (Gemini 4 Neon) — designed, implemented, and verified the selective `--replay-chain-whole` parser/validator/prewarmer, `driver_cache::stats()` reader, unit tests, and fresh-process GPU E2E reuse test
Follows up on #2741 Part 1 (first-demand capture sidecar) with Steps 2–4: offline validation, selective native `.chain.pso` whole-form prewarming, and fresh-process GPU reuse proof. Regular `--precompile`, `--pipelines`, `--used-only`, chain pieces, and runtime fallback behavior are unchanged.

- Add `crates/xcl/src/shaders/chain_whole_replay.rs` and CLI flags `--replay-chain-whole <path>` + optional `--replay-cutoff <u64>` in `crates/xcl/src/shaders.rs` (rejecting orphan `--replay-cutoff` with exit code 2).
- Parse the `schema_version: 1` UTF-8 JSONL capture sidecar (accepting #2786's 12-field `translation_options` header while validating `mem_windows`/`split_wave64` per demand record) in first-demand `seq` order, apply the effective cutoff (`min(cli_cutoff, header.sequence_cutoff)`), deduplicate exact repeated final identities while keeping distinct final identities for the same `source_record_hash` separate, and resolve demanded compute records (`FSSM` and `FSPX`/`ACCC`) in a single pass over the shader input.
- Rebuild each selected record through the runtime translation path (`recomp::pso::console_to_dxil_in`) and validate ABI version, header/CLI translation options, split-chain form, final whole DXIL hash/length, ordered static samplers and `chain_root_sig_id`, effective flags, `node_mask == 0`, and runtime `driver_cache::name_for(..., true)` key; reject ambiguous disk-key collisions across distinct validated `(chain_rs_id, node_mask, effective_flags, whole_dxil)` targets and collapse identical targets sharing one `disk_cache_name` so parallel workers never race on one `.chain.pso` path.
- Create only validated, collision-free whole-form `.chain.pso` pipelines in first-demand order using `dispatch_chain_root_signature` and recorded `effective_flags`/`node_mask` under `XCL_PIPELINE_THREADS` and `XCL_PIPELINE_MAX_KB`, reporting distinct native build/persistence outcomes (`created_with_supplied_blob`, `created_fresh`, `rejected_and_cold_retried`, `persisted`, `blob_unavailable`, `write_failed`, `cache_disabled`, `capped`, `refused`) and treating any validation issue, cap, refusal, or unpersisted entry as incomplete (exit code 1).
- Expose read-only `driver_cache::stats()` / `real::driver_cache_stats()` in `crates/xcl/src/hle/d3d12x/real.rs`.
- Add 6 unit tests in `shaders::chain_whole_replay::tests` plus fresh-process GPU E2E test `selective_chain_whole_replay_reuses_blob_in_fresh_process` in `crates/xcl/tests/gpu_compute_e2e.rs` (isolated from ambient translation/cache env vars and wave64-safe) verifying selective `.chain.pso` persistence, exact blob reuse without cold retry (`hits == 1, stale == 0`) on both real hooked `ExecuteIndirect` and direct fallback (`Dispatch` with `allocator == 0`), matching 32-lane GPU output, and zero cache hits for an unselected sibling.

Part of #2741
Part of #2088
Part of #2508
Assisted-by: Google Antigravity (Gemini 4 Neon)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 14:31:03 +00:00
Author
Owner

@⁠ettehn on GitHub · 2026-11-26 14:32 UTC · original

Independent Windows CLI and GPU check on fd317b9c3124f01f305be9263d46017a14dedd2b. The only local change was two extra cases in the existing synthetic integration fixture. Both ran before the driver cache existed.

  • --replay-cutoff 0 exited 0 with selected 0, dropped_by_cutoff 1, and complete: true. It did not create a driver-cache directory.
  • Changing only the capture’s whole_dxil_hash to a different well-formed value exited 1 with whole_dxil_mismatch, validated 0, created_fresh 0, persisted 0, and complete: false. The driver-cache directory still did not exist.
  • The original integration case then passed, including the single cold blob, warm replay, both selected runtime fallback paths, and the unselected sibling checks in three fresh GPU processes.

Windows 11 build 26200, Ryzen 9 8945HX, RTX 5070 Ti Laptop 12 GB (621.24), Rust 1.97.1 MSVC debug, DXC 1.8.2502.11, XCL_ADAPTER=NVIDIA XCL_REQUIRE_GPU=wave64.

cargo test --locked --offline -p xcl --test gpu_compute_e2e -j 2 -- selective_chain_whole_replay_reuses_blob_in_fresh_process --exact --test-threads=1 --nocapture
cargo test --locked --offline -p xcl --lib -j 2 -- shaders::chain_whole_replay:: --test-threads=1 --nocapture

Integration 1 passed and unit tests 6 passed, no failures, ignored tests, or reported skips. The run used synthetic shaders. It did not cover a retail capture, heap-window mode, or the full workspace suite.

OpenAI Codex assisted with the two extra cases and verification.

**@⁠ettehn** on GitHub · 2026-11-26 14:32 UTC · [original](https://github.com/xcl-dev/xcl/pull/2819#issuecomment-7194963527) Independent Windows CLI and GPU check on `fd317b9c3124f01f305be9263d46017a14dedd2b`. The only local change was two extra cases in the existing synthetic integration fixture. Both ran before the driver cache existed. - `--replay-cutoff 0` exited 0 with `selected 0`, `dropped_by_cutoff 1`, and `complete: true`. It did not create a driver-cache directory. - Changing only the capture’s `whole_dxil_hash` to a different well-formed value exited 1 with `whole_dxil_mismatch`, `validated 0`, `created_fresh 0`, `persisted 0`, and `complete: false`. The driver-cache directory still did not exist. - The original integration case then passed, including the single cold blob, warm replay, both selected runtime fallback paths, and the unselected sibling checks in three fresh GPU processes. Windows 11 build 26200, Ryzen 9 8945HX, RTX 5070 Ti Laptop 12 GB (621.24), Rust 1.97.1 MSVC debug, DXC 1.8.2502.11, `XCL_ADAPTER=NVIDIA XCL_REQUIRE_GPU=wave64`. ```text cargo test --locked --offline -p xcl --test gpu_compute_e2e -j 2 -- selective_chain_whole_replay_reuses_blob_in_fresh_process --exact --test-threads=1 --nocapture cargo test --locked --offline -p xcl --lib -j 2 -- shaders::chain_whole_replay:: --test-threads=1 --nocapture ``` Integration 1 passed and unit tests 6 passed, no failures, ignored tests, or reported skips. The run used synthetic shaders. It did not cover a retail capture, heap-window mode, or the full workspace suite. OpenAI Codex assisted with the two extra cases and verification.
Author
Owner

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

Ran the selective chain-whole replay tests at fd317b9:

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 --lib shaders::chain_whole_replay:: -- --nocapture
6 passed; 0 failed; 0 ignored; 1336 filtered out      (exit 0)

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

All six parser/validator/collision unit tests pass, and the fresh-process GPU test also passes here: one .chain.pso blob reused by three child processes with matching 32-lane GPU output on the RTX 5070 Ti.

What this adds: the author tested an RTX 4060 8 GB (Ada). This is a Blackwell 16 GB host with the same DXC version; the thread has no report from another machine.

Not tested: a retail capture sidecar, a paired 60 s smoke run, the full workspace suite, AMD and Intel GPUs, wave64 hosts, XCL_HEAP_WINDOWS=1, D3D12 debug layer, 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 14:49 UTC · [original](https://github.com/xcl-dev/xcl/pull/2819#issuecomment-7195394102) Ran the selective chain-whole replay tests at `fd317b9`: 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 --lib shaders::chain_whole_replay:: -- --nocapture 6 passed; 0 failed; 0 ignored; 1336 filtered out (exit 0) XCL_ADAPTER=nvidia cargo test -p xcl --test gpu_compute_e2e selective_chain_whole_replay_reuses_blob_in_fresh_process -- --test-threads=1 --nocapture 1 passed; 0 failed; 0 ignored; 7 filtered out (exit 0) ``` All six parser/validator/collision unit tests pass, and the fresh-process GPU test also passes here: one `.chain.pso` blob reused by three child processes with matching 32-lane GPU output on the RTX 5070 Ti. What this adds: the author tested an RTX 4060 8 GB (Ada). This is a Blackwell 16 GB host with the same DXC version; the thread has no report from another machine. Not tested: a retail capture sidecar, a paired 60 s smoke run, the full workspace suite, AMD and Intel GPUs, wave64 hosts, `XCL_HEAP_WINDOWS=1`, D3D12 debug layer, 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.
Author
Owner

@⁠SzczepanGrela on GitHub · 2026-11-26 15:21 UTC · original

RX 9070 / Wine: offline replay and persistence checks pass; the fresh-runtime reuse fixture remains incomplete here.

Tested

  • Head fd317b9c3124f01f305be9263d46017a14dedd2b against main b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7.
  • 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.
  • Explicit RX 9070 selection, XCL_NETWORK=0, enabled private caches. Replay uses XCL_DIRECT_DXIL=1, split instruction limit 12, XCL_SPLIT_WAVE64=1, XCL_UMA_WINDOWS=4, and the upstream fixture's two synthetic compute records.

Verified offline results

shaders::chain_whole_replay::: 6 passed / 0 failed / 0 ignored, both one and four test threads. Existing shaders::pipeline_cap_tests::: 3/0/0 on both main and head, at both thread counts; its GPU dispatch control reads 42.

Separate CLI processes using the captured synthetic demand give:

Case Result
Cutoff 0 exit 0, selected 0, dropped 1, complete true, no driver blob
Changed whole-DXIL hash exit 1, whole_dxil_mismatch, validated 0, no native build/blob
Disk cache disabled exit 1, cache_disabled 1, complete false
Cold exit 0, created_fresh 1, persisted 1, complete true
Warm exit 0, created_with_supplied_blob 1, fresh 0, complete true
Corrupt private blob exit 0, rejected_and_cold_retried 1, fresh 1, persisted 1
Cold 1 KiB cap exit 1, capped 1, no native build/blob
Warm 1 KiB cap exit 0, supplied blob accepted despite the cold-build cap
Private driver-directory write blocked exit 1, fresh 1, write_failed 1, complete false

The selected whole DXIL is 2692 bytes. Cold replay creates only 6bf9827cb92b8a85-a84-0.chain.pso, 112 bytes. Filename and SHA-256 match across cold/warm; corrupt-cache repair restores a valid 112-byte blob. Main rejects the new replay option with exit 2, as expected.

Fresh-runtime limitation

selective_chain_whole_replay_reuses_blob_in_fresh_process reports 0 passed / 1 failed / 0 ignored in both the instrumented fixture and a separately built, unmodified exact-head fixture. In the logged run, disabled/cold/warm replay completes with the expected outcomes, then the first indirect child exits -1073741819 (0xc0000005) before the cache-stat/readback checkpoint. Its actual device matches RX 9070 PCI 1002:7550, LUID 00000000:000003ef. The unmodified fixture also fails its first indirect child; it does not print that child's exit code.

Separate baseline context: unchanged console_wave64_compute_through_the_pso_hook_dispatch_and_read_back fails on both main and head with dispatch: Invalid parameter (0x80070057). The cause of the new child's termination is unestablished. Its direct_fallback and unselected_sibling cases are not reached, so runtime reuse and GPU output for this fixture remain unverified.

The instrumented tree changes only test observability: child output/counters/readbacks, device-LUID assertion, and preservation of caller-selected private artifacts. Original assertions and production sources remain unchanged. All source bytes were reconstructed and checked; the separate exact-head control has no overlays. Raw summaries, CLI counters, stored input/capture/blob bytes and executable hashes were independently verified. No runtime capability skips or ignored tests in these selections.

Build: cargo test --offline --locked --release --target x86_64-pc-windows-gnu -p xcl --lib --test gpu_compute_e2e --no-run. Exact integration filter as above, --nocapture --test-threads=1. CLI: xcl.exe shaders <synthetic-input> --replay-chain-whole <capture.jsonl> --windows 4 --split 1, with --replay-cutoff 0 for the cutoff case.

Not tested

Successful runtime reuse/readback for the new fixture on this host, native Wave64 guest execution, heap-window mode, native static-sampler cases, retail captures or title workload, scripts/smoke.ps1, full suite, native Windows, other GPUs, performance or FPS.

AI use

OpenAI Codex (GPT-6; exact serving variant not exposed) reviewed the complete diff, added test observability, ran the tests and exact-head control, independently verified the bounded results, and drafted this report. Publication authorized by the account owner.

**@⁠SzczepanGrela** on GitHub · 2026-11-26 15:21 UTC · [original](https://github.com/xcl-dev/xcl/pull/2819#issuecomment-7196154864) RX 9070 / Wine: offline replay and persistence checks pass; the fresh-runtime reuse fixture remains incomplete here. **Tested** - Head `fd317b9c3124f01f305be9263d46017a14dedd2b` against main `b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7`. - 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`. - Explicit RX 9070 selection, `XCL_NETWORK=0`, enabled private caches. Replay uses `XCL_DIRECT_DXIL=1`, split instruction limit 12, `XCL_SPLIT_WAVE64=1`, `XCL_UMA_WINDOWS=4`, and the upstream fixture's two synthetic compute records. **Verified offline results** `shaders::chain_whole_replay::`: 6 passed / 0 failed / 0 ignored, both one and four test threads. Existing `shaders::pipeline_cap_tests::`: 3/0/0 on both main and head, at both thread counts; its GPU dispatch control reads 42. Separate CLI processes using the captured synthetic demand give: | Case | Result | | --- | --- | | Cutoff 0 | exit 0, selected 0, dropped 1, complete true, no driver blob | | Changed whole-DXIL hash | exit 1, `whole_dxil_mismatch`, validated 0, no native build/blob | | Disk cache disabled | exit 1, cache_disabled 1, complete false | | Cold | exit 0, created_fresh 1, persisted 1, complete true | | Warm | exit 0, created_with_supplied_blob 1, fresh 0, complete true | | Corrupt private blob | exit 0, rejected_and_cold_retried 1, fresh 1, persisted 1 | | Cold 1 KiB cap | exit 1, capped 1, no native build/blob | | Warm 1 KiB cap | exit 0, supplied blob accepted despite the cold-build cap | | Private driver-directory write blocked | exit 1, fresh 1, write_failed 1, complete false | The selected whole DXIL is 2692 bytes. Cold replay creates only `6bf9827cb92b8a85-a84-0.chain.pso`, 112 bytes. Filename and SHA-256 match across cold/warm; corrupt-cache repair restores a valid 112-byte blob. Main rejects the new replay option with exit 2, as expected. **Fresh-runtime limitation** `selective_chain_whole_replay_reuses_blob_in_fresh_process` reports 0 passed / 1 failed / 0 ignored in both the instrumented fixture and a separately built, unmodified exact-head fixture. In the logged run, disabled/cold/warm replay completes with the expected outcomes, then the first `indirect` child exits `-1073741819` (`0xc0000005`) before the cache-stat/readback checkpoint. Its actual device matches RX 9070 PCI `1002:7550`, LUID `00000000:000003ef`. The unmodified fixture also fails its first `indirect` child; it does not print that child's exit code. Separate baseline context: unchanged `console_wave64_compute_through_the_pso_hook_dispatch_and_read_back` fails on both main and head with `dispatch: Invalid parameter (0x80070057)`. The cause of the new child's termination is unestablished. Its `direct_fallback` and `unselected_sibling` cases are not reached, so runtime reuse and GPU output for this fixture remain unverified. The instrumented tree changes only test observability: child output/counters/readbacks, device-LUID assertion, and preservation of caller-selected private artifacts. Original assertions and production sources remain unchanged. All source bytes were reconstructed and checked; the separate exact-head control has no overlays. Raw summaries, CLI counters, stored input/capture/blob bytes and executable hashes were independently verified. No runtime capability skips or ignored tests in these selections. Build: `cargo test --offline --locked --release --target x86_64-pc-windows-gnu -p xcl --lib --test gpu_compute_e2e --no-run`. Exact integration filter as above, `--nocapture --test-threads=1`. CLI: `xcl.exe shaders <synthetic-input> --replay-chain-whole <capture.jsonl> --windows 4 --split 1`, with `--replay-cutoff 0` for the cutoff case. **Not tested** Successful runtime reuse/readback for the new fixture on this host, native Wave64 guest execution, heap-window mode, native static-sampler cases, retail captures or title workload, `scripts/smoke.ps1`, full suite, native Windows, other GPUs, performance or FPS. **AI use** OpenAI Codex (GPT-6; exact serving variant not exposed) reviewed the complete diff, added test observability, ran the tests and exact-head control, independently verified the bounded results, and drafted this report. Publication authorized by the account owner.
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/2819/head:github-bot/gh-2819'
git switch 'github-bot/gh-2819'

Merge

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