d3d12: -NoFrameGen also drops a saved FSR 3 frame generation (D3D12-NOFRAMEGEN-DROPS-SAVED-FSR) #3347

Closed
MoonEyes wants to merge 2 commits from upstream-pr/3347 into main
MoonEyes commented 2026-12-03 15:07:39 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-03T15:07:39Z.


Refs #3322. Claim: D3D12-NOFRAMEGEN-DROPS-SAVED-FSR in #3312.

Cause

-NoFrameGen only replaced LEONIDA_FRAME_GEN in $switchSettings (d3d12/scripts/play-nvidia.ps1), so an LEONIDA_FSR_FRAMEGEN=1 saved by the F1 menu came back at each start, even with frame generation off.

Change

NoFrameGen now replaces both LEONIDA_FRAME_GEN and LEONIDA_FSR_FRAMEGEN (symmetric with FsrFrameGen). Header comments updated in play-nvidia.ps1 and scripts/play-d3d12.ps1.

Tests

  • MenuChoiceTests.test_a_typed_no_frame_generation_drops_a_saved_fsr_3_one (Windows only, skipUnless nt).
  • Not run here (no PowerShell on this machine), so no red/green executed. A read-only reviewer traced that it fails without the fix. python -I scripts/check_no_game_data.py passes.

Not covered

The launcher (tools/leonida_launcher.py) emits no -NoFrameGen when frame generation is off; that part belongs to @OreoFR and is not changed here.

AI-assisted: Claude Code, reviewed by a separate read-only reviewer agent.


Generated by Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5629168815 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3347). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-03T15:07:39Z. --- Refs #3322. Claim: D3D12-NOFRAMEGEN-DROPS-SAVED-FSR in #3312. ## Cause `-NoFrameGen` only replaced `LEONIDA_FRAME_GEN` in `$switchSettings` (`d3d12/scripts/play-nvidia.ps1`), so an `LEONIDA_FSR_FRAMEGEN=1` saved by the F1 menu came back at each start, even with frame generation off. ## Change `NoFrameGen` now replaces both `LEONIDA_FRAME_GEN` and `LEONIDA_FSR_FRAMEGEN` (symmetric with `FsrFrameGen`). Header comments updated in `play-nvidia.ps1` and `scripts/play-d3d12.ps1`. ## Tests - `MenuChoiceTests.test_a_typed_no_frame_generation_drops_a_saved_fsr_3_one` (Windows only, `skipUnless nt`). - Not run here (no PowerShell on this machine), so no red/green executed. A read-only reviewer traced that it fails without the fix. `python -I scripts/check_no_game_data.py` passes. ## Not covered The launcher (`tools/leonida_launcher.py`) emits no `-NoFrameGen` when frame generation is off; that part belongs to @OreoFR and is not changed here. AI-assisted: Claude Code, reviewed by a separate read-only reviewer agent. --- _Generated by [Claude Code](https://claude.ai/code)_
merzleckeier commented 2026-12-03 15:12:27 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T15:12:27Z.


The full launcher suite exposed a regression at 65c12d17. -CardMask NoFrameGen is how the launcher masks NVIDIA frame generation on AMD. It uses the same $switchSettings mapping as the explicitly typed switch. With both keys in the map, the mask now suppresses LEONIDA_FSR_FRAMEGEN=1 too. The existing test_card_mask_leaves_the_menus_nvidia_values_out_and_in_the_file passes on main (acb0657e2) and fails when I apply just this PR’s PowerShell change. The failing case is card-fsr LEONIDA_FSR_FRAMEGEN=1.

For the -CardMask loop, using only LEONIDA_FRAME_GEN when the mask name is NoFrameGen preserves FSR on AMD. I checked that change locally. Both the CardMask case and the new typed -NoFrameGen case pass, and the launcher suite is green for all eight tests that run on Linux.

