Skip to content

Load the D3D12 Agility SDK on Windows 10 - #10

Closed
Dezmonius wants to merge 1 commit into
trustno1-coder:mainfrom
Dezmonius:fix/windows-10-agility-sdk
Closed

Dezmonius wants to merge 1 commit into
trustno1-coder:mainfrom
Dezmonius:fix/windows-10-agility-sdk

Conversation

@Dezmonius

@Dezmonius Dezmonius commented Nov 26, 2026 •

Copy link
Copy Markdown

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.

Adapt the SDK exports from Marvisak/VIctory#175 and document how to stage the Microsoft runtime next to the executable.
@Dezmonius
Dezmonius marked this pull request as ready for review November 26, 2026 19:30
@trustno1-coder

Copy link
Copy Markdown
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants