Play: a shader-model probe with no answer on Windows 11 starts as before, without fetching the Agility SDK #3311

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

@⁠ShalakZ on GitHub · 2026-11-29 21:36 UTC · original
ShalakZ:pr/d3d12-no-fetch-win11 → main · +6 −0 · 1 files · 1 commits · open

Follow-up to #210.

What it changes

#210 made check_shader_model fetch the D3D12 Agility SDK when the victory shader-model probe gives no answer, for Windows 10 22H2. The code does not check the Windows version for that case, so it also fires on Windows 11. When stdin is not a terminal (a launcher, a script, a scheduled run), the answer is an automatic yes. victory play then writes a script to %TEMP% and runs it with powershell -ExecutionPolicy Bypass. The script downloads D3D12Core.dll from nuget.org into D3D12\ beside the exe, and every later start loads that runtime.

On Windows 11 the system's own Direct3D 12 runs shader model 6.6. When the probe gets no answer there, the card is in trouble (a hang just before, a driver reset or TDR recovery), and a different runtime cannot help. This change returns early in that one case (no answer from the probe, and Windows build 22000 or later). The start then goes on as it did before #210. Windows 10 keeps the fetch, and every case where the probe does answer is unchanged.

Known limit: on a non-MSVC build (the new windows-gnu branch in apps/victory/build.rs, without /DELAYLOAD:d3d12.dll), Windows 11 21H2-23H2 could in theory give no device because of a runtime-version mismatch the fetch would fix. MSVC builds (rust-toolchain.toml) are not affected. If that case matters, the guard could also check the build target.

How it was tested

  • GPU and profile: RTX 4080, Windows 11, Series X, 2560x1440, DLSS off, frame generation off, ray tracing off.
  • Before: found by reading the code during a review of the play path; the no-answer case was not reproduced live (it needs a probe that fails to make a device, e.g. right after a TDR).
  • After: normal starts are unchanged: play runs on this machine start as before, and D3D12\ is never created.
  • Reviewed by a second reader for windows_build() (VICTORY_WINDOWS_BUILD override, RtlGetVersion) and the paths it skips.
  • For shader changes, the wave sizes tested: n/a.
  • cargo test passed for the crates it touches: yes (-p victory), on a branch from v2026.11.29.02 (f889bb07) with the same commit; apps/victory/src/play.rs is identical on this PR's base, but this exact head was not built or tested separately.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #210 (where the fetch came from), #1198 (the same kind of guard for Wine).
**@⁠ShalakZ** on GitHub · 2026-11-29 21:36 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3311) `ShalakZ:pr/d3d12-no-fetch-win11` → `main` · +6 −0 · 1 files · 1 commits · open Follow-up to #210. ## What it changes #210 made `check_shader_model` fetch the D3D12 Agility SDK when the `victory shader-model` probe gives no answer, for Windows 10 22H2. The code does not check the Windows version for that case, so it also fires on Windows 11. When stdin is not a terminal (a launcher, a script, a scheduled run), the answer is an automatic yes. `victory play` then writes a script to `%TEMP%` and runs it with `powershell -ExecutionPolicy Bypass`. The script downloads `D3D12Core.dll` from nuget.org into `D3D12\` beside the exe, and every later start loads that runtime. On Windows 11 the system's own Direct3D 12 runs shader model 6.6. When the probe gets no answer there, the card is in trouble (a hang just before, a driver reset or TDR recovery), and a different runtime cannot help. This change returns early in that one case (no answer from the probe, and Windows build 22000 or later). The start then goes on as it did before #210. Windows 10 keeps the fetch, and every case where the probe does answer is unchanged. Known limit: on a non-MSVC build (the new `windows-gnu` branch in `apps/victory/build.rs`, without `/DELAYLOAD:d3d12.dll`), Windows 11 21H2-23H2 could in theory give no device because of a runtime-version mismatch the fetch would fix. MSVC builds (`rust-toolchain.toml`) are not affected. If that case matters, the guard could also check the build target. ## How it was tested - GPU and profile: RTX 4080, Windows 11, Series X, 2560x1440, DLSS off, frame generation off, ray tracing off. - Before: found by reading the code during a review of the play path; the no-answer case was not reproduced live (it needs a probe that fails to make a device, e.g. right after a TDR). - After: normal starts are unchanged: play runs on this machine start as before, and `D3D12\` is never created. - Reviewed by a second reader for `windows_build()` (`VICTORY_WINDOWS_BUILD` override, `RtlGetVersion`) and the paths it skips. - For shader changes, the wave sizes tested: n/a. - `cargo test` passed for the crates it touches: yes (`-p victory`), on a branch from v2026.11.29.02 (f889bb07) with the same commit; `apps/victory/src/play.rs` is identical on this PR's base, but this exact head was not built or tested separately. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #210 (where the fetch came from), #1198 (the same kind of guard for Wine).
check_shader_model took a probe with no answer for Windows 10 22H2 and
fetched the Agility SDK, and with stdin closed (a launcher) it did so
without asking: PowerShell with -ExecutionPolicy Bypass, from nuget.org,
into D3D12\ beside the exe, used by every later start. On Windows 11 the
system runtime runs 6.6, so no device there means a card in trouble (a
hang just before, a driver reset): the download cannot help. Windows 10
keeps the fetch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01C98J7NWqaasuwGyScze2uo
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 21:38:54 +00:00
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/3311/head:github-bot/gh-3311'
git switch 'github-bot/gh-3311'

Merge

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