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

Closed
github-bot wants to merge 2 commits from github-bot/gh-3347 into main AGit
Owner

@⁠MoonEyes on GitHub · 2026-12-03 15:07 UTC · original
ProjectLeonida:claude/gallant-sagan-aamatr → main · +12 −3 · 3 files · 2 commits · closed without merging

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

**@⁠MoonEyes** on GitHub · 2026-12-03 15:07 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3347) `ProjectLeonida:claude/gallant-sagan-aamatr` → `main` · +12 −3 · 3 files · 2 commits · closed without merging 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)_
-NoFrameGen only replaced the F1 menu's LEONIDA_FRAME_GEN, so an FSR 3
frame generation saved ON in leonida-settings.txt came back at each start
despite "no frame generation". It now replaces both, as -FrameGen does.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01DDMsHwsknvo96XTWag2WiL
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01DDMsHwsknvo96XTWag2WiL
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 15:12:25 +00:00
Author
Owner

@⁠merzleckeier on GitHub · 2026-12-03 15:12 UTC · original · edited 2026-12-03 15:14 UTC

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.

**@⁠merzleckeier** on GitHub · 2026-12-03 15:12 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3347#issuecomment-7382746305) · edited 2026-12-03 15:14 UTC 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.
github-bot closed this pull request 2026-12-03 15:27:31 +00:00
Author
Owner

@⁠MoonEyes on GitHub · 2026-12-03 15:22 UTC · original

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

**@⁠MoonEyes** on GitHub · 2026-12-03 15:22 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3347#issuecomment-7383046851) 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

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/ubiquitarianism--leonida!3347
No description provided.