Repository navigation
GPU: use the DirectX Agility SDK when the system D3D12 runtime refuses the shaders' root signatures - #2429
GPU: use the DirectX Agility SDK when the system D3D12 runtime refuses the shaders' root signatures#2429wkdwilliams wants to merge 5 commits into
Conversation
…s the shaders' root signatures The translated shaders need root signatures with the shader model 6.6 directly indexed heap flags. The runtime in Windows 10 rejects them, so no host pipeline can be made. Host devices and root signatures now go through one module that keeps the runtime in Windows when it accepts the flags and otherwise uses D3D12\D3D12Core.dll next to the executable, if present. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…n it is in use The title's own D3D12SerializeRootSignature calls went to the d3d12.dll in System32 by name. Where that runtime refuses the shader model 6.6 flags (Windows 10), every one of the title's signatures failed (26,757 in a run), the title kept null objects and crashed. They now go through the runtime the host chose, only when that is the Agility one; the other path is unchanged. A failed serialization is logged with its flags. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Verified on Windows 10 (in-box
Design notes:
One follow-up to consider (not blocking): an |
DenRakEiw
left a comment
There was a problem hiding this comment.
Verified against origin/main (940d32f) on Windows 11 + NVIDIA GeForce RTX 5090:
- Falling back to the DirectX Agility SDK runtime when the system D3D12 runtime refuses root signatures builds cleanly and passes all root-signature tests.
cargo test -p victory-gpu root::: 11/11 passed.cargo clippy -p victory-shader -p victory-gpu --all-targets -- -D warnings: 0 warnings.cargo xtask policy: 184 files ok.
AI-assisted (Gemini 4 Neon).
catminou4
left a comment
There was a problem hiding this comment.
Fourth PR covering the Windows-10 Agility SDK story (verbatim same README addition as #2393; cluster: #2360, #2383, #2393, #2429, #2460). Please converge on one implementation. Static review only: victory-gpu/victory-hle are Windows-only (D3D12/windows-sys); not compiled or tested on this macOS arm64 host. rustc 1.98.1.
|
Thanks for the verifications, and fair point on the overlap: this is the same Agility story as #2360, #2383, #2460 and the earlier #2393 (which I opened and closed; it is the same work), and I did not search for existing PRs before opening it. Please converge on whichever implementation the maintainers prefer. In case it helps that decision, one piece here may be missing from the others: the title's own root-signature serialization ( |
|
Automated triage for the maintainers. Verdict: needs work (needs the maintainer's decision). Re-reviewed at Still open in the code:
CI: passing. Generated by Claude Code |
Conflicts in crates/victory-gpu/src/host.rs (imports) and crates/victory-shader/src/emit/host.rs (main moved device creation into create_device(warp), now made on the chosen D3D12 runtime). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The Windows 10 paragraph had \n, \b and \r read as escapes in the paths. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Main moved on (the depth bounds test, Marvisak#158): keep the device made on the chosen runtime and add main's depth bounds support query after it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Test report on Windows 10 Pro 19045, AMD RX 6600 (Adrenalin 32.0.21045), Agility SDK 1.620.2 from NuGet. Branch head c41185f. No game files.
One note: for tests the DLL has to be in AI-assisted: yes (Claude Code) |
Problem
On Windows 10 (22H2, in-box
d3d12.dll10.0.19041), no host pipeline can be built. The translated shaders use root signatures with the shader model 6.6 flagsCBV_SRV_UAV_HEAP_DIRECTLY_INDEXEDandSAMPLER_HEAP_DIRECTLY_INDEXED, and the system runtime rejects them withUnsupported bit-flag set (root signature flags c01).translate --cache --pipelinesthen makes 0 pipelines (27,059 of 27,160 skipped as "the host refuses it"), andruncan't create pipelines either.Change
New
victory-shader::d3d12_runtimechooses the runtime once, at first use:D3D12\D3D12Core.dll(Agility SDK 1.620.x, from theMicrosoft.Direct3D.D3D12NuGet package) is next tovictory.exe, devices and root-signature serialization go through anID3D12DeviceFactoryfor that runtime.All host device creation and root-signature serialization now go through this module (
victory-gpuhost.rsandpipeline/host.rs;victory-shaderemit/host.rs). The first host log line says which runtime is in use. The README gets a short Windows 10 section.No Microsoft binary is added to the repo; the DLL is user-supplied, like the game files.
What should not change
On a runtime that accepts the flags (the Windows 11 case), the calls are the same
D3D12CreateDeviceandD3D12SerializeVersionedRootSignatureas before. The only differences are one extra startup serialization (the probe) and one log line.Tested
Windows 10 22H2, RTX 4060 Ti:
DirectX Agility SDK 620 from ...\D3D12\, and pipelines build or load from the library.cargo clippy --workspace --all-targetsis clean.cargo test --workspace --no-fail-fast: all pass except 3victory-gputests (descriptor::host::tests::dynamic_slots_are_held_until_released,draw::tests::a_texture_written_in_one_format_reads_in_another_through_a_placed_view,memory::tests::lists_share_a_table_and_copies_keep_their_views). They fail identically on the base commit, so they are not from this change.Not tested: Windows 11
The author has no Windows 11 machine. Request to a Windows 11 tester: build this branch with no
D3D12folder and check that the firstvictory_gpu::hostlog line readsDirect3D 12 runtime of Windows: the runtime in Windows accepts the root signature flags, and that behaviour is unchanged frommain.Not in scope
On this NVIDIA GPU the host view heap is capped at 1,000,000 descriptors and the title asks for more, which produces
title slot past the host heapwarnings and is a separate issue from this one.