fix(host): menus run at the display's refresh, movies and loads at 60 at most #3164
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 project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!3164
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:fix/movie-present-60"
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
With the game capped at 60 fps, the title screen, the opening movie and loads with a movie behind them ran at up to
240 fps, and the title screen and menus did not follow the display. Each kind of screen now runs at the rate it needs:
A refresh the renderer does not know (headless) leaves menus as they were. For a movie only the game's own limiter and
vsync event are raised to 240, as since #488 (#73); the presents are 60 a second, and a late frame is made up by the ones
after it. This also removes the cause of a movie's picture running ahead of its sound at a 60 cap (#1964). Playing
movies at 60 under a 30 cap reverses #609's choice. A run that records or plays an input recording changes nothing.
The host asks the game whether a menu is up (
game_menu_up: the pause types, and the title's screen, whose update isseen at
menu.update) and whether a loading screen is up (game_loading: the load flag, which stays set on the titlescreen, so the title wins). The renderer's table gives it the display's refresh (
MKWVK_API_VERSION96).To see the first problem on
main: cap 60, watch the title screen with the FPS counter on.Read first:
present_periodandfps_refreshinhost/nn_vi.c, thengame_menu_upandgame_loadingingame/crates/longshot-game/src/input.rs.Fixes #1446. See #1964.
Testing
Tested: CachyOS (Linux 7.3.3), RTX 3090, NVIDIA 620.70, headless. Headless reports no refresh, so the menu runs forced
120 Hz with a temporary override that is not in this PR; they ran before the last rebase.
main @ 9f76a437: 8 and 6 pictures skipped of about 2,000,main5 and 5.Checks on this head:
mise run test886 passed, 13 skipped, 12 failed. 11 of them fail onmain @ 67fda193too, runone by one (
test_dlssg,test_present_image_free,test_ui_renderer,test_present_geometry_trace,test_no_map_reload,test_turf_budget,test_vk_draw_overhead_lean,test_sync_watch_event,test_present_held_image,test_present_acquire_ahead,test_no_game_title). The twelfth istest_lifter:the_repository_s_lock_and_the_table_agree, as onmain, and adev_runtimecopy test that found its folder locked byanother build.
check_host_compile.pyfor Windows (llvm-mingw): 81 host units, 0 failed.Still to test:
main(by hand).Measurements
Verdict: the title and movies no longer run at 240 for a 60 fps video. The title video skips about 10 more pictures of
5,947 when the title runs at 120. Loading takes the same time limited to 60.
Title screen video, 5,947 pictures, this head's code before the last rebase against
main @ 7c9055d9, one timed queuejob, interleaved, the refresh forced to 120 Hz (the queue flagged 3.1 % memory stalls):
7c9055d9Loading,
63cc11afwith a log line and a switch for the limit, Uncapped, five loads a session (3 % memory stalls):Earlier, main
a98cf28aagainst the first version: with the picture hold off, a movie's picture ran 1.00 s ahead of itssound after 136 s on
mainand 0.01 s with this change.Risks
open the game runs at the refresh, so a new cap shows only once it is closed.
A revert is enough. Nothing changes in saves or settings.
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.MKWVK_API_VERSIONbumped (MkwVkHostorMkwVkRendereringpu/vk/vk_api.hchanged).Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
https://claude.ai/code/session_017vw8e3Wd6AA2ofRgZt7Lqm
Tested in game: RTX 3090, NVIDIA 620.70, CachyOS, headless at a 60 cap: title screen, opening movie, save load and teleport. Title and movies at 60 fps (240 on main); the movie lines show no worse playback, also with the game limited to 3 cores.
Possibly related, for context:
28287d6047f009110073test_present_trace now builds the presented function with its two new helpers. Full checks: the one other failure (test_lifter's tools-lock stamp) fails on main too. Windows host compile: 81 units, 0 failed.
Named the measured commits.
WIP: fix(host): movies and the title screen keep to a 60 fps capto fix(host): movies and the title screen keep to a 60 fps capCorrection: the main side was measured on the shared base
a98cf28a, not ond6e819e0.Recommendation: Request changes. Movie pacing ignores the game's requested present interval in Per frame mode and when HOS_GAME_INTERVAL is enabled. Steam Deck playback also needs a comparison because the original fix addressed missed movie pictures there.
The change keeps movie presents near the selected 60 fps cap while retaining the faster game limiter and adds limited catch-up after late frames. It reduces unnecessary presents on the tested PC, but changes interval handling and movie pacing on other systems.
Blocking (1): must change before merging.
host/nn_vi.c:174: The movie period discards the requested present interval, although Per frame mode and HOS_GAME_INTERVAL explicitly retain it. (more on the line) Do: Apply the effective interval to the movie's 60 Hz period, and update the pacing-policy test to expect the requested interval during a movie.Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)
host/nn_vi.c:474: The original movie override addressed missed pictures on Steam Deck, where this new 60-present schedule has not been tested. (more on the line) Do: Compare repeated opening-movie runs on Steam Deck at the 60 cap against the merge base, including skipped pictures and playback speed. (@fixdoes its part first: Adjust or replace the catch-up scheduling if the Deck cannot sustain the movie's picture rate.)host/nn_vi.c:474: The changed platform pacing has not been exercised in a Windows game run. (more on the line) Do: Run the title screen and opening movie on Windows at the 60 cap and check the present rate and playback.@fixcan do L1 and L2.Questions (1) (not confirmed from the code; they don't hold the recommendation)
d6e819e0, since the reported baseline isa98cf28a?Checks: Still running: 11 checks.
More: does it help, other systems, switches, what was read
Does it help: Yes for the reported cap on the tested Linux RTX 3090: the author reports 240 to 60 fps in the opening movie and picture-to-sound drift from 1.00 s to 0.01 s. Whether movie playback remains no worse on the Steam Deck is unproven; the reported baseline is
a98cf28arather than the supplied merge based6e819e0.Other systems: The host pacing path affects Windows and Linux, all GPUs, movies during loads, Per frame mode, and requested present intervals. Windows was compile-checked but not run; Steam Deck and Per frame playback remain untested. CI is still running.
Switches: HOS_MOVIE_PACE remains on by default; its enabled behavior now keeps movie presents at 60 while raising the game limiter. HOS_MOVIE_PACE=0 still leaves the limiter at the cap. The switch table and reference are updated; the default's playback cost on Steam Deck remains unverified.
Reviewed:
f009110073againstd6e819e084: Read AGENTS.md, CONTRIBUTING.md, docs/dev/standards.md, the PR template, the complete diff and commits, host/nn_vi.c, and tests/test_present_trace.py. Read the relevant pacing test, game timing and native-window caller sections; skimmed the switch-table and documentation changes. docs/review-checklist.md and ../Tooling/AGENTS.md were absent. No recorded runs or generated files were changed.; nothing run (a code review).Checked and fine:
Testing: No code or tests were run, as requested. The author reports in-game Linux testing and a Windows host compile; the supplied CI checks are still running.
Overlaps and merge order: Not checked; the network is closed.
Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, as HumanBean took it out of WIP. Nothing was run; a maintainer decides.
@ -163,0 +171,4 @@a movie's late frames are followed by quick ones until the 60 a second are made up, four periods at most; a loop thatwaited a whole period after each late frame would lose those updates, and pictures with them (issue #73). 0 otherwise:no burst) */static int64_t present_slack(int64_t period, int movie) { return movie ? 4 * period : 0; }L1 (blocking): The movie period discards the requested present interval, although Per frame mode and HOS_GAME_INTERVAL explicitly retain it.
When: At a 60 cap during a movie, if the game requests interval 2, hos_vi_native_interval sets present_interval to 2 in Per frame mode, but present_period returns 16.7 ms regardless. Texture acquisition is consequently paced at 60 instead of the requested 30 fps; intervals 3 and 4 are likewise ignored.
Do: Apply the effective interval to the movie's 60 Hz period, and update the pacing-policy test to expect the requested interval during a movie.
@ -461,0 +471,4 @@const int movie = __atomic_load_n(&movie_raised, __ATOMIC_RELAXED);const int64_t period = present_period(fps_max(), present_interval, movie), slack = present_slack(period, movie);/* (behind by more than a frame and the slack: the next one is paced from now, with no burst to catch up) */next_frame_at = next_frame_at && now - next_frame_at < period + slack ? next_frame_at + period : now + period;L2 (should fix): The original movie override addressed missed pictures on Steam Deck, where this new 60-present schedule has not been tested.
When: A Deck whose movie update loop falls short of the movie's picture rate can skip more pictures than the existing 240 fps schedule; the desktop's results do not settle that case.
Do: Compare repeated opening-movie runs on Steam Deck at the 60 cap against the merge base, including skipped pictures and playback speed.
L3 (should fix): The changed platform pacing has not been exercised in a Windows game run.
When: The Windows build compiles, but that does not show that its waits and presents maintain the intended cap and movie playback.
Do: Run the title screen and opening movie on Windows at the 60 cap and check the present rate and playback.
@review
Recommendation: Request changes. Movie pacing still ignores the game's requested present interval in Per frame mode and when HOS_GAME_INTERVAL is enabled. Steam Deck and Windows game runs also remain outstanding.
The change caps movie and title-screen presents at 60 fps while retaining the faster movie limiter and adding limited catch-up after late frames. It addresses excessive presentation rates, but currently overrides an explicit interval policy during movies.
Blocking (1): must change before merging.
host/nn_vi.c:174: The movie period discards the requested present interval, although Per frame mode and HOS_GAME_INTERVAL explicitly retain it. When: At a 60 cap during a movie, if the game requests interval 2, hos_vi_native_interval sets present_interval to 2 in Per frame mode, but present_period returns 16.7 ms regardless. Texture acquisition is consequently paced at 60 instead of the requested 30 fps; intervals 3 and 4 are likewise ignored. Do: Apply the effective interval to the movie's 60 Hz period, and update the pacing-policy test to expect the requested interval during a movie.Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)
host/nn_vi.c:474: The original movie override addressed missed pictures on Steam Deck, where this new 60-present schedule has not been tested. When: A Deck whose movie update loop falls short of the movie's picture rate can skip more pictures than the existing 240 fps schedule; the desktop's results do not settle that case. Do: Compare repeated opening-movie runs on Steam Deck at the 60 cap against the merge base, including skipped pictures and playback speed. (@fixdoes its part first: Adjust or replace the catch-up scheduling if the Deck cannot sustain the movie's picture rate.)host/nn_vi.c:474: The changed platform pacing has not been exercised in a Windows game run. When: The Windows build compiles, but that does not show that its waits and presents maintain the intended cap and movie playback. Do: Run the title screen and opening movie on Windows at the 60 cap and check the present rate and playback.@fixcan do L1 and L2.Since the last review (on
f009110073)Still open: L1 (The movie period discards the requested present interval, although Per frame mode and HOS_…); L2 (The original movie override addressed missed pictures on Steam Deck, where this new 60-pre…); L3 (The changed platform pacing has not been exercised in a Windows game run.)
Checks: Still running: 11 checks.
More: does it help, other systems, switches, what was read
Does it help: Yes for the reported cap on the tested Linux PC: the author reports 240 to 60 fps and picture-to-sound drift from 1.00 s to 0.01 s. Movie picture skips varied between runs, and the Steam Deck case remains untested.
Other systems: Pacing affects Windows and Linux, movie playback, the title screen and loads with a movie. The author reports Linux NVIDIA game runs and a Windows host compile; a Windows game run and Steam Deck playback comparison remain outstanding.
Switches: HOS_MOVIE_PACE remains on by default, but now raises only the game's limiter and vsync during movies; its documentation and switch table were updated. HOS_GAME_INTERVAL remains off by default, but its requested interval is ignored during a raised movie.
Reviewed:
f009110073againstd6e819e084: Read the changed host pacing code, pacing and trace tests, diff, commit messages, repository instructions and pull request template; skimmed the switch table and documentation changes. The full switch reference and switch table were not read.; nothing run (a code review).Checked and fine:
Testing: No commands that build or run project code were executed. Author-reported Linux game tests and Windows host compilation are recorded in the pull request; CI is still running.
Overlaps and merge order: Not established from the supplied pull request information.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
On the interval finding (
host/nn_vi.c,present_period): keeping it as it is.A Per frame run at a 60 cap shows the game does ask for interval 4 or 3 for short stretches during movies. On
mainthose presented over the raised 240, so at 60 or 80 a second. With the interval applied to 60 they would present at 15 or 20, and the movie player, which takes one picture an update, would skip pictures thatmainshows. For every interval from 1 to 4,mainpresented a movie at 60 or more, so a flat 60 ismainheld to the cap.8b7859cbsays this beside the code, and the pacing test's60 Per frame, movierow (interval 2) already expects 1/60.On the measured base: the description now says why the present rate holds on
d6e819e0and that the skipped counts may not. The Steam Deck and Windows runs are still wanted (Still to test).@review
Recommendation: Approve. The code is ready: only testing is left. The change brings movie and title-screen presents down to 60 fps in the recorded Linux run. Steam Deck and Windows game runs are still needed to check the pacing change on those systems. Recommend approval; not approved on the forge.
At a 60 fps cap, movies and the title screen present at 60 instead of up to 240 fps, while the game’s limiter remains raised during movies and late frames can be made up. The pacing code is more complex, and its effect on movie picture skips remains uncertain on Steam Deck.
Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)
host/nn_vi.c:474: The original movie override addressed missed pictures on Steam Deck, where this new 60-present schedule has not been tested. When: A Deck whose movie update loop falls short of the movie's picture rate can skip more pictures than the existing 240 fps schedule; the desktop's results do not settle that case. Do: Compare repeated opening-movie runs on Steam Deck at the 60 cap against the merge base, including skipped pictures and playback speed. (@fixdoes its part first: Adjust or replace the catch-up scheduling if the Deck cannot sustain the movie's picture rate.)host/nn_vi.c:474: The changed platform pacing has not been exercised in a Windows game run. When: The Windows build compiles, but that does not show that its waits and presents maintain the intended cap and movie playback. Do: Run the title screen and opening movie on Windows at the 60 cap and check the present rate and playback.@fixcan do L2.Since the last review (on
f009110073)Withdrawn (it was wrong): L1 (The movie period discards the requested present interval, although Per frame mode and HOS_…)
Still open: L2 (The original movie override addressed missed pictures on Steam Deck, where this new 60-pre…); L3 (The changed platform pacing has not been exercised in a Windows game run.)
Checks: Still running: 11 checks.
Also noticed (2; not asked for, not blocking)
More: does it help, other systems, switches, what was read
Does it help: Yes for the reported cap: the recorded RTX 3090 Linux run reports 240 fps before and 60 fps after. Movie playback on Steam Deck remains unproven; the recorded skipped-picture comparisons used a main commit other than the PR’s base.
Other systems: The pacing path affects Windows and Linux, including Steam Deck and Per frame mode. Linux gameplay and Windows host compilation are recorded; Windows gameplay, a Steam Deck comparison and a Per frame comparison against main remain outstanding.
Switches: HOS_MOVIE_PACE remains on by default; its behavior changes so it raises the game limiter but not the present rate at a 60 cap. HOS_MOVIE_PACE=0 retains the cap for the game limiter. The switch table and reference are updated; the default still needs the Steam Deck playback comparison.
Reviewed:
8b7859cbd5againstd6e819e084: Read the repository rules, PR template, diff and commits; inspected host pacing and the changed tests in context. Skimmed the switch reference and recorded runs; the full changed files were not all read.; nothing run (a code review).Checked and fine:
Testing: No commands that build or run project code were executed. The author reports Linux game runs, game-free checks and a Windows host compile; CI remains in progress.
Overlaps and merge order: None identified from the supplied information.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
fix(host): movies and the title screen keep to a 60 fps capto fix(host): movies and the title screen play at 60 fps under any cap up to 60@review
Recommendation: Approve. The code is ready: only testing is left. The recorded Linux runs show the title screen and movies presenting at 60 fps, but playback on Steam Deck and behavior in a Windows game run remain unverified. The pull request is also reported as not mergeable. Recommend approval; not approved on the forge.
Movies and the title screen present at 60 fps under caps up to 60, while the game's limiter is raised to help movie playback. This improves presentation pacing but raises movie presentation from low caps, with potential heat and battery costs.
Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)
host/nn_vi.c:474: The original movie override addressed missed pictures on Steam Deck, where this new 60-present schedule has not been tested. When: A Deck whose movie update loop falls short of the movie's picture rate can skip more pictures than the existing 240 fps schedule; the desktop's results do not settle that case. Do: Compare repeated opening-movie runs on Steam Deck at the 60 cap against the merge base, including skipped pictures and playback speed. (@fixdoes its part first: Adjust or replace the catch-up scheduling if the Deck cannot sustain the movie's picture rate.)host/nn_vi.c:474: The changed platform pacing has not been exercised in a Windows game run. When: The Windows build compiles, but that does not show that its waits and presents maintain the intended cap and movie playback. Do: Run the title screen and opening movie on Windows at the 60 cap and check the present rate and playback.@fixcan do L2.Since the last review (on
8b7859cbd5)Still open: L2 (The original movie override addressed missed pictures on Steam Deck, where this new 60-pre…); L3 (The changed platform pacing has not been exercised in a Windows game run.)
Checks: Still running: 11 checks.
Also noticed (2; not asked for, not blocking)
More: does it help, other systems, switches, what was read
Does it help: Unproven across affected systems. On the author's Linux RTX 3090, the opening movie's median and maximum fell from 240 to 60 fps; skipped pictures were 6 before and 5 or 12 after. The measured main commit was not the PR base, and a Steam Deck comparison is still needed.
Other systems: The host pacing affects Windows and Linux, movie playback, frame generation and low-cap users. Windows has a recorded host compile but no game run; Steam Deck and low-cap frame generation remain untested. Saves and settings are unchanged.
Switches: HOS_MOVIE_PACE remains on by default; its movie override now applies to caps below 60 as well as 60. Setting it to 0 leaves the limiter at the selected cap. The default's playback tradeoff still needs the recorded Deck run.
Reviewed:
f3b650bc86againstd6e819e084: Read the diffs, commit list, AGENTS.md, CONTRIBUTING.md, host pacing code and changed tests; skimmed the changed switch and user documentation. The combined code and test output was truncated, so not every changed file was read in full.; nothing run (a code review).Checked and fine:
Testing: No commands that build or run tests were executed. The author reports Linux game runs, game-free checks and a Windows host compile; the reported unrelated test failure also occurs on main.
Overlaps and merge order: none found
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
f3b650bc8663cc11af5ffix(host): movies and the title screen play at 60 fps under any cap up to 60to fix(host): movies play at 60 fps under any cap, and the pause menu at the refresh at most@review
Recommendation: Approve. The code is ready: only testing is left. The reported Linux run shows movies presenting at 60 instead of 240 fps, but the Steam Deck comparison and Windows game run remain outstanding. The new pause-menu limit also has not yet been observed working with a known display refresh. Recommend approval; not approved on the forge.
The change presents movies at 60 fps under any cap and limits pause and game-over screens to the display refresh when known. It adds pacing and renderer-interface complexity, and raises movie presentation from 30 to 60 fps for players using a 30 fps cap.
Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)
host/nn_vi.c:474: The original movie override addressed missed pictures on Steam Deck, where this new 60-present schedule has not been tested. When: A Deck whose movie update loop falls short of the movie's picture rate can skip more pictures than the existing 240 fps schedule; the desktop's results do not settle that case. Do: Compare repeated opening-movie runs on Steam Deck at the 60 cap against the merge base, including skipped pictures and playback speed. (@fixdoes its part first: Adjust or replace the catch-up scheduling if the Deck cannot sustain the movie's picture rate.)host/nn_vi.c:474: The changed platform pacing has not been exercised in a Windows game run. When: The Windows build compiles, but that does not show that its waits and presents maintain the intended cap and movie playback. Do: Run the title screen and opening movie on Windows at the 60 cap and check the present rate and playback.@fixcan do L2.Since the last review (on
f3b650bc86)Still open: L2 (The original movie override addressed missed pictures on Steam Deck, where this new 60-pre…); L3 (The changed platform pacing has not been exercised in a Windows game run.)
Checks: Still running: 11 checks.
Also noticed (2; not asked for, not blocking)
More: does it help, other systems, switches, what was read
Does it help: Yes for the reported 60-cap presentation rate: the description records 240 fps on main and 60 fps with the change on an RTX 3090/Linux system. Playback comparisons are less conclusive: skipped-picture counts vary, the main measurement used a different base, and the Steam Deck case remains untested.
Other systems: The pacing affects Windows and Linux, low and high caps, Per frame mode, movies and pause screens. Windows host compilation is reported, but no Windows game run; the Steam Deck movie comparison and a windowed pause-menu run with a known refresh are still needed. Frame generation can show more frames than the refresh limit on rendered frames.
Switches: HOS_MOVIE_PACE remains on by default; it now applies movie pacing under every cap. Setting it to 0 leaves the game's limiter at the selected cap. The switch table and reference were updated; the default's Steam Deck playback effect remains unmeasured.
Reviewed:
63cc11af5fagainstb77c2f4b3e: Read the repository rules, contribution guide and pull request template, the full diff, the pacing and refresh call sites, and the prior pacing diff. Skimmed the changed tests and documentation; the large changed code files and remaining dependent code were not read in full. The external Tooling rules were unavailable in the checkout.; nothing run (a code review).Checked and fine:
Testing: No commands from the project or tests were run. The author reports Linux game runs and Windows host compilation; CI is still running.
Overlaps and merge order: Not checked; the network is closed.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
fix(host): movies play at 60 fps under any cap, and the pause menu at the refresh at mostto fix(host): movies and loads at 60 fps under any cap, the pause menu at the refresh at most@review
Recommendation: Request changes. It conflicts with its base branch: bring it up to date (
@​fixor@​rebasetry first). (L4) The reported runs show movies presenting at 60 fps instead of 240 on the tested Linux PC, with similar skipped-picture counts. The Steam Deck comparison and a Windows game run are still needed for the changed pacing.The change presents movies at 60 fps under any cap, limits ordinary loading screens to at most 60 fps, and limits pause and game-over screens to the display refresh when known. It reduces unnecessary presents, while raising movie presents above caps below 60 and potentially changing movie playback on slower systems.
Blocking (1): must change before merging.
@​fixor@​rebasetry first). (for the author)Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)
host/nn_vi.c:474: The original movie override addressed missed pictures on Steam Deck, where this new 60-present schedule has not been tested. When: A Deck whose movie update loop falls short of the movie's picture rate can skip more pictures than the existing 240 fps schedule; the desktop's results do not settle that case. Do: Compare repeated opening-movie runs on Steam Deck at the 60 cap against the merge base, including skipped pictures and playback speed. (@fixdoes its part first: Adjust or replace the catch-up scheduling if the Deck cannot sustain the movie's picture rate.)host/nn_vi.c:474: The changed platform pacing has not been exercised in a Windows game run. When: The Windows build compiles, but that does not show that its waits and presents maintain the intended cap and movie playback. Do: Run the title screen and opening movie on Windows at the 60 cap and check the present rate and playback.@fixcan do L2.Since the last review (on
63cc11af5f)Still open: L2 (The original movie override addressed missed pictures on Steam Deck, where this new 60-pre…); L3 (The changed platform pacing has not been exercised in a Windows game run.)
New: L4 (It conflicts with its base branch: bring it up to date (
@​fixor@​rebasetry first).)Checks: Still running: 11 checks.
Also noticed (2; not asked for, not blocking)
More: does it help, other systems, switches, what was read
Does it help: Yes for the present-rate fix on the tested Linux PC: the reported opening-movie median and maximum fell from 240 to 60 fps, with 6 pictures skipped on main and 5 and 12 in two runs here. The Steam Deck comparison remains missing, and the main measurement was not on this PR's base.
Other systems: The pacing affects Windows and Linux, movie playback, loading screens and pause screens. Windows host compilation is reported, but a Windows game run and the Steam Deck movie comparison remain outstanding. The pause limit has not been observed with a known display refresh; frame generation can also show more frames than the refresh.
Switches: HOS_MOVIE_PACE remains on by default; its behavior changes to raise the game's movie limiter under every cap and present movies at 60. HOS_MOVIE_PACE=0 retains the selected cap. The default's Steam Deck playback cost remains unverified.
Reviewed:
2c54d48747againstb77c2f4b3e: Read the repository rules and PR template, the diff and commits, and the current pacing and game input code; skimmed the changed tests and documentation. Other changed files and surrounding code were not all read in full.; nothing run (a code review).Checked and fine:
Testing: No commands that run project code or tests were executed. The author reports Linux game runs and Windows host compilation; the requested Steam Deck and Windows game runs remain outstanding.
Overlaps and merge order: Not checked; the network is closed.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
2c54d4874733a187644b33a187644b4b9e5315fdfix(host): movies and loads at 60 fps under any cap, the pause menu at the refresh at mostto fix(host): menus run at the display's refresh, movies and loads at 60 at most@review
Why the title-video numbers (measured on
7c9055d9) still hold on67fda193: none ofhost/nn_vi.c,host/nvn_native.c, the movie decoder orgpu/vk/present_pace.hchanged between them.gpu/vk/vk_replay.cppdid (#875, #2240 and others), so absolute skip counts may differ; they were not measured again.Recommendation: Approve. The code is ready: only testing is left. The reported runs show the intended pacing on the tested Linux system, but the new movie schedule still needs a Steam Deck comparison and a Windows game run. CI is also still running. Recommend approval; not approved on the forge.
Menus follow the display refresh, movies target 60 FPS, and loading screens are capped at 60 FPS. The change reduces unnecessary presents, with some additional title-video picture skips in the reported measurements.
Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)
host/nn_vi.c:474: The original movie override addressed missed pictures on Steam Deck, where this new 60-present schedule has not been tested. When: A Deck whose movie update loop falls short of the movie's picture rate can skip more pictures than the existing 240 fps schedule; the desktop's results do not settle that case. Do: Compare repeated opening-movie runs on Steam Deck at the 60 cap against the merge base, including skipped pictures and playback speed. (@fixdoes its part first: Adjust or replace the catch-up scheduling if the Deck cannot sustain the movie's picture rate.)host/nn_vi.c:474: The changed platform pacing has not been exercised in a Windows game run. When: The Windows build compiles, but that does not show that its waits and presents maintain the intended cap and movie playback. Do: Run the title screen and opening movie on Windows at the 60 cap and check the present rate and playback.@fixcan do L2.Since the last review (on
2c54d48747)Resolved: L4 (It conflicts with its base branch: bring it up to date (
@​fixor@​rebasetry first).)Still open: L2 (The original movie override addressed missed pictures on Steam Deck, where this new 60-pre…); L3 (The changed platform pacing has not been exercised in a Windows game run.)
Checks: Still running: 11 checks.
Also noticed (1; not asked for, not blocking)
More: does it help, other systems, switches, what was read
Does it help: Yes, on the tested system: the reported title rate fell from 240 to 120 FPS at a forced 120 Hz refresh, and movie playback stayed at 60 FPS under a 30 FPS cap. The title video skipped 26 and 15 pictures versus 16 and 6 on main across two runs of 5,947 pictures; these runs predate the final rebase.
Other systems: Steam Deck movie playback and Windows game pacing remain unverified. Real display refresh, frame generation, and other affected hardware also remain to be exercised.
Switches: HOS_MOVIE_PACE remains on by default, but now raises the game limiter during movies under any cap and targets 60 presents per second. Its off setting disables the movie override; the default still needs the Deck comparison.
Reviewed:
4b9e5315fdagainst67fda193c3: Read the repository guidance and pull request template, the pacing and menu changes, related status and refresh callers, and the supplied reports. Skimmed the test and documentation diffs; did not read every changed code file in full. The referenced Tooling AGENTS.md and docs/review-checklist.md are absent.; nothing run (a code review).Checked and fine:
Testing: No code or tests were run for this review. The supplied reports include Linux game runs and Windows host compilation; CI remains in progress.
Overlaps and merge order: Not checked; network access is closed.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
Steam Deck row from Still to test, measured against the newest nightly head.
Set-up. Deck LCD: AMD Custom APU 0405 (RDNA2,
AMD Custom GPU 0405 (RADV VANGOGH), 4 cores / 8 threads), SteamOS 3.9.5 (build 20261023.100), kernel 7.2.7-valve2, mesa RADV 26.1.99, Vulkan 1.4.350. The panel is 1280x800 at 60 Hz; the game ran in desktop mode in a window (swapchain 1152x718, 4 images, mailbox, V-Sync Auto), SDL3. The settings file is the same in both arms: the 60 cap (frame_rate_cap=0),vsync=0,frame_generation=0, the game's own upscaler, 2560x1440 output, the title screen and the opening not skipped. No overlays, no MangoHud, no Steam fps limit, sleep inhibited, nothing else running.Built on the Deck with
dev.py packs base / pack / rt, base67fda193(nightly-1116), the pack from this PR's head4b9e5315:v3.2.0-330-g67fda193v3.2.0-332-g4b9e5315p3164(7d3850c9and4b9e5315)Both runtimes were prepared before measuring. Every run goes through the repository's own control bridge (
scripts/longshot_ctl.py launch ... --env HOS_VIDEO_LOG=1) with the same script each arm: 150 s on the title screen, New Game (A, A), ride the opening movies, 40 s in Kokiri Forest, PLUS, 45 s, unpause. Two runs per arm, interleaved main / PR / PR / main. Each number below is the host's own line read back out of the run log (vk: N presents, X fpswindows,video: a movie of N pictures ...), not an outside counter.Menus follow the panel. presents/s per phase: the median window, the highest window, and how many windows are above 65.
The new path is the one taken here, not the headless fallback: the renderer reports
screen 1280x800 at 60 Hz, this PR logsvi: a menu is up: the game goes at 240, presents at the display's refresh(8 times a run, 25 in a longer title-only pair) andvi: a movie is playing: the game's limiter goes to 240 for it, presents are 60 a second, and main'svi: a movie is playing: the frame rate goes to 240 for it(5 a run, 12 in the longer pair) does not appear at all. Play is the same in both arms, so a Deck already running under the cap gives nothing up.The opening and the title screen at a 60 cap: skipped pictures, the host's own per-movie line.
A second pair with a longer title window (540 s on the title, no New Game press, so 11 movies and 32,241 pictures) went the other way: main 381 skipped (1.18%), this PR 232 (0.72%). main's own run-to-run spread (54, 104 and 381 pictures, and 9 then 43 on the opening movie) is wider than the gap between the arms, and the decode times say why: the worst single decode is 111 to 187 ms in every run, and 821 ms once on this PR's first title loop. So on this Deck the skipped pictures are not higher than main's in any consistent way, and they are not lower in a way I would bank either.
Picture and sound stayed together in both arms: every movie ended within 0.024 s of its own clock (worst -0.024 s on main, -0.019 s on this PR), and the longest gap between two pictures of the opening movie is 56 to 160 ms on main and 96 to 265 ms here.
What this run does not cover. The pause menu row: the PLUS press was queued (the bridge reports frames 22119 to 22127) but no
a menu is upline appears in the 45 s after it, and the bridge's window shot came back with a stale frame, so on Deck I can neither confirm the pause menu opened nor give its rate. The title screen and the file select are covered. A refresh other than 60 Hz, a cap of 30, and frame generation on are also not covered: this Deck's panel runs at 60 Hz, so at a 60 cap the menu row and the movie row land on the same number here.The measurements in the description are on
7c9055d9. The Deck numbers above are against the base this PR now sits on,67fda193, with this PR's head4b9e5315.@rebase
I rebased this pull request onto
main(6b21da7b48): the new head is85e05a76cd.Conflicts resolved
game/crates/longshot-game/src/menu_input.rs,game/game.hNothing was built or run: read the resolution before merging.
Automated rebase by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
4b9e5315fd85e05a76cdRecommendation: Request changes. It conflicts with its base branch: bring it up to date (
@​fixor@​rebasetry first). (L5) The Steam Deck comparison supports the new movie pacing, but a Windows game run is still needed to establish the changed pacing there.Menus follow the display refresh, movies present at 60 fps, and loading screens are capped at 60 fps. This reduces unnecessary presents, with a possible cost in title-video picture skips and higher menu or movie rates under low player caps.
Blocking (1): must change before merging.
@​fixor@​rebasetry first). (for the author)Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)
host/nn_vi.c:474: The changed platform pacing has not been exercised in a Windows game run. When: The Windows build compiles, but that does not show that its waits and presents maintain the intended cap and movie playback. Do: Run the title screen and opening movie on Windows at the 60 cap and check the present rate and playback.Since the last review (on
4b9e5315fd)Resolved: L2 (The original movie override addressed missed pictures on Steam Deck, where this new 60-pre…)
Still open: L3 (The changed platform pacing has not been exercised in a Windows game run.)
New: L5 (It conflicts with its base branch: bring it up to date (
@​fixor@​rebasetry first).)Checks: Still running: 11 checks.
Also noticed (2; not asked for, not blocking)
More: does it help, other systems, switches, what was read
Does it help: Yes for the reported pacing problem: on Steam Deck, title and opening-movie presents stayed near 60 fps with the change, versus peaks of 177.3 and 172.2 fps on main. Skipped-picture counts varied between runs, with no consistent increase in the reported comparison.
Other systems: The reported Steam Deck run covers AMD RADV and a real 60 Hz display; the author's headless Linux run covers NVIDIA. Windows gameplay and frame generation in menus remain untested.
Switches: HOS_MOVIE_PACE remains enabled by default; its enabled behavior now raises the game limiter during movies under any cap and presents at 60 fps. Setting it to 0 retains cap-based movie pacing. The switch documentation is updated.
Reviewed:
85e05a76cdagainst6b21da7b48: Read AGENTS.md and CONTRIBUTING.md; inspected the diff, commit list, pacing policy and changed rebase lines, and searched the menu and refresh-rate callers. The large diff output was truncated, and the changed code files were not all read in full.; nothing run (a code review).Checked and fine:
Testing: No commands that build, test or run project code were executed. The supplied CI checks are still running; the reported Steam Deck and Linux runs were reviewed.
Overlaps and merge order: Not established from the supplied information.
Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its rebase. Nothing was run; a maintainer decides.
@rebase
I rebased this pull request onto
main(3f22b6bd63): the new head is0af6daa889.Conflicts resolved
gpu/vk/vk_replay.cpp,host/rx_backend.cNothing was built or run: read the resolution before merging.
Automated rebase by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
85e05a76cd0af6daa889Recommendation: Approve. The code is ready: only testing is left. The pacing change has shown the intended behavior on Linux and Steam Deck, but Forgejo still reports the pull request as unmergeable. A Windows game run is also still needed. Recommend approval; not approved on the forge.
Menus follow the display refresh, movies present at 60 fps, and loading is limited to the cap or 60 fps. The change reduces excessive presentation but can increase title-video skips and menu power use.
Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)
host/nn_vi.c:474: The changed platform pacing has not been exercised in a Windows game run. When: The Windows build compiles, but that does not show that its waits and presents maintain the intended cap and movie playback. Do: Run the title screen and opening movie on Windows at the 60 cap and check the present rate and playback.Since the last review (on
85e05a76cd)Resolved: L5 (It conflicts with its base branch: bring it up to date (
@​fixor@​rebasetry first).)Still open: L3 (The changed platform pacing has not been exercised in a Windows game run.)
Checks: Still running: 11 checks.
Also noticed (1; not asked for, not blocking)
More: does it help, other systems, switches, what was read
Does it help: Yes. The Steam Deck comparison reported title presentation at about 60 fps with the change, versus peaks of 158–177 fps on main; opening movies also stayed near 60 fps. Title-video skip counts varied between runs, so a consistent change in skips was not established.
Other systems: Linux headless and Steam Deck game runs are reported. Windows host compilation passed, but Windows pacing has not been exercised in a game run. Frame generation in menus remains untested.
Switches: No switch added or removed; the pacing switch documentation was updated.
Reviewed:
0af6daa889against3f22b6bd63: Read the repository rules and pull request template, the changed API and backend diff, and the pacing diff in part. Skimmed the remaining changed files and tests; the full changed code was not read.; nothing run (a code review).Checked and fine:
Testing: No commands that build, test, or run project code were executed. The reported Windows compile passed; CI is still running.
Overlaps and merge order: None identified.
Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its rebase. Nothing was run; a maintainer decides.