scripts: play-nvidia.ps1 says when it is about to run on a card that is not the NVIDIA one #2999
Open
github-bot
wants to merge 3 commits from
github-bot/gh-2999 into main
AGit
pull from: github-bot/gh-2999
merge into: github:main
github:main
github:perf/darner-title-priority-ceiling
github:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
github:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
github:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
github:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
github:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
github:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
github:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
github:fix/runtime-test-conservative-fixtures
github:ci/shard-semantic-linux
github:docs/fg-limit-fps-switch
github:fix/runtime-test-fixture-paths
github:fix/runtime-test-fixture-readers
github:fix/read-file-hard-link
github:fix/book-slot-heap-never-read
github:fix/depth-resolve-spv-path
github:fix/indirect-unused-batched
github:gh-pr/3358/base
github:fix/xmem-refusal-diagnostics
github:gh-pr/3357/base
github:ci/shorten-ci-time
github:fix/alias-later-queued-submissions
github:claude/gallant-sagan-aamatr
github:gh-pr/3342/base
github:gh-pr/3341/base
github:d3d12/agility-sdk-621
github:gh-pr/3293/base
github:gh-pr/3319/base
github:gh-pr/3318/base
github:gh-pr/3315/base
github:gh-pr/3313/base
github:gh-pr/3314/base
github:claude/fervent-curie-m19lnr
github:gh-pr/3216/base
github:gh-pr/3272/base
github:gh-pr/3276/base
github:gh-pr/3279/base
github:gh-pr/3257/base
github:gh-pr/3258/base
github:gh-pr/3271/base
github:codex/skip-no-hit-ray-passes
github:gh-pr/3230/base
github:gh-pr/3266/base
github:gh-pr/3247/base
github:gh-pr/3246/base
github:gh-pr/3244/base
github:claude/sharp-sagan-1jqnp3
github:t3/preserve-fsr-sdk-restart-path
github:t3/propagate-host-failure-hresult
github:t3/launcher-custom-parameters
github:t3/series-x-2160-startup
github:codex/d3d12-uncapped-simulation
github:ci/less-to-run
github:perf/native-compute-shader-forms
github:claude/blissful-franklin-ukp7ag
github:codex/full-precompile-default
github:gh-pr/3166/base
github:gh-pr/3148/base
github:gh-pr/3138/base
github:gh-pr/3106/base
github:gh-pr/3057/base
github:gh-pr/2756/base
github:gh-pr/2812/base
github:gh-pr/3032/base
github:gh-pr/2992/base
github:notes/card-time-and-plant-flicker
github:gh-pr/2986/base
github:gh-pr/3000/base
github:gh-pr/2966/base
github:gh-pr/2924/base
github:gh-pr/726/base
github:gh-pr/2761/base
github:gh-pr/2663/base
github:gh-pr/2861/base
github:gh-pr/2862/base
github:gh-pr/2820/base
github:gh-pr/2811/base
github:gh-pr/2803/base
github:rt-call-trace
github:gh-pr/2802/base
github:gh-pr/2766/base
github:perf/ahead-split
github:gh-pr/2589/base
github:gh-pr/2699/base
github:gh-pr/2696/base
github:docs/readme-runtime-proposal
github:gh-pr/1346/base
github:codex/coord-claim-check-20261124-7e48
No reviewers
Labels
Clear labels
accessibility
Barrier affecting people with disabilities
area: ci
.github/ workflows and settings
area: d3d12
The D3D12 runtime in d3d12/ (Rust: leonida.exe and its crates)
area: docs
Documentation
area: launcher
The launcher (launcher/)
area: runtime (legacy)
The earlier Vulkan runtime in runtime/
area: shader translator
The shader translator (leonida-shader, tools/rdna2spirv) and its tests
area: tools
tools/ and scripts/
area: viewer
The map viewer (viewer/)
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
invalid
This doesn't seem right
missing claim
Needs a claim in #14
needs in-game run
Changes the code a frame runs through: needs the 300 s in-game gate (docs/game_gate.md)
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
wontfix
This will not be worked on
No labels
accessibility
area: ci
area: d3d12
area: docs
area: launcher
area: runtime (legacy)
area: shader translator
area: tools
area: viewer
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs in-game run
needs rebase
needs-triage
question
ready-for-agent
submodules
wontfix
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
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/ubiquitarianism--leonida!2999
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2999"
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?
@fiestorra on GitHub · 2026-12-01 22:54 UTC · original
fiestorra:launcher-says-which-card→main· +15 −0 · 1 files · 3 commits · openscripts: play-nvidia.ps1 says when it is about to run on a card that is not the NVIDIA one
Without
-Adapterthe layer makes its device withD3D12CreateDevice(None, ..), which isWindows' default card. On a PC whose monitor hangs off the motherboard that is the
integrated chip, and then:
NVSDK_NGX_Result_FAIL_FeatureNotSupportedthe next start;
Measured on a 7800X3D with an RTX 4090 (two adapters, the Radeon iGPU at 0x1002 and the
4090 at 0x10de): a D3D12 device made with
Nonethere is the Radeon's. Nobody sees thisbecause the launcher does not say which card the layer took.
So the launcher now lists the cards and says it when more than one is present and no
-Adapterwas given:Nothing is chosen for the user: a PC with one card, or with the discrete card as the
default, runs exactly as before and prints nothing. With
-Adapter, nothing is printedeither (it is what the user asked for).
Written with an AI assistant.
Process, after the review's item 3
tests/test_win_launchers.pyandcheck_no_game_data.py.Fixed in
91537d2af(review items 1 and 2)-More:$Moreis merged into$settingsat line 622, after the note, so-More @{LEONIDA_ADAPTER='5070'}printed "Windows' default card is used" while the run did name a 5070. The comment names andrew-ai's dry runs and the head they were made at.python -I tests/test_win_launchers.py3 tests OK,python -I scripts/check_no_game_data.py d3d12/scripts/play-nvidia.ps1exit 0.AI-assisted: yes - DeepSeek v4.1 (flash).
Without `-Adapter` the layer makes its device with `D3D12CreateDevice(None, ..)`, which is Windows' default card. On a PC whose monitor hangs off the motherboard that is the integrated chip, and then: * DLSS cannot start on it - the SDK answers `NVSDK_NGX_Result_FAIL_FeatureNotSupported` - so the picture is the stretch, quietly, and the F1 setting goes back to stretch on the next start; * every frame is drawn by the integrated chip. Measured on a 7800X3D with an RTX 4090 (two adapters, the Radeon iGPU at 0x1002 and the 4090 at 0x10de): a D3D12 device made with `None` there is the Radeon's. Nobody sees this because the launcher does not say which card the layer took. So the launcher now lists the cards and says it when more than one is present and no `-Adapter` was given: $ scripts\play-nvidia.ps1 -Exe <game> -SeriesX -DryRun 2 cards: AMD Radeon(TM) Graphics, NVIDIA GeForce RTX 4090. No -Adapter: Windows' default card is used, which may not be the NVIDIA one. Name it (-Adapter 4090, or -Adapter '#1') if the picture comes up stretched. Nothing is chosen for the user: a PC with one card, or with the discrete card as the default, runs exactly as before and prints nothing. With `-Adapter`, nothing is printed either (it is what the user asked for). Written with an AI assistant.@andrew-ai on GitHub · 2026-12-01 22:56 UTC · original · edited 2026-12-01 23:42 UTC
At
105c80d4cthe warning disagrees with the final adapter when the caller sets it through the supported -More option. I ran the unmodified play-nvidia.ps1 with -DryRun on Windows:The launcher emits the message before applying the saved settings and -More. Checking the effective adapter after those merges would give the last two invocations the same result. This host also shows why the count can be confusing: the reported “5 cards” comprise an RTX 5070 and four virtual display entries. The runs used an existing placeholder path for -Exe and launched no game. Codex-assisted.
Rechecked
a4f3bd011on Windows. Removing the CIM query fixes the virtual-display count. With the default DLSS request, -More still prints the default-card note alongside LEONIDA_ADAPTER=5070. Passing -Adapter 5070 prints the same final setting without the note. The -NoDlss control prints no adapter note.105c80d4c2toa4f3bd0113@imShangLi on GitHub · 2026-12-02 05:57 UTC · original
VERIFY-2999 — Linux, Fedora 45, no GPU device, no game files, no title
Verdict: PASS. The added note fires only where the launcher really cannot name a card, and the behavior it describes (the layer uses Windows' default card, which may be the integrated GPU, and the launcher does not query Windows for the cards) is confirmed in
host.rsand intests/test_win_launchers.py. The one claim I could not check is the exact DLSS SDK error code, which needs a real GPU.Head
a4f3bd01, base the currentmain(0ae5a266), merge base913b88b9, 1 file, +10/−0:d3d12/scripts/play-nvidia.ps1.1. What it changes
A new
elseif ($wantDlss)block ind3d12/scripts/play-nvidia.ps1(afterif ($Adapter) { $settings.LEONIDA_ADAPTER = $Adapter }, lines 498-505): when DLSS is wanted and no-Adapteris given, it writes two lines telling the user that Windows' default card is used, which may not be the NVIDIA one, and to name it (-Adapter 4090, or-Adapter '#1') if the picture comes up stretched. The comment explains it is a note, not a query: the launcher does not ask Windows which cards there are.2. The claims it makes, and which ones I checked
d3d12/crates/leonida-gpu/src/host.rschosen_adapter()(lines 1602-1644):LEONIDA_ADAPTERunset or empty returnsNone, i.e. Windows' default adapter; a value naming no hardware card logs "Windows' default card is used". Also the launcher's own-Adapterhelp (lines 46-47) says "Default: Windows' default card." True.Write-Host; it does not callGet-CimInstance,Get-WmiObjectorGet-ChildItemon the video-class key. True.tests/test_win_launchers.pyrefuses a launcher that queries CIM for it" — checked:tests/test_win_launchers.pydefines a stubGet-CimInstance(lines 55-59) that throws for any class other thanWin32_OperatingSystem, so a launcher querying CIM for the cards would make that test fail. True.-Adapter 4090, or-Adapter '#1'" — checked against the launcher help (lines 46-47: part of the name, or#index) andhost.rs(name substring, any case, or DXGI#N). True.NVSDK_NGX_Result_FAIL_FeatureNotSupported" — not verifiable here (no GPU, no Windows, no DLSS). The repository's own Streamline error table (d3d12/crates/leonida-gpu/src/streamline.rslines 411, 454) lists an analogouseErrorFeatureNotSupported, but that is a different enum. Goes under section 5.$wantDlssscope — checked: defined at line 114, not reassigned before line 498, so theelseifsees the same value used at lines 117/126/148. True.''inside single-quoted strings rendersWindows'and'#1'. Correct.3. What the tests do here
python3 -I tests/test_win_launchers.py: 3 tests, OK (2 skipped). The only PowerShell-based test (test_nvidia_menu_restart_preserves_motion_blur_switch) isskipUnless(POWERSHELL)and is skipped because there is nopwsh/powershell.exeon this machine;test_static_quoting_and_no_pause_guardspasses; the Windows-onlytest_per_user_python_discovery_...is skipped. The change is not exercised here.-NoDlss, so$wantDlssis false.python3 -I -m unittest discover -s tests -p "test_docs_*.py": 57 tests, OK (38 s).python3 -I scripts/check_no_game_data.py d3d12/scripts/play-nvidia.ps1: clean.python3 -I scripts/red_green.py 2999 --work-dir ...:red not constructible— the pull request changes no test (only a.ps1). Reported as instructed.4. Anything wrong in the change (with the file and line)
Nothing wrong. The note is unconditional on the actual machine's card count (it fires whenever DLSS is wanted and no
-Adapteris given, even on a single-NVIDIA-GPU PC), but it is worded as a conditional ("may not be the NVIDIA one", "if the picture comes up stretched"), so it is informative rather than wrong.5. What I did not check
pwsh): the new block was checked by readingplay-nvidia.ps1, the launcher help andhost.rs, and by confirming the test-stub mechanism intests/test_win_launchers.py.NVSDK_NGX_Result_FAIL_FeatureNotSupportedon an integrated GPU — needs a real NVIDIA card and Windows; not observed.@MoonEyes on GitHub · 2026-12-02 18:12 UTC · original
Checked #2999 on Linux (the PowerShell itself was not run here). The launcher tests pass merged onto current
main, but the case andrew-ai reported is still open at this head, and #3049 would make the note's wording wrong.a4f3bd0113main45dc41f95c(clean merge treee43d79c933; merge base913b88b905, 313 commits behind)Ran (Linux, Python 3.13.18, on an export of the merge tree)
No red/green: it is a printed note with no test of its own (
test_win_launchers.pyonly keeps it from querying CIM, whicha4f3bd011fixed).Findings
d3d12/scripts/play-nvidia.ps1(the newelseif ($wantDlss)branch, about line 498): the check reads$Adapter, but the note is printed before-Moreand saved settings are merged. andrew-ai's Windows dry runs ata4f3bd011:-More @{LEONIDA_ADAPTER='5070'}still prints "No -Adapter: Windows' default card is used" while the finalLEONIDA_ADAPTERis5070. Test the effective setting (after the-Moremerge) instead of the parameter.GPUs tested:line.Verdict: defects (minor). Fix item 1 and coordinate the wording with #3049.
AI-assisted: Claude Opus 5.5 (Claude Code), verification only.
AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.
Generated by Claude Code
@fiestorra on GitHub · 2026-12-02 18:20 UTC · original
Fixed in
91537d2af, with both items from your findings and the process one said plainly in the body.Item 1 (the real defect): you are right that
$Adapterwas the wrong thing to read.$Moreis merged into$settingsat line 622, after the note, so-More @{LEONIDA_ADAPTER='5070'}printed "Windows' default card is used" while the run named a 5070. The condition now includes-not $More.ContainsKey('LEONIDA_ADAPTER'), and the comment names andrew-ai's dry runs ata4f3bd011so the next reader sees why the check is there. I checked there is no other late merge:play-nvidia.ps1does not read the F1 menu's saved settings (the runtime does), so-Adapterand-Moreare the only two ways a card arrives.Item 2: noted in place, in the comment next to the sentence - when #3049 lands the wording must change, and now the line to change is where the wording is, not in a PR body that gets scrolled past.
Item 3: said as it is in the body rather than fixed by filing a claim after the fact: there is no claim for this pull request, and I would rather that be visible than papered over.
GPUs tested: n/ais now there too.Checks on the new head: PowerShell parses with 0 syntax errors;
python -I tests/test_win_launchers.py3 tests OK;python -I scripts/check_no_game_data.py d3d12/scripts/play-nvidia.ps1exit 0.AI-assisted: yes - DeepSeek v4.1 (flash).
Written with an AI assistant.
The note fires when no card is named, and it looked at `$Adapter` only - but `-More` is merged into `$settings` further down (line 622), so `-More @{LEONIDA_ADAPTER='5070'}` printed "No -Adapter: Windows' default card is used" while the run did name a 5070. Reported by MoonEyes from andrew-ai's dry runs ata4f3bd011, which is the head this fixes. `$More.ContainsKey('LEONIDA_ADAPTER')` is now part of the condition, and the comment says why and names the report. There is no other late merge: play-nvidia.ps1 does not read the F1 menu's saved settings (the runtime does), so -Adapter and -More are the two ways a card arrives. Also noted, from the same review: #3049 (open) makes the no-adapter case pick the high-performance card, at which point "Windows' default card is used" is wrong for exactly the case this warns about. The comment now says so, so whichever lands second has the line to change. PowerShell parses (0 syntax errors), python -I tests/test_win_launchers.py: 3 tests, OK; python -I scripts/check_no_game_data.py d3d12/scripts/play-nvidia.ps1: exit 0. Written with an AI assistant.@MoonEyes on GitHub · 2026-12-02 22:01 UTC · original
This pull request touches the render path, so it needs an in-game run before it can be merged: unit tests and CI do not catch rendering regressions (a device loss after an earlier merge is why this gate exists).
Could you, or anyone with a working setup, post a run report on the current head merged onto current
main:mainSHA it was merged onto;mainalone for comparison, if you can.Please do not attach logs or screenshots that show game content. If a run on this exact head is already posted, a link to it in a reply is enough.
AI-assisted (Claude Code).
@fiestorra on GitHub · 2026-12-03 08:21 UTC · original
Sobre el informe de ejecución que pides: queda pendiente y depende de una máquina con el título, que ahora mismo no es esta (aquí no hay ejecución del juego).
Lo que sí está hecho y medido:
Head: 91537d2af7ba018651e3aa397482eafe07c0dc5d Main: d9b618f10 git merge-tree --write-tree origin/main <head> → limpio, sin conflictoO sea que se puede probar tal cual, sin rebasar nada.
Y lo que hay que mirar en esta, para que el informe sea útil y corto: arrancar
play-nvidia.ps1sin-Adapteren un PC cuya tarjeta por defecto no sea la NVIDIA y ver el aviso de dos líneas. Y anotar con quémainse probó: si#3049entra antes, la frase del aviso deja de ser cierta (lo dice el propio comentario del código).@merzleckeier on GitHub · 2026-12-03 08:54 UTC · original · requested changes
[P2] Use the effective adapter and upscaler for the warning. I tested
91537d2amerged ontod9b618f1with PowerShell 7.7 and synthetic dry runs. A typed-Adapterand a nonempty-Moreadapter now suppress the warning correctly.LEONIDA_ADAPTER=#1inleonida-settings.txt, the script warns about the default card and then emitsLEONIDA_ADAPTER=#1.-MenuRestart, an empty saved adapter clears the replayed-Adapter 4070. The launcher then emits no adapter and stays silent. The runtime also treats a whitespace-only-Moreadapter as empty.-Moreselectsstretch, the warning still prints.In a scratch control, I moved the two lines below the final settings merge. Checking
LEONIDA_UPSCALEfordlssandLEONIDA_ADAPTERfor a blank value gave the expected warning in all nine cases. The final adapter and upscaler values matched the original run in every case. AI-assisted with OpenAI Codex.@MoonEyes on GitHub · 2026-12-03 14:32 UTC · original
RUN (in game, third party, batch of five pull requests), each head merged with
git merge --no-ffonto mainb053a1813, in one build: #2686c5269801b, #26432e0b23a00, #27894cd9d71f8, #30720f1e26355, #299991537d2af. RTX 4060 8 GB, driver 610.88, Windows 11. Series S,-Resolution 1080, frame generation 2x,-PrecompileUsed, the same walking route as the other runs on this machine, 330 s after reaching the world.For reference, the same machine and route rendered 13.3 to 17.6 fps on other runs today: a check that nothing fell over, not a measurement of a gain.
Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch, on the heads listed above. If one of these pull requests changes its head, this run no longer covers it. #2834 was left out of the batch (it conflicts with the others).
Limits: one run; arrival in the world was driven by keys and not checked on pictures. The precompile took 589 s (the batch changes shader code, so the pipeline cache was cold). Switches that are off by default were not turned on: this run covers their default path only.
AI-assisted (Claude Code, Claude Opus 5.5).
@merzleckeier on GitHub · 2026-12-03 14:34 UTC · original
The saved F1 settings can still make the warning disagree with the actual adapter. I tested
91537d2aon current128579e9(tree5891e922) with the unmodified launcher in-DryRununder PowerShell 7.6.6.LEONIDA_ADAPTER=#2prints the default-card warning, then reportsLEONIDA_ADAPTER=#2in the final settings.-More @{LEONIDA_ADAPTER=''}suppresses the warning even though it requests no adapter. Replaying-Adapter #1with-MenuRestartand a saved empty adapter also suppresses it, even though the saved value clears the adapter.Moving the note after the saved-setting and
-Moremerge and checking[string]::IsNullOrWhiteSpace($settings.LEONIDA_ADAPTER)fixed those three cases. All eight dry-run cases passed with that change, including the plain default, explicit adapter,-NoDlss, and a named adapter restored on restart. The five Windows-only cases intest_win_launchers.pywere skipped; its seven other tests passed before and after the change. The existing #3049 wording caveat still applies. Synthetic inputs only. AI-assisted (Codex).@fiestorra on GitHub · 2026-12-03 17:01 UTC · original
Tienes razón en las dos, y el arreglo va en una rama:
pr-2999-fix=81ea1f9d4.El fallo era el orden, exactamente como dices. El aviso estaba en un
elseifque se decidía antes de que el menú guardado y el-Morese mezclaran en$settings, así que hablaba de una tarjeta que no era la de la tirada:Los dos casos que reportas caen los dos en esa línea:
LEONIDA_ADAPTER=#2guardado en F1:$Moreno lo tiene, así que el aviso salía — y la tirada sí nombraba tarjeta;-More @{LEONIDA_ADAPTER=''}:ContainsKeyes cierto, así que el aviso se callaba — y no nombra tarjeta ninguna.Lo que he hecho, que es lo que propones: leer de
$settingsy hacerlo después de la mezcla:Verificado sobre el
mainde ahora (717b90233):Y una cosa que el
IsNullOrWhiteSpacearregla además de lo que cuentas: un-More @{LEONIDA_ADAPTER=' '}(espacios) también cuenta como «no nombra», que conContainsKeycontaba como que sí.Lo que no he podido probar: el caso en una máquina de dos tarjetas con el juego — aquí hay una y el aviso es de cuando la de Windows no es la NVIDIA.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.