Recover automatically from a missing D3D12 Agility SDK #277

Closed
DaTweaks wants to merge 6 commits from upstream-pr/277 into main
DaTweaks commented 2026-11-27 20:38:55 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by DaTweaks on 2026-11-27T20:38:55Z.


Problem

On Windows 11 23H2, Victory could still fail with 0x887E0003
when D3D12\D3D12Core.dll was missing, even with the Windows runtime
fallback on main. The shader-model probe discarded the error code,
so startup continued without attempting recovery.

Changes

  • Preserve 0x887E0003 from the shader-model probe. If the local DLL
    is missing, automatically download the matching SDK from Microsoft
    NuGet into D3D12 beside victory.exe.
  • Explicitly load the PowerShell modules used to verify the SHA-256
    checksum and Microsoft signature.
  • Refresh the selected SDK version and rerun the shader-model check
    before launching the game. Keep the existing confirmation prompt
    when the runtime works but reports a shader model below 6.6.

Verification

  • cargo test --release --locked --offline -p victory passed all 26 tests.
  • On Windows 11 23H2, launched the merged build from a separate working
    directory with no local DLL. Victory downloaded the signed SDK beside
    the executable, loaded it, and reported Shader Model 6.8.
  • The smoke test stopped before game launch.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5532803672 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/277). Originally posted by [DaTweaks](https://github.com/DaTweaks) on 2026-11-27T20:38:55Z. --- ## Problem On Windows 11 23H2, Victory could still fail with `0x887E0003` when `D3D12\D3D12Core.dll` was missing, even with the Windows runtime fallback on `main`. The shader-model probe discarded the error code, so startup continued without attempting recovery. ## Changes - Preserve `0x887E0003` from the shader-model probe. If the local DLL is missing, automatically download the matching SDK from Microsoft NuGet into `D3D12` beside `victory.exe`. - Explicitly load the PowerShell modules used to verify the SHA-256 checksum and Microsoft signature. - Refresh the selected SDK version and rerun the shader-model check before launching the game. Keep the existing confirmation prompt when the runtime works but reports a shader model below 6.6. ## Verification - `cargo test --release --locked --offline -p victory` passed all 26 tests. - On Windows 11 23H2, launched the merged build from a separate working directory with no local DLL. Victory downloaded the signed SDK beside the executable, loaded it, and reported Shader Model 6.8. - The smoke test stopped before game launch.
DaTweaks commented 2026-11-27 20:49:19 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by DaTweaks on 2026-11-27T20:49:19Z.


Thanks for the fix in f3534e6. This PR keeps the Windows runtime fallback from that commit and adds recovery for cases where the fallback still fails.

On my Windows 11 23H2 system (build 22631.6199), the official v2026.11.27.5 executable returned none from victory.exe shader-model in a clean directory. In the same setup, the PR build surfaced 0x887E0003, automatically downloaded and verified the Microsoft SDK into D3D12 beside the executable, and reported Shader Model 6.8 on retry.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7227872894 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/277#issuecomment-7227872894). Originally posted by [DaTweaks](https://github.com/DaTweaks) on 2026-11-27T20:49:19Z. --- Thanks for the fix in f3534e6. This PR keeps the Windows runtime fallback from that commit and adds recovery for cases where the fallback still fails. On my Windows 11 23H2 system (build 22631.6199), the official v2026.11.27.5 executable returned none from victory.exe shader-model in a clean directory. In the same setup, the PR build surfaced 0x887E0003, automatically downloaded and verified the Microsoft SDK into D3D12 beside the executable, and reported Shader Model 6.8 on retry.
1tsethan commented 2026-11-27 23:01:14 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by 1tsethan on 2026-11-27T23:01:14Z.


Independent Windows validation of PR #277.

Tested commit: 4ca930c8c649197ae710efc76914424b686e00b9.

cargo test --locked -p victory play::tests -- --nocapture --test-threads=1

Exit: 0.

  • test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 14 filtered out; finished in 0.01s

Coverage here is launcher settings tests only, not missing/mismatched Agility DLL recovery. This branch also has a merge conflict against df2daaf; the tests ran its exact head without resolving that conflict.

Independent verification with OpenAI Codex assistance. Windows 11 Pro build 26200; Rust 1.98.1 MSVC; Windows SDK libraries from Microsoft.Windows.SDK.CPP.x64 10.0.28000.2957. Test harness used an RTX 3070 Ti / AMD integrated-GPU host; adapter identity was not captured for every test. These are focused checks on the stated PR commit, not gameplay, FPS, or a merged-main integration result.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7229806260 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/277#issuecomment-7229806260). Originally posted by [1tsethan](https://github.com/1tsethan) on 2026-11-27T23:01:14Z. --- Independent Windows validation of PR #277. Tested commit: `4ca930c8c649197ae710efc76914424b686e00b9`. `cargo test --locked -p victory play::tests -- --nocapture --test-threads=1` Exit: **0**. - test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 14 filtered out; finished in 0.01s Coverage here is launcher settings tests only, not missing/mismatched Agility DLL recovery. This branch also has a merge conflict against df2daaf; the tests ran its exact head without resolving that conflict. Independent verification with OpenAI Codex assistance. Windows 11 Pro build 26200; Rust 1.98.1 MSVC; Windows SDK libraries from Microsoft.Windows.SDK.CPP.x64 10.0.28000.2957. Test harness used an RTX 3070 Ti / AMD integrated-GPU host; adapter identity was not captured for every test. These are focused checks on the stated PR commit, not gameplay, FPS, or a merged-main integration result. <!-- victory-native-validation-20261128 -->
trustno1-coder commented 2026-11-28 19:22:48 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-11-28T19:22:48Z.


Thanks for this. I'm closing it without merging because it conflicts with the current main in several places (main has moved a lot since it was opened, with about 100 pull requests merged today), and I can't resolve that safely on your behalf. If you'd still like it in, please rebase it on the current main and open a new pull request.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7244500032 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/277#issuecomment-7244500032). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-11-28T19:22:48Z. --- Thanks for this. I'm closing it without merging because it conflicts with the current main in several places (main has moved a lot since it was opened, with about 100 pull requests merged today), and I can't resolve that safely on your behalf. If you'd still like it in, please rebase it on the current main and open a new pull request.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
trustno1-coder/VIctory-NVIDIA!277
No description provided.