Skip to content

D3D12.X: a huge compute program the driver refuses is logged with its verdict - #1918

Merged
raylitebull merged 1 commit into
xcl-dev:mainfrom
Rednaxeh:huge-compile-verdict-logged
Nov 25, 2026
Merged

raylitebull merged 1 commit into
xcl-dev:mainfrom
Rednaxeh:huge-compile-verdict-logged

Conversation

@Rednaxeh

@Rednaxeh Rednaxeh commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

When the driver refuses a translated compute pipeline, the only trace was note_translation_error: the report's translation_errors, or the notes of a cached-only attempt, which are dropped when a shader was still missing. On an RX 7800 XT a retail title's 13.8 MB compute program (#1332 in the form of #1321) takes the driver 15–23 s and ~15 GB of commit in every run and is refused with E_OUTOFMEMORY; xcl.log showed its driver compile finish line and, a millisecond later, the title's dispatch with that pipeline skipped, with nothing in between. The same with the 3.9 MB form of the direct DXIL backend (#1748). The verdict had to be taken from xcl shaders --measure-pso. Part of #232 / #505.

What is in it

  • crates/xcl/src/hle/d3d12x/real.rs: a huge compute program (huge_pso_bytes and up) the driver refuses is logged with its record hash, DXIL size, driver-cache file name (<fnv64(DXIL)>-<len>-<flags>.pso, so the line matches the blob cache too), HRESULT and the time the driver took, next to the driver compile start/finish lines it already has. Logging only; no behaviour changes, no test (AGENTS.md: logging needs none).
  • README.md: one sentence under the huge-pipeline paragraph.

Tested

  • AMD Radeon RX 7800 XT 16 GB (driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 Pro 26300, Rust 1.100.0 stable-x86_64-pc-windows-msvc, DXC 1.9.2602.17 (Windows SDK 10.0.26100), debug for the tests, release for the title
  • cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4 on 79fde18 (--no-fail-fast, 20 test binaries): 974 passed, 1 failed, 45 ignored. The failure, gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 (seed 722: res[30] = 0x1, CPU 0x7fffffff), fails identically on main 689f2db on this card: the direct DXIL backend, not this PR.
  • SKIPPED: gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu and f32_programs_on_the_gpu (the per-lane form refuses V_MUL_F16 / V_PK_MUL_F16 / V_CVT_F16_F32), heap_window_out_of_memory_falls_back_to_the_switch_form.
  • Retail title, 150 s run of 79fde18 with no input: the two programs the preload builds at start are now answered in xcl.log:
    [33.176] D3D12.X: driver compile finish #947: compute PSO, 13823000 B DXIL, 28913 ms, gated (waited 0 ms)
    [33.197] D3D12.X: the driver refused the compute PSO of record 95cc13288a27a96e (13823000 B DXIL, driver cache 660b0bb6c4e00c2e-d2ec18-0.pso) with 0x8007000e after 28913 ms in the driver: its dispatches are skipped
    [66.324] D3D12.X: driver compile finish #1025: compute PSO, 22835548 B DXIL, 33148 ms, gated (waited 28891 ms)
    [66.359] D3D12.X: the driver refused the compute PSO of record 56c0cd3b82a00c6e (22835548 B DXIL, driver cache a399cc18acaef5bb-15c715c-0.pso) with 0x8007000e after 33148 ms in the driver: its dispatches are skipped
    
  • The smoke pair below: A at ~13 s in both runs.

Regression run

xcl-smoke v1
commit: 689f2db477c3c062cf162649781640ef8a977c18
gpu: AMD  Radeon RX 7800 XT
title: 0da1204f
seconds: 60
exit: 0x0
frames shown: 1413 (PresentX 1413)
presents per 2 s (last 3): 54 44 15
device removals: 0
crashes: 0
peak commit: 84433 MB
xcl-smoke v1
commit: 79fde18030c29f70235f780f28ae0d64fc23cc46
gpu: AMD  Radeon RX 7800 XT
title: 0da1204f
seconds: 60
exit: 0x0
frames shown: 1359 (PresentX 1359)
presents per 2 s (last 3): 6 2 0
device removals: 0
crashes: 0
peak commit: 86300 MB

Not tested

  • NVIDIA / Intel; wave32-only GPUs (the line is driver-independent).

AI use

  • Claude Code (Claude Fable 5.1) wrote the change, the commit message and this description from the runs' logs; the runs and the tests were mine.

🤖 Generated with Claude Code

@Melow-code Melow-code left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logging the driver's rejection verdict for huge compute programs is useful for debugging. Make sure the log line includes the PSO hash or shader key so it can be matched to the cache.

… verdict

The driver's refusal of a translated compute pipeline reached only
note_translation_error: the report's translation_errors, or the notes of a
cached-only attempt, which are dropped when a shader was missing. On an RX
7800 XT a retail title's 13.8 MB compute program (xcl-dev#1332 in the form of xcl-dev#1321)
took the driver 15 - 23 s and ~15 GB of commit in every run and was refused
with E_OUTOFMEMORY; xcl.log showed its `driver compile finish` and, a
millisecond later, the title's dispatch with that pipeline skipped - and
nothing in between. The same with the 3.9 MB form of the direct DXIL backend
(xcl-dev#1748). The verdict had to be taken from `xcl shaders --measure-pso`.

A huge program (`huge_pso_bytes` and up) the driver refuses is now logged with
its record hash, DXIL size, HRESULT and the time the driver took, next to the
compile lines it already has. Logging only; no behaviour changes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Rednaxeh
Rednaxeh force-pushed the huge-compile-verdict-logged branch from 69dca26 to 79fde18 Compare November 24, 2026 23:31
@Rednaxeh

Copy link
Copy Markdown
Contributor Author

Thanks. The line had the console record's hash (the one in driver compile start and xcl shaders --measure-pso); the driver-blob cache is keyed by the translated DXIL instead (<fnv64(DXIL)>-<len>-<flags>.pso), so I added that file name next to it in 79fde18:

D3D12.X: the driver refused the compute PSO of record 95cc13288a27a96e (13823000 B DXIL, driver cache 660b0bb6c4e00c2e-d2ec18-0.pso) with 0x8007000e after 28913 ms in the driver: its dispatches are skipped

Suite and smoke rerun on the new head are in the description.

@Rednaxeh
Rednaxeh marked this pull request as ready for review November 24, 2026 23:34
@futurepro62

futurepro62 commented Nov 24, 2026 •

Copy link
Copy Markdown

Full-suite run, since this PR has no test report yet. Tested exact head 79fde18 (on its base 689f2db).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::dxil::fuzz_tests: 965 passed, 0 failed, 43 ignored. SKIPPED (no wave64): a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu, a_per_lane_2d_or_3d_group_runs_on_the_gpu, coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu, cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu, gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.
  • No new #[test] functions in the diff.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 974 passed, 0 failed, 45 ignored. SKIPPED: f16_programs_on_the_gpu (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's))), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • --skip leaves out tests that fail on main 62265d3 too, not because of this PR. On NVIDIA: heap_window_out_of_memory_falls_back_to_the_switch_form (Tests: heap_window_out_of_memory_falls_back_to_the_switch_form fails under XCL_REQUIRE_GPU=mesh (opt-in skip counted as missing coverage) #1651) and the four gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu tests (follow-up on #1651) fail because runner::skip_test turns their skips into failures under XCL_REQUIRE_GPU=mesh, and gpu::dxil::fuzz_tests seeds 70, 545, 1019 and 1507 fail CreateComputePipelineState with E_OUTOFMEMORY on this card (drivers 616.64 and 621.40). On AMD: fuzz_validate_and_gpu_1 fails on seed 540 (res[833] 0x7 vs CPU 0x6). The AMD run does not set XCL_REQUIRE_GPU.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.

@raylitebull

Copy link
Copy Markdown
Member

Code review on 79fde18:

  • Logging record hash, DXIL byte size, driver_cache::name(&dxil, copy.Flags.0), HRESULT verdict, and driver time when dxil.len() >= huge_pso_bytes() fails in translated_compute_pso_once (crates/xcl/src/hle/d3d12x/real.rs) makes rejected huge compute PSOs immediately diagnosable in xcl.log.
  • Diff audited and CI workflow approved (running).

Remaining before merge: Build and test finishing green plus AMD verification on 79fde18.

@raylitebull
raylitebull merged commit cbc296a into xcl-dev:main Nov 25, 2026
3 of 4 checks passed
@DavidM1911

Copy link
Copy Markdown
Contributor

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants