Repository navigation
Windows 10: load the D3D12 Agility SDK runtime (0 of 27,044 pipelines without it) - #856
gabrielfriasw wants to merge 1 commit into
Conversation
Windows 10's in-box d3d12.dll stops at shader model 6.5 and refuses root
signatures that index the descriptor heaps directly (flags 0x400, 0x800),
which every translated pipeline uses:
Unsupported bit-flag set (root signature flags c00)
Measured here (Windows 10 22H2 19045, RTX 3070): without the runtime
`translate --pipelines` makes 0 of 28,164 pipelines and refuses 27,044; with
it, 23,034 are made and 3,607 come from the library.
victory.exe now exports D3D12SDKVersion = 620 and D3D12SDKPath = ".\D3D12\",
and D3D12 loads D3D12Core.dll from that folder beside the executable when it
is newer than the system's runtime. The DLLs are Microsoft's and never enter
the repository: they are the Microsoft.Direct3D.D3D12 1.620.2 NuGet package
(SHA-512 d683ff7f...693032735), unpacked into target/<profile>/D3D12/.
Windows 11 keeps its in-box runtime, and a missing folder changes nothing.
|
Tried on Windows 10 22H2 / RX 7900 XTX, merged on main
This overlaps #402, which makes the same exports only when the runtime is present and adds |
|
Two results for this, one for and one to watch out for. Windows 10 — it is what makes the title run. A second machine, RTX 5070 Ti 16 GB, Ryzen 7 7700X, Windows 10 Pro 19045, NVIDIA 32.0.16.2140. Without this PR: 6 launches of 6 ended 4 to 7 seconds in with Windows 11 — the same executable needs the folder too. The description says that without
(Runs on two machines of ours; read from the logs and written with Claude Code.) |
|
Following up on the Windows 11 failure above with something that fixes it, in case you want it in this PR: commit 41b0841 in With it the same executable runs with and without the folder. Checked on Windows 11 build 26200, RTX 3080 Ti, by the module list of the process:
The launcher says on stderr which one it used. Two things were needed:
Not covered: a system with no (Written and tested with Claude Code on the machine above.) |
Why
On Windows 10, the in-box
d3d12.dllstops at shader model 6.5 and refuses every translated pipeline's root signature:0xc00=CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED(0x400) |SAMPLER_HEAP_DIRECTLY_INDEXED(0x800): the bindless flags every translated pipeline uses. The failure is atD3D12SerializeVersionedRootSignature, so nothing is drawn.Measured on this machine (Windows 10 22H2 19045, Ryzen 9 5900XT, RTX 3070, driver 32.0.16.2140) with
victory translate --pipelinesover the title's shader pack:The fork's test machine is Windows 11, where the in-box runtime already does this, so the fork never needed it. Windows 10 users get nothing at all.
What
apps/victory/build.rsexportsD3D12SDKVersionandD3D12SDKPathas data symbols (MSVC only).apps/victory/src/agility.rsdefinesD3D12SDKVersion = 620andD3D12SDKPath = ".\D3D12\".main.rskeeps both symbols alive.D3D12 reads these two symbols from the process executable and, when they name a runtime newer than the system's, loads
D3D12Core.dllfromD3D12SDKPathrelative to the executable.Getting
D3D12Core.dllThe DLLs are Microsoft's, so they must not enter the repository (upstream's asset policy, and this fork inherits it). They are the
Microsoft.Direct3D.D3D121.620.2 NuGet package — the minor version is the number exported above:build/native/bin/x64/D3D12Core.dllandd3d12SDKLayers.dllgo totarget\<profile>\D3D12\. Acargo xtasksubcommand could do the fetch; I left it out of this PR to keep the diff to the load path — say if you'd rather have it included.Tested
Windows 10 22H2, RTX 3070, real title, this branch on top of
f85101b:D3D12\reproduces the flags-c00 failure, so the effect is the runtime and not something else in the branch.I have not tested Windows 11: the folder is absent there and the in-box runtime is used, which is the previous behaviour.
Notes
victory.exeonly; no other crate is touched.victory.lib/victory.expnext to the exe; harmless, and cargo reports it as alinker_messageswarning.AI-assisted: written with an agent that ran everything above on the machine described.