Skip to content

Windows 10: opt-in D3D12 Agility SDK for shader model 6.6 - #467

Closed
blazerTweaks wants to merge 1 commit into
Marvisak:mainfrom
blazerTweaks:fix/windows10-agility-sdk
Closed

blazerTweaks wants to merge 1 commit into
Marvisak:mainfrom
blazerTweaks:fix/windows10-agility-sdk

Conversation

@blazerTweaks

Copy link
Copy Markdown

Problem

Windows 10's own D3D12 runtime stops at shader model 6.5. The root signatures translated shaders need (CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED | SAMPLER_HEAP_DIRECTLY_INDEXED) are refused:

WARN victory_gpu::pipeline::host: root signature: Unsupported bit-flag set (root signature flags c01).
WARN victory_gpu::pipeline::host: host root signature refused error=... (0x80070057)

Nothing draws, and about 20 s in the title crashes with an access violation (read 0x68). victory translate --pipelines reports the device supports SM 0x65 only. That happens even on hardware that supports SM 6.6 (an RTX 3060 Ti on a current driver here). The README lists Windows 10 as supported.

Change

  • Feature agility on victory. It exports D3D12SDKVersion (620) and D3D12SDKPath (.\D3D12\); build.rs adds the /EXPORT link args. D3D12 then loads D3D12\D3D12Core.dll from next to victory.exe.
    • It is opt-in: an exe with these exports and no DLL gets D3D12_ERROR_INVALID_REDIST (0x887E0003) for every device. That applies on Windows 11 too, and there is no fallback to the system runtime.
  • cargo xtask agility. It downloads Microsoft.Direct3D.D3D12 1.620.2 from nuget.org (using Windows' own curl and tar, so no new dependencies) into target/agility/. It then copies D3D12Core.dll and d3d12SDKLayers.dll to target/<profile>/D3D12/ for every built profile.
    • Nothing binary enters the repository; cargo xtask policy passes.
  • Errors. The host device now logs an error naming the fix in two cases: when the runtime lacks SM 6.6 (default build on Windows 10), and when an agility build cannot find the DLL.
  • README. A short Windows 10 section.

Usage on Windows 10:

cargo build --release -p victory --features agility
cargo xtask agility

Testing

On Windows 10 19045 with an RTX 3060 Ti (driver 32.0.16.1714):

Build Result
default ERROR ... lacks shader model 6.6 ... build victory with --features agility (model 0x65)
agility, no DLL ERROR ... D3D12\D3D12Core.dll is not next to it: run cargo xtask agility
agility + cargo xtask agility All pipelines are made. The boot and legal screens, intro video, start screen and loading all run, and the title reaches the world (where the GPU hang below takes over).
  • cargo clippy adds no new warnings.
  • cargo test --workspace: 8 tests fail with and without this change on Windows 10, so they predate it:
    • victory-hle net::tests::only_loopback_is_reachable: WinHttpGetProxySettingsEx is a Windows 11 export.
    • 7 victory-shader emit::valu_tests: these need an SM 6.6 device, and the test executables don't carry the Agility exports.

On this machine loading takes about 4 minutes instead of about 50 s. Entering the world then hangs the GPU; that is a separate issue (NVIDIA's 1,000,000-view heap cap), reported with the DRED report.

🤖 Generated with Claude Code

Windows 10's own D3D12 runtime stops at shader model 6.5, so the
root signatures translated shaders need (heaps directly indexed) are
refused, nothing draws and the title crashes shortly after its first
screens.

- feature `agility` on victory: exports D3D12SDKVersion/D3D12SDKPath
  (build.rs adds the /EXPORT link args) so D3D12 loads
  D3D12\D3D12Core.dll next to victory.exe. Opt-in because an exe with
  these exports and no DLL gets D3D12_ERROR_INVALID_REDIST for every
  device, Windows 11 included.
- `cargo xtask agility`: downloads Microsoft.Direct3D.D3D12 1.620.2
  from nuget.org with Windows' curl and tar and copies the runtime to
  target/<profile>/D3D12/. Nothing binary enters the repository.
- the host device logs an error naming the fix when the runtime lacks
  shader model 6.6, and when the Agility DLL is missing.

Tested on Windows 10 19045 with an RTX 3060 Ti: menus, intro and
loading now run, and the title reaches the world.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@blazerTweaks

Copy link
Copy Markdown
Author

Closing as a duplicate of #175 (fixes #84), which I found after opening this. The opt-in feature and the device-creation hints from here are offered there: #175

@upipibi upipibi mentioned this pull request Nov 24, 2026
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.

1 participant