Repository navigation
D3D12.X: retry driver-rejected compute PSOs without DXC GVN (#756) - #1398
KarolKurzyna wants to merge 3 commits into
Conversation
|
Review from the DXC-memory lane: the design is right — default GVN path untouched, one retry with |
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
732d3a5 to
2b73d16
Compare
Addresses review feedback from @pickles976 on xcl-dev#1398: - Return both DXIL disk-cache keys (default GVN build -> `-opt-disable gvn` build) via `WithoutGvn` and log them whenever a compute PSO is retried or refused. - Capture the first non-empty line of any D3D12 debug-layer error emitted on the calling thread (or fall back to Windows' formatted HRESULT) and include it in `translated_compute_pso` and `Pipelines::make` retry/failure logs. Assisted-by: Google Antigravity (Gemini 4 Neon)
|
@pickles976 Thanks for the review — addressed both asks in
Re-verified on @futurepro62 Thank you for running and posting the RTX 5070 Ti verification report as well! |
|
Test report for Tested
Two points from the review, both checked here
Not tested
AI use
|
|
Verified head
Clean build and full test suite pass on RTX 5080. |
…in-place vtables Integrates 16 upstream PRs (ivall#1380, ivall#1383, ivall#1384, ivall#1395, ivall#1398, ivall#1400, ivall#1404, ivall#1405, ivall#1419, ivall#1420, ivall#1421, ivall#1423, ivall#1424, ivall#1427, ivall#1428, ivall#1429) on top of the Linux/Proton fork, plus three Proton/vkd3d-proton fixes caught during verification: - Recompiler (ivall#1428): flatten IO_GROUP_LIMIT early-return in compute shaders so vkd3d-proton v3.1 dxil-spirv accepts the emitted CFG. - D3D12.X (ivall#1395 + ivall#867): skip UnadoptGuard on in-place-patched vtables and restore native vtables in runner::submit_list when a prior test adopted the singleton ID3D12Device. - Tests: match Wine centered default in window_position_modes. Verified under GE-Proton11-14 (RX 9060 XT / RADV): - gpu_sparse_vram_descriptors_buffers_and_xmem + gpu_valu_float_and_int + window_position_modes: 3 passed, 0 failed - Broad sweep (present, real, sparse, clamp, dstorage, gpu_valu, gpu_typed_buffer): 82 passed, 0 failed, 1 ignored, 0 skipped - 2.5 min retail title run (XCL_MEM_LIMIT=12G): 3,000+ frames at 30.0 fps, 6.0-6.1 GB flat committed RAM, 6.4 GB local VRAM, 0 DS failures.
Addresses two review points from @erickbobd on xcl-dev#1398: - Guard `-opt-disable gvn` retries on `first_elapsed <= 5 s` (`NO_GVN_RETRY_MAX_REFUSAL`) in both `translated_compute_pso` and `Pipelines::make`, resetting `started` around uncached fallback driver compiles so slow multi-minute driver OOMs on huge programs do not pay for a second, larger no-GVN compile. - Strengthen `dxil_cache_with_extra_flags_round_trip` with a GVN-sensitive HLSL compute shader and `assert_ne!(default_dxil, nogvn_dxil)`, plus `runner::skip_test("no DXC")` when DXC is absent. Assisted-by: Google Antigravity (Gemini 4 Neon)
|
@erickbobd Thank you for running the end-to-end verification on
Re-verified on RTX 3070 Ti ( @mastrr9 Thanks as well for verifying |
|
Independent Windows 11 + NVIDIA GeForce RTX 3060 Ti (8 GB, wave32) test report on latest head Tested
Regression run PR head ( Not tested: debug build, AI use: Antigravity ( |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Update: re-tested on the rebased head a0f2cc6 (on
Test report on AMD (RDNA2, Windows driver) for 58bfd73, this PR's head, unmodified. As far as I can see in the thread, it is the first AMD run of it. Short version: the suite passes apart from three known RDNA2 failures that are not from this PR. The two programs the AMD driver refused in my earlier whole-pack Tested
Not tested
AI use
|
58bfd73 to
a0f2cc6
Compare
Addresses review feedback from @pickles976 on xcl-dev#1398: - Return both DXIL disk-cache keys (default GVN build -> `-opt-disable gvn` build) via `WithoutGvn` and log them whenever a compute PSO is retried or refused. - Capture the first non-empty line of any D3D12 debug-layer error emitted on the calling thread (or fall back to Windows' formatted HRESULT) and include it in `translated_compute_pso` and `Pipelines::make` retry/failure logs. Assisted-by: Google Antigravity (Gemini 4 Neon)
Addresses two review points from @erickbobd on xcl-dev#1398: - Guard `-opt-disable gvn` retries on `first_elapsed <= 5 s` (`NO_GVN_RETRY_MAX_REFUSAL`) in both `translated_compute_pso` and `Pipelines::make`, resetting `started` around uncached fallback driver compiles so slow multi-minute driver OOMs on huge programs do not pay for a second, larger no-GVN compile. - Strengthen `dxil_cache_with_extra_flags_round_trip` with a GVN-sensitive HLSL compute shader and `assert_ne!(default_dxil, nogvn_dxil)`, plus `runner::skip_test("no DXC")` when DXC is absent. Assisted-by: Google Antigravity (Gemini 4 Neon)
|
Rebased onto @LocranKing @DavidM1911 @RodrigoTorreao thank you for the independent verifications on RTX 3060 Ti and RX 6750 XT! On #680 interop on
Re-verified on
|
|
@KarolKurzyna I re-tested the rebased head
AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this. |
…direct DXIL) Brings in upstream xcl-dev#680 (descriptor-heap memory windows without per-access switches, with switch fallback) and xcl-dev#1426 (direct RDNA2 -> DXIL backend behind XCL_DIRECT_DXIL=1 / XCL_DIRECT_DXIL=all, bypassing HLSL and DXC). Retains xcl-dev#1398 no-GVN retry, xcl-dev#1410 wave64 logging, and xcl-dev#1428 folded X dispatch group limit alongside xcl-dev#680 and xcl-dev#1426.
Addresses review feedback from @pickles976 on xcl-dev#1398: - Return both DXIL disk-cache keys (default GVN build -> `-opt-disable gvn` build) via `WithoutGvn` and log them whenever a compute PSO is retried or refused. - Capture the first non-empty line of any D3D12 debug-layer error emitted on the calling thread (or fall back to Windows' formatted HRESULT) and include it in `translated_compute_pso` and `Pipelines::make` retry/failure logs. Assisted-by: Google Antigravity (Gemini 4 Neon)
Addresses two review points from @erickbobd on xcl-dev#1398: - Guard `-opt-disable gvn` retries on `first_elapsed <= 5 s` (`NO_GVN_RETRY_MAX_REFUSAL`) in both `translated_compute_pso` and `Pipelines::make`, resetting `started` around uncached fallback driver compiles so slow multi-minute driver OOMs on huge programs do not pay for a second, larger no-GVN compile. - Strengthen `dxil_cache_with_extra_flags_round_trip` with a GVN-sensitive HLSL compute shader and `assert_ne!(default_dxil, nogvn_dxil)`, plus `runner::skip_test("no DXC")` when DXC is absent. Assisted-by: Google Antigravity (Gemini 4 Neon)
a0f2cc6 to
85ca7be
Compare
|
@RodrigoTorreao Thanks for re-testing Rebased onto Main
Re-verified on
|
Addresses review feedback from @pickles976 on xcl-dev#1398: - Return both DXIL disk-cache keys (default GVN build -> `-opt-disable gvn` build) via `WithoutGvn` and log them whenever a compute PSO is retried or refused. - Capture the first non-empty line of any D3D12 debug-layer error emitted on the calling thread (or fall back to Windows' formatted HRESULT) and include it in `translated_compute_pso` and `Pipelines::make` retry/failure logs. Assisted-by: Google Antigravity (Gemini 4 Neon)
85ca7be to
834ea6d
Compare
Addresses two review points from @erickbobd on xcl-dev#1398: - Guard `-opt-disable gvn` retries on `first_elapsed <= 5 s` (`NO_GVN_RETRY_MAX_REFUSAL`) in both `translated_compute_pso` and `Pipelines::make`, resetting `started` around uncached fallback driver compiles so slow multi-minute driver OOMs on huge programs do not pay for a second, larger no-GVN compile. - Strengthen `dxil_cache_with_extra_flags_round_trip` with a GVN-sensitive HLSL compute shader and `assert_ne!(default_dxil, nogvn_dxil)`, plus `runner::skip_test("no DXC")` when DXC is absent. Assisted-by: Google Antigravity (Gemini 4 Neon)
|
Rebased onto #1524 interop on
Re-verified on
|
834ea6d to
78b3134
Compare
Addresses review feedback from @pickles976 on xcl-dev#1398: - Return both DXIL disk-cache keys (default GVN build -> `-opt-disable gvn` build) via `WithoutGvn` and log them whenever a compute PSO is retried or refused. - Capture the first non-empty line of any D3D12 debug-layer error emitted on the calling thread (or fall back to Windows' formatted HRESULT) and include it in `translated_compute_pso` and `Pipelines::make` retry/failure logs. Assisted-by: Google Antigravity (Gemini 4 Neon)
Addresses two review points from @erickbobd on xcl-dev#1398: - Guard `-opt-disable gvn` retries on `first_elapsed <= 5 s` (`NO_GVN_RETRY_MAX_REFUSAL`) in both `translated_compute_pso` and `Pipelines::make`, resetting `started` around uncached fallback driver compiles so slow multi-minute driver OOMs on huge programs do not pay for a second, larger no-GVN compile. - Strengthen `dxil_cache_with_extra_flags_round_trip` with a GVN-sensitive HLSL compute shader and `assert_ne!(default_dxil, nogvn_dxil)`, plus `runner::skip_test("no DXC")` when DXC is absent. Assisted-by: Google Antigravity (Gemini 4 Neon)
78b3134 to
0d76f66
Compare
Addresses review feedback from @pickles976 on xcl-dev#1398: - Return both DXIL disk-cache keys (default GVN build -> `-opt-disable gvn` build) via `WithoutGvn` and log them whenever a compute PSO is retried or refused. - Capture the first non-empty line of any D3D12 debug-layer error emitted on the calling thread (or fall back to Windows' formatted HRESULT) and include it in `translated_compute_pso` and `Pipelines::make` retry/failure logs. Assisted-by: Google Antigravity (Gemini 4 Neon)
Addresses two review points from @erickbobd on xcl-dev#1398: - Guard `-opt-disable gvn` retries on `first_elapsed <= 5 s` (`NO_GVN_RETRY_MAX_REFUSAL`) in both `translated_compute_pso` and `Pipelines::make`, resetting `started` around uncached fallback driver compiles so slow multi-minute driver OOMs on huge programs do not pay for a second, larger no-GVN compile. - Strengthen `dxil_cache_with_extra_flags_round_trip` with a GVN-sensitive HLSL compute shader and `assert_ne!(default_dxil, nogvn_dxil)`, plus `runner::skip_test("no DXC")` when DXC is absent. Assisted-by: Google Antigravity (Gemini 4 Neon)
) NVIDIA D3D12 drivers can fail CreateComputePipelineState with E_OUTOFMEMORY (0x8007000E) when DXC's GVN pass merges descriptor heap handles into `phi %dx.types.Handle`, as diagnosed by @psuedo-tty in Keep the fast GVN-optimized DXIL build on the primary path and retry once with `-opt-disable gvn` only when the driver rejects the PSO: - Key DXC's disk cache on extra compiler flags (`cache_key_for_toolchain_extra`) so fallback DXIL is cached on disk without overwriting default entries. - Add `console_to_dxil_without_gvn` / `console_to_dxil_in_without_gvn` bypassing `ShaderCache` and the `translated` memory cache, and skip recompiling >8 MB HLSL already compiled at `-O0`. - Retry once on driver failure in `translated_compute_pso` (reusing the driver blob cache path) and in `xcl shaders --pipelines` (`Pipelines::make`). Fixes xcl-dev#756. Part of xcl-dev#1269. Assisted-by: Google Antigravity (Gemini 4 Neon)
Addresses review feedback from @pickles976 on xcl-dev#1398: - Return both DXIL disk-cache keys (default GVN build -> `-opt-disable gvn` build) via `WithoutGvn` and log them whenever a compute PSO is retried or refused. - Capture the first non-empty line of any D3D12 debug-layer error emitted on the calling thread (or fall back to Windows' formatted HRESULT) and include it in `translated_compute_pso` and `Pipelines::make` retry/failure logs. Assisted-by: Google Antigravity (Gemini 4 Neon)
Addresses two review points from @erickbobd on xcl-dev#1398: - Guard `-opt-disable gvn` retries on `first_elapsed <= 5 s` (`NO_GVN_RETRY_MAX_REFUSAL`) in both `translated_compute_pso` and `Pipelines::make`, resetting `started` around uncached fallback driver compiles so slow multi-minute driver OOMs on huge programs do not pay for a second, larger no-GVN compile. - Strengthen `dxil_cache_with_extra_flags_round_trip` with a GVN-sensitive HLSL compute shader and `assert_ne!(default_dxil, nogvn_dxil)`, plus `runner::skip_test("no DXC")` when DXC is absent. Assisted-by: Google Antigravity (Gemini 4 Neon)
0d76f66 to
36e23fd
Compare
Part of #1269 (addresses the DXC GVN compute PSO refusal pattern originally reported in #756, following @psuedo-tty's analysis of
phi %dx.types.Handletriggers under DXC GVN, @pickles976's review on logging cache keys and driver refusal reasons, and @erickbobd's review and verification).What is in it
-opt-disable gvnwhen the driver refusesCreateComputePipelineStateon a translated console compute shader (crates/xcl/src/hle/d3d12x/real.rs,crates/xcl/src/shaders.rs), bounded to fast refusals (<= 5 sviaNO_GVN_RETRY_MAX_REFUSAL) so multi-minute driver OOMs on huge programs do not pay for a second, larger no-GVN compile.cache_key_for_toolchain_extra/cache_key_with_extra(crates/xcl/src/gpu/recomp/dxc.rs) so fallback DXIL is cached on disk without overwriting default entries.console_to_dxil_without_gvnandconsole_to_dxil_in_without_gvnreturningWithoutGvn(crates/xcl/src/gpu/recomp/pso.rs), bypassingShaderCacheand thetranslatedmemory cache and short-circuiting shaders over 8 MB HLSL (already compiled at-O0).driver_cacheon the retry DXIL, skips the second driver call if the fallback DXIL is byte-identical, and logs both DXIL disk-cache keys (<gvn_key> -> <no_gvn_key>) plus the first line of the driver rejection message (retained D3D12 debug-layer error on the calling thread or formattedHRESULT) in bothtranslated_compute_pso_onceandxcl shaders --pipelines(Pipelines::make).main(1a0bbe3, PR Shaders: speed up translated pipeline compiles and add PSO measurements #1524driver_compile_identified/huge_pso_bytes+ PR gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426/Direct DXIL: memory windows through the descriptor heap (XCL_HEAP_WINDOWS) #1693 Direct DXIL + PR Recompiler: memory windows from the descriptor heap (no per-access switch) #680 heap windows):compile_console_shaderpreserves Direct DXIL routing whilecompile_console_shader_with_extraserves the HLSL-opt-disable gvnretry path,translated_compute_pso_onceroutes both attempts throughdriver_compile_identified(soNO_GVN_RETRY_MAX_REFUSALmeasures driver-only compile time excluding slot wait time), and the no-GVN retry stays guarded by!HEAP_WINDOW_OOM.with(|o| o.get())sowith_switch_fallbackrunsin_switch_formfirst on heap-windowE_OUTOFMEMORY.Tested
1.100.0; DXC1.9.2602.17.cargo build --release -p xcl: passed. Two existingAtomic::fetch_updatedeprecation warnings are in untouched files/lines.cargo test --workspace -- --test-threads=4on head36e23fddc939: xcl library had 1189 passed, 1 failed, 26 ignored. The failure isgpu::recomp::pso::shader_cache_tests::console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk(DXIL not compiled yet); it reproduces on base1a0bbe3a2ba9as well.Regression run
Fresh main baseline (warm cache):
This PR head (warm cache):
Not tested
AI use
Original implementation and initial evidence were prepared with Google Antigravity (Gemini 4 Neon). Codex (GPT-6) rebased/reviewed the branch and ran the current build, tests, and smoke checks.