launcher: use a local D3D12Core.dll of another Agility SDK version; VICTORY_AGILITY=0 #185

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

@⁠SovietBearz0r on GitHub · 2026-12-05 22:28 UTC · original
SovietBearz0r:larp-agility → main · +212 −46 · 3 files · 1 commits · open

Summary

Our D3D12 Agility SDK opt-in only ever asked Windows for the bundled 1.621 runtime. If a D3D12\D3D12Core.dll of another version sits beside victory.exe (a stale copy, or one from another tool), we fell back to the in-box runtime - and on Windows 10 that runtime refuses every translated pipeline (SM 6.6 directly indexed descriptor heaps), so the game fails with nothing pointing at the local file.

  • A local runtime of another Agility SDK version (1.600 and up) is now asked for as its own version, so Windows loads it. The log names the version asked for (D3D12: local D3D12\D3D12Core.dll is Agility SDK 1.614 (this build ships 1.621); asking Windows for that version...).
  • VICTORY_AGILITY=0 (or off/system) keeps Windows' own D3D12 runtime even when a local Agility SDK runtime is there - for bisecting device-removal (0x887A0005) problems that might be the runtime's.
  • A missing folder, a file that is not an Agility SDK runtime, or a local 1.621 keeps behaving as before (in-box / in-box / opted in), and the launcher prompt now names the local version it would replace.

Ported from gamingwithhomie/larp PR #140 ("Agility SDK: delay-load d3d12.dll, writable D3D12SDKVersion, fall back to the OS runtime"), GPL-3.0-or-later, adapted to our exporter and launcher: our D3D12SDKVersion is already an atomic and build.rs already delay-loads d3d12.dll, and the chosen runtime is logged through tracing after logging::init instead of eprintln.

Verification

  • cargo test --locked -p victory --bin victory agility: 6 passed (three new tests: another version is asked for as its own, missing/unusable keeps the OS runtime, the switch accepts only off values; existing launcher/agility tests unchanged).
  • cargo clippy --locked -p victory --all-targets -- -D warnings: clean.
  • cargo xtask policy: 442 files ok.
  • Not exercised in game (it depends on which D3D12Core.dll a machine happens to have); the normal-run log line now says which runtime was asked for, which makes it observable.

Context

One of the items from the LARP borrow review; it is small, opt-in/observable, and independent from the audio port (#184).

**@⁠SovietBearz0r** on GitHub · 2026-12-05 22:28 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/184) `SovietBearz0r:larp-agility` → `main` · +212 −46 · 3 files · 1 commits · open ## Summary Our D3D12 Agility SDK opt-in only ever asked Windows for the bundled **1.621** runtime. If a `D3D12\D3D12Core.dll` of another version sits beside `victory.exe` (a stale copy, or one from another tool), we fell back to the in-box runtime - and on Windows 10 that runtime refuses every translated pipeline (SM 6.6 directly indexed descriptor heaps), so the game fails with nothing pointing at the local file. - A local runtime of another Agility SDK version (`1.600` and up) is now asked for **as its own version**, so Windows loads it. The log names the version asked for (`D3D12: local D3D12\D3D12Core.dll is Agility SDK 1.614 (this build ships 1.621); asking Windows for that version...`). - `VICTORY_AGILITY=0` (or `off`/`system`) keeps Windows' own D3D12 runtime even when a local Agility SDK runtime is there - for bisecting device-removal (`0x887A0005`) problems that might be the runtime's. - A missing folder, a file that is not an Agility SDK runtime, or a local 1.621 keeps behaving as before (in-box / in-box / opted in), and the launcher prompt now names the local version it would replace. Ported from **gamingwithhomie/larp PR [#140](https://github.com/gamingwithhomie/larp/pull/139)** ("Agility SDK: delay-load d3d12.dll, writable D3D12SDKVersion, fall back to the OS runtime"), GPL-3.0-or-later, adapted to our exporter and launcher: our `D3D12SDKVersion` is already an atomic and `build.rs` already delay-loads `d3d12.dll`, and the chosen runtime is logged through `tracing` after `logging::init` instead of `eprintln`. ## Verification - `cargo test --locked -p victory --bin victory agility`: 6 passed (three new tests: another version is asked for as its own, missing/unusable keeps the OS runtime, the switch accepts only off values; existing launcher/agility tests unchanged). - `cargo clippy --locked -p victory --all-targets -- -D warnings`: clean. - `cargo xtask policy`: 442 files ok. - **Not exercised in game** (it depends on which `D3D12Core.dll` a machine happens to have); the normal-run log line now says which runtime was asked for, which makes it observable. ## Context One of the items from the LARP borrow review; it is small, opt-in/observable, and independent from the audio port (#184).
Our Agility opt-in asked Windows only for the bundled 1.621 runtime: with a
D3D12\D3D12Core.dll of another version beside victory.exe it fell back to the
in-box runtime, which on Windows 10 refuses every translated pipeline (SM 6.6
directly indexed heaps) - the game then fails with nothing pointing at the file.
A local runtime of another Agility SDK version (1.600 and up) is now asked for
as that version, so Windows loads it; the log names the version asked for, and
the launcher prompt names the version it would replace.

