GPU: load an app-local D3D12 Agility SDK runtime when present #463

Open
github-bot wants to merge 1 commit from github-bot/gh-463 into main AGit
Owner

@⁠Shaun-Fong on GitHub · 2026-11-24 03:43 UTC · original
Shaun-Fong:fix/win10-agility-runtime → main · +112 −0 · 3 files · 1 commits · open

Windows 10's inbox D3D12 runtime stops at shader model 6.5, while the shaders victory translates target 6.6 and bind through descriptor heaps. The title's root signatures (flags 0xc01) therefore fail to serialize, its renderer never finishes initializing, and it crashes during Game Init.

When target//D3D12/D3D12Core.dll exists, export the loader's D3D12SDKVersion (614) and D3D12SDKPath (.\D3D12) opt-in symbols so d3d12.dll loads that runtime instead of the system copy, and warn when the runtime is missing at run time. The build script enables the exports only when the file is present, so builds without it behave unchanged.

Verified on Windows 10 19045 with an i5-10400F and an RTX 2070 SUPER: the device reports shader model 6.6, the title's root signatures serialize, and its menus render and respond at 30 fps.

**@⁠Shaun-Fong** on GitHub · 2026-11-24 03:43 UTC · [original](https://github.com/Marvisak/VIctory/pull/463) `Shaun-Fong:fix/win10-agility-runtime` → `main` · +112 −0 · 3 files · 1 commits · open Windows 10's inbox D3D12 runtime stops at shader model 6.5, while the shaders victory translates target 6.6 and bind through descriptor heaps. The title's root signatures (flags 0xc01) therefore fail to serialize, its renderer never finishes initializing, and it crashes during Game Init. When target/<profile>/D3D12/D3D12Core.dll exists, export the loader's D3D12SDKVersion (614) and D3D12SDKPath (.\D3D12\) opt-in symbols so d3d12.dll loads that runtime instead of the system copy, and warn when the runtime is missing at run time. The build script enables the exports only when the file is present, so builds without it behave unchanged. Verified on Windows 10 19045 with an i5-10400F and an RTX 2070 SUPER: the device reports shader model 6.6, the title's root signatures serialize, and its menus render and respond at 30 fps.
Windows 10's inbox D3D12 runtime stops at shader model 6.5, while the
shaders victory translates target 6.6 and bind through descriptor
heaps. The title's root signatures (flags 0xc01) therefore fail to
serialize, its renderer never finishes initializing, and it crashes
during Game Init.

When target/<profile>/D3D12/D3D12Core.dll exists, export the loader's
D3D12SDKVersion (614) and D3D12SDKPath (.\D3D12\) opt-in symbols so
d3d12.dll loads that runtime instead of the system copy, and warn when
the runtime is missing at run time. The build script enables the
exports only when the file is present, so builds without it behave
unchanged.

Verified on Windows 10 19045 with an i5-10400F and an RTX 2070 SUPER:
the device reports shader model 6.6, the title's root signatures
serialize, and its menus render and respond at 30 fps.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:04:58 +00:00
Author
Owner

@⁠DaviTostes on GitHub · 2026-11-24 03:46 UTC · original

The head f47a36e does not build its tests against current main (d2a4bae):

error[E0428]: the name `tests` is defined multiple times
  --> crates/victory-gpu/src/host.rs:1974:1
   |
252 | mod tests {          <- from main
...
1974 | mod tests {         <- this branch

The branch carries its own mod tests while main now already has one in host.rs (same class as #134/#135/#161/#175/#193). A rebase onto current main should fix it; until then cargo test -p victory-gpu fails at compile time, so the change cannot be verified.

No game data here, so the Agility SDK loading itself was not exercised either.

**@⁠DaviTostes** on GitHub · 2026-11-24 03:46 UTC · [original](https://github.com/Marvisak/VIctory/pull/463#issuecomment-7121403337) The head `f47a36e` **does not build its tests** against current `main` (`d2a4bae`): ``` error[E0428]: the name `tests` is defined multiple times --> crates/victory-gpu/src/host.rs:1974:1 | 252 | mod tests { <- from main ... 1974 | mod tests { <- this branch ``` The branch carries its own `mod tests` while `main` now already has one in `host.rs` (same class as #134/#135/#161/#175/#193). A rebase onto current `main` should fix it; until then `cargo test -p victory-gpu` fails at compile time, so the change cannot be verified. No game data here, so the Agility SDK loading itself was not exercised either.
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-24 12:39 UTC · original

I merged f47a36e into ffe310e in an isolated checkout. The GPU library tests built and ran on Windows 10 (50 passed, one benchmark ignored).

I found an incremental build issue. After a build without the SDK, I copied D3D12Core.dll from Agility 1.614.1 with its original, older timestamp. The next cargo build reused victory.exe, and its PE export table still lacked both SDK symbols. Forcing the build script to rerun enabled them.

Watching the D3D12 directory lets Cargo detect the newer directory entry. I verified that copying the older DLL into a newly created directory or an existing empty directory enabled the exports. Removing the DLL from the directory disabled them on the next build. A second build with the DLL still in place did not relink.

The rebuilt CLI passed the startup SM 6.6 check with Agility 614 and WARP 1.0.22, and accepted one header-only synthetic DXBC container. With the same WARP package and no Agility exports, the CLI reported SM 6.5. The opt-in executable also printed its missing-runtime warning when copied without D3D12Core.dll.

AI-assisted. Verified with synthetic input and software D3D12.

Incremental patch on f47a36e
diff --git a/apps/victory/build.rs b/apps/victory/build.rs
index 80f65f2..5ed6983 100644
--- a/apps/victory/build.rs
+++ b/apps/victory/build.rs
@@ -38,8 +38,11 @@ fn main() {
     else {
         return;
     };
-    let runtime = profile_dir.join("D3D12").join("D3D12Core.dll");
-    println!("cargo:rerun-if-changed={}", runtime.display());
+    let runtime_dir = profile_dir.join("D3D12");
+    // A copied DLL can have an older timestamp than the last build. The
+    // directory changes when the DLL is added or removed.
+    println!("cargo:rerun-if-changed={}", runtime_dir.display());
+    let runtime = runtime_dir.join("D3D12Core.dll");
     if !runtime.is_file() {
         return;
     }
**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-24 12:39 UTC · [original](https://github.com/Marvisak/VIctory/pull/463#issuecomment-7131732876) I merged `f47a36e` into `ffe310e` in an isolated checkout. The GPU library tests built and ran on Windows 10 (50 passed, one benchmark ignored). I found an incremental build issue. After a build without the SDK, I copied `D3D12Core.dll` from Agility 1.614.1 with its original, older timestamp. The next `cargo build` reused `victory.exe`, and its PE export table still lacked both SDK symbols. Forcing the build script to rerun enabled them. Watching the `D3D12` directory lets Cargo detect the newer directory entry. I verified that copying the older DLL into a newly created directory or an existing empty directory enabled the exports. Removing the DLL from the directory disabled them on the next build. A second build with the DLL still in place did not relink. The rebuilt CLI passed the startup SM 6.6 check with Agility 614 and WARP 1.0.22, and accepted one header-only synthetic DXBC container. With the same WARP package and no Agility exports, the CLI reported SM 6.5. The opt-in executable also printed its missing-runtime warning when copied without `D3D12Core.dll`. AI-assisted. Verified with synthetic input and software D3D12. <details> <summary>Incremental patch on f47a36e</summary> ```diff diff --git a/apps/victory/build.rs b/apps/victory/build.rs index 80f65f2..5ed6983 100644 --- a/apps/victory/build.rs +++ b/apps/victory/build.rs @@ -38,8 +38,11 @@ fn main() { else { return; }; - let runtime = profile_dir.join("D3D12").join("D3D12Core.dll"); - println!("cargo:rerun-if-changed={}", runtime.display()); + let runtime_dir = profile_dir.join("D3D12"); + // A copied DLL can have an older timestamp than the last build. The + // directory changes when the DLL is added or removed. + println!("cargo:rerun-if-changed={}", runtime_dir.display()); + let runtime = runtime_dir.join("D3D12Core.dll"); if !runtime.is_file() { return; } ``` </details>
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:26 UTC · original · edited 2026-11-25 01:16 UTC

Automated triage for the maintainers.

Needs rebase. This pull request conflicts with main (conflicting: README.md). It will be reviewed once it is rebased onto the current main.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 00:26 UTC · [original](https://github.com/Marvisak/VIctory/pull/463#issuecomment-7148520592) · edited 2026-11-25 01:16 UTC <!-- victory-triage v1 head=f47a36e83f86f6b377aa6741d9dd2fee22fca551 verdict=needs-rebase at=2026-11-25T01:16:13Z --> Automated triage for the maintainers. **Needs rebase.** This pull request conflicts with `main` (conflicting: `README.md`). It will be reviewed once it is rebased onto the current `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠reboot0000-cmd on GitHub · 2026-11-25 06:04 UTC · original

Two small additions to the verifications above, from a third host (Windows 10 IoT Enterprise LTSC 2021 19044.7846, RTX 4090, Agility 1.614.1 as staged, #463 + #486 cherry-picked with the same single README.md conflict the triage bot flags):

  1. The opt-in fails silently, and the failure looks like a GPU problem. Without target\<profile>\D3D12\D3D12Core.dll the exports are simply not emitted, the build succeeds, and the run dies with Error: the device supports SM 0x65 only — on a 4090, which reads as a driver or hardware limitation rather than a missing file. A cargo:warning= in the else branch (something like "no app-local D3D12 runtime found; the host will stay at SM 6.5") would turn a confusing half hour into a one-line answer. This is separate from @⁠andrewpozdnakov7-jpg's timestamp finding, where the file is present but the export table goes stale: same silent outcome, different cause, and both are worth covering.
  2. Confirmed both halves of the loader's behaviour, which the incremental report leaves partly implicit: with the exports present and the DLL removed, the run refuses with the D3D12 SDK version configuration of the host exe is invalid rather than falling back to the in-box runtime; and putting System32\D3D12Core.dll (10.0.19041.7291 here) in the app-local slot gives the same refusal, because the export announces 614. So the opt-in is genuinely read and version-checked — it is not merely the presence of a DLL that changes the shader model.

The downstream value of merging this is a hardware picture nobody can publish without it: with the opt-in we completed a full translate --validate --pipelines over the title's shader archive on this machine in ~43 minutes with no device removal, which is posted on #1247. Without #463, that stage cannot be measured at all on a Windows 10 host. Counts and offsets only, per the asset policy.

**@⁠reboot0000-cmd** on GitHub · 2026-11-25 06:04 UTC · [original](https://github.com/Marvisak/VIctory/pull/463#issuecomment-7154416563) Two small additions to the verifications above, from a third host (Windows 10 IoT Enterprise LTSC 2021 **19044.7846**, RTX 4090, Agility 1.614.1 as staged, #463 + #486 cherry-picked with the same single `README.md` conflict the triage bot flags): 1. **The opt-in fails silently, and the failure looks like a GPU problem.** Without `target\<profile>\D3D12\D3D12Core.dll` the exports are simply not emitted, the build succeeds, and the run dies with `Error: the device supports SM 0x65 only` — on a 4090, which reads as a driver or hardware limitation rather than a missing file. A `cargo:warning=` in the `else` branch (something like "no app-local D3D12 runtime found; the host will stay at SM 6.5") would turn a confusing half hour into a one-line answer. This is separate from @⁠andrewpozdnakov7-jpg's timestamp finding, where the file is present but the export table goes stale: same silent outcome, different cause, and both are worth covering. 2. **Confirmed both halves of the loader's behaviour**, which the incremental report leaves partly implicit: with the exports present and the DLL removed, the run refuses with `the D3D12 SDK version configuration of the host exe is invalid` rather than falling back to the in-box runtime; and putting `System32\D3D12Core.dll` (10.0.19041.7291 here) in the app-local slot gives the same refusal, because the export announces 614. So the opt-in is genuinely read and version-checked — it is not merely the presence of a DLL that changes the shader model. The downstream value of merging this is a hardware picture nobody can publish without it: with the opt-in we completed a full `translate --validate --pipelines` over the title's shader archive on this machine in ~43 minutes with no device removal, which is posted on #1247. Without #463, that stage cannot be measured at all on a Windows 10 host. Counts and offsets only, per the asset policy.
Author
Owner

@⁠leonidaavenger on GitHub · 2026-11-25 06:10 UTC · original

Tested on Windows 10 with an RTX 4070 Ti: works. With this PR the title gets past the root-signature failure, into the world and through the opening cutscene to the Prologue, with no device removal.

Setup: Windows 10 22H2 (19045), RTX 4070 Ti 12 GB, driver 621.14, i9-12900K, 32 GB.

Build: this PR's apps/victory/build.rs and src/main.rs (f47a36e) applied on fxceless/victory-fork 310c6eb. It applies cleanly there; I left out the README hunk because the fork's README differs. I did not test it on this PR's own base. Diag build, Series X, VICTORY_RELAY=0 VICTORY_LATE_WAIT=0 VICTORY_D3D12_DRED=1.

Runtime: Microsoft.Direct3D.D3D12 1.614.1 from nuget.org (Authenticode: Microsoft Corporation). I put D3D12Core.dll and d3d12SDKLayers.dll in target\diag\D3D12\ before building.

  • The build printed opting the host D3D12 runtime into Agility SDK 614 (…\target\diag\D3D12\D3D12Core.dll).
  • dumpbin /exports lists D3D12SDKPath and D3D12SDKVersion.
  • At run time the process loaded D3D12Core.dll 1.614.1.0.20240716.3 from target\diag\D3D12\, beside the system d3d12.dll 10.0.19041.5794.

Without the opt-in (same tree): every root signature is refused with Unsupported bit-flag set (root signature flags c01), nothing draws, and the title crashes at about 3 s.

With this PR:

  • No root-signature refusals.
  • 7 compute pipelines are refused (E_INVALIDARG). It is the same 7 under 1.620.2, so the runtime version doesn't cause them; they are the 32-lane wave64 cases from #71.
  • Two runs of about 7 minutes each, one with a cold pipeline library and one warm. Both went through the world load and the in-engine opening cutscene to the Prologue title card and the first prison scene. No device removal and no nvlddmkm events in the System log.

Two things worth knowing:

  1. Changing the runtime version invalidates the host pipeline library. Under 1.614, the library saved under 1.620.2 failed to load (host pipeline library rejected; starting an empty one … 0x80070057). The first run after switching therefore rebuilds every pipeline. For a few minutes the world flickers grey or black (dropped 1282.0/frame without a host pipeline: being made), then fills in. victory handles this correctly, but a README line would save people from thinking it's broken.
  2. 1.614.1 looked better here than 1.620.2. On the same tree, an earlier run with D3D12SDKVersion = 620 and 1.620.2 showed blocky corruption and missing geometry in the cutscene. With 1.614.1 the cutscene rendered cleanly. That is one run each and the shots aren't frame-matched, so treat it as a hint, not a result. It does support pinning 614 as this PR does.

Note: Nsight Aftermath's Global mode was off for these runs; with it on, the world load hangs here (see #71). No game files or captures attached.

AI use: Claude Code (Claude Opus 5.5) built the trees, ran the title on my machine, read the logs, and drafted this comment.

**@⁠leonidaavenger** on GitHub · 2026-11-25 06:10 UTC · [original](https://github.com/Marvisak/VIctory/pull/463#issuecomment-7154511147) **Tested on Windows 10 with an RTX 4070 Ti: works.** With this PR the title gets past the root-signature failure, into the world and through the opening cutscene to the Prologue, with no device removal. **Setup:** Windows 10 22H2 (19045), RTX 4070 Ti 12 GB, driver 621.14, i9-12900K, 32 GB. **Build:** this PR's `apps/victory/build.rs` and `src/main.rs` (`f47a36e`) applied on fxceless/victory-fork `310c6eb`. It applies cleanly there; I left out the README hunk because the fork's README differs. I did not test it on this PR's own base. Diag build, Series X, `VICTORY_RELAY=0 VICTORY_LATE_WAIT=0 VICTORY_D3D12_DRED=1`. **Runtime:** `Microsoft.Direct3D.D3D12` 1.614.1 from nuget.org (Authenticode: Microsoft Corporation). I put `D3D12Core.dll` and `d3d12SDKLayers.dll` in `target\diag\D3D12\` before building. - The build printed `opting the host D3D12 runtime into Agility SDK 614 (…\target\diag\D3D12\D3D12Core.dll)`. - `dumpbin /exports` lists `D3D12SDKPath` and `D3D12SDKVersion`. - At run time the process loaded `D3D12Core.dll` 1.614.1.0.20240716.3 from `target\diag\D3D12\`, beside the system `d3d12.dll` 10.0.19041.5794. **Without the opt-in** (same tree): every root signature is refused with `Unsupported bit-flag set (root signature flags c01)`, nothing draws, and the title crashes at about 3 s. **With this PR:** - No root-signature refusals. - 7 compute pipelines are refused (`E_INVALIDARG`). It is the same 7 under 1.620.2, so the runtime version doesn't cause them; they are the 32-lane wave64 cases from #71. - Two runs of about 7 minutes each, one with a cold pipeline library and one warm. Both went through the world load and the in-engine opening cutscene to the Prologue title card and the first prison scene. No device removal and no `nvlddmkm` events in the System log. **Two things worth knowing:** 1. **Changing the runtime version invalidates the host pipeline library.** Under 1.614, the library saved under 1.620.2 failed to load (`host pipeline library rejected; starting an empty one … 0x80070057`). The first run after switching therefore rebuilds every pipeline. For a few minutes the world flickers grey or black (`dropped 1282.0/frame without a host pipeline: being made`), then fills in. victory handles this correctly, but a README line would save people from thinking it's broken. 2. **1.614.1 looked better here than 1.620.2.** On the same tree, an earlier run with `D3D12SDKVersion = 620` and 1.620.2 showed blocky corruption and missing geometry in the cutscene. With 1.614.1 the cutscene rendered cleanly. That is one run each and the shots aren't frame-matched, so treat it as a hint, not a result. It does support pinning 614 as this PR does. Note: Nsight Aftermath's Global mode was **off** for these runs; with it on, the world load hangs here (see #71). No game files or captures attached. AI use: Claude Code (Claude Opus 5.5) built the trees, ran the title on my machine, read the logs, and drafted this comment.
Author
Owner

@⁠walterwallaceson on GitHub · 2026-11-26 03:39 UTC · original

With a runtime in target/<profile>/D3D12, cargo test -p victory fails to link: rustc-link-arg also applies the two /EXPORTs to the integration tests, which don't define the symbols. rustc-link-arg-bins fixes it.

Reproduced on main 63bcca4 + this PR (f47a36e, merged), Windows 10 22H2 (19045), MSVC, with D3D12Core.dll in target/debug/D3D12:

LINK : error LNK2001: unresolved external symbol D3D12SDKPath
LINK : error LNK2001: unresolved external symbol D3D12SDKVersion
... census-....lib : fatal error LNK1120: 2 unresolved externals
error: could not compile `victory` (test "translate") due to 1 previous error
error: could not compile `victory` (test "census") due to 1 previous error
error: could not compile `victory` (test "census_unreadable") due to 1 previous error

Without a runtime, the exports aren't emitted and the tests build. That's probably why CI and the earlier test runs here didn't hit it.

The change in apps/victory/build.rs:

-    println!("cargo:rustc-link-arg=/EXPORT:D3D12SDKVersion");
-    println!("cargo:rustc-link-arg=/EXPORT:D3D12SDKPath");
+    println!("cargo:rustc-link-arg-bins=/EXPORT:D3D12SDKVersion");
+    println!("cargo:rustc-link-arg-bins=/EXPORT:D3D12SDKPath");

With it, cargo test -p victory --no-run links all four test binaries, and the victory binary still loads the app-local runtime. I've used this change for about 25 runs on an RTX 3070 under Windows 10, where the title needs the Agility runtime to start. If the package ever gains another binary, rustc-link-arg-bin=victory=... would scope it to just the one that defines the symbols.

I'm testing with Claude's help, and Claude drafted this comment.

**@⁠walterwallaceson** on GitHub · 2026-11-26 03:39 UTC · [original](https://github.com/Marvisak/VIctory/pull/463#issuecomment-7181915222) **With a runtime in `target/<profile>/D3D12`, `cargo test -p victory` fails to link: `rustc-link-arg` also applies the two `/EXPORT`s to the integration tests, which don't define the symbols. `rustc-link-arg-bins` fixes it.** Reproduced on `main` `63bcca4` + this PR (`f47a36e`, merged), Windows 10 22H2 (19045), MSVC, with `D3D12Core.dll` in `target/debug/D3D12`: ``` LINK : error LNK2001: unresolved external symbol D3D12SDKPath LINK : error LNK2001: unresolved external symbol D3D12SDKVersion ... census-....lib : fatal error LNK1120: 2 unresolved externals error: could not compile `victory` (test "translate") due to 1 previous error error: could not compile `victory` (test "census") due to 1 previous error error: could not compile `victory` (test "census_unreadable") due to 1 previous error ``` Without a runtime, the exports aren't emitted and the tests build. That's probably why CI and the earlier test runs here didn't hit it. The change in `apps/victory/build.rs`: ```diff - println!("cargo:rustc-link-arg=/EXPORT:D3D12SDKVersion"); - println!("cargo:rustc-link-arg=/EXPORT:D3D12SDKPath"); + println!("cargo:rustc-link-arg-bins=/EXPORT:D3D12SDKVersion"); + println!("cargo:rustc-link-arg-bins=/EXPORT:D3D12SDKPath"); ``` With it, `cargo test -p victory --no-run` links all four test binaries, and the `victory` binary still loads the app-local runtime. I've used this change for about 25 runs on an RTX 3070 under Windows 10, where the title needs the Agility runtime to start. If the package ever gains another binary, `rustc-link-arg-bin=victory=...` would scope it to just the one that defines the symbols. I'm testing with Claude's help, and Claude drafted this comment.
Author
Owner

@⁠reboot0000-cmd on GitHub · 2026-11-26 10:20 UTC · original

Confirming @⁠walterwallaceson's report from a second Windows 10 host, with the precondition spelled out and one field note that makes the fix obvious rather than arguable.

Reproduced here. Windows 10 IoT Enterprise LTSC 2021 (19044.7846), MSVC, main + this branch, with D3D12Core.dll staged in target\debug\D3D12:

LINK : error LNK2001: unresolved external symbol D3D12SDKPath
LINK : error LNK2001: unresolved external symbol D3D12SDKVersion
target\debug\deps\census-….lib : fatal error LNK1120: 2 unresolved externals
error: could not compile `victory` (test "census")

The precondition is worth stating because it explains the blind spot: the failure needs both an integration-test target in apps/victory/tests and a runtime staged in the profile directory. The branch's own base predates the tests directory, so cargo test there links fine, and CI has no runtime to stage — neither half of the trap is visible from either side alone.

The scoping fix works. With cargo:rustc-link-arg-bins=…, cargo test -p victory --no-run exits 0 with no LNK output and builds both unittests src\main.rs and tests\census.rs. The release binary still carries the opt-in and still reaches shader model 6.6 on this host (translate --pipelines runs with no SM 0x65 refusal).

What each image ends up with afterwards, read out of the built binaries:

image /EXPORT present
target/release/victory.exe yes
target/debug/victory.exe yes
unittests src\main.rs yes
tests\census.rs no

That last row is the consequence to record, not a defect: an integration test that needs shader model 6.6 still cannot opt in on Windows 10, so on this OS it must skip, not assert. I hit the mirror image of this on #2117 this week, where a lane-group test that needs an SM 6.6 device fails here for that reason alone — victory-shader's test harness has no opt-in at all, by design — and it reads as a regression unless the skip is explicit.

The field has already converged on this spelling. The two other open Agility implementations on this repository, #2383 and #2460, both emit:

println!("cargo:rustc-link-arg-bins=/EXPORT:D3D12SDKVersion,DATA");
println!("cargo:rustc-link-arg-bins=/EXPORT:D3D12SDKPath,DATA");

and #2383's build.rs carries the reason in a comment: -bins, not plain rustc-link-arg, "keeps /EXPORT:…,DATA off benches". Note the second half — both use the ,DATA suffix, which is how MSVC is told the export is a variable rather than a function. I measured that spelling too, same tree: clean build, tests link, shader model 6.6 reached, only the build script's own informational warning emitted. Adopting both halves brings this branch in line with the other two implementations rather than inventing a third variant.

One housekeeping point while it is being touched: the branch is currently not mergeable against 63bcca4 (needs a rebase), so both changes can land in the same push.

Why this matters from our side: every hardware pipeline census we have posted this week ran on Windows 10 behind this opt-in — the full-archive --pipelines runs (26,084 programs, five separate builds) are impossible here without it, since the in-box runtime caps at shader model 6.5. So a cargo test that cannot link on the same host is a real obstacle for anyone doing that work, not a theoretical one.

Setup, if anyone wants to repeat it: Windows 10 19044.7846, runtime D3D12Core.dll 1.614.1 in target\<profile>\D3D12\, validator DXC 1.8.2502.8, RTX 4090. No game data was needed for the link results.

**@⁠reboot0000-cmd** on GitHub · 2026-11-26 10:20 UTC · [original](https://github.com/Marvisak/VIctory/pull/463#issuecomment-7189232287) Confirming @⁠walterwallaceson's report from a second Windows 10 host, with the precondition spelled out and one field note that makes the fix obvious rather than arguable. **Reproduced here.** Windows 10 IoT Enterprise LTSC 2021 (`19044.7846`), MSVC, `main` + this branch, with `D3D12Core.dll` staged in `target\debug\D3D12`: ``` LINK : error LNK2001: unresolved external symbol D3D12SDKPath LINK : error LNK2001: unresolved external symbol D3D12SDKVersion target\debug\deps\census-….lib : fatal error LNK1120: 2 unresolved externals error: could not compile `victory` (test "census") ``` The precondition is worth stating because it explains the blind spot: the failure needs **both** an integration-test target in `apps/victory/tests` **and** a runtime staged in the profile directory. The branch's own base predates the tests directory, so `cargo test` there links fine, and CI has no runtime to stage — neither half of the trap is visible from either side alone. **The scoping fix works.** With `cargo:rustc-link-arg-bins=…`, `cargo test -p victory --no-run` exits 0 with no `LNK` output and builds both `unittests src\main.rs` and `tests\census.rs`. The release binary still carries the opt-in and still reaches shader model 6.6 on this host (`translate --pipelines` runs with no `SM 0x65` refusal). What each image ends up with afterwards, read out of the built binaries: | image | `/EXPORT` present | |---|---| | `target/release/victory.exe` | yes | | `target/debug/victory.exe` | yes | | `unittests src\main.rs` | yes | | `tests\census.rs` | **no** | That last row is the consequence to record, not a defect: an integration test that needs shader model 6.6 still cannot opt in on Windows 10, so on this OS it must **skip**, not assert. I hit the mirror image of this on #2117 this week, where a lane-group test that needs an SM 6.6 device fails here for that reason alone — `victory-shader`'s test harness has no opt-in at all, by design — and it reads as a regression unless the skip is explicit. **The field has already converged on this spelling.** The two other open Agility implementations on this repository, #2383 and #2460, both emit: ```rust println!("cargo:rustc-link-arg-bins=/EXPORT:D3D12SDKVersion,DATA"); println!("cargo:rustc-link-arg-bins=/EXPORT:D3D12SDKPath,DATA"); ``` and #2383's `build.rs` carries the reason in a comment: `-bins`, not plain `rustc-link-arg`, "keeps `/EXPORT:…,DATA` off benches". Note the second half — both use the `,DATA` suffix, which is how MSVC is told the export is a variable rather than a function. I measured that spelling too, same tree: clean build, tests link, shader model 6.6 reached, only the build script's own informational warning emitted. Adopting both halves brings this branch in line with the other two implementations rather than inventing a third variant. One housekeeping point while it is being touched: the branch is currently **not mergeable** against `63bcca4` (needs a rebase), so both changes can land in the same push. Why this matters from our side: every hardware pipeline census we have posted this week ran on Windows 10 behind this opt-in — the full-archive `--pipelines` runs (26,084 programs, five separate builds) are impossible here without it, since the in-box runtime caps at shader model 6.5. So a `cargo test` that cannot link on the same host is a real obstacle for anyone doing that work, not a theoretical one. Setup, if anyone wants to repeat it: Windows 10 `19044.7846`, runtime `D3D12Core.dll` 1.614.1 in `target\<profile>\D3D12\`, validator DXC `1.8.2502.8`, RTX 4090. No game data was needed for the link results.
This pull request has changes conflicting with the target branch.
  • README.md
  • apps/victory/src/main.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-463'
git switch 'github-bot/gh-463'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-463'
git switch 'github-bot/gh-463'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-463'
git switch 'main'
git merge --squash 'github-bot/gh-463'
git switch 'main'
git merge --ff-only 'github-bot/gh-463'
git switch 'main'
git merge 'github-bot/gh-463'
git push origin 'main'
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!463
No description provided.