Repository navigation
Conversation
|
Update for head Update for head Update for head 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
Not tested: the D3D12 debug-layer tests (no |
|
Tested — AMD Radeon RX 6800M
The child tests assert warm 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. |
|
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
Thanks! — Devin |
luckyteagirl
left a comment
There was a problem hiding this comment.
The new VS/PS path increments compiled after every successful console_to_dxil_in, including a hit from its in-memory or translated disk cache. That function returns only Compiled, so a second --precompile run can report compiled 2, already cached 0 for 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 separate warmed counter) and add a warm second-run assertion for the summary? Source review at a3312c055cf3a31f77bcb7b1e278b7479d29dc41; I did not run the precompile command. AI-assisted review with Codex.
|
Updated RX 9070 / Wine verification for head Tested RX 9070 (RADV GFX1201), Mesa Built each source copy with
All counts have 0 ignored. The unit failure on all three sources was Both graphics fresh-process cases passed their cold The additional preparation check used one supported VS and one
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: Not tested Full workspace suite, guest entry or hosted 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. |
a3312c0 to
2d229b9
Compare
|
Thanks @luckyteagirl and @SzczepanGrela — pushed
|
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,
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
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:
Not tested
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. |
|
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
Thanks! — Devin |
|
Ran the shaders end-to-end tests at 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 What this adds: the hardware reports in the thread are on an RTX 4060 (Ada) and WARP, at the earlier head 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. |
Route standalone VS and PS variants through the exact runtime console_to_dxil_in path so precompile warms translated/v2 serialization and the selected HLSL/direct-DXIL backend instead of only manually warming HLSL output. Selection matches the runtime's first hardware VS/PS FSSM and exact stage, split, windows, and base-zero keys. Paired PS variants with nonzero VS sampler bases remain cold because the shader archive has no pipeline pairing data. GNU Windows-target cargo check passed. Fresh-cache Windows probes, GPU execution, and retail smoke were not available on this host. Adapted from PR xcl-dev#2613. Assisted-by: Codex (GPT-5.6-sol)
|
Correction to 7186156070, with the cleaner control I offered there.
So the large drop in my earlier comment comes mostly from precompiling graphics at all, which The full-precompile AI use: Claude Code (Claude Opus 5.5) ran the control, recomputed the gaps from the trace lines and wrote this. |
Route standalone VS and PS variants through the exact runtime console_to_dxil_in path so precompile warms translated/v2 serialization and the selected HLSL/direct-DXIL backend instead of only manually warming HLSL output. Selection matches the runtime's first hardware VS/PS FSSM and exact stage, split, windows, and base-zero keys. Paired PS variants with nonzero VS sampler bases remain cold because the shader archive has no pipeline pairing data. GNU Windows-target cargo check passed. Fresh-cache Windows probes, GPU execution, and retail smoke were not available on this host. Adapted from PR xcl-dev#2613. Assisted-by: Codex (GPT-5.6-sol)
|
Hosted Five launches compared clean
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. |
|
I tested a follow-up for the hosted startup failure reported above. When the runtime path refuses a graphics shader during The review branch retains current main The automatic integration had a stale |
2d229b9 to
d68c74e
Compare
|
Thanks for catching that
|
Route standalone VS and PS variants through the exact runtime console_to_dxil_in path so precompile warms translated/v2 serialization and the selected HLSL/direct-DXIL backend instead of only manually warming HLSL output. Selection matches the runtime's first hardware VS/PS FSSM and exact stage, split, windows, and base-zero keys. Paired PS variants with nonzero VS sampler bases remain cold because the shader archive has no pipeline pairing data. GNU Windows-target cargo check passed. Fresh-cache Windows probes, GPU execution, and retail smoke were not available on this host. Adapted from PR xcl-dev#2613. Assisted-by: Codex (GPT-5.6-sol)
Route standalone VS and PS variants through the exact runtime console_to_dxil_in path so precompile warms translated/v2 serialization and the selected HLSL/direct-DXIL backend instead of only manually warming HLSL output. Selection matches the runtime's first hardware VS/PS FSSM and exact stage, split, windows, and base-zero keys. Paired PS variants with nonzero VS sampler bases remain cold because the shader archive has no pipeline pairing data. GNU Windows-target cargo check passed. Fresh-cache Windows probes, GPU execution, and retail smoke were not available on this host. Adapted from PR xcl-dev#2613. Assisted-by: Codex (GPT-5.6-sol) Assisted-by: Codex (GPT-5.6-sol)
Route console VS (hw == 4) and PS (hw == 5) FSSM variants in `xcl shaders --precompile` through `recomp::pso::console_to_dxil_in_outcome` instead of only the manual HLSL translate + compile_cached loop: - Warms the `translated/v2` cache used at runtime for both direct graphics (`XCL_DIRECT_DXIL=all`) and HLSL graphics (`XCL_DIRECT_DXIL=0`), warming at most one runtime VS and one runtime PS variant per container while keeping ES/GS skipped counting and Mode::Mesh handling unchanged. - Adds `recomp::pso::console_to_dxil_in_status` returning `(Compiled, bool)` and typed `recomp::pso::CompileOutcome` / `console_to_dxil_in_outcome` (sharing `INCOMPLETE_TRANSLATION_PREFIX` across both cold translations and `.err`-cached lookups) so `--precompile` increments `already cached` on in-memory or `translated/v2` disk cache hits and `compiled` only when translation or compilation actually runs. On `CompileOutcome::Incomplete`, falls through to the existing per-program `recomp::translate` loop (keeping `Mode::Vertex` / `Mode::Pixel` arms intact) so both standalone `--precompile` and hosted `prepare_for_launch` (xcl-dev#2555) preserve exact skip semantics without failing startup on unsupported shaders. - Reports explicit standalone PS `sampler_base=0` coverage alongside counts of PS and VS records carrying static samplers (which shift paired PS bases at pipeline creation). - Updates `crates/xcl/tests/shaders_e2e.rs` for `xcl-dev#1942`'s shared `container` helper and adds fresh-process end-to-end tests covering direct VS/PS warming, HLSL static-sampler `sampler_base=0` hit vs `sampler_base=1` miss, and incomplete VS (`v_cvt_off_f32_i4`) skip + supported VS warming across cold and warm `.err`-cached runs. Part of xcl-dev#2600 Part of xcl-dev#2508 Part of xcl-dev#1833 Assisted-by: Google Antigravity (Gemini 4 Neon)
d68c74e to
fddd2d7
Compare
|
Rebased cleanly onto AI disclosure: Google Antigravity (Gemini 4 Neon) resolved the |
|
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 This one merges cleanly into AI use: Claude Code (Claude Fable 5.2). |
|
Thanks Added the requested clarification to the PR description under
Welcoming an independent run on AI disclosure: comment drafted and PR description updated by Google Antigravity ( |
|
I found one precompile coverage regression on head 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, The candidate handles only the runtime-selected first program through Full 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 diffdiff --git a/crates/xcl/src/shaders.rs b/crates/xcl/src/shaders.rs
index c56e5300..1627d9a4 100644
--- a/crates/xcl/src/shaders.rs
+++ b/crates/xcl/src/shaders.rs
@@ -1915,50 +1915,53 @@ fn precompile(input: &Input, limit: usize, windows: u32, split: Option<bool>, on
record_done();
continue;
}
- let (mut warmed_vs, mut warmed_ps) = (false, false);
+ let (mut seen_vs, mut seen_ps) = (false, false);
for f in &sh.fssm {
+ let first_hw_stage = match f.stages.first().map(|s| s.hw) {
+ Some(4) if !seen_vs => { seen_vs = true; Some(recomp::pso::Stage::Vertex) }
+ Some(5) if !seen_ps => { seen_ps = true; Some(recomp::pso::Stage::Pixel) }
+ _ => None,
+ };
let Some(mode) = recomp::interface(&blob, &sh, f) else { continue };
- let runtime_stage = match (&mode, f.stages.first().map(|s| s.hw)) {
- (recomp::Mode::Vertex(_), Some(4)) => Some((recomp::pso::Stage::Vertex, &mut warmed_vs)),
- (recomp::Mode::Pixel(_), Some(5)) => Some((recomp::pso::Stage::Pixel, &mut warmed_ps)),
+ let mut handled_first_program = false;
+ let runtime_stage = match (&mode, first_hw_stage) {
+ (recomp::Mode::Vertex(_), Some(recomp::pso::Stage::Vertex)) => Some(recomp::pso::Stage::Vertex),
+ (recomp::Mode::Pixel(_), Some(recomp::pso::Stage::Pixel)) => Some(recomp::pso::Stage::Pixel),
_ => None,
};
- if let Some((stage, warmed)) = runtime_stage {
- if *warmed || f.programs.is_empty() {
- continue;
- }
- *warmed = true;
- match recomp::pso::console_to_dxil_in_outcome(&blob, stage, 0, graphics_split, windows) {
- recomp::pso::CompileOutcome::Compiled { compiled: c, from_cache } => {
- if stage == recomp::pso::Stage::Pixel {
- ps_base0.fetch_add(1, Ordering::Relaxed);
- if !c.samplers.is_empty() {
- ps_static_samplers.fetch_add(1, Ordering::Relaxed);
+ if let Some(stage) = runtime_stage {
+ if !f.programs.is_empty() {
+ handled_first_program = true;
+ match recomp::pso::console_to_dxil_in_outcome(&blob, stage, 0, graphics_split, windows) {
+ recomp::pso::CompileOutcome::Compiled { compiled: c, from_cache } => {
+ if stage == recomp::pso::Stage::Pixel {
+ ps_base0.fetch_add(1, Ordering::Relaxed);
+ if !c.samplers.is_empty() {
+ ps_static_samplers.fetch_add(1, Ordering::Relaxed);
+ }
+ } else if !c.samplers.is_empty() {
+ vs_static_samplers.fetch_add(1, Ordering::Relaxed);
+ }
+ if from_cache {
+ cached.fetch_add(1, Ordering::Relaxed);
+ } else {
+ compiled.fetch_add(1, Ordering::Relaxed);
}
- } else if !c.samplers.is_empty() {
- vs_static_samplers.fetch_add(1, Ordering::Relaxed);
}
- if from_cache {
- cached.fetch_add(1, Ordering::Relaxed);
- } else {
- compiled.fetch_add(1, Ordering::Relaxed);
+ recomp::pso::CompileOutcome::Incomplete(_) => {
+ if startup.is_some() { skipped.fetch_add(1, Ordering::Relaxed); }
}
- continue;
- }
- // Incomplete translation (`!t.complete()`): fall through to the existing
- // per-program loop below so standalone `--precompile` and hosted
- // `prepare_for_launch` keep their exact skip behavior without errors.
- recomp::pso::CompileOutcome::Incomplete(_) => {}
- recomp::pso::CompileOutcome::Failed(e) => {
- let mut g = errors.lock().unwrap();
- if g.len() < 10 {
- g.push(format!("{name}: {}", e.lines().find(|l| l.contains("error")).unwrap_or(e.lines().next().unwrap_or(""))));
+ recomp::pso::CompileOutcome::Failed(e) => {
+ let mut g = errors.lock().unwrap();
+ if g.len() < 10 {
+ g.push(format!("{name}: {}", e.lines().find(|l| l.contains("error")).unwrap_or(e.lines().next().unwrap_or(""))));
+ }
+ failed.fetch_add(1, Ordering::Relaxed);
}
- failed.fetch_add(1, Ordering::Relaxed);
- continue;
}
}
}
+ if handled_first_program && f.programs.len() == 1 { continue; }
let jobs: Vec<(&str, Option<String>)> = match &mode {
recomp::Mode::Vertex(_) => vec![("vs_6_6", None)],
recomp::Mode::Pixel(_) => vec![("ps_6_6", None)],
@@ -1969,7 +1972,7 @@ fn precompile(input: &Input, limit: usize, windows: u32, split: Option<bool>, on
continue;
}
};
- for p in &f.programs {
+ for p in f.programs.iter().skip(usize::from(handled_first_program)) {
let code = &f.data[p.offset..p.offset + p.len];
// as `pso` translates: with the title's memory windows (`console_translation`,
// `translate_mesh`)
diff --git a/crates/xcl/tests/shaders_e2e.rs b/crates/xcl/tests/shaders_e2e.rs
index 7003b95d..80c3d602 100644
--- a/crates/xcl/tests/shaders_e2e.rs
+++ b/crates/xcl/tests/shaders_e2e.rs
@@ -535,6 +535,65 @@ fn precompile_warms_hlsl_static_samplers_and_reports_base_shift() {
assert!(c_out.contains("fresh_child_timing: mode=hlsl"), "{c_out}");
}
+#[test]
+fn precompile_keeps_companion_programs_and_pixel_variants() {
+ if xcl::gpu::recomp::dxc::location().is_err() {
+ xcl::gpu::recomp::runner::skip_test("no DXC");
+ return;
+ }
+ use xcl::gpu::dxil::container::{signature_part, SigPartElement};
+ let (dir, cache) = (TempDir::new("two-program-ps"), TempDir::new("two-program-ps-cache"));
+ let ps_osg = signature_part(&[SigPartElement { stream: 0, name: "SV_Target".into(), index: 0, system_value: 64, comp_type: 3, register: 0, mask: 0xF, rw_mask: 0, min_precision: 0 }], &[]);
+ let mut code = static_sampler_code(0xF800_180F);
+ let mut second = static_sampler_code(0xF800_180F);
+ second[36..40].copy_from_slice(&0x0D0C_0B0Bu32.to_le_bytes());
+ code.extend_from_slice(&second);
+ let mut third = static_sampler_code(0xF800_180F);
+ third[36..40].copy_from_slice(&0x0D0C_0B0Cu32.to_le_bytes());
+ let blob = xbox_shader_with_osg(0, &[fssm(&code, &[(5, 1)]), fssm(&third, &[(5, 1)])], &ps_osg);
+ assert_eq!(xcl::gpu::xbox::parse(&blob).unwrap().fssm.iter().map(|f| f.programs.len()).collect::<Vec<_>>(), vec![2, 1]);
+ std::fs::write(dir.path().join("ps.bin"), blob).unwrap();
+ let run = || Command::new(env!("CARGO_BIN_EXE_xcl"))
+ .args(["shaders", dir.path().to_str().unwrap(), "--precompile", "--windows", "1", "--split", "0"])
+ .env("XCL_DIRECT_DXIL", "0")
+ .env("XCL_DXIL_CACHE", cache.path())
+ .env_remove("XCL_TRANSLATED_CACHE")
+ .output()
+ .expect("spawn xcl shaders --precompile");
+ let cold = run();
+ let text = String::from_utf8_lossy(&cold.stdout);
+ assert!(cold.status.success(), "{cold:?}");
+ assert!(text.contains("compiled 3, already cached 0, errors 0"), "{text}");
+ let warm = run();
+ let text = String::from_utf8_lossy(&warm.stdout);
+ assert!(warm.status.success(), "{warm:?}");
+ assert!(text.contains("compiled 0, already cached 3, errors 0"), "{text}");
+}
+
+#[test]
+fn precompile_keeps_a_pixel_variant_after_an_empty_first_variant() {
+ use xcl::gpu::dxil::container::{signature_part, SigPartElement};
+ if xcl::gpu::recomp::dxc::location().is_err() {
+ xcl::gpu::recomp::runner::skip_test("no DXC");
+ return;
+ }
+ let (dir, cache) = (TempDir::new("empty-first-ps"), TempDir::new("empty-first-ps-cache"));
+ let ps_osg = signature_part(&[SigPartElement { stream: 0, name: "SV_Target".into(), index: 0, system_value: 64, comp_type: 3, register: 0, mask: 0xF, rw_mask: 0, min_precision: 0 }], &[]);
+ let blob = xbox_shader_with_osg(0, &[fssm(&[], &[(5, 1)]), fssm(&static_sampler_code(0xF800_180F), &[(5, 1)])], &ps_osg);
+ assert_eq!(xcl::gpu::xbox::parse(&blob).unwrap().fssm.iter().map(|f| f.programs.len()).collect::<Vec<_>>(), vec![0, 1]);
+ std::fs::write(dir.path().join("ps.bin"), blob).unwrap();
+ let out = Command::new(env!("CARGO_BIN_EXE_xcl"))
+ .args(["shaders", dir.path().to_str().unwrap(), "--precompile", "--windows", "1", "--split", "0"])
+ .env("XCL_DIRECT_DXIL", "0")
+ .env("XCL_DXIL_CACHE", cache.path())
+ .env_remove("XCL_TRANSLATED_CACHE")
+ .output()
+ .expect("spawn xcl shaders --precompile");
+ let text = String::from_utf8_lossy(&out.stdout);
+ assert!(out.status.success(), "{out:?}");
+ assert!(text.contains("compiled 1, already cached 0, errors 0"), "{text}");
+}
+
#[test]
fn precompile_skips_incomplete_vs_while_warming_supported_vs() {
use xcl::gpu::recomp::{dxc, pso}; |
|
@Decodere @throny We ran 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. |
Fix the --precompile coverage regression caught by @thehollowedone on fddd2d7 (xcl-dev#2613#issuecomment-7223511423): - In `crates/xcl/src/shaders.rs` (`precompile`), record the first VS (`hw == 4`) and PS (`hw == 5`) FSSM match (`seen_vs`/`seen_ps`) before `recomp::interface` to match `pso.rs::console_translation`, so an empty or `interface == None` first FSSM cannot steer a later valid FSSM into `console_to_dxil_in_outcome` and fail with `FSSM without a program`. - Route only `f.programs[0]` of that first matching FSSM through `console_to_dxil_in_outcome`, count `Incomplete` skips directly on `startup.is_some()` without re-translating `programs[0]`, short-circuit only when `handled_first_program && f.programs.len() == 1`, and iterate `f.programs.iter().skip(usize::from(handled_first_program))` so companion programs and subsequent FSSMs retain full --precompile coverage. - Add `precompile_keeps_companion_programs_and_pixel_variants` and `precompile_keeps_a_pixel_variant_after_an_empty_first_variant` (cold compile + warm cache hits, 0 errors) in `crates/xcl/tests/shaders_e2e.rs`. Part of xcl-dev#2600 Part of xcl-dev#2508 Part of xcl-dev#1833 Assisted-by: Google Antigravity (Gemini 4 Neon)
|
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
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.) |
|
@Decodere We re-checked 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. |
Route standalone VS and PS variants through the exact runtime console_to_dxil_in path so precompile warms translated/v2 serialization and the selected HLSL/direct-DXIL backend instead of only manually warming HLSL output. Selection matches the runtime's first hardware VS/PS FSSM and exact stage, split, windows, and base-zero keys. Paired PS variants with nonzero VS sampler bases remain cold because the shader archive has no pipeline pairing data. GNU Windows-target cargo check passed. Fresh-cache Windows probes, GPU execution, and retail smoke were not available on this host. Adapted from PR #2613. Assisted-by: Codex (GPT-5.6-sol) Assisted-by: Codex (GPT-5.6-sol)
|
Current-main audit (2026-11-29): implemented/superseded; please close this PR. Current 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. |
|
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. |
|
Main commit 03241a5 (merged with #2959) is adapted from this PR. Through
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
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 PSO: xcl pso-precompile builds a title's compute pipelines before its run #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(xcl run: prepare shaders in the game window before title execution #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.