d3d12 play-nvidia: F1 SAVE AND RESTART keeps the start's -More values (D3D12-F1-RESTART-MORE) #3247
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3247"
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?
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-02T22:18:00Z.
Item: D3D12-F1-RESTART-MORE (claimed in #2570).
What was wrong
The F1 menu's SAVE AND RESTART starts
play-nvidia.ps1again withLEONIDA_MENU_ARGS. That list carries the switches but not-More. So after a restart, everything the start passed through-Morewas gone:LEONIDA_FG_WITH_RT=1.A player using the launcher with hardware RT, frame generation and
LEONIDA_FG_WITH_RT=1in the advanced options saw frame generation turned off after every save. With ray tracing on, the script removesLEONIDA_FRAME_GENagain.Change (
d3d12/scripts/play-nvidia.ps1)-Morenow goes intoLEONIDA_MENU_ARGSas a PowerShell literal. The menu runs these words with-Command(host/menu.rs), so the table goes through. Every quote is doubled, including the typographic single quotes PowerShell also accepts. Keys are sorted, so the command is deterministic.-More, since it was chosen after it. A normal start keeps-Moreover the menu, as before.Tests
tests/test_win_launchers.py::test_nvidia_menu_restart_replays_more. It runs a dry run with-Moreand a menu file, replaysLEONIDA_MENU_ARGSthe way the menu does, and checks three things:LEONIDA_FG_WITH_RT=1comes back;LEONIDA_FG_LIMIT_FPSwins on the restart, while-Morewins on the first start;',’,$(...),;and}survives the round trip.again LEONIDA_FG_WITH_RT=1is not found;again LEONIDA_FG_LIMIT_FPS=90is not found.tests/test_win_launchers.pysuite passes, 10 tests (Windows 11, PowerShell 5.1).scripts/check_no_game_data.pyon both files: OK.Overlap
#3233 (
-PcGlyphs) and #3214 (FSR 3 SDK path) also add to the$againblock of the restart command, on other lines. Whichever lands second may need a trivial rebase.AI-assisted (oreofr-agent, Claude). Tested on Windows 11 with an RTX 4070 Laptop, driver 621.40 (scripts only, dry runs).
🤖 Generated with Claude Code
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-02T22:23:04Z.
Review: COMMENTED
Reviewed
3e5887f6againstmainatf3865cae8. With Linux PowerShell 7.7.0 in a sandbox, the new dry-run test fails with the original launcher because the restart losesLEONIDA_FG_WITH_RT=1. It passes on this head, including the saved F1 limit taking precedence on restart. The suite passed 5 tests with 5 Windows-only skips.One exact-head merge-order note:
git merge-tree --write-tree 3e5887f6 9f84a4498with #3233 reports a content conflict intests/test_win_launchers.py, where both PRs add a test at the same spot. The launcher script merges cleanly there. The current heads of #3214 (2229cfed) and #3240 (0b2c7866) also merge cleanly with this PR.Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-02T22:29:20Z.
The
d3d12 (windows-latest)failure is not from this change (it touches onlyplay-nvidia.ps1and a Python test). It is main's own break since #3179:leonida-luatests call.unwrap()onRuntime(E0599), and main's d3d12 job fails the same way atbc20b75baandf3865cae8. #3237 fixes it; this PR's job should go green once that lands. (oreofr-agent, AI-assisted)Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-02T22:56:21Z.
VERIFY-3247 — Windows nativo:
red then greeny la rama fusiona limpia3e5887f65—play-nvidia.ps1(+11/−1),tests/test_win_launchers.py(+47)f3865cae8;git merge-treeagainstmain16243cd6e→ cleanRan at the head
Negative control (the commit's hunk in
play-nvidia.ps1reverted, the tests kept):The test bites.
What the change is: F1 SAVE AND RESTART keeps the start's
-Morevalues — the extra runtime arguments given on the command line survive the restart's rebuilt command line, instead of being dropped because the restart replays only the switches it knew about. The failure it fixes is silent: the restart looks normal and the run loses what the player asked for.What I could not test: the actual F1 restart in a running title — the test builds the restart command.
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T23:13:53Z.
RUN (independent run on Windows, head
3e5887f651920bddf186a47e9e31a14e57b86b8d, merged intomainef35d683ea9ccca645c84cd31229185283ba7380withgit merge --no-ff)Green. The merge was clean (2 files:
d3d12/scripts/play-nvidia.ps1,tests/test_win_launchers.py).python -I tests/test_win_launchers.pyon the merge: 10 tests, OK, includingtest_nvidia_menu_restart_replays_more.Red. With
main'splay-nvidia.ps1put back over the merge, the new test fails and the other 9 pass. The failure isagain LEONIDA_FG_WITH_RT=1not found: on the replay onlyLEONIDA_FG_LIMIT_FPS=90(the menu's value) came back, the-Moretable was lost. This is the bug the PR describes. The script was restored afterwards.Review.
-Moregoes intoLEONIDA_MENU_ARGSas a PowerShell literal@{'key'='value'; ...}. Every'and the typographic quotes U+2018 to U+201B are doubled, keys and values alike, keys sorted. Reading the regex['\u2018-\u201B]and doubling the matched char is correct for how PowerShell treats those characters.-Morein a dry run (stubGet-CimInstance, same as the test), took theLEONIDA_MENU_ARGSline and replayed it the way the F1 menu does (menu.rs:Start-Sleep; & '<play>' <args>throughpowershell.exe -Command). The entries:a''b,it's,x'; New-Item ...; ', the same with U+2018, U+2019, and U+201A/U+201B as closing quote,$(New-Item ...) $env:USERNAME, backtick plus$(...),say "hi" & calc, a key with spaces, an empty value, and two keys that try to close the quote (k'; New-Item ...; #,k‘=1; New-Item ...; #). Result: no sentinel file was created, and all 13 key/value pairs came back byte-identical, both through an in-process scriptblock and through a realpowershell.exe(passed with-EncodedCommandto avoid my own harness's argv and code page mangling). Single-quoted literals do not expand$or backticks, so the only way out was a quote, and all the quote forms are doubled.foreach ($k in $More.Keys) { if (-not ($MenuRestart -and $menu.Contains($k))) { ... } }. Only on a-MenuRestartstart, and only for a key the menu file has, the saved value stands. The test showsLEONIDA_FG_LIMIT_FPS60 at the first start and 90 after the restart, withLEONIDA_FG_WITH_RT=1(not in the menu file) replayed.-MenuRestartthe condition is always true, so the loop is the old one. With an empty-Morenothing is appended to the replay args. At the first start the test checks that-Morestill beats the menu (60, "Command line over the F1 menu's saved values" line).play-nvidia.ps1):git merge --no-ffof #3230 on top of this merge is clean (no conflict, 3 files).tests/test_win_launchers.pyon both merged: 10 tests, OK. Not run in game.Not covered.
menu.rs) was read but not run.Verdict. The change does what it says, is red on
mainand green with the PR, and I could not make the replayed command run injected code. Nothing blocks the merge on my side. An in-game run on this head is part of a batch run that will be posted separately.AI-assisted (Claude Code), models: Claude Opus 5.5 (checker), separate Claude Opus 5.5 judge.
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T23:32:40Z.
RUN (in game, batch of five pull requests), each head merged with
git merge --no-ffonto mainef35d683e, in one build: #31764c31594b5, #2657c16b0424e, #2807e2572082c, #323097eefdee4, #32473e5887f65. 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.2 fps on other batches today. These fps are 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. #3247 has since moved to
3dc6c58b3, which only mergesmain(81efe4566) into the head above:git diff 3e5887f65 3dc6c58b3leavesd3d12/scripts/play-nvidia.ps1andtests/test_win_launchers.pyunchanged. If another of these pull requests changes its head, this run no longer covers it.Limits: one run; arrival in the world was driven by keys and not checked on pictures;
-PrecompileUsedwas used becausemainnow precompiles every known pipeline by default (88,631 for a new executable, over an hour on this card). The default start was therefore not exercised, and the F1 SAVE AND RESTART path of #3247 was not exercised in game. An earlier attempt of this batch is not counted: the run script gave up waiting while that full precompile ran.AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-02T23:52:48Z.
Review: COMMENTED
Rechecked
3dc6c58bafter the sync withmain(81efe4566). The-Morerestart test still passes. The launcher suite on this head passed five tests with five Windows-only skips under Linux PowerShell 7.7.0.I also checked the new #3233 head (
86e92f66). Git merges the launcher script cleanly. The remaining conflict is intests/test_win_launchers.py, where both PRs insert a test at the same spot. Keeping both complete methods,test_nvidia_menu_restart_replays_moreandtest_nvidia_menu_restart_preserves_pc_glyphs_folder, resolved it in a scratch merge. Both restart tests passed there (six passed, five Windows-only skips across the full launcher suite). Synthetic dry runs only. AI-assisted.Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-02T23:59:15Z.
Merging (OreoFR's OK). Head
3dc6c58b3a, main81efe4566: merge-tree clean, all six checks green on this head, main's last CI / D3D12 runtime / No Game Data green. Red/green by merzleckeier and MoonEyes; in-game PASS in MoonEyes' batch C (4060, 330 s, 0 device loss) on3e5887f65, whose script and test are byte-identical to this head. Enqueued in the merge queue. (oreofr-agent, AI-assisted)