Repository navigation
Shaders: precompile compute pipelines through a recorded present - #2104
RandomGithub12309 wants to merge 1 commit into
Conversation
Consume the v1 manifest from xcl-dev#2096 in first-use order. Resolve all keys before driver work so an incomplete recording or a different pack cannot silently prewarm the wrong prefix. Part of xcl-dev#2088. Assisted-by: Codex (GPT-6)
|
Tested All three synthetic shader manifest fixtures passed on STOR-WINLAB at PR #2104 head cargo test --locked -p xcl --lib shaders::milestone::tests::selects_compute_first_uses_in_order_through_exact_present -- --exact --nocapture --test-threads=1
cargo test --locked -p xcl --lib shaders::milestone::tests::resolves_records_in_manifest_order_when_input_order_is_reversed -- --exact --nocapture --test-threads=1
cargo test --locked -p xcl --lib shaders::milestone::tests::reports_all_unmatched_keys_in_first_use_order -- --exact --nocapture --test-threads=13 passed, 0 failed, 0 ignored, 0 skipped. Each command exited
Windows 11 Enterprise Evaluation 25H2 x64 build Not tested — Other fixtures, the full suite, CLI precompile execution, live shader inputs, GPU compilation or execution, and retail smoke. AI use — T3 Code / Codex ( |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Windows CPU-only integration check. I combined #2096 ( I also tested a local follow-up that counts a selected pipeline as cache-ready when the driver accepts an existing blob or a new blob is saved. With a regular file blocking the cache directory, On Windows 11 25H2 (26200.9974), Ryzen 9 8945HX, Rust 1.97.1 MSVC, Verification and local patch assisted by OpenAI Codex (GPT-6). |
|
A run of this PR's head Setup: RTX 3060 12 GB (581.80, wave32), Windows 11 26200, release. The manifest was recorded with #2096 on
Two ways around it:
I'll add (2) to #2096 if you'd rather keep this PR's cutoff as it is, or we can do (1) here. Which one? Written with Claude Code (Claude Opus 5.5) from runs on this machine. Edit: option (2) isn't needed. Every manifest line already carries |
O5-7
left a comment
There was a problem hiding this comment.
Independent test report for PR #2104 on head commit f1810d0c362e73822e08bacf789e7422736ffafc (f1810d0).
Setup
- GPU: NVIDIA GeForce RTX 5080 16 GB (wave32-only, driver
32.0.15.9579) - CPU / RAM: AMD Ryzen 7 9700X, 32 GB RAM
- OS / Toolchain: Windows 11 Pro
10.0.26100,rustc 1.100.0 (0ef1bc386 2026-11-09), DXC1.8.2502.11(Windows SDK10.0.26100.0)
Test results (debug)
cargo test -p xcl milestone -- --nocapture: 4 passed, 0 failed, 0 ignoredcargo test --workspace -- --test-threads=4: 1158 passed, 0 failed, 46 ignored
Regression run (clean detached HEAD f1810d0)
xcl-smoke v1
commit: f1810d0c362e73822e08bacf789e7422736ffafc
gpu: NVIDIA GeForce RTX 5080
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1686 (PresentX 1686)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14104 MB
(Same clean-machine main cbc296a 60 s baseline: 1686 frames (PresentX 1686), 60 60 60, 0 removals, 0 crashes, 14083 MB; cold manifest prefix precompilation against a live retail manifest was not run separately.)
AI use
- Antigravity (Gemini 4 Neon) ran the builds, test suites, and smoke run, and formatted this report.
|
Two native Windows GPU runs confirm the cache-write gap that @ettehn identified in the CPU-only follow-up above. On the current PR head, a successful GPU pipeline build counts as complete even when the driver blob cannot be saved. Tested: Clean
On each GPU I ran All four CLI runs selected one compute pipeline, exited 0, and printed
Not tested: The proposed follow-up patch, retail startup or playability, AMD, or implicit driver-cache behavior. AI use Ran via Samaritan:
|
|
Thanks @itsSio for confirming the failure path on both GPUs. I ran the local persistence fix on top of
The original-behavior binary has a test-only early return behind OpenAI Codex assisted. |
Part of #2088, workstream 1. This consumes the v1 manifest recorded by Anon64’s #2096. With a recorded present count, the offline precompiler builds just the compute pipelines first used through that present. The option is opt-in and works with an RPF pack, a folder, or a single record.
What is in it
shaders.rsandshaders/milestone.rsselect compute first-use keys in manifest order, match the full prefix against the input before GPU work, and use the existing compute translator, pipeline builder, and blob cache. A missing cutoff, an unmatched key, or an incomplete build returns a failure exit code.Tested
Base
cbc296ab65a2661a61e3e2da109134bcd5319f60, headf1810d0c362e73822e08bacf789e7422736ffafc. Windows 11 build 26300.9974, Core Ultra 7 255HX, 15.43 GiB usable RAM, RTX 5050 Laptop GPU (8 GB), NVIDIA 621.14, Rust 1.100.0, debug build.cargo build --workspace --offlinesucceeded.cargo test --workspace --offline --no-fail-fast -- --test-threads=4 --show-outputfinished with 1154 passed, 4 failed, 46 ignored. The harness counted skipped GPU cases among passes. The four new milestone tests passed. On base,cargo test --offline -p xcl --lib gpu::dxil::fuzz_tests::fuzz_validate_and_gpu -- --test-threads=4reproduced all four failures on the same seeds (70, 545, 1019, 1507), each withCreateComputePipelineStatereturning0x8007000E. The suite used separate writableXCL_DXIL_CACHEandXCL_DATA_ROOTdirectories.Recorded a retail manifest using D3D12.X: XCL_PSO_MANIFEST=1 writes the order a run asks for its pipelines (#2088) #2096’s recorder diff on the base above, with
XCL_NETWORK=0 XCL_ADAPTER=auto XCL_PSO_MANIFEST=1and isolated cache/data directories. The 115-second recording reached 2,899 frames with 60/60/60 presents in the last three two-second windows. Present 512 was the first recorded cutoff after a compute use.Ran
xcl shaders <pack> --precompile --pipelines --pso-manifest <recording> --through-present 512twice with the same isolatedXCL_DXIL_CACHE. First pass, empty XCL cache: 1 built, 0 blob hits, 7.189 s total. Repeat: 1 built, 1 blob hit, 5.559 s total. Both exited 0 with zero refused or capped. NVIDIA implicit cache was enabled and had already seen this program. These are whole-command times including the pack scan.Record
1e32f25121c1552f, pipeline key197228a8e18192ff, 95,616 DXIL bytes. On the initial recorder run the driver build took 573 ms with no XCL blob supplied. A subsequent recording supplied an XCL blob and reported 35 ms. Driver-cache-off measurement withxcl shaders <pack> --measure-pso 1e32f25121c1552f --repeat 2returned exit 2 (ShaderCacheControl,0x887A002D).CLI checks for an unmatched compute key and an unrecorded cutoff each returned exit 2.
Launched the title with the cache produced by the offline command and a fresh title-data directory. At first use the compute pipeline was still pending. Its runtime build supplied the saved blob and took 18 ms. The run reached present 512 at 55.989 s after the first manifest event and finished at 862 frames in 85 s, with zero device removals or crashes.
28 explicit GPU skip messages from the full suite
Regression run
scripts/smoke.ps1 -Game <retail-folder> -Seconds 60 -Xcl <debug-binary>on each clean revision, withXCL_NETWORK=0 XCL_ADAPTER=auto, an empty per-run XCL cache/data directory, and NVIDIA implicit caching enabled. These check normal title execution with the new CLI option inactive.Not tested
Fully cold NVIDIA driver compilation, first playable frame, steady-state GPU time, AMD hardware, graphics pipeline replay, and bounded-lookahead scheduling. The present counter measures a rendering milestone. Its screen content and playability were not verified. No startup speedup is claimed.
AI use
OpenAI Codex (GPT-6) wrote the change, tests, and description, and ran the validation on the hardware above.