Load the D3D12 Agility SDK on Windows 10 #10

Closed
Dezmonius wants to merge 1 commit from upstream-pr/10 into main
Dezmonius commented 2026-11-26 19:21:14 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Dezmonius on 2026-11-26T19:21:14Z.


Changes

  • Export D3D12SDKVersion and D3D12SDKPath from the MSVC launcher so Windows 10 can load the Microsoft runtime that supports shader model 6.6.
  • Document the NuGet package and the runtime layout for both build profiles. The runtime DLL comes from Microsoft.

The export code is adapted from Marvisak/VIctory#175.

Validation

Built 70fdf99e2fc68c925335fcd4d5730f41ea4c7b86 on Windows 10 22H2 (19045), i7-7700K, RTX 5070 driver 610.88, and Rust 1.100.0 MSVC. The locked diag build with diagnostics passed and dumpbin /exports showed both symbols. The run used Agility SDK 1.620.2.

Compared the previous local Windows 10 build based on 85a529b and this change on top of 6a31e43. Both used Series S at 960×540, the same SDK DLL, independent copies of the same warmed cache and save data, and frame capture enabled. Each reached the 3D prologue and ran until the 150-second test limit.

Build Median FPS Range
85a529b with local Agility SDK fix 6.50 3.5–8.6
70fdf99 5.95 2.4–7.5

The FPS values describe ten reporting intervals per run, between 5 and 60 seconds after the first 3D frame with at least 500 draws. This is one captured run per build. It does not establish a performance regression. Both logs contained six compute pipeline refusals, zero root-signature refusals and zero unhandled exceptions. Both runs reproduced the rainbow skin artifact in the same cutscene. The fix covers the runtime setup and exports.

Windows 11, an unpatched control on 6a31e43, the full test suite, and mouse behavior were outside this run.

AI-assisted change.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5515918492 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/10). Originally posted by [Dezmonius](https://github.com/Dezmonius) on 2026-11-26T19:21:14Z. --- ## Changes - Export `D3D12SDKVersion` and `D3D12SDKPath` from the MSVC launcher so Windows 10 can load the Microsoft runtime that supports shader model 6.6. - Document the NuGet package and the runtime layout for both build profiles. The runtime DLL comes from Microsoft. The export code is adapted from [Marvisak/VIctory#175](https://github.com/Marvisak/VIctory/pull/175). ## Validation Built `70fdf99e2fc68c925335fcd4d5730f41ea4c7b86` on Windows 10 22H2 (19045), i7-7700K, RTX 5070 driver 610.88, and Rust 1.100.0 MSVC. The locked `diag` build with `diagnostics` passed and `dumpbin /exports` showed both symbols. The run used Agility SDK 1.620.2. Compared the previous local Windows 10 build based on `85a529b` and this change on top of `6a31e43`. Both used Series S at 960×540, the same SDK DLL, independent copies of the same warmed cache and save data, and frame capture enabled. Each reached the 3D prologue and ran until the 150-second test limit. | Build | Median FPS | Range | | --- | ---: | ---: | | `85a529b` with local Agility SDK fix | 6.50 | 3.5–8.6 | | `70fdf99` | 5.95 | 2.4–7.5 | The FPS values describe ten reporting intervals per run, between 5 and 60 seconds after the first 3D frame with at least 500 draws. This is one captured run per build. It does not establish a performance regression. Both logs contained six compute pipeline refusals, zero root-signature refusals and zero unhandled exceptions. Both runs reproduced the rainbow skin artifact in the same cutscene. The fix covers the runtime setup and exports. Windows 11, an unpatched control on `6a31e43`, the full test suite, and mouse behavior were outside this run. AI-assisted change.
trustno1-coder commented 2026-11-26 21:00:34 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-11-26T21:00:34Z.


Thanks for this. I'm not merging it yet because it stops the game from starting on Windows 11 when there's no D3D12\D3D12Core.dll next to the exe.

What I tested: a release build with this PR on Windows 11 (RTX 5070), using the standard play folder, which has no D3D12\ folder.

What happened: D3D12 read the exported D3D12SDKVersion/D3D12SDKPath and couldn't find the runtime at .\D3D12\. It then rejected the configuration, so creating the host device failed:

The D3D12 SDK version configuration of the host exe is invalid (0x887E0003)

The game then stopped with an unhandled C++ exception (0x887e0003) before reaching the world, with no frames rendered. The same build without this PR reaches the world at the usual frame rate.

Because the exports are baked in at link time, there's no way to turn this off at launch. Every build would need the Agility D3D12Core.dll shipped beside it, including on Windows 11 where it isn't needed.

What would make it mergeable: make the exports opt-in. For example, put build.rs and agility.rs behind a cargo feature such as --features agility, so default builds are unchanged and Windows 10 users build or download that variant. The README section can then name the feature. I'd be happy to merge that version.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7203292459 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/10#issuecomment-7203292459). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-11-26T21:00:34Z. --- Thanks for this. I'm not merging it yet because it stops the game from starting on Windows 11 when there's no `D3D12\D3D12Core.dll` next to the exe. **What I tested:** a release build with this PR on Windows 11 (RTX 5070), using the standard play folder, which has no `D3D12\` folder. **What happened:** D3D12 read the exported `D3D12SDKVersion`/`D3D12SDKPath` and couldn't find the runtime at `.\D3D12\`. It then rejected the configuration, so creating the host device failed: ``` The D3D12 SDK version configuration of the host exe is invalid (0x887E0003) ``` The game then stopped with an unhandled C++ exception (0x887e0003) before reaching the world, with no frames rendered. The same build without this PR reaches the world at the usual frame rate. Because the exports are baked in at link time, there's no way to turn this off at launch. Every build would need the Agility `D3D12Core.dll` shipped beside it, including on Windows 11 where it isn't needed. **What would make it mergeable:** make the exports opt-in. For example, put `build.rs` and `agility.rs` behind a cargo feature such as `--features agility`, so default builds are unchanged and Windows 10 users build or download that variant. The README section can then name the feature. I'd be happy to merge that version.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
trustno1-coder/VIctory-NVIDIA!10
No description provided.