Windows 10: load the D3D12 Agility SDK runtime for shader model 6.6 #402

Open
github-bot wants to merge 11 commits from github-bot/gh-402 into main AGit
Owner

@⁠domints on GitHub · 2026-11-25 00:25 UTC · original
domints:windows-10-fix → main · +579 −8 · 16 files · 11 commits · open

Windows 10's in-box D3D12 stops at shader model 6.5 and refuses root signatures with the directly indexed heap flags (c01), so every translated pipeline was refused and nothing drew (#84).

victory.exe now exports D3D12SDKVersion (620) and D3D12SDKPath (.\D3D12), and cargo xtask agility fetches Microsoft.Direct3D.D3D12 1.620.2 from nuget.org, checks its published SHA-512, and puts D3D12Core.dll and d3d12SDKLayers.dll in target<profile>\D3D12. The DLLs never enter the repository. Windows 11, or a missing folder, keeps the in-box runtime.

victory config reports whether the runtime is in place, and the SM 6.5 error names the command.

This PR is just an extraction of single relevant commit from #22 which grows in more and more unrelated commits

**@⁠domints** on GitHub · 2026-11-25 00:25 UTC · [original](https://github.com/fxceless/victory-fork/pull/402) `domints:windows-10-fix` → `main` · +579 −8 · 16 files · 11 commits · open Windows 10's in-box D3D12 stops at shader model 6.5 and refuses root signatures with the directly indexed heap flags (c01), so every translated pipeline was refused and nothing drew (#84). victory.exe now exports D3D12SDKVersion (620) and D3D12SDKPath (.\D3D12\), and `cargo xtask agility` fetches Microsoft.Direct3D.D3D12 1.620.2 from nuget.org, checks its published SHA-512, and puts D3D12Core.dll and d3d12SDKLayers.dll in target\<profile>\D3D12\. The DLLs never enter the repository. Windows 11, or a missing folder, keeps the in-box runtime. `victory config` reports whether the runtime is in place, and the SM 6.5 error names the command. This PR is just an extraction of single relevant commit from #22 which grows in more and more unrelated commits
Windows 10's in-box D3D12 stops at shader model 6.5 and refuses root
signatures with the directly indexed heap flags (c01), so every
translated pipeline was refused and nothing drew (#84).

victory.exe now exports D3D12SDKVersion (620) and D3D12SDKPath
(.\D3D12\), and `cargo xtask agility` fetches Microsoft.Direct3D.D3D12
1.620.2 from nuget.org, checks its published SHA-512, and puts
D3D12Core.dll and d3d12SDKLayers.dll in target\<profile>\D3D12\. The
DLLs never enter the repository. Windows 11, or a missing folder, keeps
the in-box runtime.

`victory config` reports whether the runtime is in place, and the SM 6.5
error names the command.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:42:40 +00:00
Author
Owner

@⁠HAL9000RELOADED on GitHub · 2026-11-25 13:00 UTC · original

Tested on Windows 10, where this matters, with an AMD card.

Setup: Windows 10 Pro 22H2 (19045), Radeon RX 7900 XTX (RDNA3), Adrenalin 32.0.32015.7029, Rust 1.98.1, DXIL validator and PC dxc from SDK 10.0.26100.

  • Tree: this PR's head e24d4b0 merged onto main a253706 (no conflict), plus the stack-headroom test fix from Marvisak/VIctory#742.
  • No game data used.

Results

  • Before cargo xtask agility: victory-shader gives 192 passed and 23 failed. The failures are the GPU tests with "no SM 6.6 device available", the in-box behaviour, so nothing changes without the runtime. Its test executable then exports nothing (checked with dumpbin /exports).
  • cargo xtask agility: it downloaded 1.620.2 and placed it in target\{debug,release,diag}\D3D12\.
  • After it, the whole workspace: 566 passed, 1 failed. Every victory-shader GPU test ran on the hardware device; there is no "no SM 6.6 hardware device" line.

Two notes

  1. victory-gpu's tests get no exports, so they stay on the in-box runtime.
    • The one failure above is victory-gpu's depth_bounds_pipeline_loads_and_filters_draws. Its root signature is refused there with E_INVALIDARG; see #850 and #692.
    • Its mesh test skips ("no host mesh shader support; skipped").
    • With the runtime in place, the same test passes on this card.
    • victory-shader's conditional exports in build.rs could cover victory-gpu's tests the same way.
  2. victory.exe exports unconditionally (dumpbin shows both symbols). With the exports and no D3D12\D3D12Core.dll beside the executable, D3D12CreateDevice fails with 0x887E0003 (D3D12_ERROR_INVALID_REDIST) on this Windows 10. I checked that with a standalone probe. So a victory.exe built without cargo xtask agility would have no host device. This is the same note as on #69.

The runs behind this, with the three fixes that make victory-gpu's tests pass on Windows 10 (#875, #849, #692): #850

**@⁠HAL9000RELOADED** on GitHub · 2026-11-25 13:00 UTC · [original](https://github.com/fxceless/victory-fork/pull/402#issuecomment-7163162012) Tested on Windows 10, where this matters, with an AMD card. **Setup:** Windows 10 Pro 22H2 (19045), Radeon RX 7900 XTX (RDNA3), Adrenalin 32.0.32015.7029, Rust 1.98.1, DXIL validator and PC dxc from SDK 10.0.26100. - **Tree:** this PR's head `e24d4b0` merged onto `main` `a253706` (no conflict), plus the stack-headroom test fix from Marvisak/VIctory#742. - No game data used. **Results** - **Before `cargo xtask agility`:** victory-shader gives 192 passed and 23 failed. The failures are the GPU tests with "no SM 6.6 device available", the in-box behaviour, so nothing changes without the runtime. Its test executable then exports nothing (checked with `dumpbin /exports`). - **`cargo xtask agility`:** it downloaded 1.620.2 and placed it in `target\{debug,release,diag}\D3D12\`. - **After it, the whole workspace:** 566 passed, 1 failed. Every victory-shader GPU test ran on the hardware device; there is no "no SM 6.6 hardware device" line. **Two notes** 1. **victory-gpu's tests get no exports, so they stay on the in-box runtime.** - The one failure above is victory-gpu's `depth_bounds_pipeline_loads_and_filters_draws`. Its root signature is refused there with `E_INVALIDARG`; see #850 and #692. - Its mesh test skips ("no host mesh shader support; skipped"). - With the runtime in place, the same test passes on this card. - victory-shader's conditional exports in `build.rs` could cover victory-gpu's tests the same way. 2. **`victory.exe` exports unconditionally** (`dumpbin` shows both symbols). With the exports and no `D3D12\D3D12Core.dll` beside the executable, `D3D12CreateDevice` fails with `0x887E0003` (`D3D12_ERROR_INVALID_REDIST`) on this Windows 10. I checked that with a standalone probe. So a `victory.exe` built without `cargo xtask agility` would have no host device. This is the same note as on #69. The runs behind this, with the three fixes that make victory-gpu's tests pass on Windows 10 (#875, #849, #692): https://git.gtahub.st/github/fxceless--victory-fork/issues/850
Author
Owner

@⁠domints on GitHub · 2026-11-25 13:20 UTC · original

@⁠HAL9000RELOADED as far as I understand, Note 2 is irrelevant - it doesn't change behaviour on Windows 11, because this D3D12Core.dll in correct version is available in the OS by default, and also the whole point of this Agility fix is that Windows 10 has outdated version and it REQUIRES new version downloaded from NuGet so obviously it won't run without those DLLs downloaded.

**@⁠domints** on GitHub · 2026-11-25 13:20 UTC · [original](https://github.com/fxceless/victory-fork/pull/402#issuecomment-7163629963) @⁠HAL9000RELOADED as far as I understand, Note 2 is irrelevant - it doesn't change behaviour on Windows 11, because this D3D12Core.dll in correct version is available in the OS by default, and also the whole point of this Agility fix is that Windows 10 has outdated version and it REQUIRES new version downloaded from NuGet so obviously it won't run without those DLLs downloaded.
Author
Owner

@⁠domints on GitHub · 2026-11-25 13:34 UTC · original

@⁠HAL9000RELOADED Added the fix to gpu crate, also revalidated note 2, and added the condition to symbol export. Tested on my Windows 10, works properly.

**@⁠domints** on GitHub · 2026-11-25 13:34 UTC · [original](https://github.com/fxceless/victory-fork/pull/402#issuecomment-7163971568) @⁠HAL9000RELOADED Added the fix to gpu crate, also revalidated note 2, and added the condition to symbol export. Tested on my Windows 10, works properly.
Author
Owner

@⁠HAL9000RELOADED on GitHub · 2026-11-25 14:05 UTC · original

Re-tested the new head fb5da17 on Windows 10 22H2 (19045) with an RX 7900 XTX (plus the stack-headroom test fix from Marvisak/VIctory#742). No game data used.

  • Without the runtime: victory.exe and the victory-shader and victory-gpu test executables export nothing (dumpbin /exports).
  • After cargo xtask agility and a plain cargo build / cargo test --no-run, with no clean: all three export D3D12SDKVersion and D3D12SDKPath.
  • Whole workspace: 567 passed, 1 failed.
    • The failure is warp_budget_saturates…, which also fails on main (#849).
    • A second victory-gpu run hit the WARP access violation from #850 (#875).
  • victory-gpu with the runtime:
    • depth_bounds_pipeline_loads_and_filters_draws now passes; before, on the in-box runtime, it failed with E_INVALIDARG.
    • The mesh pipeline test runs instead of skipping.

Both notes are covered here. Thanks for picking them up, @⁠domints, and for fixing them so quickly.

**@⁠HAL9000RELOADED** on GitHub · 2026-11-25 14:05 UTC · [original](https://github.com/fxceless/victory-fork/pull/402#issuecomment-7164745944) Re-tested the new head `fb5da17` on Windows 10 22H2 (19045) with an RX 7900 XTX (plus the stack-headroom test fix from Marvisak/VIctory#742). No game data used. - **Without the runtime:** `victory.exe` and the victory-shader and victory-gpu test executables export nothing (`dumpbin /exports`). - **After `cargo xtask agility`** and a plain `cargo build` / `cargo test --no-run`, with no clean: all three export `D3D12SDKVersion` and `D3D12SDKPath`. - **Whole workspace:** 567 passed, 1 failed. - The failure is `warp_budget_saturates…`, which also fails on `main` (#849). - A second victory-gpu run hit the WARP access violation from #850 (#875). - **victory-gpu with the runtime:** - `depth_bounds_pipeline_loads_and_filters_draws` now passes; before, on the in-box runtime, it failed with `E_INVALIDARG`. - The mesh pipeline test runs instead of skipping. Both notes are covered here. Thanks for picking them up, @⁠domints, and for fixing them so quickly.
Author
Owner

@⁠GamingRipperDoc on GitHub · 2026-11-26 06:52 UTC · original

Tested on Windows 10 22H2 (19045), AMD RX 9070 XT (Adrenalin 32.0.32015.7029), Rust 1.98.1. This PR (d95e86e) merged locally with current main (46bf535); the merge was clean.

  • cargo xtask agility: fetched Microsoft.Direct3D.D3D12 1.620.2 from nuget.org, and put D3D12Core.dll and d3d12SDKLayers.dll in target\{debug,release,diag}\D3D12\.
  • victory config: d3d12 sdk : ...\target\release\D3D12\D3D12Core.dll (version 620).
  • cargo test -p victory-shader --lib --locked: 217 passed, 0 failed. Without a runtime on this machine, 23 of these fail for want of an SM 6.6 device.
  • cargo test -p victory-gpu --lib --locked -- --test-threads=1: 209 passed, 0 failed, depth_bounds_pipeline_loads_and_filters_draws included (it fails on Windows 10 without the runtime).
  • Game, release build, no VICTORY_* variables: pipelines are created and the title runs into its 3D frames. That needed #1213 merged as well. Without it, AMD's shader compiler crashes 4 s in at amdxc64.dll+0x861b9f, which #1213 is about. The crash comes from main's translated shaders, not from this PR: it happened at this PR's own head too, and the runtime is the same 1.620.2 as in my old runs. With #1213 (and #317, #1216, also merged for this run) it ran 3 minutes past frame 1,790 with 2,871 pipelines bound and no device removal.

So on this machine the runtime loads and is used as described.

No game data in this comment.

AI-assisted (Claude Code); I ran the checks above on my machine.

**@⁠GamingRipperDoc** on GitHub · 2026-11-26 06:52 UTC · [original](https://github.com/fxceless/victory-fork/pull/402#issuecomment-7184861980) Tested on Windows 10 22H2 (19045), AMD RX 9070 XT (Adrenalin 32.0.32015.7029), Rust 1.98.1. This PR (`d95e86e`) merged locally with current `main` (`46bf535`); the merge was clean. - `cargo xtask agility`: fetched Microsoft.Direct3D.D3D12 1.620.2 from nuget.org, and put `D3D12Core.dll` and `d3d12SDKLayers.dll` in `target\{debug,release,diag}\D3D12\`. - `victory config`: `d3d12 sdk : ...\target\release\D3D12\D3D12Core.dll (version 620)`. - `cargo test -p victory-shader --lib --locked`: 217 passed, 0 failed. Without a runtime on this machine, 23 of these fail for want of an SM 6.6 device. - `cargo test -p victory-gpu --lib --locked -- --test-threads=1`: 209 passed, 0 failed, `depth_bounds_pipeline_loads_and_filters_draws` included (it fails on Windows 10 without the runtime). - Game, release build, no `VICTORY_*` variables: pipelines are created and the title runs into its 3D frames. That needed #1213 merged as well. Without it, AMD's shader compiler crashes 4 s in at `amdxc64.dll+0x861b9f`, which #1213 is about. The crash comes from `main`'s translated shaders, not from this PR: it happened at this PR's own head too, and the runtime is the same 1.620.2 as in my old runs. With #1213 (and #317, #1216, also merged for this run) it ran 3 minutes past frame 1,790 with 2,871 pipelines bound and no device removal. So on this machine the runtime loads and is used as described. No game data in this comment. AI-assisted (Claude Code); I ran the checks above on my machine.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/402/head:github-bot/gh-402'
git switch 'github-bot/gh-402'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-402'
git switch 'github-bot/gh-402'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-402'
git switch 'github-bot/gh-402'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-402'
git switch 'main'
git merge --squash 'github-bot/gh-402'
git switch 'main'
git merge --ff-only 'github-bot/gh-402'
git switch 'main'
git merge 'github-bot/gh-402'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.