Opt victory.exe into the D3D12 Agility SDK for Windows 10 #1518

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

@⁠mauri9911 on GitHub · 2026-11-24 18:42 UTC · original
mauri9911:agility-sdk → main · +45 −0 · 4 files · 1 commits · closed without merging

Problem

On Windows 10 the game opens and the menus run at 30 fps, but anything translated draws black. The log shows, for every host pipeline:

root signature: Unsupported bit-flag set (root signature flags c01).
host root signature refused error=The parameter is incorrect. (0x80070057)

Flags 0xC00 are CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED and SAMPLER_HEAP_DIRECTLY_INDEXED (SM 6.6). The D3D12 runtime that ships inside Windows 10 predates them, so all draws are dropped (drawn=0). The host also reports only SM 6.5 for the GPU, and the valu_tests / waterfall_tests that need an SM 6.6 device fail with "neither hardware nor WARP SM 6.6 device available".

Change

victory.exe exports D3D12SDKVersion and D3D12SDKPath (the build.rs adds the two /EXPORT link args). That is the documented way to opt into the D3D12 Agility SDK: the runtime then loads D3D12\D3D12Core.dll from next to the executable.

  • Without that file nothing changes (Windows uses its own runtime), so Windows 11 is unaffected.
  • The DLL is Microsoft's and is not added to the repository; the README explains where to get it (NuGet Microsoft.Direct3D.D3D12 1.619.x).
  • Nothing from the game is touched, so the asset policy is not involved.

I first tried ID3D12SDKConfiguration::SetSDKVersion at runtime; it fails with DXGI_ERROR_INVALID_CALL on Windows 10 19044 for every path/version I tried, so the exports are the way that works there.

Testing

Only on one machine: Windows 10 IoT LTSC 21H2 (19044), RTX 5060 Ti, Agility SDK 1.619.6.

  • Before: black screen, drawn=0, constant root signature flags c01 warnings.
  • After: no root signature warnings, drawn=2481 draws per frame in the same stage, intro and loading art render.
  • cargo clippy --workspace --all-targets --locked -- -D warnings passes, also with --all-features.

Not covered: the unit tests that create a GPU device still do not use the Agility SDK (only victory.exe exports the symbols), so those 15 tests still fail on Windows 10. I have not tested Windows 11 or an AMD GPU.

With this the title gets further on an NVIDIA GPU, but rendering is still incomplete (many shaders do not translate yet) and the GPU can still time out, as the README already warns.

🤖 Generated with Claude Code

**@⁠mauri9911** on GitHub · 2026-11-24 18:42 UTC · [original](https://github.com/Marvisak/VIctory/pull/1518) `mauri9911:agility-sdk` → `main` · +45 −0 · 4 files · 1 commits · closed without merging ## Problem On Windows 10 the game opens and the menus run at 30 fps, but anything translated draws black. The log shows, for every host pipeline: ``` root signature: Unsupported bit-flag set (root signature flags c01). host root signature refused error=The parameter is incorrect. (0x80070057) ``` Flags `0xC00` are `CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED` and `SAMPLER_HEAP_DIRECTLY_INDEXED` (SM 6.6). The D3D12 runtime that ships inside Windows 10 predates them, so all draws are dropped (`drawn=0`). The host also reports only SM 6.5 for the GPU, and the `valu_tests` / `waterfall_tests` that need an SM 6.6 device fail with "neither hardware nor WARP SM 6.6 device available". ## Change `victory.exe` exports `D3D12SDKVersion` and `D3D12SDKPath` (the `build.rs` adds the two `/EXPORT` link args). That is the documented way to opt into the D3D12 Agility SDK: the runtime then loads `D3D12\D3D12Core.dll` from next to the executable. - Without that file nothing changes (Windows uses its own runtime), so Windows 11 is unaffected. - The DLL is Microsoft's and is **not** added to the repository; the README explains where to get it (NuGet `Microsoft.Direct3D.D3D12` 1.619.x). - Nothing from the game is touched, so the asset policy is not involved. I first tried `ID3D12SDKConfiguration::SetSDKVersion` at runtime; it fails with `DXGI_ERROR_INVALID_CALL` on Windows 10 19044 for every path/version I tried, so the exports are the way that works there. ## Testing Only on one machine: Windows 10 IoT LTSC 21H2 (19044), RTX 5060 Ti, Agility SDK 1.619.6. - Before: black screen, `drawn=0`, constant `root signature flags c01` warnings. - After: no root signature warnings, `drawn=2481` draws per frame in the same stage, intro and loading art render. - `cargo clippy --workspace --all-targets --locked -- -D warnings` passes, also with `--all-features`. Not covered: the unit tests that create a GPU device still do not use the Agility SDK (only `victory.exe` exports the symbols), so those 15 tests still fail on Windows 10. I have not tested Windows 11 or an AMD GPU. With this the title gets further on an NVIDIA GPU, but rendering is still incomplete (many shaders do not translate yet) and the GPU can still time out, as the README already warns. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Translated shaders use SM 6.6 directly indexed heaps (root signature flags
0xC00). The D3D12 runtime inside Windows 10 refuses them: every host root
signature is rejected ("Unsupported bit-flag set (root signature flags c01)"),
all draws are dropped and the screen stays black.

