Crash on Windows 10: in-box D3D12 refuses directly-indexed root signatures (needs the Agility SDK) #123

Closed
opened 2026-11-27 18:34:17 +00:00 by github-bot · 3 comments
Owner

@⁠hopgop1 on GitHub · 2026-11-27 18:31 UTC · original

What happens
On Windows 10 (22H2, build 19045), the layer builds and starts, and the title crashes about 3 seconds after boot with an access violation in the title image (0xc0000005 … read 0x68: nothing mapped there).

Just before the crash, the log is full of rejected root signatures:

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=The parameter is incorrect. (0x80070057) shaders=[vertex …, pixel …]
WARN victory_gpu::pipeline::host: root signature: Unsupported bit-flag set (root signature flags c00).
WARN victory_gpu::pipeline::host: host root signature refused error=The parameter is incorrect. (0x80070057) shaders=[compute …]
Setup: RTX 4070 Ti, driver 621.40, Series X profile, 2560x1440, DLSS Quality, current main (d12eb1b).

Cause
crates/victory-gpu/src/pipeline/host.rs builds root signatures with D3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED | D3D12_ROOT_SIGNATURE_FLAG_SAMPLER_HEAP_DIRECTLY_INDEXED (0x400 | 0x800, Shader Model 6.6). Windows 11's built-in D3D12 runtime accepts these flags. Windows 10's built-in runtime does not, unless the program loads the D3D12 Agility SDK, and nothing in the repo currently does. The title then runs without those pipelines and crashes soon after.

Fix that works here
A small change, tested on the Windows 10 machine above: the root-signature errors are gone and it no longer crashes.

apps/victory/src/agility.rs (new, #[cfg(windows)] mod agility; in main.rs): #[unsafe(no_mangle)] pub static D3D12SDKVersion: u32 = 614; and D3D12SDKPath = ".\D3D12\", a *const c_char in a #[repr(transparent)] wrapper with unsafe impl Sync.
apps/victory/build.rs (new): a binary crate doesn't export these statics on its own, so for the MSVC target it adds cargo:rustc-link-arg-bin=victory=/EXPORT:D3D12SDKVersion,DATA and …=/EXPORT:D3D12SDKPath,DATA.
scripts/get-d3d12-agility.ps1 (new): fetches D3D12Core.dll (and d3d12SDKLayers.dll) from Microsoft's NuGet package Microsoft.Direct3D.D3D12 1.614.1 (build/native/bin/x64/) into a git-ignored d3d12-sdk, the same way Get-NVIDIA-DLSS.cmd handles NVIDIA's files, and saves the licence beside them.
scripts/play-foxhound.ps1: copies those DLLs into target<build>\D3D12\ next to victory.exe. On Windows 10 without them, it prints a note pointing to the script.
.gitignore: /d3d12-sdk/.
If the DLL is missing or its version doesn't match, d3d12.dll falls back to the system runtime, so Windows 11 setups behave exactly as before. The release victory.exe would need the same exports, plus either a D3D12\ folder shipped beside it or the DLL fetched on first start, like the DLSS files.

Happy to open a PR with this if that's easier.

**@⁠hopgop1** on GitHub · 2026-11-27 18:31 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/123) What happens On Windows 10 (22H2, build 19045), the layer builds and starts, and the title crashes about 3 seconds after boot with an access violation in the title image (0xc0000005 … read 0x68: nothing mapped there). Just before the crash, the log is full of rejected root signatures: 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=The parameter is incorrect. (0x80070057) shaders=[vertex …, pixel …] WARN victory_gpu::pipeline::host: root signature: Unsupported bit-flag set (root signature flags c00). WARN victory_gpu::pipeline::host: host root signature refused error=The parameter is incorrect. (0x80070057) shaders=[compute …] Setup: RTX 4070 Ti, driver 621.40, Series X profile, 2560x1440, DLSS Quality, current main (d12eb1b). Cause crates/victory-gpu/src/pipeline/host.rs builds root signatures with D3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED | D3D12_ROOT_SIGNATURE_FLAG_SAMPLER_HEAP_DIRECTLY_INDEXED (0x400 | 0x800, Shader Model 6.6). Windows 11's built-in D3D12 runtime accepts these flags. Windows 10's built-in runtime does not, unless the program loads the D3D12 Agility SDK, and nothing in the repo currently does. The title then runs without those pipelines and crashes soon after. Fix that works here A small change, tested on the Windows 10 machine above: the root-signature errors are gone and it no longer crashes. apps/victory/src/agility.rs (new, #[cfg(windows)] mod agility; in main.rs): #[unsafe(no_mangle)] pub static D3D12SDKVersion: u32 = 614; and D3D12SDKPath = ".\\D3D12\\", a *const c_char in a #[repr(transparent)] wrapper with unsafe impl Sync. apps/victory/build.rs (new): a binary crate doesn't export these statics on its own, so for the MSVC target it adds cargo:rustc-link-arg-bin=victory=/EXPORT:D3D12SDKVersion,DATA and …=/EXPORT:D3D12SDKPath,DATA. scripts/get-d3d12-agility.ps1 (new): fetches D3D12Core.dll (and d3d12SDKLayers.dll) from Microsoft's NuGet package Microsoft.Direct3D.D3D12 1.614.1 (build/native/bin/x64/) into a git-ignored d3d12-sdk\, the same way Get-NVIDIA-DLSS.cmd handles NVIDIA's files, and saves the licence beside them. scripts/play-foxhound.ps1: copies those DLLs into target\<build>\D3D12\ next to victory.exe. On Windows 10 without them, it prints a note pointing to the script. .gitignore: /d3d12-sdk/. If the DLL is missing or its version doesn't match, d3d12.dll falls back to the system runtime, so Windows 11 setups behave exactly as before. The release victory.exe would need the same exports, plus either a D3D12\ folder shipped beside it or the DLL fetched on first start, like the DLSS files. Happy to open a PR with this if that's easier.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 18:34:18 +00:00
Author
Owner

@⁠hopgop1 on GitHub · 2026-11-27 18:46 UTC · original

A fix for this is open as #50 (Export the Agility SDK so the build renders on Windows 10). It adds the D3D12SDKVersion / D3D12SDKPath exports to victory.exe so the Agility SDK's D3D12Core.dll is loaded on Windows 10, whose in-box D3D12 refuses the root signature flags.

**@⁠hopgop1** on GitHub · 2026-11-27 18:46 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/123#issuecomment-7225853872) A fix for this is open as #50 (Export the Agility SDK so the build renders on Windows 10). It adds the `D3D12SDKVersion` / `D3D12SDKPath` exports to `victory.exe` so the Agility SDK's `D3D12Core.dll` is loaded on Windows 10, whose in-box D3D12 refuses the root signature flags.
Author
Owner

@⁠trustno1-coder on GitHub · 2026-11-27 20:58 UTC · original

A fix that should help is released: v2026.11.27.6 (https://github.com/trustno1-coder/VIctory-NVIDIA/releases/tag/v2026.11.27.6).

On Windows 10, this crash at +0xb5a5f8 happens most likely because Windows 10's own Direct3D 12 is too old for the game's shaders and refuses some of them. victory.exe is meant to use Microsoft's newer runtime (1.614) instead. Releases before .6 could not switch to it, or failed at start with 0x887E0003.

In .6 that works. Without a D3D12 folder, it offers to download 1.614 at the first start (answer Y, or run victory.exe get-d3d12 in that folder). With a D3D12 folder, it uses that folder's version.

Please try it and tell me if it gets further. If it still crashes, attach the new victory-nvidia-play-*.log and crashes.log (both in %LOCALAPPDATA%\victory\logs).

**@⁠trustno1-coder** on GitHub · 2026-11-27 20:58 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/123#issuecomment-7228021882) A fix that should help is released: **v2026.11.27.6** (https://github.com/trustno1-coder/VIctory-NVIDIA/releases/tag/v2026.11.27.6). On Windows 10, this crash at `+0xb5a5f8` happens most likely because Windows 10's own Direct3D 12 is too old for the game's shaders and refuses some of them. victory.exe is meant to use Microsoft's newer runtime (1.614) instead. Releases before .6 could not switch to it, or failed at start with 0x887E0003. In .6 that works. Without a `D3D12` folder, it offers to download 1.614 at the first start (answer Y, or run `victory.exe get-d3d12` in that folder). With a `D3D12` folder, it uses that folder's version. Please try it and tell me if it gets further. If it still crashes, attach the new `victory-nvidia-play-*.log` and `crashes.log` (both in %LOCALAPPDATA%\victory\logs).
Author
Owner

@⁠hopgop1 on GitHub · 2026-11-27 21:03 UTC · original

Working for me now, thank you, no need to fix it myself now!

**@⁠hopgop1** on GitHub · 2026-11-27 21:03 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/123#issuecomment-7228088931) Working for me now, thank you, no need to fix it myself now!
This discussion has been locked. Commenting is limited to contributors.
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/trustno1-coder--VIctory-NVIDIA#123
No description provided.