Repository navigation
D3D12.X: DXC compiles XCL's own HLSL when D3DCompile refuses it - #3018
voiceovarian1-max wants to merge 1 commit into
Conversation
`real::compile` builds XCL's own small programs with D3DCompile: the indirect count check's (`indirect_guard`), the scatter program and the stand-ins. Under Wine, D3DCompile is Wine's own HLSL compiler, which refuses the count check's program (`E5005: Method 'Load3' is not defined on type 'RWByteAddressBuffer'`). The check was then off, and in a retail title an indirect dispatch with group counts read from GPU-written floats (0x3f800000 x ...) never ended and the device was removed. The compiler's error is now read and logged, and DXC compiles the program for the matching 6.0 profile. Where D3DCompile takes the program, as on Windows, nothing changes. Test `a_program_d3dcompile_refuses_still_compiles`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
On native Windows x64 (RTX 5070 Ti Laptop, DXC 1.8.2502.11),
This covers the compiler selection and GPU execution in isolation. The full PR build, indirect count guard and retail smoke were outside this run. AI-assisted verification with OpenAI Codex (GPT-6). |
|
Tested Clean detached PR head cargo test --locked -j 2 -p xcl --lib hle::d3d12x::real::compile_tests::a_program_d3dcompile_refuses_still_compiles -- --exact --nocapture --test-threads=11 passed, 0 failed, 0 ignored, 0 skipped, with 1,727 filtered out and Cargo exit 0. Cargo reused the pinned exact-head libtest binary. DXC initialized and the stock Not tested Forced D3DCompile refusal and DXC retry, GPU execution, indirect count guard, full workspace suite, and retail smoke. AI use T3 Code / Codex ( |
|
#3536 fixes the same failure (Wine's d3dcompiler refusing the indirect guard's AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
For nvidia-dev.
real::compilebuilds XCL's own small programs withD3DCompile: the indirect count check's (indirect_guard), the scatter program and the stand-ins. Under Wine,D3DCompileis Wine's own HLSL compiler, and it refuses the count check's program:compilereturned nothing and the count check was off (ExecuteIndirect: the counts are not checked (its program does not compile)). In a retail title, an indirect dispatch whose group counts came from GPU-written floats (0x3f800000 x 0x3eafef26 x 0x3d146851) then never ended, and the device was removed. With this change, DXC compiles the program ascs_6_0, the check works, and a 300 s run of the same title had no GPU-wait timeout and no device removal (41 out-of-range dispatches were not run). WhereD3DCompiletakes the program, as on Windows, nothing changes.compile's refusal message is now logged.This is also why #3009's new test and nvidia-dev's
an_execute_indirect_with_garbage_counts_*tests fail under Wine.What is in it
hle/d3d12x/real.rs:compilereadsD3DCompile's errors and falls back todxc::compilefor the 6.0 profile. Testa_program_d3dcompile_refuses_still_compiles.Tested
x86_64-pc-windows-gnu, release. DXC 1.9.2609.5 (XCL_DXC_DIR). Head25656f87on nvidia-dev3f39671d.cargo test -p xcl --lib -- --test-threads=4):3f39671d: 1691 passed, 8 failed, 28 ignoredan_execute_indirect_with_garbage_counts_draws_nothingandan_execute_indirect_with_garbage_counts_runs_no_groups.watch::tests::a_thread_in_the_driver_is_seen_until_it_returns. It is timing-dependent under the full parallel suite:watch::alone passed 5 of 5 runs (9 passed each) on this head.Regression run
scripts/smoke.ps1needs Windows, and we only have Linux. On Windows,D3DCompilecompiles these programs, so the new path is not taken.Not tested
AI use
🤖 Generated with Claude Code