Shader model check: ask the card the game runs on, not Windows' first adapter #1080
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!1080
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1080"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@kibagami-nc on GitHub · 2026-11-28 12:55 UTC · original
kibagami-nc:fix/shader-model-on-the-game-card→main· +54 −20 · 3 files · 2 commits · merged 2026-11-29 08:16 UTCWhat happens
Before the title starts,
victory playrunsvictory shader-modelto ask whether the GPU runs shader model 6.6. Below it, it fetches Microsoft's runtime, asks again, and refuses the start if the answer stays below 6.6.highest_shader_modelmade its device onEnumAdapters1(0), Windows' first adapter. Its own doc says it asks "the default adapter (the one the title's device is on)", but the title's device is made onhardware_adapter's card: the one the monitor is on, else the one with the most memory of its own, orVICTORY_ADAPTER's.hardware_adapter's doc says why they differ: "Windows' first adapter is often an integrated GPU (a monitor on the board's outputs, a laptop)".So on those PCs the integrated GPU's shader model was the one checked. #1035 looked like that case, a PC with Windows 11 build 26300 and an RTX 5060 (see the update below):
runs shader model 6.5;With Microsoft's runtime the GPU still runs shader model 6.5;An RTX 5060 on Windows 11 runs 6.8, so the answer most likely came from another adapter.
Update: #1035 was not this. That PC has a single GPU, the RTX 5060. Its game folder held Windows 10 2004's
D3D12.dllbesidevictory.exe, which Windows loaded in place of its own: shader model 6.5, and no Agility SDK. #1154 fixes that. This change stays for PCs with two GPUs, where Windows' first adapter is not the game's card, and the refusal now names the card it measured.The change
crates/victory-gpu/src/streamline.rs:game_adapter()returns the card the host device is made on:hardware_adapter's, else the first adapter, as before.default_adapter(), which the frame generation notice andadapter_name()already used, now takes it from there.highest_shader_model()makes its device ongame_adapter()'s card.apps/victory/src/main.rs:victory shader-modelalso prints the card it asked (card ...), before the runtime and the model.victory playreads the model from the last line, as before.apps/victory/src/play.rs:read_shader_modelalso reads thecard ...line, and the three messages of the check name it, as inthis PC's Direct3D 12 runs shader model 6.5 on <card>, and the game needs 6.6. An answer without that line, from an oldervictory.exe, still reads.Tests
victory shader-modelprintscard NVIDIA GeForce RTX 5070 Ti,runtime C:\WINDOWS\SYSTEM32\D3D12Core.dll, then6.8. This PC has no integrated GPU, so the two choices agree here. The integrated-GPU case needs a PC with both;pick_adapter, which makes the choice, is covered byadapter_tests.play::tests::the_shader_model_answer_names_its_card: an answer with a card line, one without, and one with no model.cargo test -p victory-gpu --lib --locked: 453 passed.cargo test -p victory --locked: 27 + 2 passed.-p victory-gpu -p victory,-D warnings, default and--all-features): nothing in the changed lines. It stops onmain's ownmanual_is_multiple_ofandsome_filterfindings (fixed in #665). With those allowed, both builds are clean.#1059 changes the refusal's wording for Windows 10. I opened it before #1035's reporter said they are on Windows 11, so this change is the one that bears on #1035. #1059 still holds for Windows 10.
No game files, dumps or extracted data are included.
Tested by others
upipibi (RTX 3070, Windows 11, driver 616.56), merged onto main
923e38c:victory shader-modelprintscard NVIDIA GeForce RTX 3070, then the same runtime and6.8as main.cargo test -p victory-gpu --libandcargo test -p victorypass, with one more test than main (the new one), and no new warnings.read_shader_model, the new test fails, so it catches a lostcardline.Not tested yet: a PC whose first adapter isn't the game's card (an integrated GPU plus an RTX), the case this PR is for.
@Aniseto on GitHub · 2026-11-28 14:12 UTC · original
Ran the shader-model answer parsing test at
f206d29con an NVIDIA Blackwell desktop part:Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, Rust 1.98.1 (48a229cea 2026-09-01, pinned by
rust-toolchain.toml), MSVC 14.44.35207, DXC 1.9.2609.5 (shared env), debug build.The new test passes: an answer with a card line names it, one without a card line and one without a model are handled. This is an independent run of the focused test on a second Card; the PR description already reports
victory shader-modelfindingNVIDIA GeForce RTX 5070 Tiand6.8on the author's machine. I did not exercise the integrated-GPU case (this PC has only the discrete card), and I did not run a full startup refusal.Not tested: a real laptop/iGPU + dGPU machine, a live refusal path, a paired smoke run, the full workspace suite, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data.
AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
@kibagami-nc on GitHub · 2026-11-28 14:30 UTC · original
A note for whoever reviews this: I missed #622 (KhryptorGraphics, opened earlier) before writing this. It makes the same change to
highest_shader_model, as part of a port from foxhound pre.3/pre.4:hardware_adapter's card, else the first adapter. So the two conflict there.What this PR does beyond that change:
default_adapter(), and with itadapter_name(), also follow the game's card. The frame generation notice, the RTX 20/30 MFG Unlocker offer and the FSR 3 offer read that name, so on a PC with two GPUs they now look at the card the game runs on.victory shader-modelprintscard ..., and the check's refusal names the card it measured.What #622 has and this doesn't: the memory warning before a start.
Whichever goes in first, I'll rebase this one onto it and keep only what it adds. As said in the description, #1035 itself turned out to be an old
D3D12.dllbesidevictory.exe(#1154).@upipibi on GitHub · 2026-11-28 20:42 UTC · original
Tested on Ampere: RTX 3070 (
10de:2484), driver 616.56, native Windows 11 Pro 10.0.26100, rustc 1.98.1. Debug test profile. The system WARP is the one that ships with Windows, and the D3D12 runtime in every run wasC:\Windows\SYSTEM32\D3D12Core.dll.f206d29cc, merged onto main923e38cc8(--no-ff, clean, mergea952fae). The PR's base is63b902f. The merge changes the same three files by the same amounts as the PR:main.rs+4/-0,play.rs+33/-12,streamline.rs+17/-8. The head was stillf206d29ccwhen I finished.play::tests::the_shader_model_answer_names_its_card(cratevictory,apps/victory/src/play.rs)read_shader_modelandgame_adapterare functions, not tests. The new test is the only one the PR adds.victory shader-model, the changed code itselfThe merge printed the same output in every run and with every variable:
Main prints the same
runtimeand6.8lines, without thecardline.Adapters and shader models
You can't force WARP through
game_adapter.hardware_adapterskips software adapters, soVICTORY_ADAPTER=Microsoftstill picks the 3070.VICTORY_WARPandVICTORY_D3D12_WARPare not read on this path. To get WARP's answer, I added a temporary test tostreamline.rsand removed it afterwards. It printsgame_adapter(),highest_shader_model()andadapter_name(). Then it makes a device on everyEnumAdapters1entry and onEnumWarpAdapter, and reads each one's shader model. 3 runs, plus 1 withVICTORY_WARP=1 VICTORY_D3D12_WARP=1 VICTORY_ADAPTER=Microsoft, all gave the same output:game_adapter()10de:24840x0highest_shader_model()6.8EnumAdapters1(0)10de:24840x0EnumAdapters1(1)10de:24840x0EnumAdapters1(2)1414:008c0x2(software)EnumWarpAdapter1414:008c0x2(software)pick_adaptertook entry 0, the one with the monitor, which is also Windows' first adapter. So here the PR's choice and main's choice are the same adapter.Negative control
The log is in
r1080-control.log.A. Main's code in all three files, the test kept.
git diff --stat 923e38cc8 -- apps crates:play.rs | 13 +(the test). It does not compile:error[E0425]: cannot find function read_shader_model in this scope(4 times).B. A, plus a 4-line
read_shader_modelstub with main's parse and no card, so that it builds.play.rs | 18 +. 3 runs: 0 passed, 1 failed, 0 ignored each, atplay.rs:1270:left: Some(((6, 8), None)),right: Some(((6, 8), Some("NVIDIA GeForce RTX 5070 Ti"))). The test catches a lostcardline.C. The PR's
main.rsandplay.rs, with main'sstreamline.rs(highest_shader_modelback onEnumAdapters1(0), nogame_adapter). 3 runs: 1 passed, 0 failed, 0 ignored each. On that build,victory shader-modelprintedcard NVIDIA GeForce RTX 3070and6.8, the same as on the merge. The test passes without the adapter change, which is the PR's key change.Arm. On the full merge, I put
panic!as the first line ofhighest_shader_modeland ofgame_adapter:cargo test -p victory --locked: 30 passed and 2 passed (tests/census), 0 failed;cargo test -p victory-gpu --lib --locked: 550 passed, 0 failed, 43 ignored.No test in either crate reaches
game_adapterorhighest_shader_model. Onlyvictory shader-modelabove runs them.Suites of the touched crates (hardware, once each)
a952fae923e38cc8cargo test -p victory-gpu --lib --lockedcargo test -p victory --locked(bin)cargo test -p victory --locked(tests/census)The one extra pass is the new test, and there were no failures. Both builds give the same warning counts (
victory-gpu6,victory-shader1), so the PR adds no new warnings. The logs arer1080-hw.log,r1080-warp.log,r1080-lib-merge.logandr1080-lib-main.log.CI
gh pr checksreports no checks on the PR's branch (fix/shader-model-on-the-game-card).Not tested
game_adapter.pick_adapternever chose it here.on <card>. On a 6.8 card the check never refuses, and I did not runvictory play.adapter_name().victory.exeanswer read by this one, beyond the test's fixed string.--features diagnostics, and the rest of the workspace.AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this report.
@kibagami-nc on GitHub · 2026-11-28 21:16 UTC · original
@upipibi, thank you, that's a careful run, and control C is the honest limit of this PR's test: it covers the
cardline, not the choice of adapter. On a one-GPU PC both choices are the same card, so nothing there can tell them apart. I've added your results to the description.What's left needs a PC where Windows' first adapter isn't the game's card, such as a laptop with an integrated GPU and an RTX. On such a PC, before this PR,
victory shader-modelanswers for the integrated GPU. With it, thecardline should name the RTX, and its shader model should be the RTX's.