The targeted typed-switch regression in this PR also passed independently before that adjustment. It failed on main, where the saved FSR setting survived. All 14 extracted menu-choice tests passed under PowerShell 7.6.6 on Linux with synthetic settings. The temporary test copy uses pwsh and enables the portable test class. AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7382746305 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3347#issuecomment-7382746305). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-03T15:12:27Z. --- The full launcher suite exposed a regression at `65c12d17`. `-CardMask NoFrameGen` is how the launcher masks NVIDIA frame generation on AMD. It uses the same `$switchSettings` mapping as the explicitly typed switch. With both keys in the map, the mask now suppresses `LEONIDA_FSR_FRAMEGEN=1` too. The existing `test_card_mask_leaves_the_menus_nvidia_values_out_and_in_the_file` passes on `main` (`acb0657e2`) and fails when I apply just this PR’s PowerShell change. The failing case is `card-fsr LEONIDA_FSR_FRAMEGEN=1`. For the `-CardMask` loop, using only `LEONIDA_FRAME_GEN` when the mask name is `NoFrameGen` preserves FSR on AMD. I checked that change locally. Both the CardMask case and the new typed `-NoFrameGen` case pass, and the launcher suite is green for all eight tests that run on Linux. The targeted typed-switch regression in this PR also passed independently before that adjustment. It failed on `main`, where the saved FSR setting survived. All 14 extracted menu-choice tests passed under PowerShell 7.6.6 on Linux with synthetic settings. The temporary test copy uses `pwsh` and enables the portable test class. AI-assisted with OpenAI Codex.
MoonEyes commented 2026-12-03 15:22:59 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-03T15:22:59Z.


CI is red on this PR and the failure is this change, not the base: linux-python-and-viewer fails tests/test_leonida_launcher.py::test_the_switch_table_is_the_scripts (the launcher mirrors $switchSettings, tools/leonida_launcher.py:1412) and tests/test_win_launchers.py::test_card_mask_leaves_the_menus_nvidia_values_out_and_in_the_file.

Root cause: -NoFrameGen is part of the launcher's card mask (CARD_MASK, tools/leonida_launcher.py:228). On a card without NVIDIA the launcher passes it to drop DLSS frame generation while the menu's saved FSR 3 frame generation must stay (the test asserts card-fsr LEONIDA_FSR_FRAMEGEN=1). Making -NoFrameGen also clear LEONIDA_FSR_FRAMEGEN breaks that by design, so this approach is wrong. The review before opening missed the card-mask use.

What #3322 needs instead is a distinct "no frame generation at all" signal from the launcher, which touches tools/leonida_launcher.py and so goes through @OreoFR. Leaving this PR as a draft, not for merge; I will not push a workaround on top of it.


Generated by Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7383046851 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3347#issuecomment-7383046851). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-03T15:22:59Z. --- CI is red on this PR and the failure is this change, not the base: `linux-python-and-viewer` fails `tests/test_leonida_launcher.py::test_the_switch_table_is_the_scripts` (the launcher mirrors `$switchSettings`, `tools/leonida_launcher.py:1412`) and `tests/test_win_launchers.py::test_card_mask_leaves_the_menus_nvidia_values_out_and_in_the_file`. Root cause: `-NoFrameGen` is part of the launcher's card mask (`CARD_MASK`, `tools/leonida_launcher.py:228`). On a card without NVIDIA the launcher passes it to drop DLSS frame generation while the menu's saved FSR 3 frame generation must stay (the test asserts `card-fsr LEONIDA_FSR_FRAMEGEN=1`). Making `-NoFrameGen` also clear `LEONIDA_FSR_FRAMEGEN` breaks that by design, so this approach is wrong. The review before opening missed the card-mask use. What #3322 needs instead is a distinct "no frame generation at all" signal from the launcher, which touches `tools/leonida_launcher.py` and so goes through @OreoFR. Leaving this PR as a draft, not for merge; I will not push a workaround on top of it. --- _Generated by [Claude Code](https://claude.ai/code)_

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
ProjectLeonida/mandy!3347
No description provided.