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

Closed
github-bot wants to merge 1 commit from gh-pr/467/head into gh-pr/467/base
Owner

@⁠blazerTweaks on GitHub · 2026-11-24 03:46 UTC · original
fix/windows10-agility-sdk → main · +137 −0 · 6 files · 1 commits · closed without merging

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

**@⁠blazerTweaks** on GitHub · 2026-11-24 03:46 UTC · [original](https://github.com/Marvisak/VIctory/pull/467) `fix/windows10-agility-sdk` → `main` · +137 −0 · 6 files · 1 commits · closed without merging ## 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)
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 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:05:04 +00:00
github-bot closed this pull request 2026-11-26 04:05:04 +00:00
Author
Owner

@⁠blazerTweaks on GitHub · 2026-11-24 03:49 UTC · original

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

**@⁠blazerTweaks** on GitHub · 2026-11-24 03:49 UTC · [original](https://github.com/Marvisak/VIctory/pull/467#issuecomment-7121449562) 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://git.gtahub.st/github/Marvisak--VIctory/pulls/175

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!467
No description provided.