Also adds VICTORY_AGILITY=0 (or off/system): Windows' own D3D12 runtime even
when a local Agility SDK runtime is there, for bisecting device-removal
(0x887A0005) problems that might be the runtime's. A missing folder or a file
that is not an Agility SDK runtime keeps falling back to the in-box runtime, as
before.

Ported from gamingwithhomie/larp PR #139 ("Agility SDK: delay-load d3d12.dll,
writable D3D12SDKVersion, fall back to the OS runtime"), GPL-3.0-or-later,
adapted to our exporter and launcher: our D3D12SDKVersion is already an atomic
and build.rs already delay-loads d3d12.dll, and the chosen runtime is logged
through tracing after logging::init instead of eprintln.

Verified by unit tests for the version choice and the switch's on/off values;
the existing launcher/agility tests pass. Not exercised in game (no control
over which D3D12Core.dll a machine has); the logging line in a normal run says
which runtime was asked for.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-05 22:31:12 +00:00
Author
Owner

@⁠SovietBearz0r on GitHub · 2026-12-05 22:55 UTC · original

In-game smoke on this box (RX 9070 XT, diag build): PASS for the default path, INCONCLUSIVE for the multi-version path.

  • Startup line present: D3D12: Windows' own runtime (no local D3D12\D3D12Core.dll; the launcher offers to install Agility SDK 1.621) — the "no local D3D12Core" branch works as intended; no ERROR/device-removed, exit 0, normal pacing (47.6/43.4/41.5 fps).
  • The OtherVersion/Unusable/Enabled branches cannot fire in this tree because no D3D12\D3D12Core.dll sits next to the test victory.exe. To verify the actual multi-version path, drop a 1.600+ D3D12Core.dll next to the exe (or run the launcher's Agility install) and re-run; the new strings (is Agility SDK 1.…, asking Windows for that version) are in the binary. Log: data\logs\larp-agility.log.
**@⁠SovietBearz0r** on GitHub · 2026-12-05 22:55 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/184#issuecomment-7447170099) In-game smoke on this box (RX 9070 XT, diag build): **PASS for the default path, INCONCLUSIVE for the multi-version path.** - Startup line present: `D3D12: Windows' own runtime (no local D3D12\D3D12Core.dll; the launcher offers to install Agility SDK 1.621)` — the "no local D3D12Core" branch works as intended; no ERROR/device-removed, exit 0, normal pacing (47.6/43.4/41.5 fps). - The `OtherVersion`/`Unusable`/`Enabled` branches cannot fire in this tree because no `D3D12\D3D12Core.dll` sits next to the test `victory.exe`. To verify the actual multi-version path, drop a 1.600+ `D3D12Core.dll` next to the exe (or run the launcher's Agility install) and re-run; the new strings (`is Agility SDK 1.…`, `asking Windows for that version`) are in the binary. Log: `data\logs\larp-agility.log`.
Author
Owner

@⁠SovietBearz0r on GitHub · 2026-12-05 23:44 UTC · original

Multi-version path now tested too — PASS. Downloaded Microsoft.Direct3D.D3D12 1.615.1 from NuGet, extracted the x64 D3D12Core.dll (file version 1.615.1.0.20250213.1), placed it as target\diag\D3D12\D3D12Core.dll next to the test victory.exe, and ran the bench once: 89.5 s, exit 0, 3 spots, 0 ERROR, 0 device-removed.

Log line (L1): D3D12: local D3D12\D3D12Core.dll is Agility SDK 1.615 (this build ships 1.621); asking Windows for that version … version=615 shipped=621, followed by host D3D12 device ready and normal fps (47.6/41.3/39.8). A rejected version would have failed with 0x887E0003.

The D3D12 folder was removed afterwards (confirmed absent). So both the default "no local DLL" path and the "local DLL of another version" path work; the Mismatch/Unusable branches are unit-tested but not exercised in-game (would need a corrupt/unsupported DLL). Evidence: data\ingame-verify\larp\agility-local-other\RESULT.md, package-info.json, data\logs\larp-agility-other.log.

**@⁠SovietBearz0r** on GitHub · 2026-12-05 23:44 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/184#issuecomment-7447809314) Multi-version path now tested too — **PASS**. Downloaded `Microsoft.Direct3D.D3D12` **1.615.1** from NuGet, extracted the x64 `D3D12Core.dll` (file version `1.615.1.0.20250213.1`), placed it as `target\diag\D3D12\D3D12Core.dll` next to the test `victory.exe`, and ran the bench once: 89.5 s, exit 0, 3 spots, 0 ERROR, 0 device-removed. Log line (L1): `D3D12: local D3D12\D3D12Core.dll is Agility SDK 1.615 (this build ships 1.621); asking Windows for that version … version=615 shipped=621`, followed by `host D3D12 device ready` and normal fps (47.6/41.3/39.8). A rejected version would have failed with `0x887E0003`. The `D3D12` folder was removed afterwards (confirmed absent). So both the default "no local DLL" path and the "local DLL of another version" path work; the `Mismatch`/`Unusable` branches are unit-tested but not exercised in-game (would need a corrupt/unsupported DLL). Evidence: `data\ingame-verify\larp\agility-local-other\RESULT.md`, `package-info.json`, `data\logs\larp-agility-other.log`.
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/185/head:github-bot/gh-184'
git switch 'github-bot/gh-184'

Merge

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