Repository navigation
Shaders: cache refused shaders and DXC failures by capability (#1412) - #1472
KarolKurzyna wants to merge 1 commit into
Conversation
|
Reviewed the diff — this implements #1412's acceptance faithfully, and two choices go beyond the letter of it in the right direction: the master kill switch inside the override list ( One edge worth a documented limitation (or a follow-up line in the digest), because negative entries poison asymmetrically where positive entries merely serve a stale variant: the capability digest folds translator-source-id + toolchain + extra flags, but not the device-derived wave decision — |
|
@pickles976 Thanks for the quick review! One helpful detail already in the diff: in In |
|
Independent Windows/AMD test of Tested
The cold and warm 1.8 runs returned identical error text. The override removed the 1.8 marker, and the next run with the override unset recreated it. Not tested Retail-title smoke runs, startup performance, and cross-process replay of translator refusals. The five-process probe exercised the DXC path. AI use OpenAI Codex (GPT-6 family, exact variant unavailable) wrote and ran the temporary probe and drafted this report. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
…v#1412) Deterministic DXC failures and upstream translator refusals are currently re-run from scratch on every boot, even though `report.json` logs the exact same refusal set across launches. Add capability-keyed negative cache markers across both layers without poisoning caches across recompiler/DXC fixes or debug overrides: - `dxc.rs`: write `<key>.fail` (`XCLFAIL1` + capability digest of version, `XCL_TRANSLATOR_SOURCE_ID`, and DXC toolchain) only on deterministic DXC refusals (`"dxc: ..."`), replay exact error strings via `CacheCounters::cached_failure` (`cached_failures`), and skip DXC and `CACHED_ONLY` deferrals on hit without bumping `compilations`. - `pso.rs`: write `<stem>.fail` (`XCLTRNF1` + `ident`, capability digest covering stage/sampler_base/windows/split, blob len + hash2) in `translated` for deterministic upstream translator and DXC refusals, skipping transient errors and `cached_only` deferrals. - Skip and delete stale/mismatched markers whenever capability-changing or debug env overrides are active (`XCL_SAFE_BARRIER`, `XCL_SPLIT_WAVE64`, `XCL_WAVE64_SPIN`, `XCL_NEGATIVE_CACHE`, `XCL_RECOMP_*`, `XCL_DEBUG_*`). Fixes xcl-dev#1412. Assisted-by: Google Antigravity (Gemini 4 Neon)
a56a7c7 to
e96f516
Compare
|
Rebased onto @DavidM1911 Thank you for verifying on RTX 3060 Ti! Direct DXIL interop on
Re-verified on
|
|
Independent Windows/NVIDIA verification of head Tested
Regression run (warm not required; single 60 s smoke of this head) Not tested
AI use
|
Fixes #1412.
What is in it
dxc: ...) in<key>.failmarkers alongside<key>.dxil(crates/xcl/src/gpu/recomp/dxc.rs), storing the formatted failure text and a capability digest (XCLFAIL1, package version,XCL_TRANSLATOR_SOURCE_ID, andtoolchain_identity()).CacheCounters::cached_failure(CacheStats::cached_failures) without incrementingcompilationsorcompilation_failuresor triggeringCACHED_ONLYdeferrals.Compile: ...,DXC: ..., missing DLL, invalid container) are never negative-cached.<stem>.fail(XCLTRNF1+ident, capability digest overident/stage/sampler_base/windows/split, blob size andhash2) insidetranslated(crates/xcl/src/gpu/recomp/pso.rs), short-circuiting before re-lowering on subsequent runs while skippingcached_onlydeferrals (has_missed()) and transient DXC errors..failfile on disk whenever capability-changing or debug env overrides are active (XCL_SAFE_BARRIER,XCL_SPLIT_WAVE64,XCL_WAVE64_SPIN,XCL_NEGATIVE_CACHE,XCL_RECOMP_*,XCL_DEBUG_*), and deletes stale or mismatched markers when a capability digest drifts or a shader later succeeds.main(9039900, PR gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 Direct DXIL + PR Direct DXIL: memory windows through the descriptor heap (XCL_HEAP_WINDOWS) #1693):translated::identity()stays wired throughidentity_with(..., Backend::current(), crate::gpu::dxil::kernel::TRANSLATOR_VERSION), isolating Direct DXIL refusal markers from HLSL ones and invalidating them onTRANSLATOR_VERSIONbumps.Tested
26300.9974), Intel Core i5-14600K, NVIDIA GeForce RTX 3070 Ti (8192 MiB, driver621.24/32.0.16.2124, SM 6.6, wave32),rustc 1.100.0(stable-x86_64-pc-windows-msvc),dxcompiler 1.9.2602.17 (21d28f72)/dxil 1.9.2602.17(Windows SDK10.0.26100.0)..\scripts\test.ps1) on commite96f5163ee1e4d6f34bb84bc255c002e334a3bb8: 864 passed, 0 failed, 42 ignored across 20 workspace/integration test runs (unittests src\lib.rs:815 passed, 0 failed, 22 ignored;GPU tests skipped on this adapter: 2 (no wave64), 1 (no heap windows); zero warnings in modified files), including:gpu::recomp::dxc::cache_tests::dxc_deterministic_failures_are_cached_and_replayed(passed; checks zero DXC calls, flatcompilations/compilation_failures,cached_failures == 1, exactcompilation_errorsstring, andcached_onlynon-deferral)gpu::recomp::dxc::cache_tests::dxc_negative_marker_invalidates_on_capability_change_and_env_override(passed)gpu::recomp::dxc::cache_tests::dxc_transient_failures_are_not_negative_cached(passed)gpu::recomp::pso::shader_cache_tests::translated_refusals_are_cached_and_invalidated_by_capability_digest(passed; checks zero re-lowering on hit, Direct DXILBackend/TRANSLATOR_VERSIONseparation, and single-entry invalidation while leaving unrelated markers intact)gpu::recomp::pso::shader_cache_tests::translated_negative_markers_skip_and_delete_under_env_overrides(passed)gpu::recomp::pso::shader_cache_tests::translated_deferred_and_transient_errors_are_not_negative_cached(passed)gpu::recomp::pso::shader_cache_tests::direct_dxil_identity_never_collides_with_hlsl&direct_and_hlsl_disk_entries_are_separate(passed)cargo build --release -p xcl) succeeded cleanly after commite96f5163ee1e4d6f34bb84bc255c002e334a3bb8with zero warnings in modified files.Regression run
Baseline (
main, warm DXIL/driver cache):This branch (
e96f5163ee1e4d6f34bb84bc255c002e334a3bb8, warm DXIL/driver cache):Not tested
gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_maskandgpu::recomp::tests::gpu_wave32_program_in_wave64_hardwareskipped on this adapter:no wave64), heap-window fallback path (heap_window_out_of_memory_falls_back_to_the_switch_formskipped:no heap windows), andXCL_SAMPLE_*sample-asset tests (not set locally).0failures logged), so two-run refusal replay and capability invalidation are verified by the unit tests above rather than live retail story-loading refusals.AI use
Implemented, tested, and drafted with Google Antigravity (Gemini 4 Neon); all unit tests, workspace tests, release build, and
xcl-smokeruns were executed locally on the hardware listed above.