victory.exe now exports D3D12SDKVersion and D3D12SDKPath (build.rs adds the
/EXPORT link args), which makes the runtime load D3D12\D3D12Core.dll from next
to the executable when it exists. Without that file nothing changes, and
Windows 11 needs none of it. The DLL is Microsoft's and is not added to the
repository; the README says where to get it.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:34:51 +00:00
github-bot closed this pull request 2026-11-26 04:34:51 +00:00
Author
Owner

@⁠EduBertozzi on GitHub · 2026-11-24 18:43 UTC · original

For whoever reviews this: the same fix already has open PRs. #175 uses the same approach (exe exports plus cargo xtask agility), #463 does it conditionally, #968 combines it with other changes, and #969 uses a different mechanism (ID3D12SDKConfiguration1::CreateDeviceFactory, no exe exports).

Two of them are tested on Windows 10 19045 with a GTX 1060:

  • #175 reaches SM 6.6, and the menu proposed in #959 reports it (comment).
  • With #969 and VICTORY_D3D12_AGILITY, the shader and GPU suites pass, 123 + 50, where without it they fail for lack of SM 6.6 (comment).

Merging one of them makes the others conflict, so it may help to compare against those before picking one.

AI-assisted (Claude Code).

**@⁠EduBertozzi** on GitHub · 2026-11-24 18:43 UTC · [original](https://github.com/Marvisak/VIctory/pull/1518#issuecomment-7141051055) For whoever reviews this: the same fix already has open PRs. #175 uses the same approach (exe exports plus `cargo xtask agility`), #463 does it conditionally, #968 combines it with other changes, and #969 uses a different mechanism (`ID3D12SDKConfiguration1::CreateDeviceFactory`, no exe exports). Two of them are tested on Windows 10 19045 with a GTX 1060: - #175 reaches SM 6.6, and the menu proposed in #959 reports it ([comment](https://git.gtahub.st/github/Marvisak--VIctory/pulls/175)). - With #969 and `VICTORY_D3D12_AGILITY`, the shader and GPU suites pass, 123 + 50, where without it they fail for lack of SM 6.6 ([comment](https://git.gtahub.st/github/Marvisak--VIctory/pulls/969)). Merging one of them makes the others conflict, so it may help to compare against those before picking one. AI-assisted (Claude Code).
Author
Owner

@⁠mauri9911 on GitHub · 2026-11-24 18:52 UTC · original

Closing as a duplicate of #969 (same fix through ID3D12SDKConfiguration1::CreateDeviceFactory). I tested #969 on Windows 10 build 19044 without KB5029331 with an RTX 5060 Ti and posted the results there: #969

**@⁠mauri9911** on GitHub · 2026-11-24 18:52 UTC · [original](https://github.com/Marvisak/VIctory/pull/1518#issuecomment-7141265110) Closing as a duplicate of #969 (same fix through ID3D12SDKConfiguration1::CreateDeviceFactory). I tested #969 on Windows 10 build 19044 without KB5029331 with an RTX 5060 Ti and posted the results there: https://git.gtahub.st/github/Marvisak--VIctory/pulls/969

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!1518
No description provided.