fix(menu): keep a 7680x2160 output instead of scaling it to 6256x1760 #2637
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2637
Loading…
Reference in a new issue
No description provided.
Delete branch "clayton06/Longshot:fix/7680x2160-native-output"
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?
Summary
On a 7680x2160 monitor the Graphics tab's Output resolution tops out at 6256x1760, so the native mode cannot be selected. The window is already 7680x2160. The list is built in the game.
hos_output_size_valid(host/hos_wide_size.h) refused any output with more pixels than 5120x2880. 7680x2160 has more (16,588,800 against 14,745,600), sogpu/vk/menu/output.cppadd_screen_sizedropped the monitor's own mode. The picture for a 32:9 frame at height 2160 is thenhos_wide_sizeagainsthos_wide_max_px()(5120x2160 pixels), which is exactly 6256x1760. That is the row in the screenshot. It is not Windows display scaling.7680x2160 is now a size the game accepts (5:4 to 48:9, at most 7680x2160's pixels).
hos_wide_picturekeeps an output that is already that shape, so the native row is labelled7680x2160 (native)and the game draws it. Widening a smaller 16:9 output, including 3840x2160 on a 32:9 screen, still stops at 6256x1760, so a 5120x1440 monitor does not suddenly render 7680x2160. 8K (7680x4320) is still refused. The keep is not limited to 7680x2160: any valid output whose shape already matches the picture's (within 2%) keeps its own pixels when that is more than the 5120x2160 budget. A custom 5120x2800 output, 14.3 million pixels, was scaled down to 5120x2160's pixels before and now keeps all of them, so an existing profile with such a size renders more and uses more render-target memory. Steam Deck 1280x800 and every output at or under the 5120x2160 budget are unchanged.The render-target pool is not raised. An output with more pixels than 3840x2160, which 7680x2160 is, already stays at 900 MB (
hos_rt_pool_size). A 1.4 GB pool for a full 7680x2160 picture failed the game's reservation at boot; this change does not ask for that pool. 900 MB is what 5120x2880 plays at. 7680x2160 has about 12% more pixels than that, so a heavy scene can still run out of the pool.HOS_WIDE_MAX_PXstill overrides the budget, including for a native output, and its row ingpu/vk/switches.defnow says so.Read first:
host/hos_wide_size.h(hos_output_size_valid,hos_wide_picture),host/hos_main.c(the widescreen picture),gpu/vk/menu/output.cpp(picture_for).See #1271. Launcher issue MagicBeanDev/LongshotLauncher#291 is this same menu.
Testing
Test system: the in-game runs were on SKYNET-SFF. Windows 11 Pro 26H2 (build 26300.9974), AMD Ryzen 7 9800X3D (8 cores / 16 threads), ASUS ROG STRIX X870-I GAMING WIFI, 64 GB DDR5-6000 (2×32 GB Corsair CMP64GX5M2B6000Z30), NVIDIA GeForce RTX 5090 32 GB (driver 621.24). The game ran from
E:\Games\longshoton a WD_BLACK SN850X 8 TB NVMe SSD (volume 850x02). Displays: Samsung Odyssey G95NC 57" at 7680×2160 240 Hz for the G9 sessions; an InnoView 2560×1600 (16:10, 60 Hz) portable monitor for the default-output check (that portable was not connected when these specs were read).Tested: game-free, Linux, gcc 13 and g++. No game dump and no Windows GPU on the machine that wrote the patch, so this has not run in the game.
On main
4d1e555f, before the fix:python -I -B tests/test_widescreen_shapes.py --cc gccfails withexplicit surround 7680x2160: 6256x1760 ... expected 7680x2160.python -I -B tests/test_display_modes.py --cxx g++aborts onhos_output_size_valid(7680, 2160).python -I -B tests/test_output_resolution.py --cxx g++aborts because7680x2160and6144x2560are not accepted.With the fix, those three pass, and so do
tests/test_rt_pool_minimum.pyandtests/test_menu_i18n.py MenuI18nTests.test_custom_output_texts_are_translated. Removing the keep inhos_wide_picturebrings the widescreen failure back, at 6256x1760.mise run teston this head, rebased onto main699405ec, is 849 passed, 9 skipped (Windows-only). Two checks also fail on that main, and this PR does not touch them:tests/test_lifter.py(clippyneedless_borrowinbuilder/crates/build-driver/src/play.rs) andtests/test_lifter_semantics.py(six Unicorn mismatches onfmax/fmaxnm/fmaxp).tests/test_xess_rules.pyfailed in the same run only because a parallel cargo test left dummylibxess.dllfiles undertarget/test-scratch/; it passes once those leftovers are removed.After the review fixes (
e1ca5486):python -I -B tests/test_display_modes.py --cxx g++passes withHOS_WIDE_MAX_PXunset, set to 8294400 and set to 99999999 in the caller's environment (the fixture now removes it), and its newoverriderun showsHOS_WIDE_MAX_PX=8294400capping a native 7680x2160 output to 5400x1520.tests/test_switch_table.py,tests/test_widescreen_shapes.py,tests/test_output_resolution.py,tests/test_rt_pool_minimum.pyandtests/test_settings_table.pypass; the fullmise run testwas not re-run on this commit.Tested in the game (Nov 27, 2026): Windows 11, RTX 5090, Samsung Odyssey Neo G9 57" at 7680x2160 (240 Hz), a build of this PR from the nightly launcher. Insert menu, Graphics, Aspect ratio 32:9 (monitor's), Output resolution
7680x2160 (native).The log reports
output resolution 7680x2160and a 7680x2160 swapchain. 6256x1760 appears nowhere in the session.Screenshots of the same Castle Town spot with the upscaler set to Off, Game's own and DLSS Performance are all 7680x2160. Off and Game's own keep detail out to single pixels, with no sign of an upscale from 6256x1760. DLSS Performance renders 3840x1080 and outputs 7680x2160, as expected.
Route: Castle Town, Hyrule Field (time of day changed), Kokiri Forest, Hyrule Field, Kakariko Village, Death Mountain Trail, as child Link, on DLAA after the screenshots.
No crash, no null texture or
texture handle ids -1, 0 failed shader programs, no missing effects.The pool log says 900 MB (the game's 305 MB). Render-target pool use peaked at 711 MB in Kakariko Village, and the driver refused 0 allocations. VRAM peaked at 14.6 of 30.7 GB on Death Mountain Trail.
Each scene change has one load hitch of 72–268 ms, then a steady 60 fps.
The only log error: writing
settings.ini.newhit Windows error 32 (file in use) and the file was written in place. Harmless.Second session, same PC and build, ~35 minutes, using Debug Teleport and Switch age. Fire Temple as child then adult (about 19 minutes in the adult temple at a steady 60 fps, min 58.2), Death Mountain Crater as adult and child, Lake Hylia and Hyrule Field as adult and as child, plus a brief Kokiri Forest visit. Upscaler was DLAA at 7680x2160 in the temple, then Off (7680x2160 stretched 1:1) for the later overworld. No crash, no null texture or
texture handle ids -1, 0 failed programs, 0 driver-refused allocations. Pool use peaked at 659 MB (child Lake / Field), under the 900 MB cap; Fire Temple used 246 MB. VRAM peaked at 15.4 of 30.7 GB. Scene-change hitches were 70–357 ms, then a steady 60 fps.Same PC and build (
pr-2637-9dde5b6e), around 12:45 PM ET, Aspect ratio 32:9, upscaler Off, a steady 60 fps. A 16:9 Output resolution of 3840x2160 still shows 6256x1760, as expected. 5120x1440 (native) still outputs and renders 5120x1440. 1920x1080 still widens to 3840x1080. All three are the old behaviour, unchanged.Default-output check, Nov 27, 2026 around 1:05 PM ET, same SKYNET-SFF, a single native 2560x1600 (16:10) portable monitor and a fresh
settings.ini(no prior profile). Both this PR (pr-2637-9dde5b6e) and Nightly 845 (388c9d4b, main) picked the same defaults: Quality preset Auto (this PC), Aspect ratio 16:10 (monitor's), Output resolution 2304x1440, Upscaler NVIDIA DLSS (Transformer K), Render resolution Quality 67% (1536x960). The default output is unchanged against main. This was a 16:10 desktop monitor, not a Steam Deck.Steam Deck (Tier 1), Nov 27, 2026 around 4:00 PM ET: SteamOS, Deck LCD (RADV VANGOGH, Mesa 26.2.0-devel), launcher nightly-190, Desktop Mode. This PR (
pr-2637-7ae70166) on a first start with no output resolution chosen outputs 1280x800, picture 1280x800, 16:10 (oe: output resolution 1280x800 (none chosen: the screen's, smaller than the game's 2560x1440)). Nightly 850 (d3f65787) on the same Deck also outputs 1280x800, 16:10. The Deck's default output is unchanged against main, with no errors in either launch log.A full-frame scan of a 25-minute NVIDIA App AV1 capture at native 7680x2160 60 fps (Fire Temple as adult, Death Mountain Crater, Lake Hylia, Hyrule Field, Kokiri Forest) with FFmpeg 8.0.1 found 0 decode errors across 90,013 frames, no flicker, magenta/green or missing-texture frames, and every black or frozen stretch matched a fade, load or menu in the game log.
Still to test:
None. All planned checks have run; their results are in Tested above.
Measurements
Nothing to measure for speed. The change does not alter a default on a 16:9, 21:9, 16:10 or Steam Deck screen. On a 7680x2160 screen the newly selectable output uses the existing 900 MB render-target cap rather than the 1373 MB a linear scale of 2560x1440 would ask for.
Risks
A 7680x2160 picture at the 900 MB pool is tighter than 5120x2880, which is the largest output that cap was played at. If a scene runs out of render targets, set
HOS_WIDE_MAX_PX=11059200(5120x2160's pixels) inlongshot_env.txtbeside that version's game to restore the old scale, or pick 6256x1760 / 5120x1440. Reverting the change is enough. Existingoutput_reslines are unchanged. Selecting 7680x2160 writes that size into the profile'slongshot_options.ini(output_res=), which older builds reject and replace with the game's own output. Copy that file before testing.A custom output above 5120x2160's pixels that already matches the picture's shape (for example 5120x2800, 14.3 million pixels) now renders at its full size instead of the scaled 5120x2160-pixel picture, so it needs more render-target memory than before; with the 900 MB pool, a heavy scene can run out. Setting
HOS_WIDE_MAX_PX=11059200brings the old scale back for those too. 6144x2560 is newly accepted because it is under the new pixel budget. 7680x4320 is still refused.Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named).main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here.tests/that reads changed source is updated, not weakened.Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.All planned in-game checks have run; their results are in Tested above.
WIP: fix(menu): keep a 7680x2160 output instead of scaling it to 6256x1760to fix(menu): keep a 7680x2160 output instead of scaling it to 6256x1760fix(menu): keep a 7680x2160 output instead of scaling it to 6256x1760to WIP: fix(menu): keep a 7680x2160 output instead of scaling it to 6256x17609dde5b6e9c7ae70166baWIP: fix(menu): keep a 7680x2160 output instead of scaling it to 6256x1760to fix(menu): keep a 7680x2160 output instead of scaling it to 6256x1760In-game testing on this PR is done. On the G9 at 7680x2160 (native), the morning route, an afternoon session in the Fire Temple, Death Mountain Crater, Lake Hylia and Hyrule Field as child and adult, and the 32:9 output checks (3840x2160 still shows 6256x1760; 5120x1440 and 1920x1080 widening stay on the old behaviour) all held a steady 60 fps with no crashes or missing effects. A fresh-profile default-output check on a 2560x1600 16:10 monitor matched Nightly 845 (main): both picked 2304x1440. Please review for merge. The Test system section in the description lists the hardware these runs used.
Steam Deck (Tier 1) tested. SteamOS, Deck LCD (RADV VANGOGH, Mesa 26.2.0-devel), launcher nightly-190, Desktop Mode.
7ae70166), first start, fresh profile, no output resolution chosen: output 1280x800, picture 1280x800, 16:10 (oe: output resolution 1280x800 (none chosen: the screen's, smaller than the game's 2560x1440)).d3f65787), same Deck: output 1280x800, picture 1280x800, 16:10.@review
Recommendation: Approve. The reported Windows run shows that native 7680×2160 works, but the full-resolution path has not been exercised on AMD Tier 1 hardware. The change also increases the picture size for some previously accepted outputs, so its claim that those outputs are unchanged needs correction. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.
The menu accepts 7680×2160 and the host preserves its native picture, while retaining the existing 900 MiB render-target pool cap. The same preservation also affects other wide or narrow outputs above the old picture budget, increasing their rendered pixels and resource demand.
Should fix (2): not blocking, but worth doing before merging.
host/hos_wide_size.h:104: The description says other previously accepted sizes are unchanged, but this preservation applies to all matching valid non-16:9 outputs. (more on the line) Do: Describe this broader behavior and its cost, or restrict the preservation to the intended newly supported sizes.tests/test_display_modes.py:102: The new assertions inherit HOS_WIDE_MAX_PX from the environment. (more on the line) Do: Remove HOS_WIDE_MAX_PX from the environment passed to the fixture, and test an explicit override separately.Nits (1): optional.
host/hos_wide_size.h:104: The switch table still describes the default pixel budget as the maximum for every widescreen picture. (more on the line) Do: Update the HOS_WIDE_MAX_PX entry in gpu/vk/switches.def to describe the matching-output exception and the explicit override.Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)
host/hos_wide_size.h:104: Exercise the enlarged picture on an AMD Tier 1 GPU before merging. (more on the line) Do: Run a representative demanding route at 7680×2160 on AMD, recording allocation failures, pool use and visible output.@fixcan do L2, L3 and L4.Checks: Still running: 10 checks.
More: does it help, other systems, switches, what was read
Does it help: Yes: the reported game-free checks fail on main and pass with the change, and the Windows RTX 5090 run reports a 7680×2160 swapchain and full-size screenshots. The reported pool peak was 711 MiB of 900 MiB; the changed full-resolution path has not been tested on AMD hardware.
Other systems: The logic is shared by Windows and Linux and all GPU vendors. The Steam Deck first-start run checks its unchanged default, but does not exercise the newly enlarged picture path; the reported native-resolution game runs cover NVIDIA on Windows. Existing non-16:9 custom outputs above 5120×2160 pixels can also render larger than before.
Switches: HOS_WIDE_MAX_PX remains an explicit override, but its implicit default now has an exception for valid matching outputs. The switch table still describes the default as an unconditional maximum and should be updated.
Reviewed:
7ae70166baagainst699405ecba: Read AGENTS.md, CONTRIBUTING.md, the PR template, standards, the diff and commit messages. Read host/hos_wide_size.h, gpu/vk/display_modes.h, gpu/vk/menu/output.cpp, tests/test_display_modes.py, tests/test_widescreen_shapes.py and tests/test_rt_pool_minimum.py; inspected the changed regions and relevant callers in host/hos_main.c and host/nn_applet.c. Skimmed translations, remaining tests and documentation; did not read the full large host and menu files. docs/review-checklist.md and ../Tooling/AGENTS.md were absent.; nothing run (a code review).Checked and fine:
Testing: No code or tests were run during review. The PR reports game-free checks and Windows and Steam Deck game runs; CI was still running.
Overlaps and merge order: Not checked; network is closed.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
@ -88,0 +101,4 @@if (!oh || !hos_output_size_valid(ow, oh)) return;const double got = (double)ow / (double)oh;const double off = got > r ? got / r - 1.0 : r / got - 1.0;if (off <= 0.02 && (uint64_t)ow * oh > (uint64_t)(*w) * (*h)) *w = ow, *h = oh;L1 (should fix): Exercise the enlarged picture on an AMD Tier 1 GPU before merging.
When: Selecting 7680×2160 now sends a 16.6-megapixel picture through the shared renderer and the capped render-target pool. The Deck run uses 1280×800, so it does not exercise that changed path on AMD.
Do: Run a representative demanding route at 7680×2160 on AMD, recording allocation failures, pool use and visible output.
L2 (should fix): The description says other previously accepted sizes are unchanged, but this preservation applies to all matching valid non-16:9 outputs.
When: A previously accepted custom 5120×2800 output exceeds the old 5120×2160 picture budget. It now keeps all 14.3 million pixels instead of being scaled down, increasing rendering and memory demand for an existing profile.
Do: Describe this broader behavior and its cost, or restrict the preservation to the intended newly supported sizes.
L4 (nit): The switch table still describes the default pixel budget as the maximum for every widescreen picture.
When: With HOS_WIDE_MAX_PX unset, a matching 7680×2160 output exceeds the table's stated 5120×2160-pixel default maximum.
Do: Update the HOS_WIDE_MAX_PX entry in gpu/vk/switches.def to describe the matching-output exception and the explicit override.
@ -98,0 +99,4 @@{unsigned w = 0, h = 0;hos_wide_picture(7680, 2160, 7680.0 / 2160.0, hos_wide_max_px(), &w, &h);assert(w == 7680 && h == 2160); // (native 32:9, not 6256x1760)L3 (should fix): The new assertions inherit HOS_WIDE_MAX_PX from the environment.
When: With HOS_WIDE_MAX_PX=8294400 set, hos_wide_picture honors that override and the assertion expecting 7680×2160 fails even when the implementation is correct.
Do: Remove HOS_WIDE_MAX_PX from the environment passed to the fixture, and test an explicit override separately.
@fix
I didn't fix this pull request: it doesn't allow edits from maintainers (the author can turn on Allow edits from maintainers).
Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
Turned on Allow edits from maintainers, so
@fixcan go ahead with L2, L3 and L4. Thanks for the review.Pushed a commit for the review:
switches.defnow describes the native-output exception (L4),test_display_modes.pyno longer inheritsHOS_WIDE_MAX_PXand tests an explicit override on its own (L3), and the description now states the full keep rule with the 5120x2800 cost in Risks (L2). Behavior is unchanged.For L1: I have an AMD Radeon RX 9070 XT in a Thunderbolt 5 eGPU enclosure, so I can run a demanding route at 7680x2160 on it and report allocation failures, render-target pool use and the output if that would help. One caveat: it's over Thunderbolt 5 rather than a desktop PCIe slot, so bandwidth-bound numbers may not be representative, though allocation and pool behavior should be the same.
@fix
e1ca548687ded246f6c1Recommendation: Approve. The code is ready: only testing is left. The native 7680x2160 output worked in the reported NVIDIA sessions, but the enlarged picture has not yet been exercised on an AMD Tier 1 GPU. The author has offered an RX 9070 XT run. Recommend approval; not approved on the forge.
What
@fixchangedI changed this pull request: the new head is
ded246f6c1. I rebased it ontomain(251b55c4c3).Nothing was built or run: the checks run again on the new head.
The change allows native 7680x2160 output and preserves matching large custom outputs. Those larger pictures use more render-target memory within the existing 900 MB pool.
Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)
host/hos_wide_size.h:104: Exercise the enlarged picture on an AMD Tier 1 GPU before merging. When: The reported AMD Steam Deck run uses 1280x800, so it does not exercise the enlarged render targets. Do: Run a demanding 7680x2160 route on the offered RX 9070 XT and report output, pool use and allocation failures.Checks: they run again on this head; a failure shows on the pull request.
More: does it help, other systems, switches, what was read
Does it help: Yes: the reported Windows RTX 5090 sessions output and rendered 7680x2160, where the previous picture was 6256x1760. A game-free test also reportedly fails before the fix and passes with it.
Other systems: The output-size logic is shared across GPUs and platforms. The reported Steam Deck run covered its unchanged 1280x800 default, not the enlarged picture; an AMD full-resolution run remains outstanding. Large matching custom outputs can also use more render-target memory.
Switches: HOS_WIDE_MAX_PX retains its default of 5120x2160 pixels and explicitly overrides the native-output exception; its switch-table description was updated.
Reviewed:
ded246f6c1against251b55c4c3: Read AGENTS.md, CONTRIBUTING.md and host/hos_wide_size.h in full; reviewed the rebased pull request diff and its recorded test results. Other changed code and tests were skimmed, not read in full. No docs/review-checklist.md was present; the pull request template was located but not read.; nothing run (a code review).Checked and fine:
Testing: No commands that build or run tests were executed. The pull request reports passing game-free checks and in-game NVIDIA and Steam Deck sessions; CI has not run on this head.
Overlaps and merge order: none found
Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.