Repository navigation
d3d12: the DLSS build is asked for once NVIDIA's SDK is here, whatever the switches (D3D12-F1-DLSS-REBUILD) - #2931
Mykolas009 wants to merge 3 commits into
Conversation
…r the switches (D3D12-F1-DLSS-REBUILD) play-nvidia.ps1 made the layer again with DLSS only when the start's own switches wanted DLSS ($wantDlss), and it decides that before it reads the F1 menu's saved settings. A DLSS choice the menu saved behind a replayed -Resolution (the menu's SAVE AND RESTART) therefore asked for no build: with a build noted as made without DLSS and NVIDIA's SDK installed afterwards, every such start fell back from DLSS. get-nvidia-sdks.ps1 says the next start builds the layer with DLSS; that held only for some switches. The check now follows the SDK alone: a diag build noted as made without DLSS is made again when nvsdk_ngx_d.lib is here, unless -NoDlss. It stays the one check it was; no second one behind the menu. Two things follow from asking more starts for that build: - without cargo such a start no longer stops with "No build and no cargo": it says DLSS waits for cargo and runs the build that is here (a start with no build at all still stops, as before); - a dry run, which builds nothing, says that a start builds first and prints the settings of the start after it; it printed the settings from before the build without a word. Test: tests/test_play_nvidia_menu_choice.py, ten cases of launcher dry runs against a synthetic folder with a stand-in cargo on the PATH (no game files, no GPU), and one more run for a note whose exe is gone. On main six of the ten fail (the five that expect the build and the one without cargo); with this change all pass. Not in this change: scripts/game-gate.ps1 refuses to run without a build so that none is made inside a run. A build noted as made without DLSS, with the SDK there, is now made again by starts that did not ask for it before (the gate's default Series X start among them), inside the run. A guard there is a follow-up: the gate needs PowerShell 7, which the PC this was written on does not have. Found by ubiquitarianism (ProjectLeonida#2570, 1 Dec 2026). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
KelboLive
left a comment
There was a problem hiding this comment.
Good fix: the rebuild is now keyed to the SDK lib alone (play-nvidia.ps1:129-131), with -NoDlss still the opt-out, and the no-SDK, -NoDlss and no-cargo paths fall back as before (the no-cargo case now continues with the existing build rather than stopping). The switch precedence is untouched — $wantDlss and the menu block at :529-641 still decide runtime use, so a DLSS-capable binary does not mean DLSS runs.
Red/green is solid: the new test fails 6/10 on ab374c7d5 and the suite is 16/16 here, with the -NoDlss case failing when the -not $NoDlss conjunct is removed. Merge with current main (including #2922) is clean and green, and the launcher tests plus switches.md check pass.
One thing before merge: scripts/game-gate.ps1:125-136 records exe_sha16/built_with before launching, so this change can rebuild leonida.exe during a gate run and leave run.json describing the previous binary — the body already flags it. Either add the guard you mentioned or file it as a follow-up, but it should not be left implicit, since the gate is the thing we use to compare builds.
Minor: the dry run reports the rebuild a real start would make, which is slightly optimistic if the build then fails — acceptable, just worth knowing.
|
Measured launcher build and restart sequencing at
The adapted stock menu suite ran 16 test methods per tree. Main failed six subtests in the new build-selection method, and the PR alone and combined passed all 16 methods. This checks launcher control flow and settings at synthetic boundaries. Real SDK compilation and the game gate were outside scope. AI-assisted (Codex). |
…LSS (D3D12-F1-DLSS-REBUILD) The gate refuses to run without a build, because the play script would make it inside the run. Since the change before this one, play-nvidia.ps1 also makes a build noted as made without DLSS again once NVIDIA's SDK is there, whatever the start's switches ask for: on such a checkout that build too would be made inside the run, after the gate wrote down the exe's hash and what it was built with. The gate now refuses that run as well and names the build script. Not with -NoDlss in -PlayArgs (shortened or with :$true too) and not without cargo: the play script makes no build then. That commit's message calls this guard a follow-up, for want of PowerShell 7 on the PC it was written on; it has been installed since, and this is it. Checked with PowerShell 7.7.0: the guard's own lines against a synthetic folder, eleven cases; and the whole script twice. With a build noted as made without DLSS and the SDK there it refuses before anything starts (exit 1, no run folder). With a build noted as made with DLSS it goes on as before: run.json carries built_with, and the run ends at once with ERROR not_started, there being no game in the folder. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Thanks for checking it. The guard is in now (218b032): |
|
The new gate check on I exercised the whole gate against a synthetic SDK marker, an existing diagnostics-only build stamp and cargo on PATH. A sentinel at the first process lookup stopped accepted cases before a run started. Separately, I ran the real play wrapper in dry-run mode with a stub inner launcher to record the forwarded switch. No game files were used.
The preceding commit |
|
The gate also treats a quoted adapter name as the DLSS opt-out. I reproduced this on I ran the actual gate, generated In both accepted cases, The guard at Synthetic inputs only. The builder and final process start were replaced by test doubles. MEASURED, AI-assisted with OpenAI Codex and independent raw-log verification. |
…D12-F1-DLSS-REBUILD) The preflight added in 218b032 read -NoDlss out of -PlayArgs with a pattern over the text. Two reviews of the pull request showed where that goes wrong: - `-NoDlss: $true`, a space after the colon, binds true, and the gate refused the run and asked for a DLSS rebuild (andrew-ai, PowerShell 7.6.9); - `-Adapter 'Fixture -NoDlss Adapter'` binds no switch, and the gate let the run go on into a build inside the run (merzleckeier, PowerShell 7.4.21). The gate now asks PowerShell itself: Test-NoDlssBound takes the param block of scripts\play-d3d12.ps1 and lets it bind the arguments the launch line gives the script (-Game, -Data, -More, then -PlayArgs); nothing of the play script runs. The first thing the probe writes is the answer, so text behind a `;` in -PlayArgs cannot stand in for it. Arguments PowerShell cannot bind (an ambiguous -No, a switch that does not exist, a value outside a ValidateSet) count as -NoDlss not said, as the start itself fails on them, and the refusal then says that they did not bind and with which error. The probe is reached only when the build's note, the SDK and cargo already say the play script would build. tests/test_game_gate.py takes the function out of the script and puts 19 lines of -PlayArgs to PowerShell 7 against the real play script's parameters: bare, shortened, :$true, : $true, :$false, : $false, alone and among other switches, the quoted adapter name alone, with -NoDlss:$false and with a real -NoDlss, an argument that does not bind, and a `; $true` behind the arguments (skipped where there is no pwsh). A second test holds that no pattern is matched against -PlayArgs any more. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
The revised preflight fixes the quoted-adapter and spaced-true cases in the full gate. I reran the actual gate, generated
The main control reached the sentinel in all 12 cases. None of the 24 cases invoked the stub builder. The stock gate test file passed 24/24 on main and 26/26 on the PR. This covers the selected literal argument forms, with synthetic inputs and a test double at the final process start. AI-assisted local testing, independently checked against the raw data. |
Claimed in the coordination issue as: D3D12-F1-DLSS-REBUILD (#2570 (comment)), from the finding #2570 (comment)
What and why
d3d12/scripts/play-nvidia.ps1made the layer again with DLSS only when the start's own switches wanted DLSS ($wantDlss), and it decides that before it reads the F1 menu's saved settings. A DLSS choice the menu saved behind a replayed-Resolution(SAVE AND RESTART) therefore asked for no build: with a build noted as made without DLSS (built-with.txtwithoutdlss) and NVIDIA's SDK installed afterwards, every such start fell back from DLSS.get-nvidia-sdks.ps1ends with "The next start of scripts\play-nvidia.ps1 builds the layer with DLSS"; that held only for some switches. #2922 covers the handoff once the build has DLSS; this is the step before it.The check now follows the SDK alone: a diag build noted as made without DLSS is made again when
nvsdk_ngx_d.libis here, unless-NoDlss. It stays the one check it was (no second one behind the menu).Two things follow from asking more starts for that build, and are part of this change:
The gate follows (second commit):
scripts/game-gate.ps1refuses to run without a build so that none is made inside a run. With the change above, a build noted as made without DLSS would be made again inside the run by starts that did not ask for it before (the gate's default Series X start among them), after the gate wrote down the exe's hash. The gate now refuses that run as well and names the build script; not with-NoDlssin-PlayArgsand not without cargo, when the play script makes no build. One sentence indocs/game_gate.mdsays so.Tested
Windows 11 Pro (build 26300), Windows PowerShell 5.1, Python 3.14.3. No game files and no GPU involved.
python -I tests/test_play_nvidia_menu_choice.py: 16 pass with this change (onmainab374c7). The new test,test_the_dlss_build_is_asked_for_once_its_sdk_is_here_whatever_the_switches, is ten cases of launcher dry runs against a synthetic folder, with a stand-in cargo on a PATH filtered of any other so the PC's own does not decide, and one more run for a note whose exe is gone. Onmain's launcher six of the ten fail (the five that expect the build and the one without cargo); the four that describe behaviour this change leaves alone pass there.build-nvidia.ps1that only writes the build's note: the launcher calls it, reads the note again and goes on with "Series S, DLSS"; with cargo off the PATH it says so and goes on with the build that is here. (By hand; the start then stops where it needs the realleonida.exe.)tests/test_win_launchers.pyandtests/test_leonida_launcher.pypass;tools/d3d12_switches.py --checkis clean (no new switch);scripts/check_no_game_data.pyon both files is clean.-NoDlss:$falseor another switch;-NoDlssspelled out, shortened or with:$true, a build with DLSS, no SDK, no cargo, no note: let through), and the whole script twice: it refuses before anything starts (exit 1, no run folder), and with a build noted as made with DLSS it goes on as before (run.jsoncarriesbuilt_with; the run ends at once with ERRORnot_started, there being no game in the folder).tests/test_game_gate.pyand the thirteentests/test_docs_*.pypass.build-nvidia.ps1(this PC does not have the SDK; the check calls the script exactly as before), and a gate run with the game.GPUs tested: n/a (launcher logic). The PC: NVIDIA GeForce RTX 5060 8 GB, driver 610.88, Windows 11 Pro.
AI-assisted: yes. Written and tested with Claude Code (Claude Fable 5.2). The diff was audited by a separate read-only reviewer agent (Claude Fable 5.2), twice before opening and once more for the second commit; its first pass turned a second check behind the menu into this change of the one existing check, and the gate's guard is its second pass's point.
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (not applicable: no translator change)🤖 Generated with Claude Code