Windows 10: load the D3D12 Agility SDK runtime (shader model 6.6) #44

Open
github-bot wants to merge 6 commits from github-bot/gh-44 into main AGit
Owner

@⁠Arvi23 on GitHub · 2026-11-25 12:47 UTC · original
Arvi23:pr/windows10-agility → main · +571 −5 · 15 files · 6 commits · open

Windows 10's in-box D3D12 runtime stops at shader model 6.5. It refuses the root signatures every translated pipeline uses (directly indexed heaps, flags 0x400/0x800, logged as root signature flags c01/c00), so nothing draws, and the title crashes during init. This tree's README lists Windows 10 as supported, but nothing here loads a newer runtime yet.

What

Six commits, authorship kept:

  1. 1b3243e (Marvisak/VIctory#175 by kykifox1337-source, as carried in fxceless/victory-fork#420):
    • victory.exe exports D3D12SDKVersion = 620 and D3D12SDKPath = ".\D3D12\".
    • cargo xtask agility downloads Microsoft.Direct3D.D3D12 1.620.2 from nuget.org, checks its published SHA-512, and unpacks D3D12Core.dll and d3d12SDKLayers.dll into target\<profile>\D3D12\. The DLLs never enter the repository.
    • victory config reports whether the runtime is in place.
  2. 7fde840 (Marvisak/VIctory#362, also from fxceless/victory-fork#420): the victory-shader test executables get the same exports, only when D3D12Core.dll is staged. Without it they behave as before.
  3. 0807c72: the Windows 10 step goes in this fork's "How it is run here" section. The upstream half of the README stays unchanged.
  4. 451255b: victory-gpu's test executables get the same exports as the shader tests (a build script and a test-only module). Without them, on Windows 10, depth_bounds_control_a_title_draw failed with "host refused the depth bounds pipeline"; it passes on Windows 11.
  5. 7a06d5a: the tests' exports are a .drectve linker directive in the test-only module, not link arguments from the build scripts. Link arguments reached the integration tests too (victory-shader/tests/resource_tracking.rs), which lack the symbols, so cargo test --workspace failed to link. The build scripts now only set cfg(agility_runtime) when the runtime is staged.
  6. ed30376: victory.exe gets the exports only when D3D12Core.dll is in the profile's D3D12\ folder at build time (cfg(agility_runtime), as the test executables already did). Without it, the executable names no runtime and the in-box one is used, as on 01aadd1. Before this commit, Windows 11 without cargo xtask agility failed every device creation with D3D12_ERROR_INVALID_REDIST (reported below by adrianmjim, RX 7900 XT). cargo xtask agility now also touches apps/victory/build.rs, so the next build picks the runtime up, and victory config says which case applies: present, named but missing, or not built in.

Changes for this tree:

  • apps/victory/build.rs keeps this tree's /STACK:16777216 next to the two /EXPORTs (the exports only when the runtime is staged, see 6).
  • crates/victory-shader/src/lib.rs gets only the test-only agility module. There is no bvh module here.
  • xtask declares miniz_oxide itself, since the workspace doesn't list it.

When the runtime was not staged at build time, on Windows 11 or 10, victory.exe names no runtime and the in-box one is used, as before. D3D12 does not fall back when an executable names a runtime that is missing (D3D12_ERROR_INVALID_REDIST), which is why the exports are only added once cargo xtask agility has filled the folder (commit 6).

Tested

RX 9070 XT, driver 32.0.32029.2010, Ryzen 7 5800X3D, 32 GB, Windows 10 IoT Enterprise LTSC 21H2 (19044), Rust 1.98.1.

  • In game, on 71652a2 + this PR + the integer-target blend PR: the diagnostics build, run as your README describes (same VICTORY_* settings), loads into the prologue. 0 root signatures were refused, the whole first room was drawn, at 2.7–3.0 fps, with no crash or device removal. Five earlier runs on 4cbe9d7 plus these commits also refused no root signatures.
  • Without them, Windows 10 refuses every root signature (flags c01). I saw that on fxceless's tree on this machine, where the title crashed about 2 s in.
  • cargo xtask agility, then victory config: d3d12 sdk : ...\target\diag\D3D12\D3D12Core.dll (version 620).
  • cargo test --workspace on 71652a2 + this PR: 555 passed, 7 failed, and the 7 fail without this PR too:
    • the five xmem tests of #2 and #8;
    • repository_passes_policy (lower.rs over the size limit, as your README notes);
    • crash::tests::unwinds_like_the_system_walk, which is flaky on Windows 10: 4 failures in 6 runs on 71652a2 alone, 2 in 6 with this PR.
  • With the runtime staged, the tests that need an SM 6.6 card run on the card: no "no SM 6.6 device" in the run, and depth_bounds_control_a_title_draw passes.
  • In one of several runs queue::tests::present_runs_after_a_queues_wait failed once. It passed on its own 5 times out of 5, so it looks timing-sensitive.
  • cargo clippy on the touched crates: no warnings in the touched files.
  • Commit 6, debug build on this machine: with no D3D12\ folder at build time, victory.exe has no exports and victory config says the in-box runtime is used. With the folder staged and a rebuild, both exports are there, victory config names D3D12Core.dll (version 620), and victory translate --pipelines makes its device on the Agility runtime (host waves 32-64 lanes). With the folder removed afterwards, victory config says it is named but missing.

Not tested here: Windows 11. adrianmjim's report there found the regression that commit 6 fixes; a retest of the new head is pending. On NVIDIA, #113 ran the workspace tests with this PR on Windows 10 (RTX 2060).

AI use: Claude Code (Claude Opus 5.5) assembled and adapted the commits, ran the checks, and wrote this. The runs are on my machine.

🤖 Generated with Claude Code

**@⁠Arvi23** on GitHub · 2026-11-25 12:47 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/44) `Arvi23:pr/windows10-agility` → `main` · +571 −5 · 15 files · 6 commits · open Windows 10's in-box D3D12 runtime stops at shader model 6.5. It refuses the root signatures every translated pipeline uses (directly indexed heaps, flags `0x400`/`0x800`, logged as `root signature flags c01`/`c00`), so nothing draws, and the title crashes during init. This tree's README lists Windows 10 as supported, but nothing here loads a newer runtime yet. ## What Six commits, authorship kept: 1. `1b3243e` (Marvisak/VIctory#175 by kykifox1337-source, as carried in fxceless/victory-fork#420): - `victory.exe` exports `D3D12SDKVersion = 620` and `D3D12SDKPath = ".\D3D12\"`. - `cargo xtask agility` downloads `Microsoft.Direct3D.D3D12` 1.620.2 from nuget.org, checks its published SHA-512, and unpacks `D3D12Core.dll` and `d3d12SDKLayers.dll` into `target\<profile>\D3D12\`. The DLLs never enter the repository. - `victory config` reports whether the runtime is in place. 2. `7fde840` (Marvisak/VIctory#362, also from fxceless/victory-fork#420): the `victory-shader` test executables get the same exports, only when `D3D12Core.dll` is staged. Without it they behave as before. 3. `0807c72`: the Windows 10 step goes in this fork's "How it is run here" section. The upstream half of the README stays unchanged. 4. `451255b`: `victory-gpu`'s test executables get the same exports as the shader tests (a build script and a test-only module). Without them, on Windows 10, `depth_bounds_control_a_title_draw` failed with "host refused the depth bounds pipeline"; it passes on Windows 11. 5. `7a06d5a`: the tests' exports are a `.drectve` linker directive in the test-only module, not link arguments from the build scripts. Link arguments reached the integration tests too (`victory-shader/tests/resource_tracking.rs`), which lack the symbols, so `cargo test --workspace` failed to link. The build scripts now only set `cfg(agility_runtime)` when the runtime is staged. 6. `ed30376`: `victory.exe` gets the exports only when `D3D12Core.dll` is in the profile's `D3D12\` folder at build time (`cfg(agility_runtime)`, as the test executables already did). Without it, the executable names no runtime and the in-box one is used, as on `01aadd1`. Before this commit, Windows 11 without `cargo xtask agility` failed every device creation with `D3D12_ERROR_INVALID_REDIST` (reported below by adrianmjim, RX 7900 XT). `cargo xtask agility` now also touches `apps/victory/build.rs`, so the next build picks the runtime up, and `victory config` says which case applies: present, named but missing, or not built in. Changes for this tree: - `apps/victory/build.rs` keeps this tree's `/STACK:16777216` next to the two `/EXPORT`s (the exports only when the runtime is staged, see 6). - `crates/victory-shader/src/lib.rs` gets only the test-only `agility` module. There is no `bvh` module here. - `xtask` declares `miniz_oxide` itself, since the workspace doesn't list it. When the runtime was not staged at build time, on Windows 11 or 10, `victory.exe` names no runtime and the in-box one is used, as before. D3D12 does not fall back when an executable names a runtime that is missing (`D3D12_ERROR_INVALID_REDIST`), which is why the exports are only added once `cargo xtask agility` has filled the folder (commit 6). ## Tested RX 9070 XT, driver 32.0.32029.2010, Ryzen 7 5800X3D, 32 GB, **Windows 10 IoT Enterprise LTSC 21H2 (19044)**, Rust 1.98.1. - In game, on `71652a2` + this PR + the integer-target blend PR: the diagnostics build, run as your README describes (same `VICTORY_*` settings), loads into the prologue. 0 root signatures were refused, the whole first room was drawn, at 2.7–3.0 fps, with no crash or device removal. Five earlier runs on `4cbe9d7` plus these commits also refused no root signatures. - Without them, Windows 10 refuses every root signature (`flags c01`). I saw that on fxceless's tree on this machine, where the title crashed about 2 s in. - `cargo xtask agility`, then `victory config`: `d3d12 sdk : ...\target\diag\D3D12\D3D12Core.dll (version 620)`. - `cargo test --workspace` on `71652a2` + this PR: **555 passed, 7 failed**, and the 7 fail without this PR too: - the five `xmem` tests of #2 and #8; - `repository_passes_policy` (`lower.rs` over the size limit, as your README notes); - `crash::tests::unwinds_like_the_system_walk`, which is flaky on Windows 10: 4 failures in 6 runs on `71652a2` alone, 2 in 6 with this PR. - With the runtime staged, the tests that need an SM 6.6 card run on the card: no "no SM 6.6 device" in the run, and `depth_bounds_control_a_title_draw` passes. - In one of several runs `queue::tests::present_runs_after_a_queues_wait` failed once. It passed on its own 5 times out of 5, so it looks timing-sensitive. - `cargo clippy` on the touched crates: no warnings in the touched files. - Commit 6, debug build on this machine: with no `D3D12\` folder at build time, `victory.exe` has no exports and `victory config` says the in-box runtime is used. With the folder staged and a rebuild, both exports are there, `victory config` names `D3D12Core.dll (version 620)`, and `victory translate --pipelines` makes its device on the Agility runtime (`host waves 32-64 lanes`). With the folder removed afterwards, `victory config` says it is named but missing. Not tested here: Windows 11. adrianmjim's report there found the regression that commit 6 fixes; a retest of the new head is pending. On NVIDIA, #113 ran the workspace tests with this PR on Windows 10 (RTX 2060). AI use: Claude Code (Claude Opus 5.5) assembled and adapted the commits, ran the checks, and wrote this. The runs are on my machine. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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 f3c73334561b04cbbc2b00419f0a7d1ba777a9f9)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
victory-gpu's test executables had no D3D12SDKVersion and D3D12SDKPath
exports, so on Windows 10 they ran on the in-box runtime, which refuses
the root signatures of translated shaders:
depth_bounds_control_a_title_draw failed with "host refused the depth
bounds pipeline" (it passes on Windows 11).

The same as victory-shader's: a test-only `agility` module and a build
script that exports it only when `cargo xtask agility` has staged
D3D12Core.dll; the xtask touches both build scripts, and the version
test checks all three copies of D3D12SDKVersion.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The build scripts passed /EXPORT:D3D12SDKVersion and /EXPORT:D3D12SDKPath
as link arguments, which reach every executable of the crate, the
integration tests too. Those link the library without its test-only
`agility` module, so `cargo test --workspace` failed to link
victory-shader's tests/resource_tracking.rs ("unresolved external symbol
D3D12SDKVersion").

The exports are now a `.drectve` linker directive in the `agility` module
itself, so only the unit-test executable carries them, and the build
scripts set `cfg(agility_runtime)` when the runtime is staged instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
D3D12 does not fall back to the in-box runtime when the runtime an
executable names is missing: it refuses the device with
D3D12_ERROR_INVALID_REDIST. victory.exe exported D3D12SDKVersion 620
always, so on Windows 11 without `cargo xtask agility` every device
creation failed (reported on this PR with an RX 7900 XT, Windows 11 26300),
where it had used the in-box runtime before.

The executable now exports the two symbols only when D3D12Core.dll is in
the profile's D3D12\ folder at build time (cfg(agility_runtime)), as the
shader and GPU test executables already did; without it it names no
runtime and the in-box one is used, as before this PR. `cargo xtask
agility` touches apps/victory/build.rs too, so the next build exports
them. `victory config` says which of the three it is: built in and there,
built in but missing (device creation fails), or not built in.

Checked on Windows 10 (RX 9070 XT): without the folder no exports and the
in-box runtime; with it the exports, and the device is made on the Agility
runtime (translate --pipelines).

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

@⁠chazi123 on GitHub · 2026-11-25 13:01 UTC · original

One more data point for 620 on NVIDIA, from a different tree (JoshuuDev/victory-amd, same translator core), Windows 10 19045 + RTX 3060 Laptop 12 GB:

  • host mesh shader support mesh=true, the world reaches and draws.
  • The version was 620, not 614 — relevant to #9, which uses a 614 shim and still stops on the loading spinner. The shim itself does not look like the blocker there.
  • Result on this box: menus 30 fps, world 2.9-4.2 fps, correct colours, no device loss for 8+ minutes.

The method differs from the PR above, and it needs no build-script change — useful when apps/victory/build.rs is not yours to edit. Load the runtime at call time instead of through /EXPORT:

D3D12GetInterface(CLSID_D3D12SDKConfiguration)
  -> CreateDeviceFactory(620, "<exe>\D3D12")
  -> SetFlags(ALLOW_RETURNING_EXISTING_DEVICE)
  -> ApplyToGlobalState()

called from host::create(), immediately before D3D12CreateDevice. D3D12Core.dll still has to be in <exe>\D3D12\; only the wiring differs. About 165 lines, no dependency beyond the windows crate already in the tree, one call site.

Source: https://github.com/chazi123/xcl-chazi/tree/main/victory-amd-win10-nvidia — files/agility.rs, with log excerpts in logs/evidence.txt.

One thing worth knowing whichever path is taken: D3D12 does not fall back when the executable names a runtime that is missing (D3D12_ERROR_INVALID_REDIST), so this path returns a state rather than failing silently and falls through to the in-box runtime only when it was never loaded.

**@⁠chazi123** on GitHub · 2026-11-25 13:01 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/44#issuecomment-7163184007) One more data point for 620 on NVIDIA, from a different tree (JoshuuDev/victory-amd, same translator core), Windows 10 19045 + RTX 3060 Laptop 12 GB: - `host mesh shader support mesh=true`, the world reaches and draws. - The version was **620, not 614** — relevant to #9, which uses a 614 shim and still stops on the loading spinner. The shim itself does not look like the blocker there. - Result on this box: menus 30 fps, world 2.9-4.2 fps, correct colours, no device loss for 8+ minutes. The method differs from the PR above, and it needs no build-script change — useful when `apps/victory/build.rs` is not yours to edit. Load the runtime at call time instead of through `/EXPORT`: ```rust D3D12GetInterface(CLSID_D3D12SDKConfiguration) -> CreateDeviceFactory(620, "<exe>\D3D12") -> SetFlags(ALLOW_RETURNING_EXISTING_DEVICE) -> ApplyToGlobalState() ``` called from `host::create()`, immediately before `D3D12CreateDevice`. `D3D12Core.dll` still has to be in `<exe>\D3D12\`; only the wiring differs. About 165 lines, no dependency beyond the `windows` crate already in the tree, one call site. Source: https://github.com/chazi123/xcl-chazi/tree/main/victory-amd-win10-nvidia — `files/agility.rs`, with log excerpts in `logs/evidence.txt`. One thing worth knowing whichever path is taken: D3D12 does not fall back when the executable names a runtime that is missing (`D3D12_ERROR_INVALID_REDIST`), so this path returns a state rather than failing silently and falls through to the in-box runtime only when it was never loaded.
Author
Owner

@⁠Arvi23 on GitHub · 2026-11-25 13:28 UTC · original

Added 451255b: victory-gpu's test executables now get the Agility exports too, as the shader tests already did (a build script plus a test-only module, and cargo xtask agility touches both build scripts).

This comes from the note on #45 that depth_bounds_control_a_title_draw passes on Windows 11. On Windows 10 it failed with "host refused the depth bounds pipeline", because the victory-gpu tests still ran on the in-box runtime. It was the tests, not the game. With the commit, cargo test -p victory-gpu --lib on this branch gives 109 passed, 0 failed, three runs in a row (RX 9070 XT, Windows 10 LTSC 21H2). The description is updated.

AI use: Claude Code (Claude Opus 5.5) wrote the commit and this; the runs are on my machine.

**@⁠Arvi23** on GitHub · 2026-11-25 13:28 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/44#issuecomment-7163831693) Added `451255b`: `victory-gpu`'s test executables now get the Agility exports too, as the shader tests already did (a build script plus a test-only module, and `cargo xtask agility` touches both build scripts). This comes from the note on #45 that `depth_bounds_control_a_title_draw` passes on Windows 11. On Windows 10 it failed with "host refused the depth bounds pipeline", because the `victory-gpu` tests still ran on the in-box runtime. It was the tests, not the game. With the commit, `cargo test -p victory-gpu --lib` on this branch gives 109 passed, 0 failed, three runs in a row (RX 9070 XT, Windows 10 LTSC 21H2). The description is updated. AI use: Claude Code (Claude Opus 5.5) wrote the commit and this; the runs are on my machine.
Author
Owner

@⁠Arvi23 on GitHub · 2026-11-25 13:33 UTC · original

One more fix, 7a06d5a: with the Agility runtime staged, cargo test --workspace failed to link victory-shader/tests/resource_tracking.rs ("unresolved external symbol D3D12SDKVersion"). The build scripts' /EXPORT link arguments reached the integration tests too, and those don't have the test-only module. The exports are now a .drectve linker directive inside that module, so only the unit-test executable carries them.

cargo test --workspace on this branch now links and runs: 555 passed, and the 7 that fail also fail without this PR (listed in the description).

**@⁠Arvi23** on GitHub · 2026-11-25 13:33 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/44#issuecomment-7163944572) One more fix, `7a06d5a`: with the Agility runtime staged, `cargo test --workspace` failed to link `victory-shader/tests/resource_tracking.rs` ("unresolved external symbol D3D12SDKVersion"). The build scripts' `/EXPORT` link arguments reached the integration tests too, and those don't have the test-only module. The exports are now a `.drectve` linker directive inside that module, so only the unit-test executable carries them. `cargo test --workspace` on this branch now links and runs: 555 passed, and the 7 that fail also fail without this PR (listed in the description).
Author
Owner

@⁠adrianmjim on GitHub · 2026-11-25 17:23 UTC · original

Tried on Windows 11 (build 26300, in-box D3D12Core.dll 10.0.26100.9818), RX 7900 XT, with this PR (7a06d5a) applied to 01aadd1, release build, without running cargo xtask agility:

> victory translate --pipelines --jobs 1 <game>\data
Error: La configuración de la versión del SDK de D3D12 del host exe no es válida.

(The system's Spanish text for D3D12_ERROR_INVALID_REDIST: "the host exe's D3D12 SDK version configuration is invalid".) The same command on 01aadd1 creates the device (host waves 32-64 lanes) and goes on translating. So on this Windows 11 the in-box runtime is not used as before when the folder is missing: victory.exe always exports D3D12SDKVersion = 620, the in-box runtime here does not satisfy it, and D3D12 refuses the device rather than falling back, as the description itself notes. victory run creates its device the same way, so it would fail too for anyone on Windows 11 who has not run cargo xtask agility.

Maybe make the exports on victory.exe opt-in in the same way as the test executables (only when the runtime is staged at build time, e.g. the agility_runtime cfg the build scripts already compute), or have victory config/run fail early with a hint to run cargo xtask agility. I can retest a new head on this machine.

**@⁠adrianmjim** on GitHub · 2026-11-25 17:23 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/44#issuecomment-7169443247) Tried on **Windows 11** (build 26300, in-box `D3D12Core.dll` 10.0.26100.9818), RX 7900 XT, with this PR (`7a06d5a`) applied to `01aadd1`, release build, **without** running `cargo xtask agility`: ``` > victory translate --pipelines --jobs 1 <game>\data Error: La configuración de la versión del SDK de D3D12 del host exe no es válida. ``` (The system's Spanish text for `D3D12_ERROR_INVALID_REDIST`: "the host exe's D3D12 SDK version configuration is invalid".) The same command on `01aadd1` creates the device (`host waves 32-64 lanes`) and goes on translating. So on this Windows 11 the in-box runtime is **not** used as before when the folder is missing: `victory.exe` always exports `D3D12SDKVersion = 620`, the in-box runtime here does not satisfy it, and D3D12 refuses the device rather than falling back, as the description itself notes. `victory run` creates its device the same way, so it would fail too for anyone on Windows 11 who has not run `cargo xtask agility`. Maybe make the exports on `victory.exe` opt-in in the same way as the test executables (only when the runtime is staged at build time, e.g. the `agility_runtime` cfg the build scripts already compute), or have `victory config`/`run` fail early with a hint to run `cargo xtask agility`. I can retest a new head on this machine.
Author
Owner

@⁠Arvi23 on GitHub · 2026-11-25 18:31 UTC · original

@⁠adrianmjim thanks, that's a real regression, and your first suggestion is the fix: ed30376 makes the exports on victory.exe depend on the runtime being staged at build time, as the test executables already did.

  • apps/victory/build.rs exports D3D12SDKVersion/D3D12SDKPath only when target\<profile>\D3D12\D3D12Core.dll exists when it runs (cfg(agility_runtime)). Without it, victory.exe names no runtime and D3D12 uses the in-box one, as 01aadd1 does.
  • cargo xtask agility now also touches apps/victory/build.rs, so the next build picks the runtime up without a clean.
  • victory config says which case it is: built in and present, built in but missing (device creation will fail, run cargo xtask agility), or not built in (in-box runtime).

Checked here on Windows 10 (RX 9070 XT, driver 32.0.32029.2010), debug build:

exports in victory.exe victory config device
no D3D12\ folder at build time none not built in, in-box runtime in-box (Windows 10 then refuses SM 6.6, as before)
folder staged, then built both D3D12Core.dll (version 620) made on the Agility runtime (translate --pipelines: host waves 32-64 lanes)
built with it, folder removed after both named but missing, run cargo xtask agility would fail (your case, now announced)

I can't test Windows 11 here, so a retest of the new head on your machine (without cargo xtask agility) would confirm the device comes up on the in-box runtime again.

AI use: Claude Code (Claude Opus 5.5) wrote the fix and this reply; the checks ran on my machine.

**@⁠Arvi23** on GitHub · 2026-11-25 18:31 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/44#issuecomment-7171030590) @⁠adrianmjim thanks, that's a real regression, and your first suggestion is the fix: `ed30376` makes the exports on `victory.exe` depend on the runtime being staged at build time, as the test executables already did. - `apps/victory/build.rs` exports `D3D12SDKVersion`/`D3D12SDKPath` only when `target\<profile>\D3D12\D3D12Core.dll` exists when it runs (`cfg(agility_runtime)`). Without it, `victory.exe` names no runtime and D3D12 uses the in-box one, as `01aadd1` does. - `cargo xtask agility` now also touches `apps/victory/build.rs`, so the next build picks the runtime up without a clean. - `victory config` says which case it is: built in and present, built in but missing (device creation will fail, run `cargo xtask agility`), or not built in (in-box runtime). Checked here on Windows 10 (RX 9070 XT, driver 32.0.32029.2010), debug build: | | exports in `victory.exe` | `victory config` | device | |---|---|---|---| | no `D3D12\` folder at build time | none | not built in, in-box runtime | in-box (Windows 10 then refuses SM 6.6, as before) | | folder staged, then built | both | `D3D12Core.dll (version 620)` | made on the Agility runtime (`translate --pipelines`: `host waves 32-64 lanes`) | | built with it, folder removed after | both | named but missing, run `cargo xtask agility` | would fail (your case, now announced) | I can't test Windows 11 here, so a retest of the new head on your machine (without `cargo xtask agility`) would confirm the device comes up on the in-box runtime again. AI use: Claude Code (Claude Opus 5.5) wrote the fix and this reply; the checks ran on my machine.
Author
Owner

@⁠HAL9000RELOADED on GitHub · 2026-11-25 18:35 UTC · original

Another Windows 10 data point, on RDNA3: Windows 10 22H2 (19045), RX 7900 XTX 24 GB, driver 32.0.32015.7029, i7-13700KF, 96 GB, Rust 1.98.1. ed30376 merged on 000ffdd (clean), debug build.

victory.exe (victory translate --pipelines --jobs 1 <empty dir>, which makes the host device without game data):

exports (dumpbin /exports) victory config device
no D3D12\ at build time none not built in, the in-box runtime is used in-box runtime: the device supports SM 0x65 only (on Windows 10, cargo xtask agility …)
cargo xtask agility, then build both D3D12Core.dll (version 620) host waves 32-64 lanes

On 7a06d5a the first row was D3D12_ERROR_INVALID_REDIST here too, so @⁠adrianmjim's case also happened on Windows 10. With ed30376 you get the hint instead.

cargo test --workspace, runtime staged: 560 passed, 6 failed: the five xmem tests (#2, #8) and repository_passes_policy. unwinds_like_the_system_walk passed this time (flaky, as you noted). No no SM 6.6 device skips.

For comparison, 000ffdd without this PR fails 38 here: on top of those, 31 victory-shader tests (valu_tests, scratch_tests, lane_read_loop_tests: "the device supports SM 0x65 only") and depth_bounds_control_a_title_draw ("host refused the depth bounds pipeline"). This PR fixes all 32 on this card.

Not tested: building with the runtime and removing the folder afterwards (your third row), and the game itself.

**@⁠HAL9000RELOADED** on GitHub · 2026-11-25 18:35 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/44#issuecomment-7171125403) Another Windows 10 data point, on RDNA3: **Windows 10 22H2 (19045)**, **RX 7900 XTX 24 GB**, driver 32.0.32015.7029, i7-13700KF, 96 GB, Rust 1.98.1. `ed30376` merged on `000ffdd` (clean), debug build. **`victory.exe`** (`victory translate --pipelines --jobs 1 <empty dir>`, which makes the host device without game data): | | exports (`dumpbin /exports`) | `victory config` | device | |---|---|---|---| | no `D3D12\` at build time | none | `not built in, the in-box runtime is used` | in-box runtime: `the device supports SM 0x65 only (on Windows 10, cargo xtask agility …)` | | `cargo xtask agility`, then build | both | `D3D12Core.dll (version 620)` | `host waves 32-64 lanes` | On `7a06d5a` the first row was `D3D12_ERROR_INVALID_REDIST` here too, so @⁠adrianmjim's case also happened on Windows 10. With `ed30376` you get the hint instead. **`cargo test --workspace`**, runtime staged: **560 passed, 6 failed**: the five `xmem` tests (#2, #8) and `repository_passes_policy`. `unwinds_like_the_system_walk` passed this time (flaky, as you noted). No `no SM 6.6 device` skips. For comparison, `000ffdd` without this PR fails 38 here: on top of those, 31 `victory-shader` tests (`valu_tests`, `scratch_tests`, `lane_read_loop_tests`: "the device supports SM 0x65 only") and `depth_bounds_control_a_title_draw` ("host refused the depth bounds pipeline"). This PR fixes all 32 on this card. Not tested: building with the runtime and removing the folder afterwards (your third row), and the game itself.
Author
Owner

@⁠adrianmjim on GitHub · 2026-11-25 18:42 UTC · original

Retested ed30376 on the same machine (Windows 11 build 26300, in-box D3D12Core.dll 10.0.26100.9818, RX 7900 XT), release build, fresh target directory, without cargo xtask agility (no D3D12\ folder beside the executable):

  • victory.exe carries neither D3D12SDKVersion nor D3D12SDKPath.
  • victory config: d3d12 sdk : not built in, the in-box runtime is used (needed on Windows 10: ...).
  • victory translate --pipelines --jobs 1 <game>: the device is created (host waves 32-64 lanes) and translation goes on, as on 01aadd1. With 7a06d5a the same command failed with D3D12_ERROR_INVALID_REDIST.

So the regression is gone here. Not tested: the two other rows of your table on Windows 11 (I did not run cargo xtask agility on this machine).

**@⁠adrianmjim** on GitHub · 2026-11-25 18:42 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/44#issuecomment-7171294222) Retested `ed30376` on the same machine (Windows 11 build 26300, in-box `D3D12Core.dll` 10.0.26100.9818, RX 7900 XT), release build, fresh target directory, **without** `cargo xtask agility` (no `D3D12\` folder beside the executable): - `victory.exe` carries neither `D3D12SDKVersion` nor `D3D12SDKPath`. - `victory config`: `d3d12 sdk : not built in, the in-box runtime is used (needed on Windows 10: ...)`. - `victory translate --pipelines --jobs 1 <game>`: the device is created (`host waves 32-64 lanes`) and translation goes on, as on `01aadd1`. With `7a06d5a` the same command failed with `D3D12_ERROR_INVALID_REDIST`. So the regression is gone here. Not tested: the two other rows of your table on Windows 11 (I did not run `cargo xtask agility` on this machine).
Author
Owner

@⁠lerapeurdu62280-debug on GitHub · 2026-11-26 19:20 UTC · original

Test report on RDNA 2 under Windows 10, which this PR had no data point for yet: Windows 10 Pro 19045, AMD RX 6600 8 GB (Adrenalin 32.0.21045), Rust 1.98.1, debug build. ed30376 merged on main 4f62c2a (merges cleanly). No game files.

victory.exe (victory translate --pipelines <empty folder>, which makes the host device first):

exports result victory config
before cargo xtask agility none the device supports SM 0x65 only (on Windows 10, cargo xtask agility puts a newer D3D12 runtime beside victory.exe) not built in, the in-box runtime is used …
after cargo xtask agility and a rebuild D3D12SDKPath, D3D12SDKVersion device made, no error …\target\debug\D3D12\D3D12Core.dll (version 620)

So no 0x887E0003 without the runtime, and clear messages both ways. cargo xtask agility downloaded 1.620.2 and staged it into debug, release and diag.

Test binaries:

without the runtime with it
victory-gpu 112 passed, 1 failed (depth_bounds_control_a_title_draw) 113 passed, 0 failed (2 runs)
victory-shader 246 passed, 31 failed 275 passed, 2 failed

The two victory-shader failures left (valu_tests::scalar_counted_in_a_divergent_loop_read_after_it, scalar_counted_in_nested_divergent_loops) fail without the runtime too, so they are not from this PR. In one of four full victory-gpu runs with the runtime, resource::tests::copy_texture_region_reads_back_into_title_buffer failed (aligned row 0, all zeros). It passed 3/3 alone and in the other runs, so it looks like a parallel-run flake.

A small note, not a blocker: the build scripts watch the D3D12 folder through rerun-if-changed. If the folder is moved away and back by hand (its files keep their old timestamps), the test binary is not rebuilt and keeps whatever it had: I got a binary without the exports while the runtime was there, until I touched build.rs. Going through cargo xtask agility did not hit this.

AI-assisted: yes (Claude Code)

**@⁠lerapeurdu62280-debug** on GitHub · 2026-11-26 19:20 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/44#issuecomment-7201467582) Test report on **RDNA 2 under Windows 10**, which this PR had no data point for yet: **Windows 10 Pro 19045, AMD RX 6600 8 GB** (Adrenalin 32.0.21045), Rust 1.98.1, debug build. `ed30376` merged on `main` 4f62c2a (merges cleanly). No game files. **`victory.exe`** (`victory translate --pipelines <empty folder>`, which makes the host device first): | | exports | result | `victory config` | |---|---|---|---| | before `cargo xtask agility` | none | `the device supports SM 0x65 only (on Windows 10, cargo xtask agility puts a newer D3D12 runtime beside victory.exe)` | `not built in, the in-box runtime is used …` | | after `cargo xtask agility` and a rebuild | `D3D12SDKPath`, `D3D12SDKVersion` | device made, no error | `…\target\debug\D3D12\D3D12Core.dll (version 620)` | So no 0x887E0003 without the runtime, and clear messages both ways. `cargo xtask agility` downloaded 1.620.2 and staged it into `debug`, `release` and `diag`. **Test binaries:** | | without the runtime | with it | |---|---|---| | `victory-gpu` | 112 passed, 1 failed (`depth_bounds_control_a_title_draw`) | **113 passed, 0 failed** (2 runs) | | `victory-shader` | 246 passed, 31 failed | **275 passed, 2 failed** | The two `victory-shader` failures left (`valu_tests::scalar_counted_in_a_divergent_loop_read_after_it`, `scalar_counted_in_nested_divergent_loops`) fail without the runtime too, so they are not from this PR. In one of four full `victory-gpu` runs with the runtime, `resource::tests::copy_texture_region_reads_back_into_title_buffer` failed (`aligned row 0`, all zeros). It passed 3/3 alone and in the other runs, so it looks like a parallel-run flake. A small note, not a blocker: the build scripts watch the `D3D12` folder through `rerun-if-changed`. If the folder is moved away and back by hand (its files keep their old timestamps), the test binary is not rebuilt and keeps whatever it had: I got a binary without the exports while the runtime was there, until I touched `build.rs`. Going through `cargo xtask agility` did not hit this. AI-assisted: yes (Claude Code)
Author
Owner

@⁠Arvi23 on GitHub · 2026-11-26 19:55 UTC · original

Thanks for testing on RDNA 2 under Windows 10, that's the combination the PR had no data for. The SM 0x65 only message without the runtime, and a clean device with it, is exactly the behaviour I was after. The test numbers match too: without a runtime that has shader model 6.6, the shader tests that need it can't make their pipelines.

**@⁠Arvi23** on GitHub · 2026-11-26 19:55 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/44#issuecomment-7202101349) Thanks for testing on RDNA 2 under Windows 10, that's the combination the PR had no data for. The `SM 0x65 only` message without the runtime, and a clean device with it, is exactly the behaviour I was after. The test numbers match too: without a runtime that has shader model 6.6, the shader tests that need it can't make their pipelines.
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/44/head:github-bot/gh-44'
git switch 'github-bot/gh-44'

Merge

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