Repository navigation
D3D12.X: say why no GPU made a device with the debug layer on - #1444
WillyboPeep wants to merge 1 commit into
Conversation
With XCL_D3D12_DEBUG a debug layer of another SDK version than the D3D12 runtime makes every device fail with E_INVALIDARG; only the runtime's debug output names the cause (887a002d, "D3D12 SDKLayers dll does not match the D3D12SDKVersion of D3D12 Core dll"). XCL dropped each GPU's error, logged WARP's alone and went on with the fallback device, so the debug-layer e2e test failed with twelve D3D12.X failures in the test title. Each GPU's error is now logged before WARP is tried, and with the debug layer on a warning names both DLLs and their versions. The e2e test skips on that warning. Seen on Windows 11 26300 with the inbox D3D12Core 10.0.26100.10068 (Windows Update) beside the Graphics Tools' d3d12SDKLayers 10.0.26100.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Regression run for this PR: head main this PR: No device removals or crashes; 103 % of main's frames, 99 % of its peak commit. Peak commit in both runs is mostly the pipeline preload's DXC compiles on this machine (#1035; 23 GB on Not tested: the whole suite; whether the title reaches the changed code in these 60 s. Written with Claude Code (Claude Opus 5.5) from runs on this machine. |
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Two contributors checked independently and found that #653 solves the same problem in a different way: #1607, group D43. You may want to compare them with the other author and agree on one, or say in the PR why both are needed. This is a hint, not a request from the maintainers; nobody from the project has adopted #1607 so far. AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table. |
With
XCL_D3D12_DEBUG=1, a D3D12 debug layer of another SDK version than the D3D12 runtime makes every device fail withE_INVALIDARG. Only the runtime's debug output names the cause (D3D Error 887a002d: D3D12 SDKLayers dll does not match the D3D12SDKVersion of D3D12 Core dll). XCL dropped each GPU's error, logged WARP's alone (could not create a D3D12 device (D3D12 device (WARP): The parameter is incorrect. (0x80070057))) and went on with the fallback device. So on such a machinetest_title_draws_with_a_root_signature_under_the_debug_layerfails with twelve[FAIL]lines from the test title (elevenD3D12.X: …, one DirectStorage) and exit0xc0000409, onmainas on any branch, and a title run with the debug layer draws nothing without saying why.It happens after Windows Update moves the inbox
D3D12Core.dllon while the Graphics Tools optional feature keeps its olderd3d12SDKLayers.dll(here 10.0.26100.10068 against 10.0.26100.1).What is in it
D3D12.X: say why no GPU made a device with the debug layer on–hle/d3d12x/real.rs: each GPU'screate_deviceerror is logged before WARP is tried; with the debug layer on and no GPU device, one warning names thed3d12SDKLayers.dllbeside the loadedD3D12Core.dlland both versions, and says what to do.gpu/recomp/dxc.rs:file_versionispub(crate)for that (dxc.rs is a translator source, so the translated cache is rebuilt once).tests/e2e.rs: the debug-layer test skips on that warning, as it does without the layer.Tested
OutputDebugStringcapture during the debug-layer test title's run showsD3D Error 887a002d: … D3D12 SDKLayers dll does not match the D3D12SDKVersion of D3D12 Core dll.once per device attempt.cargo test -p xcl --test e2e: onmain930e8b42 passed, 1 failed (this test); with this change 3 passed, the debug-layer test printingSKIPPED … no GPU made a device with the debug layer on. The log line it skips on:D3D12: with the debug layer on (XCL_D3D12_DEBUG) no GPU made a device; the usual cause is a debug layer of another SDK version than the D3D12 runtime (d3d12SDKLayers.dll 6.2.26100.1 (C:\WINDOWS\SYSTEM32\d3d12SDKLayers.dll); D3D12Core.dll 6.2.26100.10068 (C:\WINDOWS\SYSTEM32\D3D12Core.dll)) – update the Graphics Tools optional feature, or run without XCL_D3D12_DEBUGcargo build --workspace+cargo test --workspace --no-fail-fast -- --test-threads=4on4394201(the same tree as this PR's head9274ac3, which only has another author): 751 passed, 0 failed, 41 ignored. SKIPPED:gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64),set_predication_buffer_state_and_kickoff("no GPU": it setsXCL_D3D12_DEBUG=1itself, so it gets no device here for the same reason; with this change its output carries the warning), and the debug-layer test as above. Onmain930e8b4this test fails as described above (cargo test -p xcl --test e2e: 2 passed, 1 failed, twelve[FAIL]lines); the full suite was not rerun there.9274ac3below (RTX 5070 Ti, debug layer installed): 751 passed, 0 failed, only the two wave64 tests SKIPPED.Regression run
Both runs sit at the title's start screen without input, so both show the commit growth of #1307 (fixed by #1321), on
mainas here.main:
PR:
Not tested
d3d12SDKLayers.dll.ID3D12DeviceFactorymight allow it, not tried).AI use