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

Closed
blazerTweaks wants to merge 1 commit from upstream-pr/467 into main
blazerTweaks commented 2026-11-24 03:46:01 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by blazerTweaks on 2026-11-24T03:46:01Z.


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

<!-- greyfinch-sync:Marvisak/VIctory:issue:6574142655 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/467). Originally posted by [blazerTweaks](https://github.com/blazerTweaks) on 2026-11-24T03:46:01Z. --- ## 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: ```powershell 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](https://claude.com/claude-code)
upstream-sync closed this pull request 2026-11-24 06:53:13 +00:00
blazerTweaks commented 2026-11-24 06:55:32 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by blazerTweaks on 2026-11-24T03:49:00Z.


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: https://github.com/Marvisak/VIctory/pull/175

<!-- greyfinch-sync:Marvisak/VIctory:comment:7121449562 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/467#issuecomment-7121449562). Originally posted by [blazerTweaks](https://github.com/blazerTweaks) on 2026-11-24T03:49:00Z. --- 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: https://github.com/Marvisak/VIctory/pull/175

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
Marvisak/VIctory!467
No description provided.