Windows 10: the D3D12 Agility SDK runtime for victory.exe and the shader tests #420

Closed
github-bot wants to merge 2 commits from github-bot/gh-420 into main AGit
Owner

@⁠GamingRipperDoc on GitHub · 2026-11-25 00:36 UTC · original
GamingRipperDoc:win10-agility → main · +469 −3 · 12 files · 2 commits · closed without merging

Windows 10 support: the D3D12 Agility SDK runtime for victory.exe and for the victory-shader test executables. Ported from the upstream PRs Marvisak/VIctory#175 (by @⁠kykifox1337-source) and Marvisak/VIctory#362.

Why

Windows 10's in-box D3D12 stops at shader model 6.5 and refuses the root signatures every translated pipeline uses (directly indexed heaps, flags 0x400/0x800). Without a newer runtime, nothing draws on Windows 10 and the title crashes during init (upstream Marvisak/VIctory#348, a duplicate of Marvisak/VIctory#84). This tree has none of the upstream Agility work.

What

Two commits, authorship kept:

  1. 4463b39 (Marvisak/VIctory#175): victory.exe exports D3D12SDKVersion = 620 / D3D12SDKPath = ".\D3D12\"; cargo xtask agility fetches Microsoft.Direct3D.D3D12 1.620.2 from nuget.org, checks its SHA-512, and unpacks D3D12Core.dll / d3d12SDKLayers.dll into target\<profile>\D3D12\ (never into the repository); victory config reports the runtime. Port changes: miniz_oxide is declared in xtask/Cargo.toml itself, since this workspace uses zlib-rs and doesn't list it, and show_config keeps the data_dir line above the new lines.
  2. ff6649a (Marvisak/VIctory#362): the victory-shader test executables get the same exports (path ..\D3D12\, since they live in deps\), only when D3D12Core.dll is staged; without it they behave exactly as before. cargo xtask agility touches crates/victory-shader/build.rs so the next build picks it up. Port change: lib.rs keeps this tree's bvh module next to the test-only agility one.

Note: D3D12 does not fall back to the in-box runtime when the executable names a newer one that is missing (D3D12_ERROR_INVALID_REDIST), so on any machine, Windows 11 included, victory.exe from this branch needs cargo xtask agility once. The test executables don't (their exports are conditional).

Tested

Windows 10 22H2 (19045.7846), AMD RX 9070 XT (driver 32.0.32015.7029), Ryzen 9 9900X, Rust 1.98.1, on main 31714de:

without the runtime with cargo xtask agility
cargo test -p victory-shader --lib 191 passed, 23 failed (no SM 6.6 device) 214 passed, 0 failed
victory config d3d12 sdk : not beside the executable … d3d12 sdk : …\target\diag\D3D12\D3D12Core.dll (version 620)
victory run, 60 s, no input (no SM 6.6 device: nothing draws) menus at ~30 fps, 0 root signatures refused
  • cargo test -p xtask: 6 passed. cargo clippy --workspace --all-targets --locked [--all-features] -- -D warnings: clean. cargo xtask policy: ok.
  • The 60 s run then ended in a crash inside AMD's shader compiler during the first-boot screens; that's a separate issue (filed separately), not caused by this change, which only makes a device available.

No game data used.

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

**@⁠GamingRipperDoc** on GitHub · 2026-11-25 00:36 UTC · [original](https://github.com/fxceless/victory-fork/pull/420) `GamingRipperDoc:win10-agility` → `main` · +469 −3 · 12 files · 2 commits · closed without merging Windows 10 support: the D3D12 Agility SDK runtime for `victory.exe` and for the `victory-shader` test executables. Ported from the upstream PRs Marvisak/VIctory#175 (by @⁠kykifox1337-source) and Marvisak/VIctory#362. ## Why Windows 10's in-box D3D12 stops at shader model 6.5 and refuses the root signatures every translated pipeline uses (directly indexed heaps, flags `0x400`/`0x800`). Without a newer runtime, nothing draws on Windows 10 and the title crashes during init (upstream Marvisak/VIctory#348, a duplicate of Marvisak/VIctory#84). This tree has none of the upstream Agility work. ## What Two commits, authorship kept: 1. **`4463b39` (Marvisak/VIctory#175):** `victory.exe` exports `D3D12SDKVersion = 620` / `D3D12SDKPath = ".\D3D12\"`; `cargo xtask agility` fetches `Microsoft.Direct3D.D3D12` 1.620.2 from nuget.org, checks its SHA-512, and unpacks `D3D12Core.dll` / `d3d12SDKLayers.dll` into `target\<profile>\D3D12\` (never into the repository); `victory config` reports the runtime. Port changes: `miniz_oxide` is declared in `xtask/Cargo.toml` itself, since this workspace uses zlib-rs and doesn't list it, and `show_config` keeps the `data_dir` line above the new lines. 2. **`ff6649a` (Marvisak/VIctory#362):** the `victory-shader` test executables get the same exports (path `..\D3D12\`, since they live in `deps\`), only when `D3D12Core.dll` is staged; without it they behave exactly as before. `cargo xtask agility` touches `crates/victory-shader/build.rs` so the next build picks it up. Port change: `lib.rs` keeps this tree's `bvh` module next to the test-only `agility` one. Note: D3D12 does not fall back to the in-box runtime when the executable names a newer one that is missing (`D3D12_ERROR_INVALID_REDIST`), so on any machine, Windows 11 included, `victory.exe` from this branch needs `cargo xtask agility` once. The test executables don't (their exports are conditional). ## Tested Windows 10 22H2 (19045.7846), AMD RX 9070 XT (driver 32.0.32015.7029), Ryzen 9 9900X, Rust 1.98.1, on `main` `31714de`: | | without the runtime | with `cargo xtask agility` | |---|---|---| | `cargo test -p victory-shader --lib` | 191 passed, **23 failed** (`no SM 6.6 device`) | **214 passed, 0 failed** | | `victory config` | `d3d12 sdk : not beside the executable …` | `d3d12 sdk : …\target\diag\D3D12\D3D12Core.dll (version 620)` | | `victory run`, 60 s, no input | (no SM 6.6 device: nothing draws) | menus at ~30 fps, **0** root signatures refused | - `cargo test -p xtask`: 6 passed. `cargo clippy --workspace --all-targets --locked [--all-features] -- -D warnings`: clean. `cargo xtask policy`: ok. - The 60 s run then ended in a crash inside AMD's shader compiler during the first-boot screens; that's a separate issue (filed separately), not caused by this change, which only makes a device available. No game data used. AI-assisted (Claude Code); I ran everything above on my machine.
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]>

[Ported onto fxceless/victory-fork: miniz_oxide is declared in xtask itself, since this
tree's workspace uses zlib-rs and no longer lists it; show_config keeps the data_dir line
above the d3d12 sdk lines.]

(cherry picked from commit 19aec59, Marvisak/VIctory#175)
On Windows 10 the victory-shader test executables had no D3D12SDKVersion
and D3D12SDKPath exports, so every host device stopped at shader model 6.5:
the 7 emit::valu_tests failed and the device-backed tests skipped.

The tests now export them (path ..\D3D12\, the folder `cargo xtask
agility` fills) only when D3D12Core.dll is there: D3D12 does not fall back
to the in-box runtime when the named one is missing. The build script
watches the DLL only when it exists, so a missing runtime does not rebuild
the crate every time; the xtask touches build.rs after installing it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit f3c7333456)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:43:02 +00:00
Author
Owner

@⁠GamingRipperDoc on GitHub · 2026-11-25 04:10 UTC · original

Yes, functionally. #69 came first and carries the same two upstream PRs (Marvisak/VIctory#175 and #362). apps/victory/build.rs, apps/victory/src/agility.rs, crates/victory-shader/build.rs and xtask/src/agility.rs are byte-identical between the two.

The one material difference is the manifest. Since #69 was branched, main replaced miniz_oxide with zlib-rs in [workspace.dependencies] (3bff182). #69's xtask/Cargo.toml still says miniz_oxide.workspace = true. Merged onto current main (no text conflict), the workspace no longer loads:

error inheriting `miniz_oxide` from workspace root manifest's `workspace.dependencies.miniz_oxide`

This PR declares miniz_oxide = "0.9.1" (and sha2) in xtask/Cargo.toml itself, so it builds on current main.

I'm happy to close this in favour of #69 once its manifest is updated. In that case my RX 9070 XT / Windows 10 results in the description can count as an extra data point for #69.

AI-assisted (Claude Code).

**@⁠GamingRipperDoc** on GitHub · 2026-11-25 04:10 UTC · [original](https://github.com/fxceless/victory-fork/pull/420#issuecomment-7152600887) Yes, functionally. #69 came first and carries the same two upstream PRs (Marvisak/VIctory#175 and #362). `apps/victory/build.rs`, `apps/victory/src/agility.rs`, `crates/victory-shader/build.rs` and `xtask/src/agility.rs` are byte-identical between the two. The one material difference is the manifest. Since #69 was branched, `main` replaced `miniz_oxide` with `zlib-rs` in `[workspace.dependencies]` (`3bff182`). #69's `xtask/Cargo.toml` still says `miniz_oxide.workspace = true`. Merged onto current `main` (no text conflict), the workspace no longer loads: ``` error inheriting `miniz_oxide` from workspace root manifest's `workspace.dependencies.miniz_oxide` ``` This PR declares `miniz_oxide = "0.9.1"` (and `sha2`) in `xtask/Cargo.toml` itself, so it builds on current `main`. I'm happy to close this in favour of #69 once its manifest is updated. In that case my RX 9070 XT / Windows 10 results in the description can count as an extra data point for #69. AI-assisted (Claude Code).
github-bot closed this pull request 2026-11-26 06:45:54 +00:00
Author
Owner

@⁠domints on GitHub · 2026-11-25 10:03 UTC · original

@⁠GamingRipperDoc This PR won't build on current main exactly because of you using miniz_oxide, current main has no miniz_oxide anymore, and for at least 12 hours for that matter.
#69 on the other hand, adds unnecessary miniz_oxide back to the root Cargo.toml leaving app with two zip unpacking packages.

I suggest closing both in favor of #402 which is minimal change, resolves conflicts and uses zlib-rs instead of just re-pulling miniz_oxide.

**@⁠domints** on GitHub · 2026-11-25 10:03 UTC · [original](https://github.com/fxceless/victory-fork/pull/420#issuecomment-7159164682) @⁠GamingRipperDoc This PR won't build on current main exactly because of you using `miniz_oxide`, current main has no `miniz_oxide` anymore, and for at least 12 hours for that matter. #69 on the other hand, adds unnecessary `miniz_oxide` back to the root Cargo.toml leaving app with two zip unpacking packages. I suggest closing both in favor of #402 which is minimal change, resolves conflicts and uses `zlib-rs` instead of just re-pulling `miniz_oxide`.
Author
Owner

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

Closing this in favor of #402, as @⁠domints suggested: it does the same thing (Agility SDK runtime for SM 6.6 on Windows 10), merges cleanly on current main, and unpacks with zlib-rs instead of bringing miniz_oxide back. This branch no longer builds on main because miniz_oxide is gone.

My Windows 10 22H2 + RX 9070 XT results from this PR still apply to the approach. I'll check #402 on the same machine and report there.

No game data in this comment.

AI-assisted (Claude Code).

**@⁠GamingRipperDoc** on GitHub · 2026-11-26 06:29 UTC · [original](https://github.com/fxceless/victory-fork/pull/420#issuecomment-7184476036) Closing this in favor of #402, as @⁠domints suggested: it does the same thing (Agility SDK runtime for SM 6.6 on Windows 10), merges cleanly on current `main`, and unpacks with `zlib-rs` instead of bringing `miniz_oxide` back. This branch no longer builds on `main` because `miniz_oxide` is gone. My Windows 10 22H2 + RX 9070 XT results from this PR still apply to the approach. I'll check #402 on the same machine and report there. No game data in this comment. AI-assisted (Claude Code).

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.