GPU: use the DirectX Agility SDK when the system D3D12 runtime refuses the shaders' root signatures #2391
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2393"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by wkdwilliams on 2026-11-25T12:39:34Z.
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.Imported from Marvisak/VIctory. Originally posted by qtLkz on 2026-11-25T12:56:09Z.
Windows 11 check, as requested: Windows 11 Pro build 26300, RTX 4070 Ti (Ada), driver 621.01, Rust 1.98.1 pinned, this PR merged on main
940d32f, noD3D12folder.I don't have the game files, so I didn't run
victoryitself. To see the startup line, I added a throwaway local integration test (not pushed) that printsvictory_shader::d3d12_runtime::description(), the stringvictory_gpu::hostlogs:So on Windows 11 the probe passes on the system runtime and the Agility path isn't taken.
cargo test --workspace --locked --no-fail-fast: the same 5 failures as on plain940d32fon this card, and nothing new:dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_views(NVIDIA heap cap, #2317)stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride,stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros,synthetic_tests::gathers_at_a_level_match_the_hardware(fixed by #2315 + #2322)The victory-shader hardware tests (244 passed) now serialize their root signatures through the new module, so that path is also exercised on the system runtime here.
AI-assisted (Claude).
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T13:19:21Z.
Review: COMMENTED
Use the DirectX Agility SDK when the system D3D12 refuses root signature flags (Windows 10). 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. Overlaps #2383's
cargo xtask agilitymechanism and #2360's README — three PRs now cover the same Windows-10 SM 6.6 story; suggest converging on one implementation.Pull request closed