scripts: play-nvidia.ps1 says when it is about to run on a card that is not the NVIDIA one #2999
Code
Clone this repository
Checkout
From your project repository, check out a new branch and test the changes.
git fetch -u origin "github-pr/2999:github-pr/2999" git switch "github-pr/2999"
Open
leonida/mandy
fiestorra wants to merge 3 commits from
github-pr/2999 into main
pull from: github-pr/2999
merge into: leonida:main
leonida:main
leonida:github-pr/3295
leonida:beta
leonida:docs/changelog-3483-3500
leonida:github-pr/3294
leonida:github-pr/2975
leonida:github-pr/2815
leonida:feat/gate-driver-start
leonida:feat/skip-pipelines-release
leonida:perf/lazy-compare
leonida:perf/mwaitx-wait
leonida:test/prio-ceiling-main
leonida:fix/ab-cpu-stdout
leonida:fix/gate-old-crashes
leonida:diag/ab-cpu
leonida:test/main-0312
leonida:github-pr/3291
leonida:diag/indirect-clamp-census
leonida:feat/barrier-enhanced
leonida:perf/texture-frame-ceiling
leonida:perf/dstorage-threads
leonida:fix/console-queue-dma-tables
leonida:fix/port-descriptors-record-parts
leonida:fix/frame-waits-fence
leonida:fix/console-sampler-words
leonida:fix/graphics-userdata-spill
leonida:fix/xg-reserved-layout-rotation
leonida:fix/barrier-console-flags
leonida:fix/switches-wait-test-child
leonida:test/list-value-waits
leonida:test/lot-gxdk-0412
leonida:fix/bvh-compacted-size
leonida:docs/i18n-quickstarts
leonida:feat/native-pipeline-slots
leonida:fix/clippy-leonida-gpu
leonida:fix/list-value-producers
leonida:fix/descriptor-page-straddle
leonida:fix/xmem-low-window
leonida:fix/ffx-jitter-never-zero
leonida:fix/run-stdout-closed
leonida:github-pr/2892
leonida:github-pr/2896
leonida:feat/warm-save-every
leonida:github-pr/2980
leonida:github-pr/2994
leonida:github-pr/3005
leonida:github-pr/3010
leonida:github-pr/3136
leonida:github-pr/3303
leonida:github-pr/3220
leonida:github-pr/3143
leonida:github-pr/3330
leonida:github-pr/3226
leonida:github-pr/3187
leonida:carry/3395
leonida:github-pr/2946
leonida:github-pr/2947
leonida:github-pr/2945
leonida:github-pr/2983
leonida:github-pr/3001
leonida:github-pr/3372
leonida:github-pr/3128
leonida:github-pr/3296
leonida:github-pr/2588
leonida:github-pr/3119
leonida:github-pr/3378
leonida:fix/crash-diagnostics
leonida:feat/dlss-mip-bias
leonida:fix/retired-out-of-order
leonida:fix/dxr-postbuild-barrier
leonida:fix/amd-relay-default
leonida:fix/removed-report-wait
leonida:feat/heap-twin
leonida:feat/vram-margin
leonida:github-pr/2472
leonida:github-pr/3123
leonida:github-pr/3088
leonida:assets/annonce-v1
leonida:github-pr/2794
leonida:github-pr/3300
leonida:github-pr/3304
leonida:github-pr/3308
leonida:github-pr/3367
leonida:github-pr/3369
leonida:fix/launcher-dlss-diagnostics
leonida:github-pr/3269
leonida:github-pr/2957
leonida:github-pr/3205
leonida:fix/crash-zero-guard
leonida:github-pr/3185
leonida:github-pr/3099
leonida:github-pr/3104
leonida:github-pr/3348
leonida:github-pr/3379
leonida:github-pr/3377
leonida:perf/darner-title-priority-ceiling
leonida:github-pr/3376
leonida:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
leonida:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
leonida:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
leonida:github-pr/3373
leonida:github-pr/3368
leonida:github-pr/3198
leonida:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
leonida:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
leonida:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
leonida:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
leonida:github-pr/3346
leonida:github-pr/3375
leonida:github-pr/2958
leonida:github-pr/3151
leonida:github-pr/3307
leonida:github-pr/3278
leonida:github-pr/3374
leonida:fix/runtime-test-conservative-fixtures
leonida:github-pr/3366
leonida:ci/shard-semantic-linux
leonida:github-pr/3354
leonida:docs/fg-limit-fps-switch
leonida:github-pr/3365
leonida:fix/read-file-hard-link
leonida:github-pr/3364
leonida:fix/book-slot-heap-never-read
leonida:github-pr/3361
leonida:github-pr/3263
leonida:github-pr/3360
leonida:github-pr/3353
leonida:github-pr/3331
leonida:fix/alias-later-queued-submissions
leonida:github-pr/3352
leonida:github-pr/3228
leonida:github-pr/3349
leonida:claude/gallant-sagan-aamatr
leonida:github-pr/3200
leonida:github-pr/3132
leonida:github-pr/3323
leonida:github-pr/3332
leonida:github-pr/3340
leonida:github-pr/3311
leonida:github-pr/3334
leonida:github-pr/3297
leonida:github-pr/3256
leonida:github-pr/2567
leonida:github-pr/2851
leonida:d3d12/agility-sdk-621
leonida:github-pr/3164
leonida:github-pr/3114
leonida:github-pr/3050
leonida:github-pr/3113
leonida:github-pr/3326
leonida:github-pr/3144
leonida:github-pr/2642
leonida:github-pr/3072
leonida:github-pr/2789
leonida:github-pr/2643
leonida:github-pr/3009
leonida:github-pr/3035
leonida:github-pr/3031
leonida:github-pr/2686
leonida:github-pr/2834
leonida:github-pr/3321
leonida:github-pr/3325
leonida:github-pr/3290
leonida:github-pr/3324
leonida:github-pr/3130
leonida:claude/fervent-curie-m19lnr
leonida:github-pr/3309
leonida:github-pr/3305
leonida:github-pr/3306
leonida:github-pr/3302
leonida:github-pr/3301
leonida:github-pr/3345
leonida:github-pr/3211
leonida:github-pr/3027
leonida:github-pr/3286
leonida:github-pr/3235
leonida:github-pr/3265
leonida:github-pr/3275
leonida:codex/skip-no-hit-ray-passes
leonida:github-pr/2823
leonida:github-pr/2911
leonida:github-pr/3262
leonida:github-pr/3125
leonida:github-pr/3206
leonida:github-pr/3250
leonida:github-pr/3238
leonida:github-pr/3188
leonida:github-pr/2952
leonida:github-pr/3217
leonida:github-pr/3168
leonida:t3/preserve-fsr-sdk-restart-path
leonida:t3/propagate-host-failure-hresult
leonida:github-pr/3209
leonida:t3/launcher-custom-parameters
leonida:github-pr/3207
leonida:github-pr/3183
leonida:github-pr/3160
leonida:github-pr/3201
leonida:ci/less-to-run
leonida:github-pr/2930
leonida:github-pr/2797
leonida:perf/native-compute-shader-forms
leonida:github-pr/3191
leonida:github-pr/3011
leonida:github-pr/3019
leonida:github-pr/2996
leonida:gh-readonly-queue/main/pr-2789-45dc41f95c1cd0dcc29c2c50582e0e9af8a77259
leonida:claude/blissful-franklin-ukp7ag
leonida:github-pr/3141
leonida:github-pr/3156
leonida:github-pr/3150
leonida:github-pr/3153
leonida:github-pr/3163
leonida:github-pr/3142
leonida:github-pr/3139
leonida:github-pr/2841
leonida:github-pr/3069
leonida:github-pr/3098
leonida:github-pr/3107
leonida:github-pr/3071
leonida:github-pr/2774
leonida:github-pr/2889
leonida:github-pr/3075
leonida:github-pr/2661
leonida:github-pr/3064
leonida:github-pr/3054
leonida:github-pr/3049
leonida:github-pr/2855
leonida:github-pr/2943
leonida:github-pr/3016
leonida:github-pr/2887
leonida:github-pr/3006
leonida:github-pr/3003
leonida:github-pr/2993
leonida:notes/card-time-and-plant-flicker
leonida:github-pr/2989
leonida:feat/vulkan-rs
leonida:github-pr/2985
leonida:github-pr/2951
leonida:github-pr/2982
leonida:github-pr/752
leonida:github-pr/792
leonida:github-pr/2877
leonida:github-pr/2654
leonida:github-pr/2893
leonida:github-pr/2948
leonida:github-pr/2944
leonida:github-pr/2919
leonida:github-pr/2915
leonida:archive/ci/less-to-run/20261202T1121Z
leonida:github-pr/2800
leonida:github-pr/2822
leonida:github-pr/2833
leonida:github-pr/2840
leonida:github-pr/2831
leonida:github-pr/2832
leonida:github-pr/2801
leonida:github-pr/2890
leonida:github-pr/2891
leonida:github-pr/2664
leonida:github-pr/2807
leonida:rt-call-trace
leonida:github-pr/2755
leonida:perf/ahead-split
leonida:github-pr/2587
leonida:github-pr/2698
leonida:github-pr/2609
leonida:github-pr/3219
leonida:docs/readme-runtime-proposal
leonida:github-pr/2017
leonida:github-pr/1741
leonida:github-pr/1667
leonida:codex/coord-claim-check-20261124-7e48
No reviewers
Assignees
Clear assignees
No assignees
Labels
Clear labels
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
enhancement
New feature or request
missing claim
Needs a claim in #14
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
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
Projects
Clear projects
No items
No project
Milestone
Clear milestone
No items
No milestone
Dependencies
No dependencies set
Notifications
2 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
leonida/mandy!2999
Loading…
Reference in a new issue
No description provided.
Delete branch "github-pr/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?
This branch is out-of-date with the base branch
Reviewers 0 approvals
Details
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.scripts: 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).
At 105c80d4c the 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 a4f3bd011 on 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.
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.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
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.
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).
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).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).
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).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.
Checked:
$Moreis[hashtable](line 90) and$wantDlssis defined at line 114, so the guard and the merge order are right. The note covers exactly the case #3011 documents from the other side. No objection.