feat(vk): stepped sliders with commit-on-release for Render resolution and Frame generation across Modern dark and Classic themes #2383

Merged
HumanBean merged 3 commits from Jer9/Longshot:feat/vk-insert-menu-stepped-sliders into main 2026-11-23 20:35:25 +00:00
Contributor

Summary

On the Graphics tab of the Insert menu, Render resolution and Frame generation were previously configured via wrapping Choice controls. For Render resolution, options wrapped in an arbitrary order (Native, Quality, Balanced, Performance, Ultra Performance, and Auto), placing Auto to the left of 33% and allowing accidental wrap-around from Native (100%) to Auto (0). Furthermore, mouse-dragging sliders in the menu triggered immediate value commits on every mouse-move event. For heavy settings like Render resolution and Frame generation multiplier, this caused rapid back-to-back render target reallocations, optical flow buffer updates, and pipeline churn (costing +4.7 to 30.6 ms of stutter per step) while the player was merely trying to adjust the slider.

This pull request resolves these UX and performance issues by introducing stepped sliders with commit_on_release across both Modern dark and Classic themes:

  1. Stepped Slider Infrastructure (gpu/vk/vk_menu_hit.h, gpu/vk/menu_model.h, gpu/vk/vk_menu.cpp): Introduces pure stop-index <-> permille mapping helpers (slider_stop_permille, slider_stop_index, slider_find_stop) with non-linear spacing and edge stops. Adds menu_hit::DragState and Setting::commit_on_release: while a slider is being dragged, thumb position, fill bar, and value text update smoothly at 60+ FPS, while the underlying setting commit and file save are deferred until the mouse button is released (or cancelled cleanly if the player switches tabs or presses Escape).
  2. Dynamic Resolution Toggle + Stepped Render Resolution Slider (gpu/vk/upscaler_rows.h, gpu/vk/menu/upscaler.cpp): Adds a dedicated Dynamic resolution toggle (Off / On) directly above Render resolution. Setting it to On sets opts.resolution = 0, exits Native mode if active, and hides the fixed slider. Setting it to Off exposes Render resolution as an intuitive, non-wrapping stepped slider with engine-specific stops up to 100% or Native, remembering the player's last fixed stop, including Native (defaulting to Quality 67%). longshot_options.ini: resolution and control bridge option set resolution <val> remain 100% backwards-compatible.
  3. Split Frame Generation Mode + Multiplier Stepped Slider (gpu/vk/framegen_rows.h, gpu/vk/menu/framegen.cpp): Splits Frame generation into a clean Mode choice (Off / Auto / Fixed) and an accompanying Multiplier stepped slider (2x..8x) that appears only when Fixed is selected (remembering the player's last multiplier, defaulting to 2x). On RTX 40 series GPUs with NVIDIA DLSS-G (which supports only 2x), the multiplier slider cleanly locks at 2x with dimmed styling.
  4. Visual Polish, Marquee Fitting & 13-Language i18n (gpu/vk/vk_menu.cpp, gpu/vk/menu_i18n.h): slider_cell() incorporates fit() text fitting and marquee animation so long localized resolution strings (Quality 67% (1708x960)) never collide with arrows or overflow cell bounds. Full i18n translations added across all 13 supported languages.

What a player notices:

  • On the Graphics tab of the Insert menu, Render resolution is now an intuitive stepped slider with stops at both ends, clear percentage stops, and a Native stop where supported.
  • Dynamic resolution is a clean Off / On toggle directly above Render resolution. Turning it On hides the fixed slider, eliminating the previous confusing Auto stop positioned left of 33%.
  • Frame generation provides a clean top-level choice (Off / Auto / Fixed). When set to Fixed, an intuitive Multiplier stepped slider (2x..8x) appears directly beneath it.
  • Mouse-dragging either slider updates the thumb, fill, and preview label with zero hitching or stalling: expensive reallocations are deferred until the mouse button is released.
  • Both Modern dark and Classic themes render with clean contrast, centered text fitted inside arrows, and proper gold selection styling.

Helps:

  • All players navigating the Insert menu Graphics settings with mouse, controller, or keyboard.
  • Players tuning upscalers (FSR 3.1, DLSS, FSR 4, XeSS) or Frame Generation who want smooth slider adjustment without mid-drag stutters.

No measurable impact:

  • In-game steady-state rendering performance (no changes to draw loop or shaders).
  • Players keeping their existing longshot_options.ini configurations (opts.resolution and opts.framegen storage is 100% backwards-compatible).

Files to read first:

  • gpu/vk/vk_menu_hit.h: pure stop-index <-> permille helpers and menu_hit::DragState.
  • gpu/vk/menu_model.h: Setting::commit_on_release and Setting::sync declarations.
  • gpu/vk/vk_menu.cpp: slider_cell() text fitting (fit()), drag lifecycle, and row synchronization.
  • gpu/vk/menu/upscaler.cpp: Dynamic resolution toggle + Render resolution stepped slider.
  • gpu/vk/menu/framegen.cpp: Frame generation Mode choice + Multiplier stepped slider.
  • tests/test_menu_stepped_sliders.py: unit tests covering slider stops, clamping, commit-on-release, and Dynamic resolution / Frame generation mode mapping.

Testing

Tested:

  • Windows 11 (build 26200), AMD Ryzen AI 7 350, AMD Radeon 860M Graphics (8 CUs, RDNA 3.5 integrated GPU, 6 GB allocated VRAM), Adrenalin 26.10.1 (LLPC).
  • Captured and visually verified 6 title-screen Insert menu screenshots across Modern dark (menu_theme=0) and Classic (menu_theme=1) themes at 1280x720 (RX_VK_SHOT_MENU=1, FSR 3.1):
    1. Dynamic resolution: Off + Render resolution stepped slider (Quality 67% (854x480) cleanly fitted inside arrows via fit()).
    2. Dynamic resolution: On with Render resolution cleanly hidden above Sharpness.
    3. Frame generation: Fixed + Frame generation multiplier stepped slider (4x) above Frame generation by: FSR 3.1 FG.
      Visual comparison sheets compiled: pr_b_modern_dark_comparison.png and pr_b_classic_comparison.png.
  • Before the final fix, verified 20/20 --strict targeted tests PASS (0 failed, 0 skipped): test_menu_stepped_sliders.py, test_framegen_by_row.py, test_menu_hit.py, test_menu_slider_ends.py, test_menu_ini_keys.py, test_menu_i18n.py, test_menu_i18n_count.py, test_settings_table.py, test_preset_exempt.py, test_bug_report_defaults.py, test_upscaler_rows.py, test_upscaler_round_trip.py, test_framegen_dlss_cap.py, test_framegen_preset.py, test_menu_modules.py, test_menu_rows_model.py, test_menu_model.py, test_menu_setting_walk.py, test_vk_braces.py, test_utf8_paths.py.
  • Before the final fix, verified full tests/run_all.py on Windows (882 passed, 29 pre-existing Windows/POSIX baseline failures that also fail on clean main — test_auto_handheld, test_pads_after_menu, test_build_long_paths, test_dev_*, test_linux_preflight, test_perf_report, test_crash_dialog, test_seed_reader, etc. — 59 skipped in 328 s), with 0 regressions. The final fix still needs testing.

How to test:

  1. Open the Insert menu -> Graphics tab in both Modern dark and Classic themes with Upscaler = AMD FSR 3.1.
  2. Toggle Dynamic resolution between Off and On: verify On hides Render resolution and persists resolution=0 in longshot_options.ini; verify Off shows Render resolution as a non-wrapping stepped slider with engine-specific stops up to 100% or Native, stops at both ends, and clean text fitting inside arrows.
  3. Click and drag Render resolution across multiple stops: verify the thumb, fill bar, and value label update smoothly during drag and the resolution change commits once on mouse release (and cancels cleanly on Esc or tab switch).
  4. Set Frame generation to Off / Auto / Fixed: verify Frame generation multiplier (2x..8x, locked at 2x on 1-stop DLSS-G) appears only under Fixed, drags smoothly with commit-on-release, and persists to the same frame_generation INI key.

Still to test:

  • Linux AMD RADV / Steam Deck: verify Insert menu stepped sliders and theme rendering in an active game session by hand.
  • Windows unlocked desktop: interactive live mouse drag on Render resolution and Frame generation multiplier sliders by hand (DragState deferral/commit/cancel is verified by unit tests in tests/test_menu_stepped_sliders.py).

Measurements

Nothing to measure: this PR changes only Insert menu layout, slider hit-testing, and deferred mouse-drag commits (zero changes to the Vulkan draw loop, upscalers, or shaders; deferring commits until release avoids triggering intermediate +4.7–30.6 ms resolution-step spikes while dragging).

Risks

  • Settings and compatibility: Zero longshot_options.ini schema churn: opts.resolution == 0 (Dynamic) and fixed stops 1..N, as well as opts.framegen values (0 Off, 1 Auto, 2..8 Multipliers) continue to serialize into identical keys. Existing player INI files load with 100% fidelity.
  • Control bridge: longshot_ctl.py / dev.py ab commands (option set resolution <val>, option set frame_generation <val>) synchronize row state through row_sync() without behavioural divergence.
  • Caches and ABI: Zero SPIR-V or shader translation changes (MKWVK_API_VERSION = 45 unchanged). No game assets or save files modified.
  • Sibling branches: Minor contextual overlap with PR #2369 in 3 files (gpu/vk/menu/framegen.cpp, docs/user/graphics-and-controls.md, tests/test_menu_ini_keys.py), which rebase cleanly on adjacent lines.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named).
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A fix: a game-free test that fails on main and passes here.
  • A check under tests/ that reads changed source is updated, not weakened.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths.
  • Screenshots of the same spot on main and here, for a change that shows on screen.
  • Docs updated.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.
## Summary On the Graphics tab of the Insert menu, `Render resolution` and `Frame generation` were previously configured via wrapping `Choice` controls. For `Render resolution`, options wrapped in an arbitrary order (`Native`, `Quality`, `Balanced`, `Performance`, `Ultra Performance`, and `Auto`), placing `Auto` to the left of `33%` and allowing accidental wrap-around from `Native (100%)` to `Auto (0)`. Furthermore, mouse-dragging sliders in the menu triggered immediate value commits on every mouse-move event. For heavy settings like `Render resolution` and `Frame generation multiplier`, this caused rapid back-to-back render target reallocations, optical flow buffer updates, and pipeline churn (costing +4.7 to 30.6 ms of stutter per step) while the player was merely trying to adjust the slider. This pull request resolves these UX and performance issues by introducing stepped sliders with `commit_on_release` across both Modern dark and Classic themes: 1. **Stepped Slider Infrastructure (`gpu/vk/vk_menu_hit.h`, `gpu/vk/menu_model.h`, `gpu/vk/vk_menu.cpp`)**: Introduces pure stop-index <-> permille mapping helpers (`slider_stop_permille`, `slider_stop_index`, `slider_find_stop`) with non-linear spacing and edge stops. Adds `menu_hit::DragState` and `Setting::commit_on_release`: while a slider is being dragged, thumb position, fill bar, and value text update smoothly at 60+ FPS, while the underlying setting commit and file save are deferred until the mouse button is released (or cancelled cleanly if the player switches tabs or presses Escape). 2. **Dynamic Resolution Toggle + Stepped Render Resolution Slider (`gpu/vk/upscaler_rows.h`, `gpu/vk/menu/upscaler.cpp`)**: Adds a dedicated `Dynamic resolution` toggle (`Off / On`) directly above `Render resolution`. Setting it to `On` sets `opts.resolution = 0`, exits Native mode if active, and hides the fixed slider. Setting it to `Off` exposes `Render resolution` as an intuitive, non-wrapping stepped slider with engine-specific stops up to `100%` or Native, remembering the player's last fixed stop, including Native (defaulting to Quality 67%). `longshot_options.ini: resolution` and control bridge `option set resolution <val>` remain 100% backwards-compatible. 3. **Split Frame Generation Mode + Multiplier Stepped Slider (`gpu/vk/framegen_rows.h`, `gpu/vk/menu/framegen.cpp`)**: Splits `Frame generation` into a clean Mode choice (`Off / Auto / Fixed`) and an accompanying `Multiplier` stepped slider (`2x..8x`) that appears only when `Fixed` is selected (remembering the player's last multiplier, defaulting to 2x). On RTX 40 series GPUs with NVIDIA DLSS-G (which supports only 2x), the multiplier slider cleanly locks at 2x with dimmed styling. 4. **Visual Polish, Marquee Fitting & 13-Language i18n (`gpu/vk/vk_menu.cpp`, `gpu/vk/menu_i18n.h`)**: `slider_cell()` incorporates `fit()` text fitting and marquee animation so long localized resolution strings (`Quality 67% (1708x960)`) never collide with arrows or overflow cell bounds. Full i18n translations added across all 13 supported languages. **What a player notices:** - On the Graphics tab of the Insert menu, `Render resolution` is now an intuitive stepped slider with stops at both ends, clear percentage stops, and a Native stop where supported. - `Dynamic resolution` is a clean `Off / On` toggle directly above `Render resolution`. Turning it `On` hides the fixed slider, eliminating the previous confusing `Auto` stop positioned left of 33%. - `Frame generation` provides a clean top-level choice (`Off / Auto / Fixed`). When set to `Fixed`, an intuitive `Multiplier` stepped slider (`2x..8x`) appears directly beneath it. - Mouse-dragging either slider updates the thumb, fill, and preview label with zero hitching or stalling: expensive reallocations are deferred until the mouse button is released. - Both `Modern dark` and `Classic` themes render with clean contrast, centered text fitted inside arrows, and proper gold selection styling. **Helps:** - All players navigating the Insert menu Graphics settings with mouse, controller, or keyboard. - Players tuning upscalers (FSR 3.1, DLSS, FSR 4, XeSS) or Frame Generation who want smooth slider adjustment without mid-drag stutters. **No measurable impact:** - In-game steady-state rendering performance (no changes to draw loop or shaders). - Players keeping their existing `longshot_options.ini` configurations (`opts.resolution` and `opts.framegen` storage is 100% backwards-compatible). Files to read first: - `gpu/vk/vk_menu_hit.h`: pure stop-index <-> permille helpers and `menu_hit::DragState`. - `gpu/vk/menu_model.h`: `Setting::commit_on_release` and `Setting::sync` declarations. - `gpu/vk/vk_menu.cpp`: `slider_cell()` text fitting (`fit()`), drag lifecycle, and row synchronization. - `gpu/vk/menu/upscaler.cpp`: `Dynamic resolution` toggle + `Render resolution` stepped slider. - `gpu/vk/menu/framegen.cpp`: `Frame generation` Mode choice + `Multiplier` stepped slider. - `tests/test_menu_stepped_sliders.py`: unit tests covering slider stops, clamping, commit-on-release, and Dynamic resolution / Frame generation mode mapping. ## Testing **Tested:** - Windows 11 (build 26200), AMD Ryzen AI 7 350, AMD Radeon 860M Graphics (8 CUs, RDNA 3.5 integrated GPU, 6 GB allocated VRAM), Adrenalin 26.10.1 (LLPC). - Captured and visually verified 6 title-screen Insert menu screenshots across `Modern dark` (`menu_theme=0`) and `Classic` (`menu_theme=1`) themes at 1280x720 (`RX_VK_SHOT_MENU=1`, FSR 3.1): 1. `Dynamic resolution: Off` + `Render resolution` stepped slider (`Quality 67% (854x480)` cleanly fitted inside arrows via `fit()`). 2. `Dynamic resolution: On` with `Render resolution` cleanly hidden above `Sharpness`. 3. `Frame generation: Fixed` + `Frame generation multiplier` stepped slider (`4x`) above `Frame generation by: FSR 3.1 FG`. Visual comparison sheets compiled: `pr_b_modern_dark_comparison.png` and `pr_b_classic_comparison.png`. - Before the final fix, verified `20/20` `--strict` targeted tests PASS (0 failed, 0 skipped): `test_menu_stepped_sliders.py`, `test_framegen_by_row.py`, `test_menu_hit.py`, `test_menu_slider_ends.py`, `test_menu_ini_keys.py`, `test_menu_i18n.py`, `test_menu_i18n_count.py`, `test_settings_table.py`, `test_preset_exempt.py`, `test_bug_report_defaults.py`, `test_upscaler_rows.py`, `test_upscaler_round_trip.py`, `test_framegen_dlss_cap.py`, `test_framegen_preset.py`, `test_menu_modules.py`, `test_menu_rows_model.py`, `test_menu_model.py`, `test_menu_setting_walk.py`, `test_vk_braces.py`, `test_utf8_paths.py`. - Before the final fix, verified full `tests/run_all.py` on Windows (882 passed, 29 pre-existing Windows/POSIX baseline failures that also fail on clean `main` — `test_auto_handheld`, `test_pads_after_menu`, `test_build_long_paths`, `test_dev_*`, `test_linux_preflight`, `test_perf_report`, `test_crash_dialog`, `test_seed_reader`, etc. — 59 skipped in 328 s), with 0 regressions. The final fix still needs testing. **How to test:** 1. Open the Insert menu -> Graphics tab in both `Modern dark` and `Classic` themes with `Upscaler = AMD FSR 3.1`. 2. Toggle `Dynamic resolution` between `Off` and `On`: verify `On` hides `Render resolution` and persists `resolution=0` in `longshot_options.ini`; verify `Off` shows `Render resolution` as a non-wrapping stepped slider with engine-specific stops up to `100%` or Native, stops at both ends, and clean text fitting inside arrows. 3. Click and drag `Render resolution` across multiple stops: verify the thumb, fill bar, and value label update smoothly during drag and the resolution change commits once on mouse release (and cancels cleanly on `Esc` or tab switch). 4. Set `Frame generation` to `Off` / `Auto` / `Fixed`: verify `Frame generation multiplier` (`2x..8x`, locked at `2x` on 1-stop DLSS-G) appears only under `Fixed`, drags smoothly with commit-on-release, and persists to the same `frame_generation` INI key. **Still to test:** - Linux AMD RADV / Steam Deck: verify Insert menu stepped sliders and theme rendering in an active game session by hand. - Windows unlocked desktop: interactive live mouse drag on `Render resolution` and `Frame generation multiplier` sliders by hand (`DragState` deferral/commit/cancel is verified by unit tests in `tests/test_menu_stepped_sliders.py`). ## Measurements Nothing to measure: this PR changes only Insert menu layout, slider hit-testing, and deferred mouse-drag commits (zero changes to the Vulkan draw loop, upscalers, or shaders; deferring commits until release avoids triggering intermediate `+4.7–30.6 ms` resolution-step spikes while dragging). ## Risks - **Settings and compatibility:** Zero `longshot_options.ini` schema churn: `opts.resolution == 0` (Dynamic) and fixed stops `1..N`, as well as `opts.framegen` values (`0` Off, `1` Auto, `2..8` Multipliers) continue to serialize into identical keys. Existing player INI files load with 100% fidelity. - **Control bridge:** `longshot_ctl.py` / `dev.py ab` commands (`option set resolution <val>`, `option set frame_generation <val>`) synchronize row state through `row_sync()` without behavioural divergence. - **Caches and ABI:** Zero SPIR-V or shader translation changes (`MKWVK_API_VERSION = 45` unchanged). No game assets or save files modified. - **Sibling branches:** Minor contextual overlap with PR #2369 in 3 files (`gpu/vk/menu/framegen.cpp`, `docs/user/graphics-and-controls.md`, `tests/test_menu_ini_keys.py`), which rebase cleanly on adjacent lines. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [ ] `mise run test` passes (any failure that also fails on `main` is named). - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [ ] A fix: a game-free test that fails on `main` and passes here. - [x] A check under `tests/` that reads changed source is updated, not weakened. - [ ] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. - [ ] Screenshots of the same spot on `main` and here, for a change that shows on screen. - [x] Docs updated. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold.
Assisted-by: Antigravity
feat(vk): stepped sliders with commit-on-release for Render resolution and Frame generation
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
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
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (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
Website / Website on Cloudflare (pull_request) Has been cancelled
6ce0f5c5d2
Assisted-by: Antigravity
Author
Contributor

Tested in game: Windows 11 Radeon 860M (1280x720, AMD FSR 3.1, RX_VK_SHOT_MENU=1): visually verified 6 Insert menu states across Modern dark and Classic themes (Dynamic resolution Off + Render resolution stepped slider, Dynamic resolution On hiding fixed slider, Frame generation Fixed + Multiplier stepped slider)

Tested in game: Windows 11 Radeon 860M (1280x720, AMD FSR 3.1, RX_VK_SHOT_MENU=1): visually verified 6 Insert menu states across Modern dark and Classic themes (Dynamic resolution Off + Render resolution stepped slider, Dynamic resolution On hiding fixed slider, Frame generation Fixed + Multiplier stepped slider)
Author
Contributor

Visual Verification: Modern Dark and Classic Themes

Captured at 1280x720 windowed (menu_theme=0 and menu_theme=1, AMD FSR 3.1) showing the 3 Option C menu states:

  1. Dynamic resolution: Off — Render resolution is exposed as an intuitive stepped slider (Quality 67% (854x480) cleanly fitted inside arrows via fit()).
  2. Dynamic resolution: On — Render resolution is cleanly hidden above Sharpness, persisting resolution=0 without the previous wrapping Auto option.
  3. Frame generation: Fixed — Multiplier stepped slider (4x) appears directly below Frame generation: Fixed with smooth stepped drag and commit-on-release.

Modern Dark Theme Comparison

Modern Dark Comparison

Classic Theme Comparison

Classic Comparison

### Visual Verification: Modern Dark and Classic Themes Captured at 1280x720 windowed (`menu_theme=0` and `menu_theme=1`, AMD FSR 3.1) showing the 3 Option C menu states: 1. **Dynamic resolution: Off** — `Render resolution` is exposed as an intuitive stepped slider (`Quality 67% (854x480)` cleanly fitted inside arrows via `fit()`). 2. **Dynamic resolution: On** — `Render resolution` is cleanly hidden above `Sharpness`, persisting `resolution=0` without the previous wrapping `Auto` option. 3. **Frame generation: Fixed** — `Multiplier` stepped slider (`4x`) appears directly below `Frame generation: Fixed` with smooth stepped drag and commit-on-release. #### Modern Dark Theme Comparison ![Modern Dark Comparison](https://git.magicbean.dev/attachments/e946dc06-8d10-4183-8418-7f87b0a6234e) #### Classic Theme Comparison ![Classic Comparison](https://git.magicbean.dev/attachments/f18414e1-b0a8-4713-aec3-eec8a38ee45a)
Owner
@review
BeanBot left a comment

Recommendation: Approve. A settings change during a drag can commit the preview to a different row, and the dynamic-resolution toggle does not restore Native after it was selected. The interactive drag behavior also still needs an in-game run. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.

The change replaces wrapping choices with stepped sliders and defers expensive mouse-drag commits. It adds useful previews and separates dynamic resolution and frame-generation mode, at the cost of additional state and synchronization paths.

Should fix (2): not blocking, but worth doing before merging.

  • L1 gpu/vk/vk_menu.cpp:5553: The drag stores a visible row index and resolves it again against the current row list, so a visibility change can redirect the eventual commit to another setting. (more on the line) Do: Store a stable row identity for the drag and cancel it if that row is hidden or the tab changes; add an integration test that changes visibility during a drag.
  • L2 gpu/vk/upscaler_rows.h:250: Enabling dynamic resolution from a Native mode does not remember that fixed stop. (more on the line) Do: Remember the Native sentinel as a fixed stop and restore the corresponding Native upscaler when dynamic resolution is turned off.

Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)

  • L3 gpu/vk/vk_menu.cpp:5550: The interactive behavior of the new drag lifecycle has not yet been verified in the game. (more on the line) Do: Run the documented mouse-drag, release and cancel cases in an active game session, including both sliders and themes.

@fix can do L1 and L2.

Checks: Still running: 10 checks.

More: does it help, other systems, switches, what was read

Does it help: Unproven. The reported Windows screenshots show the new layout, but the author says interactive mouse dragging has not been tested. No before-and-after runs substantiate the claimed 4.7–30.6 ms improvement.

Other systems: The controls affect saved graphics settings, the control bridge, upscaler Native modes, frame generation and both menu themes. The reported visual check covers Windows with AMD FSR 3.1; Linux and interactive drag behavior remain untested.

Switches: No environment switches added, changed or removed. The new Dynamic resolution control reflects the existing resolution setting; the multiplier control reflects the existing frame_generation setting.

Reviewed: 6ce0f5c5d2 against d02cac0fb4: Read the repository rules and PR template, commit log, changed slider helpers, settings modules, menu model and relevant menu input, persistence and bridge paths. Skimmed translations, documentation and changed tests. The large menu source and all changed test files were not read in full; docs/review-checklist.md and the adjacent Tooling checkout were absent.; nothing run (a code review).

Checked and fine:

  • Both commits record AI assistance.
  • The diff adds no committed game-derived artifacts or shader/API changes.
  • The frame-generation multiplier is locked during the output-resolution preview.

Testing: No commands that build, run tests or execute project code were run. The PR reports Windows visual checks and targeted tests; CI is still running.

Overlaps and merge order: The description reports overlap with PR #2369 in framegen.cpp, graphics-and-controls.md and test_menu_ini_keys.py; merge order is not established.


Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

**Recommendation: Approve.** A settings change during a drag can commit the preview to a different row, and the dynamic-resolution toggle does not restore Native after it was selected. The interactive drag behavior also still needs an in-game run. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge. The change replaces wrapping choices with stepped sliders and defers expensive mouse-drag commits. It adds useful previews and separates dynamic resolution and frame-generation mode, at the cost of additional state and synchronization paths. **Should fix (2)**: not blocking, but worth doing before merging. - **L1** `gpu/vk/vk_menu.cpp:5553`: The drag stores a visible row index and resolves it again against the current row list, so a visibility change can redirect the eventual commit to another setting. (more on the line) **Do:** Store a stable row identity for the drag and cancel it if that row is hidden or the tab changes; add an integration test that changes visibility during a drag. - **L2** `gpu/vk/upscaler_rows.h:250`: Enabling dynamic resolution from a Native mode does not remember that fixed stop. (more on the line) **Do:** Remember the Native sentinel as a fixed stop and restore the corresponding Native upscaler when dynamic resolution is turned off. **Testing before merging (1)** (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation) - **L3** `gpu/vk/vk_menu.cpp:5550`: The interactive behavior of the new drag lifecycle has not yet been verified in the game. (more on the line) **Do:** Run the documented mouse-drag, release and cancel cases in an active game session, including both sliders and themes. `@fix` can do L1 and L2. **Checks:** Still running: 10 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven. The reported Windows screenshots show the new layout, but the author says interactive mouse dragging has not been tested. No before-and-after runs substantiate the claimed 4.7–30.6 ms improvement. **Other systems:** The controls affect saved graphics settings, the control bridge, upscaler Native modes, frame generation and both menu themes. The reported visual check covers Windows with AMD FSR 3.1; Linux and interactive drag behavior remain untested. **Switches:** No environment switches added, changed or removed. The new Dynamic resolution control reflects the existing resolution setting; the multiplier control reflects the existing frame_generation setting. **Reviewed:** 6ce0f5c5d21c against d02cac0fb432: Read the repository rules and PR template, commit log, changed slider helpers, settings modules, menu model and relevant menu input, persistence and bridge paths. Skimmed translations, documentation and changed tests. The large menu source and all changed test files were not read in full; docs/review-checklist.md and the adjacent Tooling checkout were absent.; nothing run (a code review). **Checked and fine:** - Both commits record AI assistance. - The diff adds no committed game-derived artifacts or shader/API changes. - The frame-generation multiplier is locked during the output-resolution preview. **Testing:** No commands that build, run tests or execute project code were run. The PR reports Windows visual checks and targeted tests; CI is still running. **Overlaps and merge order:** The description reports overlap with PR #2369 in framegen.cpp, graphics-and-controls.md and test_menu_ini_keys.py; merge order is not established. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
@ -234,0 +247,4 @@
if (e == FSR3) return n = (int)(sizeof kFsr3FixedSteps / sizeof kFsr3FixedSteps[0]), kFsr3FixedSteps;
if (e == OFF) return n = (int)(sizeof kOffFixedSteps / sizeof kOffFixedSteps[0]), kOffFixedSteps;
return n = (int)(sizeof kGameFixedSteps / sizeof kGameFixedSteps[0]), kGameFixedSteps;
}
Member

