fix(menu): keep render scale when switching upscalers #55
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
needs measurements
question
testing wanted
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!55
Loading…
Reference in a new issue
No description provided.
Delete branch "mooki/Longshot:fix/upscaler-scale-after-toggle"
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?
Why
Switching the Upscaler away from DLSS and back should not silently lower the chosen Render resolution. On current Longshot main, Balanced 58% still returns as Performance 50%; this change keeps the player's choice.
What changed
set_row(), the scale text/help and effective getter ingpu/vk/vk_menu.cpp, andsnap_render()ingpu/vk/upscaler_rows.h; persistence is specified indocs/control.md.valueseparately from the effectivetext; this distinction is documented.Flags and settings
No new switch, build flag, command-line flag or saved key is introduced. These existing settings change how a temporary fallback is used; first-start Auto defaults and deliberate preset choices are unchanged.
dlssresolutioninto itresolutionMeasurements
Branch state: on main
ef8b784faba4944fe3cfa07daf20b28140251011; heada3fdd78b7049a56f7d083baa34d35c9a67fe0f61; whole game-free suite on this head:511 passed, 1 failed, 20 skipped(mainef8b784faba4944fe3cfa07daf20b28140251011:510 passed, 1 failed, 20 skipped); the commits are unchanged by rebases apart from the results table.main:
d4a69456(2026-11-12)this PR: fix/upscaler-scale-after-toggle @
01ee6ca7Hardware: RTX 4090 24 GB, NVIDIA 615.78.08; Core i9-13900K, 96 GB; Arch Linux, kernel 7.2.15-1-omarchy
Scene: copied Hyrule Field save, standing in the same place; 1920×1080, Custom quality preset, DLSS model M, Balanced 58%, frame generation off, cap 60, shader precompile off; windowless
Method: two interleaved pairs, main → branch → main → branch, 158.5–160.6 seconds per run, on 2026-11-12. Each loaded the same save and waited for controllable play plus 60 presents before setting the rows. Read back the actual menu options before, while using Game's own, and after returning to DLSS; capture the menu at each stage. Ordinary shared runs: correctness evidence, not a speed comparison.
How to reproduce: on a Hyrule Field save, select Custom, DLSS model M and Balanced 58% at 1920×1080; switch Upscaler to Game's own, then back to DLSS without changing Render resolution. Read the row or control-bridge option_get after each change. Run
python -I -B tests/test_upscaler_round_trip.py --cxx clang++for the real-source regression.The original case still reproduces exactly on the forge's main. The newer in-play rows and Auto preset do not remove it. These runs explicitly used Custom, so Auto was not selecting a different scale. Auto fallback/restoration and surrendering control after a manual selection are covered separately by the real-source fixture.
d4a6945601ee6ca7The option readbacks below are extracted verbatim by field from the saved replies.
storedis the reply'svalue;textis what the menu displays:The first pair's actual gameplay sizes agree with those rows. After returning to DLSS:
d4a6945601ee6ca7d4a6945601ee6ca7All four runs had zero fatal/crash/device-loss/core-escape/kernel-fault counts, with complete kernel-journal coverage. Both binaries in each arm were built from that arm's source, using the same release profile and the already-installed NVIDIA SDK. No SDK was downloaded or licence accepted for this move.
The complete suite used the repository's default compiler (Clang 23.1.3), a fresh HOME and strict prerequisite checking. Its only failure on both arms was
tests/test_updater_asset_digest.py: the installed .NET SDK cannot resolveMicrosoft.AspNetCore.App.Ref (= 10.0.13)offline (NU1100). This is an inherited local prerequisite failure, not a passing test.The day's shared baseline suite on the same main commit was 507 passed, 2 failed, 20 skipped: the same .NET failure and a timing-dependent
test_appimage_package_retry.pyfailure under heavy load. Its one isolated follow-up passed all nine cases. The already-completed main suite above and this branch's suite both passed that AppImage test; neither the shared failure nor the differing raw totals is hidden. Forgejo has no CI runner.The original published head added only the four evidence rows after built/tested code
01ee6ca7d947ec99718a75635ce972385a577133. The base update used for this branch changed only scripts, docs and tests, not game code, and all six patches are unchanged. The measured commits above remain the actual game builds; their observations still hold. Later base refreshes are handled when the PR is marked ready. No additional game run or speed measurement is claimed.The whole game-free suite ran on the exact head in the branch-state block, including its documentation rows; the baseline is the suite run once on that main for all of these pull requests. The only failure on both is
tests/test_updater_asset_digest.py, the local .NET reference-pack failure described above. Earlier results above retain their actual measured commits.Testing
Tested: on the RTX 4090/NVIDIA 615.78.08, Core i9-13900K/96 GB and Arch Linux system named above: the whole game-free suite, the real-source round-trip fixture against both commits, Windows-target syntax for five fixture units, and two interleaved windowless Hyrule Field runs per build. The real menu/bridge option values and gameplay-size log lines show the lost preference on main and its preservation here. Menu and gameplay appearance were also inspected without a visual-quality or menu-overhead measurement; no speed claim.
Not tested: the following coverage remains unrun because these checks used this Linux/NVIDIA PC, windowless automation and the stated saved scene; syntax is not Windows execution. These limitations are not represented as additional runs:
Needs other testers:
None. The change is the menu's saved-scale choice and fallback in shared code, with no shader, device or platform path changed; every engine-capability combination is covered by the fixture and the DLSS round trip was run in the game. Windows, AMD and the FSR runtime remain explicitly unrun above.
Screenshots
Risk and rollback
A saved numeric preference can differ from the active engine's fallback: tools must use the bridge's text or the effective scale getter rather than treat value as the active pixel ratio. Deliberately changing Render resolution or a quality preset still replaces the preference. Native/DLAA mode memory and the original area's FPS drop remain out of scope. There is no new off switch; reverting the change restores the previous snap-on-switch behavior, with no options-file schema migration.
Reviewer notes
Start with
set_row(),tx_resolution(),hn_resolution()andresolution_scale()ingpu/vk/vk_menu.cpp, then the removed special repair inmenu_setting_set(). The real-source round-trip fixture preserves its assertions, adds Auto ownership/fallback coverage, and fails if an unrelated Debug renderer action is called. The earlier Hookshot evidence and the two port-worker fixture repairs are retained rather than relabelled as a new Windows execution.Issues
Original report: https://github.com/NotRexed/Hookshot/issues/2780. This addresses the scale lost during its upscaler workaround, not the whole performance report; it does not close it.
Original pull request: https://github.com/NotRexed/Hookshot/issues/2916. Its archived discussion and review lists are empty; no formal review request is being dropped.
On this forge: See #89 (the whole performance report, which this does not close). The separate DLSS-model report on the forge is not this saved-scale bug. No old GitHub issue number is used as a forge closing reference.
Checklist
For everyone
type(scope): description).main.python -I -B tests/run_all.pyrun and passing (any failure that also fails onmainis named above).third_party/untouched (a new folder with aPROVENANCE.mdinstead).If applicable
Assisted-by:/Co-Authored-By:trailers.docs/tested-configurations.mdfor each measured run.mainand passing here.tests/that reads changed source updated in this PR, not weakened.Moved from NotRexed/Hookshot#2916.
Assisted-by: GPT-6 Astra
Co-Authored-By: GPT-6 Astra [email protected]
fix(menu): keep render scale when switching upscalersto WIP: fix(menu): keep render scale when switching upscalersBack to work in progress, for its description only. This was opened shortly before #48 merged and follows the earlier template, so it does not pass the new description check (no Flags and settings and no Risk and rollback section, table columns named Before and After). The code and the measurements are unchanged: the whole suite passes on this exact commit apart from one local .NET failure that also fails on main. The description is being moved to the new template and the branch rebased onto
d725b363; it comes back throughpr readyonce the check passes.Updated the description to the newest template, including Testing, the complete checklist, settings/defaults, risk/rollback and reviewer notes, while keeping the uploaded pictures and all earlier evidence. The branch-state block records the tested rebase and its exact-head whole suite, with only the same local .NET failure as main. The game evidence keeps its measured commit labels because that completed base update changed no game code.
Rebased onto main
ef8b784ffor this update: the only conflict was the results table, where both sides' rows are kept; the commits are otherwise unchanged. Whole suite ona3fdd78b: 511 passed, 1 failed, 20 skipped; the one failure is the local .NET reference pack that also fails on main.065d3b1714toa3fdd78b70WIP: fix(menu): keep render scale when switching upscalersto fix(menu): keep render scale when switching upscalersWording only: removed sentences about how my local test tooling ran the suite; they were of no use to a reviewer. The results are unchanged.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.