Shaders: warm runtime-selected graphics DXIL variants in --precompile #2603
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2613"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by Decodere on 2026-11-26T01:58:51Z.
Routes the runtime-selected first console vertex (
hw == 4) and pixel (hw == 5) FSSM program inxcl shaders --precompilethroughrecomp::pso::console_to_dxil_in_outcome, warming the exacttranslated/v2runtime cache variants (includingXCL_DIRECT_DXIL=alldirect graphics variants), distinguishing cache hits from fresh compiles, preserving full companion-program and later-FSSM coverage alongside exact incomplete-translation skip semantics for both standalone--precompileand hostedprepare_for_launch(#2555), and explicitly reporting standalone PSsampler_base=0coverage alongside static-sampler shift counts. Updated in follow-up commitffa475a38d0356e8a4f17be8f2c014b43b0e5a37on top offddd2d71(mainf9a0cb80f9decb41d6f6315f6cf4e06270ba2bda, preserving #1871'sxcl pso-precompile,--records,--used, andmake_pipelinesbehavior) to fix the multi-program and empty-first-FSSM coverage regression caught by@thehollowedone. Part of #2600, Part of #2508, Part of #1833.What is in it
crates/xcl/src/gpu/recomp/pso.rs:console_to_dxil_in_status(blob, stage, sampler_base, split_wave64, windows) -> Result<(Compiled, bool), String>(withconsole_to_dxil_indelegating to it) returning whether the result came from the in-memory ortranslated/v2disk cache (true) vs fresh translation/compilation (false).INCOMPLETE_TRANSLATION_PREFIX(used acrossconsole_translation,finish_two_pass, andcompile_console_mesh), typedCompileOutcome::{Compiled, Incomplete, Failed}, andconsole_to_dxil_in_outcome(...)so both cold translations and.err-cached lookups distinguish incomplete translations (!Translation::complete()) from hard parse/interface/DXC failures.console_to_dxil_in_status/console_to_dxil_in_outcomewrap the exact sameShaderKeyandtranslated::cachedlookup, andINCOMPLETE_TRANSLATION_PREFIX("incomplete translation, ") is byte-identical to the prior error prefix — existing DXIL/HLSL caches remain valid without re-translation.crates/xcl/src/shaders.rs(precompile):seen_vsforhw == 4,seen_psforhw == 5) beforerecomp::interface, matchingpso.rs::console_translation's exact selection so an empty orinterface == Nonefirst FSSM cannot steer a later valid FSSM intoconsole_to_dxil_in_outcomeand fail withFSSM without a program(caught by@thehollowedone).f.programs[0]of that first matching VS/PS FSSM throughrecomp::pso::console_to_dxil_in_outcome(&blob, stage, 0, graphics_split, windows)(and usesconsole_to_dxil_in_statusfor compute while preserving #1871'sselectedfiltering,startupsplit-chain build path, andpipeline_jobs/make_pipelinesordering), incrementingcachedon cache hits andcompiledonly on fresh compiles.CompileOutcome::Incomplete(_), counts the hosted startup skip directly (if startup.is_some() { skipped.fetch_add(1, Ordering::Relaxed); }) without re-translatingprograms[0], preserving exact skip behavior (0errors,1skip on startup) for both standalone--precompileand hostedprepare_for_launch(#2555, addressing@CryingLaughing's report).handled_first_program && f.programs.len() == 1and iteratesf.programs.iter().skip(usize::from(handled_first_program))so companion programs (f.programs[1..]) and subsequent VS/PS FSSMs retain full--precompilecoverage.ps_base0,ps_static_samplers, andvs_static_samplersfromCompiled.samplersand prints an explicit runtime-path coverage summary line when standalone PS or static-sampler VS records are warmed.crates/xcl/tests/shaders_e2e.rs:xbox_shader_with_osgusing#1942's sharedcontainerhelper alongside#1871'spso_precompile_help_and_required_records_operand.precompile_warms_direct_vs_ps_and_hits_in_fresh_process(XCL_DIRECT_DXIL=all),precompile_warms_hlsl_static_samplers_and_reports_base_shift(XCL_DIRECT_DXIL=0), andprecompile_skips_incomplete_vs_while_warming_supported_vs.@thehollowedone's two regression testsprecompile_keeps_companion_programs_and_pixel_variants(compiled 3 -> 0,already cached 0 -> 3,errors 0) andprecompile_keeps_a_pixel_variant_after_an_empty_first_variant(compiled 1 -> 0,already cached 0 -> 1,errors 0).Tested
26200), NVIDIA GeForce RTX 4060 8 GB (Ada, 32-lane waves, driver32.0.16.2114), Intel Core i5-11400F (6C/12T), 32 GB RAM,rustc 1.100.0, DXC1.9.2609.5, debug + release, follow-up HEADffa475a38d0356e8a4f17be8f2c014b43b0e5a37(fast-forward ontofddd2d71678df6001b8b58f43a60e8cf22d94806, merge-basef9a0cb80f9decb41d6f6315f6cf4e06270ba2bda).fddd2d71with both newprecompile_keeps_tests:0 passed; 2 failed(compiled 1instead of3on the companion/multi-FSSM PS fixture;errors 1 ... FSSM without a programon the empty-first-FSSM PS fixture).cargo clippy --tests -p xcl -- -A clippy::approx_constant -A clippy::while_immutable_condition:exit 0,0new warnings or errors across all 3 modified files (pso.rs,shaders.rs,shaders_e2e.rs; the-Aflags suppress only pre-existingrustc 1.100.0deny-by-default lints outside this diff).3xDebug and3xRelease targeted tests (RTX 4060,0skips):cargo test --lib -p xcl shaders:: -- --test-threads=4(Debug3x, Release3x):13 passed; 0 failed; 0 ignoredcargo test -p xcl --test shaders_e2e -- --test-threads=4(Debug3x, Release3x):14 passed; 0 failed; 0 ignored(includes#1871'spso_precompile_help_and_required_records_operand, all 3 graphics-variant warming E2E tests, and both newprecompile_keeps_*tests covering cold compile + warm cache hits).cargo build --release -p xcl:exit 0,0new warnings in touched files.fddd2d71in this thread:@UncommonDLLpassedprecompile_skips_incomplete_vs_while_warming_supported_vson Windows (rustc 1.100.0, DXC1.9.2609.5), and@thehollowedoneverified the companion/empty-first-FSSM candidate fix (14/14shaders_e2e,13/13shaders::) on RTX 3080 Ti.Regression run
Quiet 60 s retail smoke runs (
scripts/smoke.ps1 -Seconds 60,XCL_PREPARE=0,XCL_NETWORK=0,title: 29640639, NVIDIA GeForce RTX 4060).main(f9a0cb80f9decb41d6f6315f6cf4e06270ba2bda, exact merge-base):PR (
ffa475a38d0356e8a4f17be8f2c014b43b0e5a37):Not tested
d3d12SDKLayers.dllnot installed on this host),XCL_HEAP_WINDOWS=1, and Windows Developer Mode driver-cache-disable tests.--precompile/prepare_for_launchrun (XCL_PREPARE=0was used for the 60 s retail smoke; graphics-variant warming, incomplete-VS skip, companion-program, and empty-first-FSSM paths are verified via isolated fresh-process synthetic console VS/PS containers inshaders_e2e).XCL_SAMPLE_*game-data tests and#[ignore]tests.AI use
console_to_dxil_in_status,CompileOutcome/console_to_dxil_in_outcome, theprecompileruntime graphics warming, cache-hit accounting, coverage reporting, and follow-up companion/later-FSSM coverage fix (adapting the repros and fix caught by@thehollowedone), ran all failing-first, clippy,3xDebug/Releaseshaders::andshaders_e2e, release build, and paired 60 s RTX 4060 smoke verifications, and updated this PR description.Imported from ivall/xcl. Originally posted by DarkPanda69 on 2026-11-26T02:27:50Z.
Update for head
ffa475a: the branch no longer merges intomain(conflict inshaders.rs), so I tested the PR head against its merge-basef9a0cb8.shaders_e2e: 14 passed, 0 failed, no SKIPPED.shaders::: 13 passed, 0 failed, with the same 1 SKIPPED (pso_measurement_compiles_an_exact_synthetic_record). Same on the RX 9070 XT and the RTX 3060.Update for head
d68c74e: same result. The diff no longer applies as a patch onmain8b957be, so I merged the branch into it (shaders.rsauto-merged, no conflicts).shaders_e2egives 11 passed, 0 failed, no SKIPPED, on both the RX 9070 XT and the RTX 3060.shaders::gives 10 passed, 0 failed on both, with the same 1 SKIPPED as before.Update for head
2d229b9: rerun onmainb49be18, same cards and--nocapture.shaders_e2egives 10 passed, 0 failed, no SKIPPED, on both the RX 9070 XT and the RTX 3060.shaders::gives 10 passed, 0 failed on both, with the same 1 SKIPPED asmain(pso_measurement_compiles_an_exact_synthetic_record).64-lane AMD run (listed as untested) on an RX 9070 XT, plus an RTX 3060: both new end-to-end tests pass on both cards, with no skips.
Head
a3312c0applied onmainb49be18, debug, Windows 11 Pro 26200, card chosen withXCL_ADAPTER:cargo test -p xcl --test shaders_e2e -- --nocapture: 10 passed, 0 failed, no SKIPPED on both cards, withprecompile_warms_direct_vs_ps_and_hits_in_fresh_processandprecompile_warms_hlsl_static_samplers_and_reports_base_shiftamong them.cargo test -p xcl --lib -- shaders::: 10 passed, 0 failed on both cards. 1 SKIPPED, the same onmain:pso_measurement_compiles_an_exact_synthetic_record(cannot disable the driver cache).Not tested: the D3D12 debug-layer tests (no
d3d12SDKLayers.dllhere either), a retail pack, Intel.AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T02:30:41Z.
Tested — AMD Radeon RX 6800M
a3312c055cf3a31f77bcb7b1e278b7479d29dc41(clean detached worktree). Windows 11 Home 10.0.26200, Ryzen 9 5980HX, RX 6800M driver 30.0.13002.13003, rustc 1.99.0, DXC 1.9.2609.5, debug build.XCL_ADAPTER=6800M,XCL_REQUIRE_GPU=1, andXCL_DXC_DIRto the local DXC 1.9.2609 x64 directory. Rancargo test --locked -p xcl --test shaders_e2e -j 1 precompile_warms_ -- --test-threads=1 --nocapturein an isolated target directory under a memory guard: 2 passed, 0 failed, 0 ignored, 8 filtered; noSKIPPEDlines; guard did not trigger.warm_translate_dxc_ms=5.452,native_pso_ms=5.909.warm_translate_dxc_ms=4.994,native_pso_ms=18.077.The child tests assert warm
translated/v2hits and zero DXC compiles on those hits. The numeric native PSO timings show that both cases reachedCreateGraphicsPipelineState. The child inheritsXCL_ADAPTER=6800M; this machine's matching hardware adapter is the RX 6800M. The helper only falls back to WARP when no adapter matches, so this is RX 6800M native-driver evidence rather than a pass inferred from the outer test status alone.Not tested: full workspace suite on this head, release profile, a retail shader archive or paired title smoke, other GPUs, and whether the changed path improves title behavior. Timings are single samples, not a performance comparison.
AI use: OpenAI Codex (GPT-6; exact serving variant unavailable) and a Luna subagent selected the focused test, ran it, checked the exact-head log and adapter-selection code, and drafted this report.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T02:33:31Z.
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: 1 failure under parallel scheduling; clean on--test-threads=1rerun (1308 passed, 0 failed, 27 ignored, 79s). Intermittent single-test flake — tracked in #1978.Thanks!
— Devin
Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T05:36:46Z.
Review: COMMENTED
The new VS/PS path increments
compiledafter every successfulconsole_to_dxil_in, including a hit from its in-memory or translated disk cache. That function returns onlyCompiled, so a second--precompilerun can reportcompiled 2, already cached 0for graphics variants even when both came from the cache. The HLSL loop below distinguishes hits. Could the graphics path expose/count the cache outcome (or use a separatewarmedcounter) and add a warm second-run assertion for the summary? Source review ata3312c055cf3a31f77bcb7b1e278b7479d29dc41; I did not run the precompile command. AI-assisted review with Codex.Imported from ivall/xcl. Originally posted by SzczepanGrela on 2026-11-26T06:21:34Z.
Updated RX 9070 / Wine verification for head
d68c74e55cf5837d7fee81f8eee52472d91dd9b6, current main8b957bec6f82495aec940944c6bf47faa02db590, and their automatic three-way integration using merge basee120925e3abc9956a8b9bae631969d32e8ccd43c. The integrated preparation preserved the unsupported-VS skip while warming the supported runtime variant in both direct and HLSL modes.Tested
RX 9070 (RADV GFX1201), Mesa
26.3.1-arch3.5, Ryzen 7 7700, CachyOS kernel7.3.0-5-cachyos, GE-Proton11-12 / Wine 11.0 Staging, native d3d12/d3d12core/dxgi, vkd3d-proton8293130ebe370b1+(local asserts-disabled build), DXC1.9.2602.17, Rust1.97.1, releasex86_64-pc-windows-gnu.Built each source copy with
cargo test --offline --locked --release --target x86_64-pc-windows-gnu -p xcl --test shaders_e2e --lib --no-run. Ran the resulting executables through Wine with--nocapture --test-threads=1and--nocapture --test-threads=4, selectingshaders::tests::for the unit target. Upstream tests and assertions were unchanged. The only added fixture, on main and the integration, was an append-only#[cfg(test)]caller ofprepare_for_launch.All counts have 0 ignored. The unit failure on all three sources was
pso_measurement_compiles_an_exact_synthetic_record:cannot disable the driver cache ... Not implemented. (0x80004001), but XCL_REQUIRE_GPU=wave64. This is retained as a failure, not counted as GPU coverage. The six unit passes includeretail_pack_samplereturning early becauseXCL_SAMPLE_RPFwas unset, one skip message per unit invocation. No retail data was loaded.Both graphics fresh-process cases passed their cold
compiled 2, already cached 0, errors 0, warmcompiled 0, already cached 2, errors 0, translated-cache and zero-DXC assertions. The HLSL case also checked the separate PS(base=1) variant. Eight native graphics PSO creations completed across exact-head/integration and the two thread modes, with numeric native-PSO markers and no capability skips. The new incomplete-VS end-to-end case passed in all four PR/integration invocations.The additional preparation check used one supported VS and one
v_cvt_off_f32_i4VS, withXCL_DIRECT_DXIL=alland0,XCL_UMA_WINDOWS=4,XCL_HEAP_WINDOWS=0, and the device-selected graphics split form (true). Each source/backend had separate cold, warm and fresh cached-only probe processes, 12 processes total:Ok(()), progress2/2,errors 0, andskipped (runtime pairing or unsupported translation) 1. Cold reportedcompiled 1, already cached 0; warm reportedcompiled 0, already cached 1.translated/v2.binand an incomplete-translation.err. Fresh-process probes reused both without DXC compilation, and cold/warm/probe cache snapshots stayed byte-identical.An initial local probe incorrectly expected the HLSL main control to miss. I corrected that local expectation after checking the DXC and translated-cache paths, retained its logs, rebuilt the affected test binaries, and repeated the complete 24-invocation comparison above. Source, executable and cache hashes and raw counts were checked separately.
Environment:
XCL_ADAPTER=AMD Radeon RX 9070,XCL_REQUIRE_GPU=wave64,XCL_NETWORK=0,XCL_DXC_THREADS=1, native DLL overrides, and private enabled application/driver cache directories.Not tested
Full workspace suite, guest entry or hosted
xcl run, retail archives, smoke runs, shader execution/rendered-image correctness, forced hard-error paths, native Windows, other GPUs, or performance/FPS. The preparation fixture called the preparation function directly. No title-level regression claim.AI use
OpenAI Codex (GPT-6; exact serving variant not exposed) reviewed the changes, prepared the local fixture, built and ran the comparisons, independently checked source bytes, raw logs and cache snapshots, and wrote this update. Publication authorized by the account owner.
Imported from ivall/xcl. Originally posted by Decodere on 2026-11-26T06:43:45Z.
Thanks @luckyteagirl and @SzczepanGrela — pushed
2d229b9faddressing both review items:recomp::pso::console_to_dxil_in_statusreturning(Compiled, bool)(from_cache) and wired it intoshaders.rs::precompile(CS, VS, and PS) so in-memory andtranslated/v2hits incrementalready cachedinstead ofcompiled. Bothshaders_e2etests now verify coldcompiled 2, already cached 0, errors 0followed by a warm second--precompilerun reportingcompiled 0, already cached 2, errors 0.time_native_graphics_psoto returnResult<Option<f64>, String>so root-signature andCreateGraphicsPipelineStatefailures fail the test with the exact error / HRESULT once a D3D12 device is created, while genuine no-device environments route throughrunner::skip_test("no D3D12 device").shaders_e2e(10/0/0,0skipped), full release workspace (1437/0/47), and paired 60 s RTX 4060 smoke (1546frames,60 60 60,0removals/crashes).Imported from ivall/xcl. Originally posted by KDenKC on 2026-11-26T08:04:33Z.
Retail title, RTX 5090: the large graphics pipelines now start their driver compile within milliseconds instead of seconds. One 600 s run per side. Our control's precompile was compute-only (see Not tested).
Setup: RTX 5090 32 GB (driver 621.24), Ryzen 7 9800X3D, Windows 11, release,
XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_PSO_TRACE=1 XCL_NETWORK=0.mainb49be18+ this PR ata3312c05+ #2551 (3567b2e).2d229b9fdiffers only in the counters and tests.xcl shaders <pack> --precompile --used-only --pipelines(graphics included) took 42.3 min: 26,503 shaders, 0 errors;PS warmed at assumed sampler_base=0: 12101 (5765 with static samplers); VS with static samplers shifting paired PS base: 173; 2,812 pipelines, 0 refused.mainb49be18, precompiled with--only cs.Large graphics pipelines (≥ 200 KB DXIL) in the world-start stall (no frames shown). Gap = time from the previous driver compile finishing to this one starting, from the
driver compile start/finishtrace lines:The rest of the stall is the NVIDIA driver's own compile, which this PR does not change. Run-wide graphics compiles with no driver blob: 1,328 taking 106.7 s on the control, 1,447 taking 131.1 s here.
Run totals: both reached 600 s with no removal or crash. Frames shown: 2,163 (control) vs 2,117. Two-second windows with no frame after 120 s: 206 vs 215 of 240. These totals are not a fair A/B, for two reasons:
--used-onlycame from a 200 s run that never reached them.Not tested
mainwith its own full--precompile(graphics included) as the control. That is the cleaner A/B for this PR, and we can run it if useful.2d229b9fitself (only its diff againsta3312c05was read).sampler_base > 0pixel shader paths.AI use: Claude Code (Claude Opus 5.5) built and ran both sides. Gemini (Antigravity) extracted the trace numbers. Claude Code recomputed the gap table from the raw logs and wrote this.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T08:29:16Z.
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
Imported from ivall/xcl. Originally posted by Aniseto on 2026-11-26T08:32:17Z.
Ran the shaders end-to-end tests at
2d229b9: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.
Both new fresh-process tests pass here. The timings printed on this adapter were
warm_translate_dxc_ms=3.738 native_pso_ms=12.321(direct VS+PS) andwarm_translate_dxc_ms=3.191 native_pso_ms=21.054(HLSL static-sampler VS+PS). They are single runs, not a benchmark.What this adds: the hardware reports in the thread are on an RTX 4060 (Ada) and WARP, at the earlier head
a3312c0. This is a Blackwell wave32 part at the current head2d229b9, which addressed the review findings.Not tested: a full retail shader archive, a paired 60 s smoke run, the whole workspace suite, AMD and Intel GPUs, native wave64, 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.
Imported from ivall/xcl. Originally posted by KDenKC on 2026-11-26T13:28:53Z.
Correction to 7186156070, with the cleaner control I offered there.
mainb49be18with its own full--precompile --used-only --pipelines(graphics included, 42 min, 0 errors), the same recipe otherwise (200 s warm-up, then 600 s):main, compute-only precompilemain, full precompileSo the large drop in my earlier comment comes mostly from precompiling graphics at all, which
mainalready does. In this measure, this PR takes it from ~23 ms to ~6 ms median (129 to 8 ms worst). I've put a note at the top of the earlier comment.The full-precompile
mainrun used an exe name with a warmer NVIDIA cache. The gap is XCL-side, so that shouldn't move it, but I'm noting it. That run ended with the #2403 removal at 577 s.AI use: Claude Code (Claude Opus 5.5) ran the control, recomputed the gaps from the trace lines and wrote this.
Imported from ivall/xcl. Originally posted by CryingLaughing on 2026-11-26T16:00:25Z.
Hosted
xcl runverification on currentmainafter #2555. The supported vertex shader warmed correctly. An unsupported loose vertex shader also exposed a startup regression.Five launches compared clean
main8b957bec6f82495aec940944c6bf47faa02db590with its unmodified Git three-way merge with PR head2d229b9f76b605edffed09419328dc2245b97e8a(tree7a620e2bf3335ace3a34de65826b4c964985ad8b). RTX 4080 driver 621.01, Core i5-13600K, Windows 11 25H2 build 26200.9974, Rust 1.100.0 x64 MSVC, DXC 1.8.2502.11, debug. Each used the same synthetic guest, isolated caches, andxcl run <fixture> -- --pr2600-vs-onlywithXCL_DIRECT_DXIL=all XCL_ADAPTER=4080 XCL_ASYNC_PSO=0 XCL_PSO_DISK_CACHE=0 XCL_HEAP_WINDOWS=0 XCL_UMA_WINDOWS=4.24acc6835ffb0a75_Vertex_0_4_1.binbefore the guest ran. A fresh integrated process with only that cache entry and no loose shaders created the same PSO, retained the entry byte for byte, and emitted no targeted direct compile dump or fallback.v_cvt_off_f32_i4, and the guest still requested the separate supported VS. Main reported 0 errors, 1 skip, ran the guest to its PSO marker, and exited 0. The integrated build reported 1 error, 0 skips, loggedincomplete translation, missing: ["v_cvt_off_f32_i4"], and exited 2 before guest entry.Could the hosted path preserve the old skip behavior for incomplete translations? Routing that case through the existing per-program handling would keep the successful cache warmup and let launch proceed past an unused unsupported shader.
Imported from ivall/xcl. Originally posted by CryingLaughing on 2026-11-26T16:31:34Z.
I tested a follow-up for the hosted startup failure reported above. When the runtime path refuses a graphics shader during
xcl runpreparation, that stage now falls back to the existing per-program preparation, which handles incomplete translations as skips. Successful cache warming still uses the runtime path. Production patch · Verified review branchThe review branch retains current main
8b957bec6f82495aec940944c6bf47faa02db590and PR head2d229b9f76b605edffed09419328dc2245b97e8aas the integration parents. On RTX 4080 driver 621.01, Windows 11 25H2 build 26200.9974, Core i5-13600K, Rust 1.100.0 x64 MSVC, DXC 1.8.2502.11, debug, all five controls completed as expected. The formerly fatal loose VS now reports 0 errors and 1 skip, and its guest exits 0. The supported VS still warms the exact 2,584-byte cache entry and a fresh synthetic guest reuses it with no direct recompile. Both offline controls keep the original unsupported-shader diagnostic and count, and exit 0.The automatic integration had a stale
dxbc_containertest call after main moved the helper. The review branch changes that call separately. At combined tip7b3a0fc8176b905cd0ce52c51bba877f3332cc29, the two focused cold/warm tests and all tenshaders_e2etests passed with zero capability skips. Test-helper patchImported from ivall/xcl. Originally posted by Decodere on 2026-11-26T17:27:26Z.
Thanks for catching that
#2555interaction and confirming the fallback shape — fixed ind68c74e5(rebased ontoe120925e, cleanly mergeable ontomain8b957bec):CompileOutcome::{Compiled, Incomplete, Failed}andconsole_to_dxil_in_outcomeinpso.rs(sharingINCOMPLETE_TRANSLATION_PREFIXacross both cold translations and.err-cached hits).shaders.rs::precompile,CompileOutcome::Incomplete(_)now falls through to the existing per-programrecomp::translateloop (keepingMode::Vertex/Mode::Pixelarms andgraphics_splitintact) so standalone--precompileand hostedprepare_for_launch(#2555) both skip unsupported shaders with0errors.shaders_e2e.rsfor#1942'scontainerhelper and addedprecompile_skips_incomplete_vs_while_warming_supported_vs(supported VS +v_cvt_off_f32_i4unsupported VS, cold + warm.err-cached + fresh-process zero-DXC cache hit). Also verified in a live 3-way merge against8b957becthat both cold and warm.err-cachedprepare_for_launchruns returnOk(())with0 errors, 1 skip, alongside full release workspace (1445/0/47) and paired 60 s RTX 4060 smokes (e120925evsd68c74e5).Imported from ivall/xcl. Originally posted by Decodere on 2026-11-27T16:00:50Z.
Rebased cleanly onto
main(f9a0cb80/#1871) atfddd2d71678df6001b8b58f43a60e8cf22d94806(preserving#1871'sxcl pso-precompile,--records,--used, andmake_pipelinesbehavior), updated the PR description, and re-verified on RTX 4060 (0new clippy warnings,3xDebug & Releaseshaders::13/0/0+--test shaders_e2e12/0/0, paired 60 sXCL_PREPARE=0smoke1595vs1579frames,0device removals/crashes).AI disclosure: Google Antigravity (Gemini 4 Neon) resolved the
shaders.rsconflict, ran local verification, and updated the PR.Imported from ivall/xcl. Originally posted by throny on 2026-11-27T16:25:08Z.
Merge status (I have been asked to prepare merges of PRs with several independent tests; the bar is: no open critical finding or performance regression, a fresh check of the merge result against today's
main, and green required checks. Each merge is still confirmed by a person.)This one merges cleanly into
main6089122aand both checks are green, but the headfddd2d7was pushed today after the rebase and I find no independent run on it (the eight earlier reports are on older heads, and three findings fixed since then were not re-confirmed by their reporters). One independent test of the current head, ideally by one of the earlier testers, and it is ready for the pre-merge review from my side. It also touchesgpu/recomp/pso.rs: a line in the description on whether translated output or cache keys change would help testers.AI use: Claude Code (Claude Fable 5.2).
Imported from ivall/xcl. Originally posted by Decodere on 2026-11-27T16:36:25Z.
Thanks
@thronyfor the clean merge check on#2613.Added the requested clarification to the PR description under
crates/xcl/src/gpu/recomp/pso.rs(zero code changes pushed; head remainsfddd2d71678df6001b8b58f43a60e8cf22d94806):console_to_dxil_in_statusandconsole_to_dxil_in_outcomewrap the exact sameShaderKeyandtranslated::cachedlookup, andINCOMPLETE_TRANSLATION_PREFIX("incomplete translation, ") is byte-identical to the prior error prefix — existing DXIL/HLSL caches remain valid without re-translation.@luckyteagirl's earlier review note (compiledvs cached hits) was addressed prior to this head ind68c74e5/fddd2d71(from_cache: bool+ warm second-run assertion).Welcoming an independent run on
fddd2d71so this is ready for your pre-merge review.AI disclosure: comment drafted and PR description updated by Google Antigravity (
Decodere) based on the verifiedfddd2d71diff.Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-27T16:39:06Z.
I found one precompile coverage regression on head
fddd2d71.--precompilepromises to visit every program, but the new runtime-cache helper selects only the first program of the first matching graphics FSSM. On success, the loop skips its companion programs; thewarmed_vs/warmed_psguard also skips later FSSMs of that stage. If the first FSSM is empty, the helper fails while a valid later FSSM goes unwarmed.Two synthetic PS fixtures reproduce this without a title: one has two programs plus a later PS FSSM; the other has an empty first PS FSSM and a valid second one. With the two test additions on the untouched head,
cargo test --offline --locked -j 4 -p xcl --test shaders_e2e precompile_keeps_ -- --nocapturefailed 0/2 (the first fixture compiled 1 instead of 3; the second reportedFSSM without a program). The candidate below passed 2/2, and the completeshaders_e2etarget passed 14/14.cargo test --offline --locked -j 4 -p xcl --lib shaders:: -- --test-threads=4passed 13/13.The candidate handles only the runtime-selected first program through
console_to_dxil_in_outcome; it leaves companion programs and later FSSMs on the prior loop. It records the first hardware match before checking its interface or program count, so a later FSSM cannot be mistaken for the runtime's selection. AnIncompleteoutcome counts the selected program as a hosted skip without immediately retranslating it. A selected one-program FSSM returns before allocating the old loop's jobs vector.Full
cargo test --offline --locked -j 4 --workspace --no-fail-fast -- --test-threads=4 --quieton Windows 11 build 26300, RTX 3080 Ti / 621.35, Rust 1.99.1, DXC 1.8.2502.11: candidate 1,465 passed / 4 failed / 47 ignored / 25 GPU skip notices; untouched head with the same two tests 1,463 passed / 6 failed / 47 ignored / 25 skip notices. The four shared failures wereconsole_mesh_caches_hlsl_compute_pass_in_memory_and_on_diskand threee2etest-title cases. The only additional failures on the untouched head were the two new regressions.Not tested: retail precompile, paired smoke, rendered graphics, AMD or Intel. This is an uncommitted candidate for the author to adapt and verify on a clean head. AI use: Codex (GPT-6.2 Sol) wrote and ran the candidate and tests; Codex (GPT-6.2 Astra) reviewed the selection and loop invariants.
Candidate source and regression diff
Imported from ivall/xcl. Originally posted by UncommonDLL on 2026-11-27T16:59:18Z.
@Decodere @throny We ran
precompile_skips_incomplete_vs_while_warming_supported_vsunchanged on Windows atfddd2d71678df6001b8b58f43a60e8cf22d94806, using Rust 1.100.0 and DXC 1.9.2609.5. The cold run compiled one shader. The warm run compiled zero and found one already cached. Both reported zero errors. In a fresh process, the supported vertex shader hit the cache-only path with zero DXC cache-miss compilations at that check. The unsupported shader returnedIncompleteforv_cvt_off_f32_i4.Cargo exited 0 with one test passed and 11 filtered out. This fixture covers the vertex-shader cache path. The companion pixel-shader cases reported above exercise a separate path. OpenAI Codex ran the test with PowerShell and Cargo.
Imported from ivall/xcl. Originally posted by Decodere on 2026-11-27T17:35:12Z.
Great catch, @thehollowedone — thank you for the clean repros and analysis, and thanks @UncommonDLL for confirming the VS cache-only path on Windows!
I pushed follow-up commit
ffa475a38d0356e8a4f17be8f2c014b43b0e5a37(Shaders: keep companion programs and later FSSMs in --precompile) fast-forward ontofddd2d71addressing all three parts of the coverage regression (cc @throny for visibility):pso.rs::console_translation's exact first-FSSM selection (crates/xcl/src/shaders.rs):warmed_vs/warmed_pswithseen_vs/seen_psrecorded on the firsthw == 4|5FSSM beforerecomp::interface, so an empty orinterface == Nonefirst FSSM cannot steer a later valid FSSM intoconsole_to_dxil_in_outcomeand fail withFSSM without a program.f.programs[0]of that first matching VS/PS FSSM throughconsole_to_dxil_in_outcome, countedCompileOutcome::Incompletedirectly onstartup.is_some()without re-translatingprograms[0], short-circuited only whenhandled_first_program && f.programs.len() == 1, and iteratedf.programs.iter().skip(usize::from(handled_first_program))so companion programs (f.programs[1..]) and subsequent FSSMs retain full--precompilecoverage.crates/xcl/tests/shaders_e2e.rs):precompile_keeps_companion_programs_and_pixel_variantsandprecompile_keeps_a_pixel_variant_after_an_empty_first_variant(both checking cold compile + warm cache hit counts and0errors).ffa475a38d0356e8a4f17be8f2c014b43b0e5a37(RTX 4060, Windows 11,rustc 1.100.0, DXC1.9.2609.5):fddd2d71:0 passed; 2 failed(compiled 1instead of3;errors 1 ... FSSM without a program).cargo clippy --tests -p xcl -- -A clippy::approx_constant -A clippy::while_immutable_condition:exit 0,0new warnings in touched files.3xDebug +3xReleaseshaders:::13 passed; 0 failed; 0 ignored.3xDebug +3xRelease--test shaders_e2e:14 passed; 0 failed; 0 ignored; 0 skipped.cargo build --release -p xcl+ quiet 60 sXCL_PREPARE=0RTX 4060 smoke (title: 29640639):1606frames (PresentX 1606),60 60 60,0device removals,0crashes,14019 MBpeak commit (vsf9a0cb801579frames /13996 MB).pso.rsno-DXIL/no-cache-key-change clarification.Ready for re-check whenever you have a moment!
(AI use: Google Antigravity (Gemini 4 Neon) adapted the fix and regression tests credited to @thehollowedone, ran failing-first/clippy/tests/smoke verifications, and drafted this reply.)
Imported from ivall/xcl. Originally posted by UncommonDLL on 2026-11-27T18:20:26Z.
@Decodere We re-checked
ffa475a38d0356e8a4f17be8f2c014b43b0e5a37on Windows with DXC1.9.2609.5. Both unchanged pixel-shader cache tests passed. Cargo exited 0 with two passed, zero failed, zero ignored and zero runtime skips.The companion-program fixture compiled three shaders cold and found all three in cache on the warm run. The empty-first fixture compiled one shader cold and found it in cache on the warm run. Both fixtures reported zero errors on both passes. Their original assertions checked the captured child output. We used your failing-parent control. OpenAI Codex ran the tests through PowerShell and Cargo.
Imported from ivall/xcl. Originally posted by bmjask on 2026-11-29T14:50:20Z.
Current-main audit (2026-11-29): implemented/superseded; please close this PR.
Current
mainnow hasstandalone_graphics_variants, warms the runtime-selected first VS/PS variants, and—more importantly—prepares exact graphics history recipes through the graphics worker/corpus path, including the actual paired fixed-function/static-sampler state this PR could not infer from standalone records. The companion/later-FSSM coverage is also present in the evolved precompile path.Merging this stale conflicted implementation would duplicate older preparation logic. Cache impact of the concept is safe because it warms existing identities rather than changing shader output, but there is no remaining patch to carry.
Review assisted by Codex; exact model name was not exposed in this session.
Imported from ivall/xcl. Originally posted by throny on 2026-12-01T07:51:43Z.
Two contributors checked independently and found that #2928 #2950 solves the same problem in a different way: #1607, group D148. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.
This is a hint from the community triage in #1607, not a maintainer decision.
AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:28:28Z.
Triage (#1607) – head
ffa475aMain commit
03241a5(merged with #2959) is adapted from this PR. Throughstandalone_graphics_variants, it sends the runtime-selected VS/PS (first hardware stage 4/5 FSSM, sampler base 0) throughpso::console_to_dxil_ininxcl shaders --precompile.What main does not take from this PR:
CompileOutcome::Incompleteclassification;If any of these is still wanted, it would be a small new PR on top of main.
The other open PRs in this group (#2928, #2950) cover the same path with other additions.
Recommendation: close (superseded by main commit
03241a5).AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by Decodere on 2026-12-02T07:47:22Z.
Closing as superseded by
maincommit03241a58(#2959, adapted from #2613), which routes runtime-selected standalone VS/PS variants throughpso::console_to_dxil_inviastandalone_graphics_variantsincrates/xcl/src/shaders.rs. Thanks @bmjask, @Foniass, and @UncommonDLL for the reviews and verification. (AI note: verified with Antigravity, Gemini 4 Neon.)Pull request closed