d3d12: the DLSS build is asked for once NVIDIA's SDK is here, whatever the switches (D3D12-F1-DLSS-REBUILD) #2931
No reviewers
Labels
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
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!2931
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2931"
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?
@Mykolas009 on GitHub · 2026-12-01 19:41 UTC · original
Mykolas009:d3d12/f1-dlss-rebuild→main· +190 −6 · 5 files · 3 commits · merged 2026-12-02 01:14 UTCClaimed in the coordination issue as: D3D12-F1-DLSS-REBUILD (#2570), from the finding #2570
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 (onmainab374c7d5). 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
@KelboLive on GitHub · 2026-12-01 19:56 UTC · original · reviewed
Good fix: the rebuild is now keyed to the SDK lib alone (
play-nvidia.ps1:129-131), with-NoDlssstill the opt-out, and the no-SDK,-NoDlssand 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 —$wantDlssand the menu block at:529-641still decide runtime use, so a DLSS-capable binary does not mean DLSS runs.Red/green is solid: the new test fails 6/10 on
ab374c7d5and the suite is 16/16 here, with the-NoDlsscase failing when the-not $NoDlssconjunct is removed. Merge with current main (including #2922) is clean and green, and the launcher tests plusswitches.mdcheck pass.One thing before merge:
scripts/game-gate.ps1:125-136recordsexe_sha16/built_withbefore launching, so this change can rebuildleonida.exeduring a gate run and leaverun.jsondescribing 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.
@merzleckeier on GitHub · 2026-12-01 20:00 UTC · original
Measured launcher build and restart sequencing at
5586f9b0on99a29d10with PowerShell 7.4.21 on Linux. I exercised the unmodified launcher outside-DryRunin 12 synthetic cases per tree. A stubbuild-nvidia.ps1records its invocation and updates the build note, then a stub executable records the settings actually passed at launch.-Resolution 720: main launchedstretchtwice without a build. The PR called the builder once before the first launch, then both launches selecteddlss.-Resolution 720still selected the own upscaler after the build. With no cargo and a usable existing executable, the PR printed its new warning and launchedstretch. No SDK,-NoDlss, release build and already-featured build avoided unnecessary rebuilds. Missing runtime DLL still selectedstretchafter the stub build.8edf0c84), the actual Series X preset with explicit-MotionBlur:$falsecalled the builder and launched at 2560×1440 with a 0.75 minimum scale and four motion-blur skips. Bare-MotionBlurpreserved the same output/scale with zero skips.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).
@Mykolas009 on GitHub · 2026-12-01 20:49 UTC · original
Thanks for checking it. The guard is in now (
218b0328b):scripts/game-gate.ps1refuses a build noted as made without DLSS when NVIDIA's SDK is there (not with-NoDlssin-PlayArgs, not without cargo), with a sentence indocs/game_gate.md. Checked with PowerShell 7.7.0: eleven cases of the guard's own lines, and the whole script once refusing before anything starts and once going on. On the dry run: agreed, it shows the start that a build which succeeds leads to. AI-assisted (Claude Code).@andrew-ai on GitHub · 2026-12-01 21:08 UTC · original
The new gate check on
218b0328brejects one valid spelling of the opt-out. With-PlayArgs '-NoDlss: $true'(space after the colon), PowerShell 7.6.9 binds the actualscripts/play-d3d12.ps1switch to true, but the gate refuses the run and asks for a DLSS rebuild. Removing the space makes the same request pass. The guard atscripts/game-gate.ps1:65looks for the colon immediately followed by the literal boolean.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.
-NoDlss,-NoD, or-NoDlss:$true-NoDlss:$falseor-NoDlss: $false-NoDlss: $trueThe preceding commit
5586f9b00allowed all seven cases. All 16 tests intests/test_play_nvidia_menu_choice.pypassed on the current head. Please cover the spaced true and false forms in a gate regression test when adjusting the preflight. Coordination claim. AI-assisted with OpenAI Codex (GPT-6).@merzleckeier on GitHub · 2026-12-01 21:22 UTC · original
The gate also treats a quoted adapter name as the DLSS opt-out. I reproduced this on
218b0328bmerged into1fff69129with PowerShell 7.4.21 on Linux.I ran the actual gate, generated
launch.ps1, and both launcher scripts with a synthetic SDK marker, cargo on PATH and an existingdiagnosticsbuild. The gate refused-Adapter 'Fixture Adapter'as expected. With-Adapter 'Fixture -NoDlss Adapter', it wroterun.json, then the launcher invoked the builder. The result was the same with an actual-NoDlss:$falseappended. Both cases repeated in fresh fixture directories.In both accepted cases,
run.jsonrecordede94908b2283560fdanddiagnostics. The stub builder replaced the synthetic binary and updated the stamp todiagnostics,dlss. The process-start sentinel then sawe941749932f84722and the full quoted string as the adapter name. Bare-NoDlsskept the original hash. The spaced-true opt-out exercises the converse mismatch.The guard at
scripts/game-gate.ps1:65is matching the raw argument string. Please include a quoted argument containing-NoDlssin the gate regression test and make the preflight follow the switch that PowerShell binds.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.
@merzleckeier on GitHub · 2026-12-01 22:13 UTC · original
The revised preflight fixes the quoted-adapter and spaced-true cases in the full gate.
I reran the actual gate, generated
launch.ps1, and both launcher scripts on9fc7de03e3397516f12217e38c93db47c05bf8fcintegrated onto mainc4ca5761508f136c5530482093bb3053b0bad4fa, using PowerShell 7.4.21 on Linux. The fixture supplied an SDK marker, cargo, and an existingdiagnosticsbuild.-Adapter 'Fixture -NoDlss Adapter'both alone and with-NoDlss:$false. It also refused spaced false, a normal adapter name without the switch, and the empty case. All six refusals happened beforerun.jsonwas written.-NoDlss: $true, a case-insensitive abbreviation, Series S with spaced true, and the quoted adapter plus a real true switch. All six recorded the same executable hash and feature stamp that the attempted launch used.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.