WIP: feat(graphics): draw distances and low Steam Deck defaults #227

Draft
dukenheimer wants to merge 4 commits from dukenheimer/Longshot:feat/steam-deck-draw-distances into main
First-time contributor

Why

Players on the Steam Deck need controls for scenery and shadow detail without changing the game's output resolution. This ports Hookshot's distance controls and initializes the new rows to conservative values in the Steam Deck profile.

Depends on the Steam Deck profile PR #225. This branch is based on its reviewed head 0d372bf1211a370292bb6bee0a7ebef48ec82614 on main 0877184. The current diff against main includes that prerequisite; merge the profile first and restack this PR before review.

What changed

  • Port NotRexed/Hookshot#2669: Foliage distance, Object detail, Grass density, Shadow distance, Contact shadows and Base quality, with safe slider caps and a debug uncap switch.
  • Wire menu translations, persistent INI keys, run-only RX_OOT_* overrides, option callbacks, and build-ID/instruction-checked guest hooks through the lifter. Existing option IDs are preserved.
  • Initialize new Deck profile rows to foliage/shadows 25%, object detail 100%, grass/contact shadows off, and base quality Normal. Saved rows and explicit environment overrides win.
  • Apply those defaults only when the profile is chosen (deck.apply), not when Auto re-chooses after a display/build change. Compiled regression cases exercise the real choice and six production assignments, including player-value preservation and canonical/alias overrides.
  • Track game-written distance components independently and bind saved quality/contact state to the owning scene object, preventing stale values from being restored into replacement objects.
  • Add synthetic-memory and profile/override regression tests; adapt existing source-extraction fixtures without weakening their checks.

Flags and settings

Flag What it does Default now Recommendation Helps on Doesn't help on Untested on
Foliage distance / Object detail / Grass density / Shadow distance Adjust the corresponding game detail parameters; safe caps remain unless explicitly uncapped Non-Deck: 100%; new Deck rows: 25% / 100% / 0% / 25% Keep adjustable; no FPS claim Deck controls verified No measured FPS improvement on the tested route Other GPUs and areas
Contact shadows / Base quality Contact-shadow toggle and the game's handheld quality preset Non-Deck: On / Normal; new Deck rows: Off / Normal Preserve saved choices Deck controls verified Not separately measured Other hardware
RX_OOT_FOLIAGE, RX_OOT_OBJECTS, RX_OOT_GRASS, RX_OOT_SHADOWS Run-only percent overrides; longer row-name aliases are accepted, canonical names win Unset Debug/testing overrides, not persistent defaults All supported builds Does not change output resolution Other hardware
RX_OOT_CONTACT_SHADOWS, RX_OOT_BASE_QUALITY, RX_OOT_UNCAP_DETAIL_SLIDERS Run-only toggle overrides Unset; uncap Off Leave uncap off Testing No guaranteed speedup Uncapped long play

The README and development switch/INI reference document the rows and precedence.

Measurements

Main base of the published profile: 0877184.
This PR: feat/steam-deck-draw-distances @ 03dfc729, rebased onto profile 0d372bf1.
Measured build: 7a836de2, before the rebase, based on profile 55dcb427.

Hardware: Steam Deck OLED, AMD Custom GPU 0932, RADV Mesa 26.2.0-devel (git-5c65d4fc31); SteamOS 3.9.5 build 20261023.100, kernel 7.2.7-valve2.
Scene: moving Kokiri Forest route, Gaming Mode, 1280x720 at 60 Hz, Auto (this PC), warm caches, frame generation 2x.
Method: one accepted, screenshot-verified warm run LD-warm3; 2,220 shown frames. Game FPS and draws come from the replay log, shown-frame timing from frames.csv.
How to reproduce: fully re-lift/build with these hooks, select the Deck profile and its low distance defaults, load Kokiri Forest and repeat the walking/camera-pan route. The harness used CONV_B=4 to exit the conversation before measurement.

Metric Measured build @ 7a836de2, LD-warm3
Real game FPS 14.5
Shown FPS, FG 2x 28.3
Draws per game frame 1,902 average, range 1,534-2,282
Shown-frame p95 68.4 ms
Shown frames over 100 ms 39
Crash / OOM None reported in the accepted run
frames=2220 mean_ms=35.37 fps=28.27 p50=26.12 p95=68.40 p99=119.14 max=322.97 hitches100=39 secs_under12=2 majflt=49237
game frames 14.5 fps (10 lines), 1902 draws

No paired baseline and no measured FPS gain. The earlier “about 12% fewer draws” comparison used 2,165 draws from LD-warm, which was the same build stuck in Saria's conversation. It is not a like-for-like route comparison and cannot establish a percentage reduction. Two earlier attempts were excluded because lower field draw counts confused the conversation-exit heuristic.

The summary's variant=U53abbb8 hookshot=941a0d91 fields are stale harness labels, not build identity. The measured source is 7a836de2. The rebased 03dfc729 binary has not been run on the Deck; the rebase follows main's removal of Auto output-resolution selection and the reviewed profile's choice gating. A new same-build paired route measurement is still needed before a performance claim.

Testing

Tested: Synthetic-memory guest-hook tests and Deck default/cap/alias/saved-option fixtures passed with Windows llvm-mingw Clang and Ubuntu 24.04 GCC. Before rebase, the full Windows game-free suite had 459 passes, 74 skips and six failures reproduced on unchanged profile 55dcb427: test_fpx_sticky, test_bake_portability, test_check_third_party, test_release, test_setup_runtime, test_spawn_emit. The Deck owner fully re-lifted/built 7a836de2 with zero build failures and verified the accepted warm run's scene and profile settings.

Not tested: Rebased binary gameplay, a paired same-scene baseline, long sessions, other areas, non-Deck GPU gameplay, and uncapped high detail. Baseline/tool-dependent skips are not hardware validation.

After rebase, the targeted guest-hook, Auto/profile and cap/override fixtures passed again with llvm-mingw Clang. The full Windows suite reported 446 passed, six failed, 72 skipped. Failures were test_fpx_sticky, test_bake_portability, test_check_third_party, test_release, test_spawn_emit, and test_display_pointer (undefined win::rx_option in its fixture). The first five were reproduced on the previous unchanged baseline; the display test and all of its host inputs are unchanged from profile e26a8581. These failures are not claimed fixed here.

After the second restack onto reviewed profile 0d372bf1, the three targeted checks (test_oot_gfx, test_auto_settings, test_deck_distances) passed, including the compiled profile re-choose regression. The older full-suite result above is not claimed as a full-suite run of this newer head.

Needs other testers:

  • Steam Deck: repeat a warm, matched baseline/low-default route with real game FPS, draws, and image comparison (request to open).
  • Other GPUs: confirm manual rows, saved settings and scene transitions remain correct (request to open).

Screenshots

Not attached yet. The Deck owner's scene screenshots are local only and have not been published. Paired screenshots of the menu and same scene are still needed before this WIP is ready for review.

Risk and rollback

Lower distances intentionally change visual detail. Guest hooks depend on the supported build ID and checked instruction signatures; unexpected signatures are rejected with diagnostics. Keep the debug uncap switch off. Restore distance rows to 100%, Contact shadows On and Base quality Normal, or revert this commit to remove the controls. This needs a re-lift/host build, not only a renderer DLL swap.

Reviewer notes

Review the profile-default precedence and independent-component/scene-owner regression cases first. The renderer host structure layout is unchanged; new callback option IDs avoid existing FPS and item-wheel reservations.

Issues

Depends on #225. Credits NotRexed/Hookshot#2669; this PR does not close a performance issue or claim a measured speedup.

Checklist

For everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description).
  • Rebased on current main.
  • python -I -B tests/run_all.py run; baseline failures named above.
  • Tested in the game, or what wasn't is named under Testing.
  • Testing filled in: what was tested, what wasn't, and what needs other testers.
  • Measured main and this PR on the same scene/settings with interleaved runs.
  • No game files, dumps, build output or generated shader files.
  • third_party/ untouched.
  • License-compatible source port.

If applicable

  • AI assistance recorded in commit trailers.
  • Flags noted and references updated.
  • Paired screenshots for the visible change.
  • Tested-configuration row for the rebased measurement.
  • A game-free regression test added.
  • Source-reading tests updated, not weakened.
  • Host-hook fixtures compile on Windows and Linux.
  • Docs updated.
## Why Players on the Steam Deck need controls for scenery and shadow detail without changing the game's output resolution. This ports Hookshot's distance controls and initializes the new rows to conservative values in the Steam Deck profile. **Depends on [the Steam Deck profile PR #225](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/225).** This branch is based on its reviewed head `0d372bf1211a370292bb6bee0a7ebef48ec82614` on main `0877184`. The current diff against main includes that prerequisite; merge the profile first and restack this PR before review. ## What changed - Port [NotRexed/Hookshot#2669](https://github.com/NotRexed/Hookshot/pull/2669): Foliage distance, Object detail, Grass density, Shadow distance, Contact shadows and Base quality, with safe slider caps and a debug uncap switch. - Wire menu translations, persistent INI keys, run-only `RX_OOT_*` overrides, option callbacks, and build-ID/instruction-checked guest hooks through the lifter. Existing option IDs are preserved. - Initialize new Deck profile rows to foliage/shadows 25%, object detail 100%, grass/contact shadows off, and base quality Normal. Saved rows and explicit environment overrides win. - Apply those defaults only when the profile is chosen (`deck.apply`), not when Auto re-chooses after a display/build change. Compiled regression cases exercise the real choice and six production assignments, including player-value preservation and canonical/alias overrides. - Track game-written distance components independently and bind saved quality/contact state to the owning scene object, preventing stale values from being restored into replacement objects. - Add synthetic-memory and profile/override regression tests; adapt existing source-extraction fixtures without weakening their checks. ## Flags and settings | Flag | What it does | Default now | Recommendation | Helps on | Doesn't help on | Untested on | |---|---|---|---|---|---|---| | Foliage distance / Object detail / Grass density / Shadow distance | Adjust the corresponding game detail parameters; safe caps remain unless explicitly uncapped | Non-Deck: 100%; new Deck rows: 25% / 100% / 0% / 25% | Keep adjustable; no FPS claim | Deck controls verified | No measured FPS improvement on the tested route | Other GPUs and areas | | Contact shadows / Base quality | Contact-shadow toggle and the game's handheld quality preset | Non-Deck: On / Normal; new Deck rows: Off / Normal | Preserve saved choices | Deck controls verified | Not separately measured | Other hardware | | `RX_OOT_FOLIAGE`, `RX_OOT_OBJECTS`, `RX_OOT_GRASS`, `RX_OOT_SHADOWS` | Run-only percent overrides; longer row-name aliases are accepted, canonical names win | Unset | Debug/testing overrides, not persistent defaults | All supported builds | Does not change output resolution | Other hardware | | `RX_OOT_CONTACT_SHADOWS`, `RX_OOT_BASE_QUALITY`, `RX_OOT_UNCAP_DETAIL_SLIDERS` | Run-only toggle overrides | Unset; uncap Off | Leave uncap off | Testing | No guaranteed speedup | Uncapped long play | The README and development switch/INI reference document the rows and precedence. ## Measurements Main base of the published profile: `0877184`. This PR: `feat/steam-deck-draw-distances` @ `03dfc729`, rebased onto profile `0d372bf1`. **Measured build:** `7a836de2`, before the rebase, based on profile `55dcb427`. Hardware: Steam Deck OLED, AMD Custom GPU 0932, RADV Mesa 26.2.0-devel (`git-5c65d4fc31`); SteamOS 3.9.5 build 20261023.100, kernel 7.2.7-valve2. Scene: moving Kokiri Forest route, Gaming Mode, 1280x720 at 60 Hz, Auto (this PC), warm caches, frame generation 2x. Method: one accepted, screenshot-verified warm run `LD-warm3`; 2,220 shown frames. Game FPS and draws come from the replay log, shown-frame timing from `frames.csv`. How to reproduce: fully re-lift/build with these hooks, select the Deck profile and its low distance defaults, load Kokiri Forest and repeat the walking/camera-pan route. The harness used `CONV_B=4` to exit the conversation before measurement. | Metric | Measured build @ `7a836de2`, LD-warm3 | |---|---| | Real game FPS | 14.5 | | Shown FPS, FG 2x | 28.3 | | Draws per game frame | 1,902 average, range 1,534-2,282 | | Shown-frame p95 | 68.4 ms | | Shown frames over 100 ms | 39 | | Crash / OOM | None reported in the accepted run | ```text frames=2220 mean_ms=35.37 fps=28.27 p50=26.12 p95=68.40 p99=119.14 max=322.97 hitches100=39 secs_under12=2 majflt=49237 game frames 14.5 fps (10 lines), 1902 draws ``` **No paired baseline and no measured FPS gain.** The earlier “about 12% fewer draws” comparison used 2,165 draws from `LD-warm`, which was the same build stuck in Saria's conversation. It is not a like-for-like route comparison and cannot establish a percentage reduction. Two earlier attempts were excluded because lower field draw counts confused the conversation-exit heuristic. The summary's `variant=U53abbb8 hookshot=941a0d91` fields are stale harness labels, not build identity. The measured source is `7a836de2`. The rebased `03dfc729` binary has not been run on the Deck; the rebase follows main's removal of Auto output-resolution selection and the reviewed profile's choice gating. A new same-build paired route measurement is still needed before a performance claim. ## Testing **Tested:** Synthetic-memory guest-hook tests and Deck default/cap/alias/saved-option fixtures passed with Windows llvm-mingw Clang and Ubuntu 24.04 GCC. Before rebase, the full Windows game-free suite had 459 passes, 74 skips and six failures reproduced on unchanged profile `55dcb427`: `test_fpx_sticky`, `test_bake_portability`, `test_check_third_party`, `test_release`, `test_setup_runtime`, `test_spawn_emit`. The Deck owner fully re-lifted/built `7a836de2` with zero build failures and verified the accepted warm run's scene and profile settings. **Not tested:** Rebased binary gameplay, a paired same-scene baseline, long sessions, other areas, non-Deck GPU gameplay, and uncapped high detail. Baseline/tool-dependent skips are not hardware validation. After rebase, the targeted guest-hook, Auto/profile and cap/override fixtures passed again with llvm-mingw Clang. The full Windows suite reported **446 passed, six failed, 72 skipped**. Failures were `test_fpx_sticky`, `test_bake_portability`, `test_check_third_party`, `test_release`, `test_spawn_emit`, and `test_display_pointer` (undefined `win::rx_option` in its fixture). The first five were reproduced on the previous unchanged baseline; the display test and all of its host inputs are unchanged from profile `e26a8581`. These failures are not claimed fixed here. After the second restack onto reviewed profile `0d372bf1`, the three targeted checks (`test_oot_gfx`, `test_auto_settings`, `test_deck_distances`) passed, including the compiled profile re-choose regression. The older full-suite result above is not claimed as a full-suite run of this newer head. **Needs other testers:** - Steam Deck: repeat a warm, matched baseline/low-default route with real game FPS, draws, and image comparison (request to open). - Other GPUs: confirm manual rows, saved settings and scene transitions remain correct (request to open). ## Screenshots Not attached yet. The Deck owner's scene screenshots are local only and have not been published. Paired screenshots of the menu and same scene are still needed before this WIP is ready for review. ## Risk and rollback Lower distances intentionally change visual detail. Guest hooks depend on the supported build ID and checked instruction signatures; unexpected signatures are rejected with diagnostics. Keep the debug uncap switch off. Restore distance rows to 100%, Contact shadows On and Base quality Normal, or revert this commit to remove the controls. This needs a re-lift/host build, not only a renderer DLL swap. ## Reviewer notes Review the profile-default precedence and independent-component/scene-owner regression cases first. The renderer host structure layout is unchanged; new callback option IDs avoid existing FPS and item-wheel reservations. ## Issues Depends on #225. Credits [NotRexed/Hookshot#2669](https://github.com/NotRexed/Hookshot/pull/2669); this PR does not close a performance issue or claim a measured speedup. ## Checklist ### For everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`). - [ ] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` run; baseline failures named above. - [x] Tested in the game, or what wasn't is named under Testing. - [x] Testing filled in: what was tested, what wasn't, and what needs other testers. - [ ] Measured main and this PR on the same scene/settings with interleaved runs. - [x] No game files, dumps, build output or generated shader files. - [x] `third_party/` untouched. - [x] License-compatible source port. ### If applicable - [x] AI assistance recorded in commit trailers. - [x] Flags noted and references updated. - [ ] Paired screenshots for the visible change. - [ ] Tested-configuration row for the rebased measurement. - [x] A game-free regression test added. - [x] Source-reading tests updated, not weakened. - [x] Host-hook fixtures compile on Windows and Linux. - [x] Docs updated.
feat(vk): a Steam Deck profile, on by itself on a Deck
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 18s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
e26a858130
One switch, RX_VK_STEAM_DECK (or steam_deck= in longshot_options.ini), for what ran
fastest on a Steam Deck OLED; neither set, it is on where a Deck is found. With
Auto (this PC): Minimum, Frame generation 2x and the VRAM budget Auto. Whatever
the preset, while their own switches are unset: RX_VK_RECORDER=thread and the new
RX_VK_PRECOMPILE_GRAPHICS=none (no graphics pipelines kept ready before the
title: the full precompile ran the Deck out of memory). Off the Deck nothing
changes: Auto's fingerprint is the same with the profile off.

Co-authored-by: Copilot App <[email protected]>
feat(graphics): draw distances and low Steam Deck defaults
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 5s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
d2f21fa159
Port Hookshot PR #2669 graphics distance controls onto the Steam Deck profile. Add foliage, object detail, grass, shadow, contact-shadow and base-quality rows with safe caps, persisted options and run-only RX_OOT overrides. Initialize new Deck rows to foliage/shadows 25%, grass/contact shadows off, object detail 100%, base quality Normal while preserving player choices.

Keep guest scale state per component and quality/contact state per owner so game writes and scene object replacements are not overwritten. Add game-free hooks, profile, cap, alias and saved-value regressions; update source-extraction fixtures.

Co-authored-by: Copilot App <[email protected]>
dukenheimer force-pushed feat/steam-deck-draw-distances from d2f21fa159
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 5s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
to 03dfc72953
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
PR description / Description follows the template (pull_request_target) Successful in 29s
Website / Website on Cloudflare (pull_request_target) Has been skipped
2026-11-13 17:12:38 +00:00
Compare
Author
First-time contributor

Restacked onto the reviewed Steam Deck profile #225 at 0d372bf1 (main 0877184). The six distance defaults now follow deck.apply, so Auto re-chooses preserve player adjustments. Added compiled regressions using the actual profile choice and production assignments, covering re-choose, saved-row and environment precedence. Three targeted checks passed on the new head 03dfc729. The rebased binary still needs hardware verification; the prior route result has no paired baseline and establishes no FPS gain.

Restacked onto the reviewed Steam Deck profile #225 at 0d372bf1 (main 0877184). The six distance defaults now follow deck.apply, so Auto re-chooses preserve player adjustments. Added compiled regressions using the actual profile choice and production assignments, covering re-choose, saved-row and environment precedence. Three targeted checks passed on the new head 03dfc729. The rebased binary still needs hardware verification; the prior route result has no paired baseline and establishes no FPS gain.
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
PR description / Description follows the template (pull_request_target) Successful in 29s
Website / Website on Cloudflare (pull_request_target) Has been skipped
This pull request has changes conflicting with the target branch.
  • gpu/vk/vk_menu.h
Some workflows are waiting to be reviewed.
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'feat/steam-deck-draw-distances:dukenheimer-feat/steam-deck-draw-distances'
git switch 'dukenheimer-feat/steam-deck-draw-distances'
Sign in to join this conversation.
No reviewers
No milestone
No project
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
MagicBeanDev/Longshot!227
No description provided.