Repository navigation
Conversation
In `crates/xcl/src/gpu/recomp/pso.rs`, `compile_console_shader` (CS, VS,
PS) and `compile_console_mesh` (MS) all check `dxc::defer()` before
running cold Direct DXIL translation during `dxc::cached_only()` async
PSO probes, but `console_geometry()` omitted that guard. Under
`XCL_DIRECT_DXIL=1` + `dxc::cached_only()`, it ran
`kernel::translate_geometry()` synchronously on the render thread — and
when the pass-through mesh shader was already warm in DXC's cache,
`dxc::cached_only()` even returned `(Ok(TwoPass), missed = false)`
instead of deferring.
Factor `console_geometry_with(..., direct: bool)` so tests can exercise
both paths without mutating the `XCL_DIRECT_DXIL` environment variable,
and add `if dxc::defer() { return Err("DXIL not compiled yet".into()); }`
at the top of the direct DXIL branch before `kernel::translate_geometry`,
leaving the HLSL path (`direct = false`) unchanged.
Add unit tests verifying that direct `console_geometry_with` defers with
`missed == true` inside `dxc::cached_only()` even when the pass-through
mesh shader is warm, still succeeds outside `dxc::cached_only()`, and
that the HLSL path still hits cleanly inside `dxc::cached_only()`.
Part of xcl-dev#1269 (related to xcl-dev#1896)
Assisted-by: Google Antigravity (Gemini 4 Neon)
|
Both CPU/DXC geometry cache tests passed on PR #2103 at Tested on STOR-WINLAB, Windows 11 Enterprise Evaluation 25H2 x64 build 26200.9974, Ryzen 7 3800X, Rust/Cargo 1.100.0 cargo test --locked -p xcl --lib gpu::recomp::pso::geometry_defer_tests::direct_console_geometry_defers_during_cached_only_even_with_warm_passthrough -- --exact --nocapture --test-threads=1
cargo test --locked -p xcl --lib gpu::recomp::pso::geometry_defer_tests::hlsl_console_geometry_keeps_warm_cached_only_hit -- --exact --nocapture --test-threads=1
Each command exited Not tested — GPU execution, live async PSO probes, retail titles, or the rest of the workspace suite. AI use — T3 Code / Codex ( |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Independent Windows run on 7743842. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (621.35), Rust 1.99.1 MSVC, DXC 1.8.2502.11. The clean A separate synthetic fixture exercised XCL's hooked This covers PSO creation and worker routing. No draw or retail smoke was run. AI use: Codex (GPT-6, exact variant unspecified) prepared the scratch fixture, ran the tests and drafted this report. |
|
AMD RX 7800 XT test report Tested locally by merging PR head Hardware and tools: AMD Radeon RX 7800 XT, driver 32.0.31035.1003; Windows 10 Pro; Rust 1.100.0 / Cargo 1.100.0; DXC 1.8.2502.11 (DXIL 1.8.2502.11). Debug test build.
Not tested
AI use |
|
Independent AMD RDNA4 / Linux (RADV, native wave64) test report for head Hardware & environment
Unit / GPU tests (
Combined retail sanity run (
Not tested
AI use
|
bmjask
left a comment
There was a problem hiding this comment.
No concrete correctness defect found. The cached_only defer guard matches the existing direct CS/MS behavior and the focused tests cover the intended miss/hit paths. Nonblocking coverage gap: the direct fixture does not exercise a translate_geometry unsupported error followed by the existing HLSL fallback while cached_only. That is not a blocker, but would make the fallback contract clearer.
|
I compared this guard and the overlapping guard in #2918 using the same two-PS synthetic ES+GS fixture. Clean Windows builds of
Setting OpenAI Codex assisted with verification. |
|
merge-check claim |
|
merge-check |
|
merge-check claim |
|
A nearby producer/consumer check is AnyXboxX #575: an exact used key survives a warm build while unused variants stay cold. For the cache-only DXIL probe here, a synthetic pair with one published geometry key and one missing one can show that the miss does not build on the caller. The published key must still hit. This checks probe policy, independently of the existing runtime measurements. |
|
merge-check |
What is in it
Adds the missing
dxc::defer()guard to the direct DXIL branch ofconsole_geometry()incrates/xcl/src/gpu/recomp/pso.rs, matchingcompile_console_shader(CS, VS, PS) andcompile_console_mesh(MS):real.rswrapstranslated_graphics_pso(includingtranslated_gs_pso->pso::console_geometry) indxc::cached_only()during async PSO cache probes. Whilecompile_console_shader(CS/VS/PS) andcompile_console_mesh(MS) all checkif dxc::defer() { return Err("DXIL not compiled yet".into()); }before cold direct DXIL translation,console_geometryomitted that check. UnderXCL_DIRECT_DXIL=1+dxc::cached_only(), it rankernel::translate_geometry()synchronously on the render thread — and whenmesh_passthrough_for()was already warm in DXC's cache,dxc::cached_only()returned(Ok(TwoPass), missed = false)instead of deferring.crates/xcl/src/gpu/recomp/pso.rs):console_geometry_with(vs, gs, ps, split_wave64, direct: bool)so unit tests can exercise both the direct DXIL and HLSL paths without mutatingXCL_DIRECT_DXIL, keepingconsole_geometrycalling it withcrate::gpu::dxil::kernel::enabled().if dxc::defer() { return Err("DXIL not compiled yet".into()); }at the top ofif direct { ... }right beforekernel::translate_geometry, leaving the HLSL path (direct = false) unchanged.geometry_defer_testsincrates/xcl/src/gpu/recomp/pso.rs):direct_console_geometry_defers_during_cached_only_even_with_warm_passthrough: constructs minimal synthetic console VS(ES)+GS containers, runsconsole_geometry_with(..., true)once outsidedxc::cached_only(confirming direct DXIL succeeds and warmingmesh_passthrough_forin DXC's cache), then verifiesdxc::cached_only(|| console_geometry_with(..., true))returnsErr("DXIL not compiled yet")withmissed == true.hlsl_console_geometry_keeps_warm_cached_only_hit: verifies the HLSL path (direct = false) still hits cleanly insidedxc::cached_only(Ok,missed == false) once warm.Part of #1269 (related to #1896)
Tested
rustc 1.100.0, DXC1.9.2609.5, release build.dxc::defer()inconsole_geometry_with):cargo test --release -j 4 -p xcl --lib geometry_defer_tests -- --nocapture --test-threads=1: 1 passed, 1 failed (direct_console_geometry_defers_during_cached_only_even_with_warm_passthroughpanicked:direct console_geometry must defer inside dxc::cached_only (missed=false)).cargo test --release -j 4 -p xcl --lib geometry_defer_tests -- --nocapture --test-threads=1: 2 passed, 0 failed, 0 ignored, 0 skipped.XCL_ADAPTER="Microsoft Basic Render Driver" cargo test --release -j 4 -p xcl --lib geometry_defer_tests -- --nocapture --test-threads=1: 2 passed, 0 failed, 0 ignored, 0 skipped.cargo test --release -j 4 -p xcl --lib gpu::recomp::pso:: -- --test-threads=1: 18 passed, 0 failed, 1 ignored (repeated_pso_shader_compilebenchmark is#[ignore]).cargo build --release --workspace: exit0.cargo test --release --workspace -- --test-threads=4: 1156 passed, 0 failed, 46 ignored across 21 test binaries, with 25SKIPPEDstderr lines:no wave64(32-lane RTX 4060 hardware)per-lane form: refused(#1426unsupported f16/f32 semantics in per-lane wave32 tests)cannot disable the driver cache (Windows Developer Mode is required)(pso_measurement_compiles_an_exact_synthetic_record)no heap windows(heap_window_out_of_memory_falls_back_to_the_switch_form)Regression run
Paired 60s
scripts/smoke.ps1runs on the same retail title (title: 29640639) and GPU (NVIDIA GeForce RTX 4060):Base (
origin/main,cbc296ab):This PR (
7743842a):No regressions (
1610vs1539frames,14511 MBvs14520 MBpeak commit,60 60 60presents per 2 s,0device removals,0crashes).Not tested
XCL_DIRECT_DXIL=1exercising legacy GS pipelines throughreal.rsasync PSO probes (the pairedscripts/smoke.ps1runs used the default translator configuration; direct GS deferral is covered bygeometry_defer_tests).dxc::defer()beforetranslate_geometryon the CPU and does not alter generated DXIL.AI use
dxc::defer()guard inpso::console_geometry, factoredconsole_geometry_with, authored the fix and unit tests inpso.rs, and ran all build, unit, WARP, workspace, and paired smoke checks.