L2 (should fix): Enabling dynamic resolution from a Native mode does not remember that fixed stop.

When: With DLAA selected, turn Dynamic resolution on and then off. The toggle leaves DLAA and restores the last numeric stop, initially Quality 67%, instead of the Native stop the player was using.

Do: Remember the Native sentinel as a fixed stop and restore the corresponding Native upscaler when dynamic resolution is turned off.

**L2** (should fix): Enabling dynamic resolution from a Native mode does not remember that fixed stop. *When:* With DLAA selected, turn Dynamic resolution on and then off. The toggle leaves DLAA and restores the last numeric stop, initially Quality 67%, instead of the Native stop the player was using. **Do:** Remember the Native sentinel as a fixed stop and restore the corresponding Native upscaler when dynamic resolution is turned off.
@ -5492,1 +5550,4 @@
if (drag_state.active()) { // (a slider held: it follows the cursor's x until let go)
if (drag_state.row >= tab_row_count(cur_tab)) {
drag_state.cancel();
} else {
Member

L1 (should fix): The drag stores a visible row index and resolves it again against the current row list, so a visibility change can redirect the eventual commit to another setting.

When: While dragging Render resolution, a control-bridge request can turn Dynamic resolution on. The resolution row disappears, but the same index now identifies the next visible row; releasing the mouse passes the resolution stop ID to that row's set_row instead.

Do: Store a stable row identity for the drag and cancel it if that row is hidden or the tab changes; add an integration test that changes visibility during a drag.

**L1** (should fix): The drag stores a visible row index and resolves it again against the current row list, so a visibility change can redirect the eventual commit to another setting. *When:* While dragging Render resolution, a control-bridge request can turn Dynamic resolution on. The resolution row disappears, but the same index now identifies the next visible row; releasing the mouse passes the resolution stop ID to that row's set_row instead. **Do:** Store a stable row identity for the drag and cancel it if that row is hidden or the tab changes; add an integration test that changes visibility during a drag.
@ -5489,3 +5550,1 @@
if (!(ptr.held & HOS_MOUSE_LEFT) || !d.value) {
drag_row = -1;
save();
if (drag_state.active()) { // (a slider held: it follows the cursor's x until let go)
Member

L3 (should fix): The interactive behavior of the new drag lifecycle has not yet been verified in the game.

When: The reported tests exercise the helper state and screenshots show static menu states, but neither demonstrates that actual mouse input previews, commits once on release and cancels correctly.

Do: Run the documented mouse-drag, release and cancel cases in an active game session, including both sliders and themes.

**L3** (should fix): The interactive behavior of the new drag lifecycle has not yet been verified in the game. *When:* The reported tests exercise the helper state and screenshots show static menu states, but neither demonstrates that actual mouse input previews, commits once on release and cancels correctly. **Do:** Run the documented mouse-drag, release and cancel cases in an active game session, including both sliders and themes.
Owner
@fix
BeanBot force-pushed feat/vk-insert-menu-stepped-sliders from 6ce0f5c5d2
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
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
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (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
Website / Website on Cloudflare (pull_request) Has been cancelled
to ae67646974
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 24s
PR description / Description follows the template (pull_request_target) Failing after 34s
CI / Website build and checks (pull_request) Failing after 44s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 46s
CI / Workflow lint (actionlint) (pull_request) Successful in 48s
Third-party parts / As their notes say (pull_request) Successful in 53s
2026-11-23 20:04:35 +00:00
Compare
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left (a run of the change itself). The interactive drag behavior still needs an in-game run on the final fix. The reported screenshots do not establish preview, release, and cancellation behavior. Recommend approval; not approved on the forge.

What @fix changed
I changed this pull request: the new head is ae67646974. I rebased it onto main (6bf8cf34c8). I edited its description to match the change.

Changed

  • Slider drag row identity: gpu/vk/vk_menu.cpp:930 tracks the global row and cancels the drag if its tab or visible position changes. Added a visibility-change integration fixture in tests/test_menu_stepped_sliders.py:212. Tests were not run.
  • Restore Native resolution: gpu/vk/upscaler_rows.h:255 remembers the Native stop and restores the current engine’s Native mode when dynamic resolution is disabled. Added coverage for DLAA, FSR 4 and XeSS in tests/test_menu_stepped_sliders.py:139. Tests were not run.

Nothing was built or run: the checks run again on the new head.

The change replaces wrapping graphics choices with stepped sliders and defers expensive slider commits until release. The final fix preserves drag row identity and restores Native resolution after toggling dynamic resolution; it adds state and validation to the menu.

Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)

  • L3 gpu/vk/vk_menu.cpp:5550: The interactive behavior of the new drag lifecycle has not yet been verified in the game. When: The reported tests exercise the helper state and screenshots show static menu states, but neither demonstrates that actual mouse input previews, commits once on release and cancels correctly. Do: Run the documented mouse-drag, release and cancel cases in an active game session, including both sliders and themes.

Checks: they run again on this head; a failure shows on the pull request.

Also noticed (3; not asked for, not blocking)
  • The pull request also lists a Linux AMD or Steam Deck menu check as still to test.
  • The base-to-head diff includes earlier upstream changes beyond the listed slider files.
  • The final fix's added tests and builds have not yet been reported as run.
More: does it help, other systems, switches, what was read

Does it help: Unproven: the description reports 4.7–30.6 ms per intermediate resolution step, but does not provide comparable before-and-after drag measurements. Interactive behavior on the final fix is also unverified.

Other systems: The menu applies across Windows and Linux and across upscaler and frame-generation modes. Screenshots cover Windows with AMD FSR 3.1; Linux and live drag behavior remain unreported on the final fix.

Switches: The slider changes add no switches. The full base diff also changes gpu/vk/switches.def in an earlier upstream commit; its default and measurements were not reviewed.

Reviewed: ae67646974 against 6bf8cf34c8: Read the fix diff, the drag-state helpers, relevant menu drag and resolution-toggle code, repository rules and pull request template. Skimmed the broader base diff and tests; the full base diff and all changed files were not read in full.; nothing run (a code review).

Checked and fine:

  • The fix keeps the dragged row's global identity and cancels when its visible position or tab changes.
  • The dynamic-resolution toggle remembers Native and restores the current engine's Native mode.

Testing: No commands that build, test, or run the project were executed. The author reports Windows screenshots and pre-fix test results; CI has not run on this head.

Overlaps and merge order: The description reports adjacent overlap with PR #2369 in framegen.cpp, graphics-and-controls.md, and test_menu_ini_keys.py; merge order was not established.


Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The code is ready: only testing is left (a run of the change itself). The interactive drag behavior still needs an in-game run on the final fix. The reported screenshots do not establish preview, release, and cancellation behavior. Recommend approval; not approved on the forge. **What `@fix` changed** I changed this pull request: the new head is ae6764697423. I rebased it onto `main` (6bf8cf34c80f). I edited its description to match the change. **Changed** - **Slider drag row identity**: gpu/vk/vk_menu.cpp:930 tracks the global row and cancels the drag if its tab or visible position changes. Added a visibility-change integration fixture in tests/test_menu_stepped_sliders.py:212. Tests were not run. - **Restore Native resolution**: gpu/vk/upscaler_rows.h:255 remembers the Native stop and restores the current engine’s Native mode when dynamic resolution is disabled. Added coverage for DLAA, FSR 4 and XeSS in tests/test_menu_stepped_sliders.py:139. Tests were not run. Nothing was built or run: the checks run again on the new head. The change replaces wrapping graphics choices with stepped sliders and defers expensive slider commits until release. The final fix preserves drag row identity and restores Native resolution after toggling dynamic resolution; it adds state and validation to the menu. **Testing before merging (1)** (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation) - **L3** `gpu/vk/vk_menu.cpp:5550`: The interactive behavior of the new drag lifecycle has not yet been verified in the game. *When:* The reported tests exercise the helper state and screenshots show static menu states, but neither demonstrates that actual mouse input previews, commits once on release and cancels correctly. **Do:** Run the documented mouse-drag, release and cancel cases in an active game session, including both sliders and themes. **Checks:** they run again on this head; a failure shows on the pull request. <details> <summary>Also noticed (3; not asked for, not blocking)</summary> - The pull request also lists a Linux AMD or Steam Deck menu check as still to test. - The base-to-head diff includes earlier upstream changes beyond the listed slider files. - The final fix's added tests and builds have not yet been reported as run. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven: the description reports 4.7–30.6 ms per intermediate resolution step, but does not provide comparable before-and-after drag measurements. Interactive behavior on the final fix is also unverified. **Other systems:** The menu applies across Windows and Linux and across upscaler and frame-generation modes. Screenshots cover Windows with AMD FSR 3.1; Linux and live drag behavior remain unreported on the final fix. **Switches:** The slider changes add no switches. The full base diff also changes gpu/vk/switches.def in an earlier upstream commit; its default and measurements were not reviewed. **Reviewed:** ae6764697423 against 6bf8cf34c80f: Read the fix diff, the drag-state helpers, relevant menu drag and resolution-toggle code, repository rules and pull request template. Skimmed the broader base diff and tests; the full base diff and all changed files were not read in full.; nothing run (a code review). **Checked and fine:** - The fix keeps the dragged row's global identity and cancels when its visible position or tab changes. - The dynamic-resolution toggle remembers Native and restores the current engine's Native mode. **Testing:** No commands that build, test, or run the project were executed. The author reports Windows screenshots and pre-fix test results; CI has not run on this head. **Overlaps and merge order:** The description reports adjacent overlap with PR #2369 in framegen.cpp, graphics-and-controls.md, and test_menu_ini_keys.py; merge order was not established. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.</sub>
HumanBean deleted branch feat/vk-insert-menu-stepped-sliders 2026-11-23 20:35:26 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
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!2383
No description provided.