Skip to content

d3d12: preserve explicit MotionBlur values in the 1080p–1440p preset - #2761

Open
merzleckeier wants to merge 3 commits into
ProjectLeonida:mainfrom
merzleckeier:fix/1080-1440p-motion-blur-switch
Open

merzleckeier wants to merge 3 commits into
ProjectLeonida:mainfrom
merzleckeier:fix/1080-1440p-motion-blur-switch

Conversation

@merzleckeier

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: D3D12-DYNAMIC-PRESET-MOTION-BLUR-FALSE. Claim

What and why

Passing -MotionBlur:$false to play-X-1080-1440p.ps1 leaves False as a positional argument when the wrapper forwards @args. PowerShell binds that token to Resolution and rejects the launch.

The preset now binds MotionBlur as a named switch and forwards its bound value alongside the other launcher arguments. The preset still supplies the Series X and 1080p minimum defaults.

Tested

  • On main a4ed2638, the new PowerShell dry-run regression reproduces the Resolution binding failure. With this patch it covers omitted, bare, explicitly true and explicitly false values and checks 2560×1440 output and 0.75 minimum scale.
  • Of the four launcher tests, three passed on CachyOS with PowerShell 7.4.21, including the merged d3d12: preserve -MotionBlur across F1 restart #2626 restart regression. The Windows-only cmd.exe case was skipped. The tests used an empty synthetic executable. A separate Codex reviewer independently repeated the red/green check.
  • git diff --check and scripts/check_no_game_data.py passed.

GPUs tested: n/a.

AI-assisted: OpenAI Codex (GPT-6), with independent Codex review.

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • Synthetic test inputs and clean no-game-data check.

@ecox982745

Copy link
Copy Markdown
Contributor

Independent native Windows launcher verification for 2b85ec124 merged onto a21a62af1 (tree cf8e84fd2). Tested Windows PowerShell 5.1.26100.10068 and PowerShell 7.6.9 with a synthetic executable path containing spaces, an apostrophe and an ampersand.

On main, both explicit forms (-MotionBlur:$false and -MotionBlur:$true) were rejected by the Resolution binder on both shells. With the PR, omitted, bare, explicit true and explicit false all completed their first dry run and a replay of the actual LEONIDA_MENU_ARGS. Motion blur matched the request on both launches. The preset kept 2560x1440 output and the 0.75 minimum render scale, and the restarted command picked up a separately saved F1 setting.

The stock tests/test_win_launchers.py passed all four tests on native Windows, including the cmd.exe discovery and exit propagation test. Synthetic launcher inputs only. AI-assisted with OpenAI Codex (GPT-6.2 Sol).

@KelboLive

Copy link
Copy Markdown

Independent check on Windows (not the author), at 2b85ec124.

  • python -I tests/test_win_launchers.py: 4 tests OK in 1.14 s.

The launcher-preset case (explicit MotionBlur preserved in the 1080p–1440p preset) is covered by the updated test and passes; no PowerShell execution-policy failure here.

Environment: Windows 11 Pro 10.0.26200.9711, Python 3.12.10, Windows PowerShell 5.1.

AI-assisted: yes (opencode).

@KelboLive KelboLive left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified on Windows: python -I tests/test_win_launchers.py is 4/4, reverting to @args alone fails the new test with exactly the Cannot validate argument on parameter 'Resolution' … "False" error, and keeping param while dropping @PSBoundParameters fails at assertNotEqual(skips[0], skips[2]). So the fix is pinned in both directions. A fake inner script also confirms the forwarding: MotionBlur=False for -MotionBlur:$false, True for bare and :true, nothing when omitted, with -SeriesX -Lowest 1080 intact; :0/:1/:2 are correctly refused by the switch conversion.

The precedence is sound because there is no MotionBlur default to lose — the switch only decides whether four skip ids are appended (play-nvidia.ps1:466-476), and $PSBoundParameters distinguishes unset from explicit false at the argument level even though the two are behaviourally identical today.

Two real follow-ups:

  1. The bug class is still there in all ten sibling presets. play-X-1440p.ps1 and play-S-1080p.ps1 still take bare @args, so -MotionBlur:$true/:$false binds the value token to Resolution and leaves MotionBlur true — reproduced. On this preset, -NoDlss:$false and -Log:$false still fail the same way. The same param+@PSBoundParameters pattern (or one shared wrapper) in each preset would remove the class rather than one instance.
  2. d3d12/README.md now contradicts the test: its row gives this preset "0.5 to 0.667" render scale, while the code (Series X + -Lowest 1080 -> LEONIDA_OUTPUT=2560x1440) and the new test say 0.75 to 1.0.

Test precision: the test asserts the resulting skip list, so an "forward only when true" change would still pass. A fake play-nvidia.ps1 asserting $PSBoundParameters would pin the "explicit false is forwarded" half — the launcher test already copies scripts, so it is cheap.

@merzleckeier

Copy link
Copy Markdown
Contributor Author

Applied the two review follow-ups in 8edf0c8. The explicit-false forwarding regression test now observes the inner launcher’s bound parameters. It distinguishes omitted, explicit false, bare true and explicit true, and also checks that Series X and Lowest 1080 are forwarded. In a negative control that drops only the explicit false binding, the existing dry run still passes and the new test fails on omitted versus False.

The README now describes the fixed and dynamic preset flags and the Series X render scales. The current merge into 43c7b34 passed four launcher tests using PowerShell 7.4.21 on Linux and all seven Series X dry runs. The Windows-only cmd.exe test was skipped in this run. An independent read-only review also verified the new test and its negative control. The wider switch-forwarding issue across the sibling presets remains a separate follow-up.

AI-assisted with OpenAI Codex (GPT-6), including a separate read-only reviewer. Synthetic launcher inputs; no GPU required for these checks.

@merzleckeier

Copy link
Copy Markdown
Contributor Author

Native Windows verification of 8edf0c8 on the merge into 88a9f13. The full launcher test file passed 5/5 under PowerShell 7 and 5/5 in a second run selecting Windows PowerShell 5.1.26100.33822. This includes the new explicit-false binding test, the real-preset dry run and the Windows cmd.exe discovery/exit-propagation case. Synthetic launcher inputs only.

Windows Actions job and logs · MEASURED, AI-assisted (Codex).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants