fix(vk): frame generation's fixed multipliers on the game's timeline under V-Sync On (FIFO) too #1442

Merged
HumanBean merged 5 commits from pmwork-personal/Longshot:fix/fg-fifo-paced into main 2026-11-17 21:48:19 +00:00
Member

Type: fix · Risk: medium · Tested on: Windows 11, RTX 5090 (NVIDIA 621.24) · Needs: Windows with another NVIDIA card (RTX 40), AMD and Intel, a fixed-refresh display with V-Sync On, Linux

On main since #1362 merged: rebased onto main e8e92f97, this PR's own commits only (b168de50 the code, c50d1993 the hint
and docs, 024e7432 the tested rows, 42252930 the review's fixes), plus 09e3e113 from HumanBean's review: one set's images
under FIFO when the display's refresh is unknown, and the game frame's handover-to-present time in the log, for the latency A/B.

Why

With V-Sync On (and V-Sync Auto, which is FIFO while DLSS Frame Gen makes the frames), a fixed multiplier's set still
went out as it came: FIFO showed its frames one a refresh, and the set's last frame stayed on the screen until the next
set came. The motion is uneven (3x at 60 fps on a 240 Hz G-Sync display: 4.2, 4.2 and 8.3 ms a frame), and at the
display's limit main loses frames: at 3x with a 60 cap on 165 Hz it ran at 51-53 fps, with frames on the screen up to
15-17 ms (p99) instead of one refresh.

#1362 shows a set's frames at their own times where the swapchain does not wait for a refresh. This PR does the same
under FIFO, where at most one frame can go out each refresh.

See #315.

How to reproduce

Seen on: Windows 11 Pro build 26300, RTX 5090, NVIDIA 621.24 (32.0.16.2124), 5120x2160 at 165 Hz with G-Sync
Settings and switches: V-Sync On (or Auto with DLSS Frame Gen), Frame generation 3x (Frame generation by: Auto,
DLSS FG), Frame pacing Off (its default)
Steps: in play, turn the camera at an even speed; for numbers, run PresentMon on longshot.exe.
Expected: each frame on the screen for about the same time (one or a few refreshes, as the frame rate asks).
Actual: on main the frames' times on the screen vary (sd 2.3-2.5 ms at 3x, V-Sync On), and at the refresh limit
the game drops to 51-53 fps with frames shown up to 15-17 ms.

What changed

A fixed multiplier's set is now shown on the game's timeline in every present mode. Under FIFO each frame goes at its
due time but no sooner than a refresh after the frame before was given, so the frames never queue up in the swapchain
and the next set's copies never wait behind them. RX_VK_FG_TIMELINE=0 still gives main's behaviour back.

  • gpu/vk/vk_framegen.cpp: fixed_on_timeline no longer leaves FIFO out; fifo_slot (new) gives a frame its time
    under FIFO: its due time, but not sooner than a refresh after the slot the frame before was given, the slots a refresh
    apart from the last one given (as Auto's), and again from now when more than half a refresh behind (the display thread
    held up). In display_main: the display's refresh per set (Taken.refresh), a present late by over 1 ms past its slot
    is the next one's slot, a present that is not shown gives its slot back, a frame under FIFO is late against its slot,
    and the log's second frame interpolation: line counts the frames held to a slot.
  • gpu/vk/vk_main.cpp create_swapchain: two sets' images under FIFO too (with #1362's slot per frame of both sets,
    and at most kPresentSlotsMax over the least), so the next set is taken early there as well: with one set's, its
    copies went once the set before was shown, behind the game's next frame. Under FIFO a set too big for the chain (an
    NVIDIA surface: 7x and 8x) keeps one set's, as main: more images there only deepen FIFO's queue.
    RX_VK_FG_TIMELINE=0: one set's and 3 slots, as main. create_device's comment says the present
    queue is off by default, and what it did under FIFO.
  • the Frame pacing hint (Off and On, 13 languages), the README, docs/development.md, gpu/vk/switches.def: the fixed
    multipliers keep their own times in every mode ("With V-Sync Off" goes); as on #1362, the hint does not send players
    to RX_VK_PRESENT_QUEUE, which the README and docs/development.md keep. docs/design.md section 13 is now "Frame
    generation's presents, as rules" (rule 2: FIFO and fifo_slot); its anchor's new name is in the five // doc: lines,
    tests/test_doc_anchors.py and the measure skill.
  • tests/test_framegen_fixed_pace.py: a model of a VRR display under FIFO (one present a refresh, three sets, a late wake)
    next to #1362's V-Sync Off model: 3x at 60 fps on 240 Hz shows each frame as far after the one before as its picture; a
    late set goes out a refresh apart, never two presents waiting; game frames 10 and 20 ms apart at 3x on 165 Hz are
    shown each when presented, the game held at 55 fps.

This joins the FIFO work of an earlier branch onto #1362: that branch also left late made frames out (a drop), which #1362
removed. With the drop, the refresh limit failed (the game ran at its 60 cap and threw away 80-120 made frames per 5 s:
two-refresh gaps); without it the game is held at the limit, as below.

Measurements

Verdict: better than main in all three cases. At the refresh limit (3x, cap 60) the frames' times on the screen
went from sd 1.6-2.2 ms to 0.1-0.3 ms and the game from 51-53 to 55 fps; with V-Sync On at 3x (the tester's settings),
sd 2.3-2.5 to 0.7 ms, p99 18 to 8-9 ms, and the game from 50 to 54 fps; at 2x with a 60 cap, the animation error from
3.9-4.1 to 2.3-2.5 ms and the latency from 14.2 to 11.2 ms.

Hardware: Windows 11 Pro build 26300, RTX 5090, NVIDIA 621.24, AMD Ryzen 7 9800X3D, 64 GB
Scene: Hyrule Market (child), a saved spot where the camera can turn; 5120x2160 at 165 Hz with G-Sync, fullscreen, DLSS
frame generation (DLSS-G made every frame in play), Reflex On + Boost. D3: V-Sync Auto, 3x, cap 60, DLSS Performance
(180 frames a second asked of 165 Hz: the refresh limit). A: V-Sync On, 3x, uncapped, DLAA (the tester's own). D2: V-Sync
Auto, 2x, cap 60, DLSS Performance (120 a second).
Method: main at #1362's base and this PR, each a dev_packs.py pack on one base (nightly-396 @ 7887c497), a warm-up of
each, then main and this PR in turn: D3 three runs a side, A and D2 two a side (2026-11-17 10:34 to 10:52). The control
bridge turns the camera with the right stick (60 degrees a second) for 30 s; PresentMon 2.3.0 on longshot.exe for 26 s
of it. Columns from PresentMon's CSV: frames shown a second, the game's fps (that over the multiplier), DisplayedTime's
sd and p99, far = frames more than 35% off the mean, the sd of AnimationError, DisplayLatency's median. Each run's
number is shown. The head, 2d3bc77b, adds the review's fixes after the measured 1a854a3e (= 80186012), not run on the screen: the late count under
FIFO (the log only), one set's images under FIFO for 7x and 8x (not measured here), the display's refresh asked after a
set's copies instead of before (once a second, a call to Windows no longer in the first copy's time), the test model and
comments; at 2x and 3x what is shown does not change. Since the runs, #1362 took main 67efc4d3 in (a merge) and this PR
is rebased onto it: main's #1309 deleted RX_VK_PRESENT_AHEAD, whose default (a set's copies together) the runs used, and
is otherwise a refactor its own runs measured as no change in fps.
How to reproduce: the settings above, a save at a spot to turn the camera, PresentMon 2.x --process_name longshot.exe --timed 26 --terminate_after_timed --output_file <csv>. Rows: docs/tested/2026-11-17-fg-fifo-*.md.

Before: main @ 544229a2 After: this PR @ 1a854a3e
D3: game fps 52.6 / 52.2 / 50.8 54.9 / 54.9 / 55.0
D3: DisplayedTime sd, ms 1.57 / 1.78 / 2.24 0.23 / 0.30 / 0.08
D3: p99, ms 14.95 / 15.70 / 17.16 6.23 / 6.23 / 6.25
D3: far % 3.2 / 3.6 / 5.3 0.2 / 0.2 / 0.0
D3: animation error sd, ms 2.12 / 2.22 / 2.75 0.32 / 0.43 / 0.15
A: game fps 50.5 / 50.0 54.4 / 54.4
A: DisplayedTime sd, ms 2.26 / 2.47 0.67 / 0.66
A: p99, ms 18.21 / 18.30 8.70 / 8.26
A: far % 4.9 / 5.5 1.2 / 1.0
A: animation error sd, ms 2.68 / 2.66 0.81 / 0.85
D2: DisplayedTime sd, ms 2.79 / 2.65 2.41 / 2.52
D2: far % 16.1 / 16.0 14.3 / 16.0
D2: animation error sd, ms 4.08 / 3.94 2.33 / 2.47
D2: latency (DisplayLatency median), ms 14.2 / 14.2 11.2 / 11.3
run      shown/s game fps  mean    sd   p10   p90   p99  far% anim sd   lat
r6D3-main1   157.8     52.6  6.34  1.57  6.03  6.09 14.95   3.2    2.12  11.8
r6D3-pr1   164.7     54.9  6.07  0.23  6.03  6.09  6.23   0.2    0.32  11.8
r6D3-main2   156.6     52.2  6.39  1.78  6.03  6.09 15.70   3.6    2.22  11.8
r6D3-pr2   164.7     54.9  6.07  0.30  6.03  6.09  6.23   0.2    0.43  11.8
r6D3-main3   152.5     50.8  6.56  2.24  6.03  6.10 17.16   5.3    2.75  11.8
r6D3-pr3   164.9     55.0  6.06  0.08  6.03  6.09  6.25   0.0    0.15  11.8
r6A-main1   151.5     50.5  6.60  2.26  5.94  6.50 18.21   4.9    2.68  11.8
r6A-pr1    163.1     54.4  6.13  0.67  5.95  6.18  8.70   1.2    0.81  11.8
r6A-main2   149.9     50.0  6.67  2.47  5.95  6.24 18.30   5.5    2.66  11.8
r6A-pr2    163.2     54.4  6.13  0.66  5.95  6.17  8.26   1.0    0.85  11.8
r6D2-main1   119.9     60.0  8.34  2.79  5.88 11.60 14.28  16.1    4.08  14.2
r6D2-pr1   120.0     60.0  8.33  2.41  5.90 12.27 13.86  14.3    2.33  11.2
r6D2-main2   120.0     60.0  8.33  2.65  5.88 11.62 13.83  16.0    3.94  14.2
r6D2-pr2   120.0     60.0  8.33  2.52  5.90 12.32 14.39  16.0    2.47  11.3

(this PR, A, r6A-pr1's log)
vk: frame interpolation: 822 frames shown on time, 0 late (over 2 ms); shown apart: <2 ms 0, 2-7 808, 7-9 14, 9-12 0, 12-17 0, 17-25 0, over 25 0
vk: frame interpolation: 274 sets on the game's timeline, 272 taken early, 189 with copies later than they came (left out of the GPU's delay), 788 frames held to a refresh after the one before (FIFO); first copies done 12.5 ms after their game frame (seen within 2 ms), 14.9 ms past their lead for the GPU (RX_VK_FG_TIMELINE=0: off)

Flags and settings

No new switch. RX_VK_FG_TIMELINE (from #1362) now also covers FIFO; its row and docs say so.

Flag What it is Before this PR After this PR Effect Helps / doesn't help / untested Recommendation
RX_VK_FG_TIMELINE env, renderer on: V-Sync Off and mailbox only on: every present mode; =0 off =0: the sets, images and slots as main in every mode helps: the table (RTX 5090, FIFO, 2x and 3x); untested elsewhere on for everyone; =0 for an A/B

Testing

Tested:

  • Game-free: python -I -B tests/run_all.py on 0c552c97 (Windows, llvm-mingw): 630 passed, 46 failed, 47 skipped. All 46
    fail on main on this PC too: they call g++ or setenv, read Linux paths, or check things this PC lacks
    (test_tested_configurations: a Windows pipe's line ends). Four (fastfp_fma, fpx_sticky, spawn_emit,
    finish_output) pass or fail from run to run on this PC, on main as here. tests/test_framegen_fixed_pace.py (new)
    and the checks that cut the changed sources pass; so do test_switch_table and test_vk_swapchain_compat since
    main 67efc4d3.

    The 46, each failing on main too

    auto_handheld bug_report bug_report_defaults cpu_report crash_dialog crash_groups crt_options damage_debug_menu
    display_startup_failure dlss_feature_size failed_compile_keeps_objects finish_output framegen_preset
    fsr_uniform_ownership guest_imported hardware_report hud_layout_row import_reach invalidate_vcore job_queue
    linux_preflight linux_pressure mirror_budget missing_nup pads_after_menu parallel_init_order pending_guest_import
    perf_report pipeline_play_cache portable_builder_startup present_thread profiling_mode readback_timeout_source
    recorder_sync replay_write_order rumble_menu run_all_changed slow_frames staging_burst target_image_pool
    tested_configurations upscaler_round_trip upscaler_rows vcore_escape vk_occlusion_queries walk_key

  • A cold review of this PR's commits by a second agent: nothing that can wait forever or hold the game more than main,
    no overflow, no fault at a mode change or a failed present, RX_VK_FG_TIMELINE=0 as main. Its findings, fixed in
    2d3bc77b: the late count under FIFO missed late frames; 7x and 8x under FIFO got two sets' images, which only deepened
    FIFO's queue (two refreshes more delay); the refresh query counted in the first copy's time; the test's FIFO model fed
    back every set where the code feeds back none at the refresh limit (the case now runs both ways); two stale comments.

  • In the game, Windows 11, RTX 5090, NVIDIA 621.24, 5120x2160 at 165 Hz with G-Sync: the runs above.

Not tested: the head's fixes on the screen (2d3bc77b, above); a fixed-refresh display with V-Sync On (frames round to
whole refreshes there; fifo_slot keeps them a refresh apart at least); a display whose refresh Windows does not report
(no fifo_slot spacing then: the frames go as on main); 4x and up under FIFO; FSR 3.1 frame generation and the built-in maker under FIFO; AMD, Intel and
RTX 40 cards; Linux; the present queue under FIFO in this branch (the earlier branch measured it: animation error 2.98 ->
1.65 ms at V-Sync On 3x).

Must be tested:

  • Windows, an RTX 40 card: V-Sync On, Frame generation 3x, turn the camera; expecting the frames evenly on the screen and
    the log's second frame interpolation: line counting frames held to a refresh (Test Farm: @Beanstalk windows nvidia,
    V-Sync On with DLSS frame generation at 3x, the camera turning; PresentMon against main)
  • AMD on Windows and Linux (FSR 3.1 FG) with V-Sync On at 2x and 3x: the same (Test Farm: @Beanstalk amd windows and amd
    linux)
  • A fixed-refresh display (no G-Sync or FreeSync) with V-Sync On at 2x and 3x: even motion, no frame held two refreshes
    more often than on main (by hand: a tester with such a display)

Risks

What could break: frame generation under FIFO (V-Sync On, and Auto with DLSS Frame Gen) with a fixed multiplier: each
frame now waits for its time and its refresh slot, so the game's frame is shown about made / (made + 1) of a game frame
later than on main (in these runs the latency stayed the same or went down: 11.8 ms at 3x, 14.2 -> 11.2 ms at 2x); the
swapchain asks for two sets' images under FIFO (an NVIDIA surface: 8 from 3x up, 6 at 2x); a display whose refresh the
system reports wrong would get its slots too far apart or too close.

Turning it off: RX_VK_FG_TIMELINE=0 (the sets, images and slots as on main in every mode).

Compatibility: Nothing changes: no save, longshot_options.ini key, cache or vk ABI change.

Issues

See #315

Checklist

Everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description) of the status line's type.
  • Why gives the reason plainly and links the issues that fit (the tracker searched).
  • Tested on my own PC where it runs (in the game, for a change the game runs), as Testing's Tested says; what
    can't be run by hand is in Testing's Not testable by hand, with why.
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Nothing gets worse that I know of: any cost (speed, latency, memory, a setup that worked before) is measured and
    in Risks. Not ticked yet: Risks names extra swapchain images under FIFO, a memory cost with no measurement.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main.
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named).
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • Numbers from the same PC, scene and settings, at least 2 interleaved runs each, the median reported.
  • Switches documented (docs/development.md; the README for a menu row) and shipped at their recommended value.
  • A file in docs/tested/ for each new measured run (format in docs/tested-configurations.md).
  • A check under tests/ that reads changed source updated in this PR, not weakened.
  • Docs updated.

🤖 Generated with Claude Code

**Type:** fix · **Risk:** medium · **Tested on:** Windows 11, RTX 5090 (NVIDIA 621.24) · **Needs:** Windows with another NVIDIA card (RTX 40), AMD and Intel, a fixed-refresh display with V-Sync On, Linux On main since #1362 merged: rebased onto main e8e92f97, this PR's own commits only (b168de50 the code, c50d1993 the hint and docs, 024e7432 the tested rows, 42252930 the review's fixes), plus 09e3e113 from HumanBean's review: one set's images under FIFO when the display's refresh is unknown, and the game frame's handover-to-present time in the log, for the latency A/B. ## Why With V-Sync On (and V-Sync Auto, which is FIFO while DLSS Frame Gen makes the frames), a fixed multiplier's set still went out as it came: FIFO showed its frames one a refresh, and the set's last frame stayed on the screen until the next set came. The motion is uneven (3x at 60 fps on a 240 Hz G-Sync display: 4.2, 4.2 and 8.3 ms a frame), and at the display's limit main loses frames: at 3x with a 60 cap on 165 Hz it ran at 51-53 fps, with frames on the screen up to 15-17 ms (p99) instead of one refresh. #1362 shows a set's frames at their own times where the swapchain does not wait for a refresh. This PR does the same under FIFO, where at most one frame can go out each refresh. See #315. ## How to reproduce **Seen on:** Windows 11 Pro build 26300, RTX 5090, NVIDIA 621.24 (32.0.16.2124), 5120x2160 at 165 Hz with G-Sync **Settings and switches:** V-Sync On (or Auto with DLSS Frame Gen), Frame generation 3x (Frame generation by: Auto, DLSS FG), Frame pacing Off (its default) **Steps:** in play, turn the camera at an even speed; for numbers, run PresentMon on `longshot.exe`. **Expected:** each frame on the screen for about the same time (one or a few refreshes, as the frame rate asks). **Actual:** on main the frames' times on the screen vary (sd 2.3-2.5 ms at 3x, V-Sync On), and at the refresh limit the game drops to 51-53 fps with frames shown up to 15-17 ms. ## What changed A fixed multiplier's set is now shown on the game's timeline in every present mode. Under FIFO each frame goes at its due time but no sooner than a refresh after the frame before was given, so the frames never queue up in the swapchain and the next set's copies never wait behind them. `RX_VK_FG_TIMELINE=0` still gives main's behaviour back. - `gpu/vk/vk_framegen.cpp`: `fixed_on_timeline` no longer leaves FIFO out; `fifo_slot` (new) gives a frame its time under FIFO: its due time, but not sooner than a refresh after the slot the frame before was given, the slots a refresh apart from the last one given (as Auto's), and again from now when more than half a refresh behind (the display thread held up). In `display_main`: the display's refresh per set (`Taken.refresh`), a present late by over 1 ms past its slot is the next one's slot, a present that is not shown gives its slot back, a frame under FIFO is late against its slot, and the log's second `frame interpolation:` line counts the frames held to a slot. - `gpu/vk/vk_main.cpp` `create_swapchain`: two sets' images under FIFO too (with #1362's slot per frame of both sets, and at most `kPresentSlotsMax` over the least), so the next set is taken early there as well: with one set's, its copies went once the set before was shown, behind the game's next frame. Under FIFO a set too big for the chain (an NVIDIA surface: 7x and 8x) keeps one set's, as main: more images there only deepen FIFO's queue. `RX_VK_FG_TIMELINE=0`: one set's and 3 slots, as main. `create_device`'s comment says the present queue is off by default, and what it did under FIFO. - the Frame pacing hint (Off and On, 13 languages), the README, `docs/development.md`, `gpu/vk/switches.def`: the fixed multipliers keep their own times in every mode ("With V-Sync Off" goes); as on #1362, the hint does not send players to `RX_VK_PRESENT_QUEUE`, which the README and `docs/development.md` keep. `docs/design.md` section 13 is now "Frame generation's presents, as rules" (rule 2: FIFO and `fifo_slot`); its anchor's new name is in the five `// doc:` lines, `tests/test_doc_anchors.py` and the measure skill. - `tests/test_framegen_fixed_pace.py`: a model of a VRR display under FIFO (one present a refresh, three sets, a late wake) next to #1362's V-Sync Off model: 3x at 60 fps on 240 Hz shows each frame as far after the one before as its picture; a late set goes out a refresh apart, never two presents waiting; game frames 10 and 20 ms apart at 3x on 165 Hz are shown each when presented, the game held at 55 fps. This joins the FIFO work of an earlier branch onto #1362: that branch also left late made frames out (a drop), which #1362 removed. With the drop, the refresh limit failed (the game ran at its 60 cap and threw away 80-120 made frames per 5 s: two-refresh gaps); without it the game is held at the limit, as below. ## Measurements **Verdict:** better than main in all three cases. At the refresh limit (3x, cap 60) the frames' times on the screen went from sd 1.6-2.2 ms to 0.1-0.3 ms and the game from 51-53 to 55 fps; with V-Sync On at 3x (the tester's settings), sd 2.3-2.5 to 0.7 ms, p99 18 to 8-9 ms, and the game from 50 to 54 fps; at 2x with a 60 cap, the animation error from 3.9-4.1 to 2.3-2.5 ms and the latency from 14.2 to 11.2 ms. Hardware: Windows 11 Pro build 26300, RTX 5090, NVIDIA 621.24, AMD Ryzen 7 9800X3D, 64 GB Scene: Hyrule Market (child), a saved spot where the camera can turn; 5120x2160 at 165 Hz with G-Sync, fullscreen, DLSS frame generation (DLSS-G made every frame in play), Reflex On + Boost. D3: V-Sync Auto, 3x, cap 60, DLSS Performance (180 frames a second asked of 165 Hz: the refresh limit). A: V-Sync On, 3x, uncapped, DLAA (the tester's own). D2: V-Sync Auto, 2x, cap 60, DLSS Performance (120 a second). Method: main at #1362's base and this PR, each a `dev_packs.py` pack on one base (nightly-396 @ 7887c497), a warm-up of each, then main and this PR in turn: D3 three runs a side, A and D2 two a side (2026-11-17 10:34 to 10:52). The control bridge turns the camera with the right stick (60 degrees a second) for 30 s; PresentMon 2.3.0 on `longshot.exe` for 26 s of it. Columns from PresentMon's CSV: frames shown a second, the game's fps (that over the multiplier), `DisplayedTime`'s sd and p99, far = frames more than 35% off the mean, the sd of `AnimationError`, `DisplayLatency`'s median. Each run's number is shown. The head, 2d3bc77b, adds the review's fixes after the measured 1a854a3e (= 80186012), not run on the screen: the late count under FIFO (the log only), one set's images under FIFO for 7x and 8x (not measured here), the display's refresh asked after a set's copies instead of before (once a second, a call to Windows no longer in the first copy's time), the test model and comments; at 2x and 3x what is shown does not change. Since the runs, #1362 took main 67efc4d3 in (a merge) and this PR is rebased onto it: main's #1309 deleted RX_VK_PRESENT_AHEAD, whose default (a set's copies together) the runs used, and is otherwise a refactor its own runs measured as no change in fps. How to reproduce: the settings above, a save at a spot to turn the camera, PresentMon 2.x `--process_name longshot.exe --timed 26 --terminate_after_timed --output_file <csv>`. Rows: `docs/tested/2026-11-17-fg-fifo-*.md`. | | Before: main @ 544229a2 | After: this PR @ 1a854a3e | |---|---|---| | D3: game fps | 52.6 / 52.2 / 50.8 | 54.9 / 54.9 / 55.0 | | D3: `DisplayedTime` sd, ms | 1.57 / 1.78 / 2.24 | 0.23 / 0.30 / 0.08 | | D3: p99, ms | 14.95 / 15.70 / 17.16 | 6.23 / 6.23 / 6.25 | | D3: far % | 3.2 / 3.6 / 5.3 | 0.2 / 0.2 / 0.0 | | D3: animation error sd, ms | 2.12 / 2.22 / 2.75 | 0.32 / 0.43 / 0.15 | | A: game fps | 50.5 / 50.0 | 54.4 / 54.4 | | A: `DisplayedTime` sd, ms | 2.26 / 2.47 | 0.67 / 0.66 | | A: p99, ms | 18.21 / 18.30 | 8.70 / 8.26 | | A: far % | 4.9 / 5.5 | 1.2 / 1.0 | | A: animation error sd, ms | 2.68 / 2.66 | 0.81 / 0.85 | | D2: `DisplayedTime` sd, ms | 2.79 / 2.65 | 2.41 / 2.52 | | D2: far % | 16.1 / 16.0 | 14.3 / 16.0 | | D2: animation error sd, ms | 4.08 / 3.94 | 2.33 / 2.47 | | D2: latency (`DisplayLatency` median), ms | 14.2 / 14.2 | 11.2 / 11.3 | ``` run shown/s game fps mean sd p10 p90 p99 far% anim sd lat r6D3-main1 157.8 52.6 6.34 1.57 6.03 6.09 14.95 3.2 2.12 11.8 r6D3-pr1 164.7 54.9 6.07 0.23 6.03 6.09 6.23 0.2 0.32 11.8 r6D3-main2 156.6 52.2 6.39 1.78 6.03 6.09 15.70 3.6 2.22 11.8 r6D3-pr2 164.7 54.9 6.07 0.30 6.03 6.09 6.23 0.2 0.43 11.8 r6D3-main3 152.5 50.8 6.56 2.24 6.03 6.10 17.16 5.3 2.75 11.8 r6D3-pr3 164.9 55.0 6.06 0.08 6.03 6.09 6.25 0.0 0.15 11.8 r6A-main1 151.5 50.5 6.60 2.26 5.94 6.50 18.21 4.9 2.68 11.8 r6A-pr1 163.1 54.4 6.13 0.67 5.95 6.18 8.70 1.2 0.81 11.8 r6A-main2 149.9 50.0 6.67 2.47 5.95 6.24 18.30 5.5 2.66 11.8 r6A-pr2 163.2 54.4 6.13 0.66 5.95 6.17 8.26 1.0 0.85 11.8 r6D2-main1 119.9 60.0 8.34 2.79 5.88 11.60 14.28 16.1 4.08 14.2 r6D2-pr1 120.0 60.0 8.33 2.41 5.90 12.27 13.86 14.3 2.33 11.2 r6D2-main2 120.0 60.0 8.33 2.65 5.88 11.62 13.83 16.0 3.94 14.2 r6D2-pr2 120.0 60.0 8.33 2.52 5.90 12.32 14.39 16.0 2.47 11.3 (this PR, A, r6A-pr1's log) vk: frame interpolation: 822 frames shown on time, 0 late (over 2 ms); shown apart: <2 ms 0, 2-7 808, 7-9 14, 9-12 0, 12-17 0, 17-25 0, over 25 0 vk: frame interpolation: 274 sets on the game's timeline, 272 taken early, 189 with copies later than they came (left out of the GPU's delay), 788 frames held to a refresh after the one before (FIFO); first copies done 12.5 ms after their game frame (seen within 2 ms), 14.9 ms past their lead for the GPU (RX_VK_FG_TIMELINE=0: off) ``` ### Flags and settings No new switch. `RX_VK_FG_TIMELINE` (from #1362) now also covers FIFO; its row and docs say so. | Flag | What it is | Before this PR | After this PR | Effect | Helps / doesn't help / untested | Recommendation | |---|---|---|---|---|---|---| | `RX_VK_FG_TIMELINE` | env, renderer | on: V-Sync Off and mailbox only | on: every present mode; `=0` off | `=0`: the sets, images and slots as main in every mode | helps: the table (RTX 5090, FIFO, 2x and 3x); untested elsewhere | on for everyone; `=0` for an A/B | ## Testing **Tested:** - Game-free: `python -I -B tests/run_all.py` on 0c552c97 (Windows, llvm-mingw): 630 passed, 46 failed, 47 skipped. All 46 fail on main on this PC too: they call `g++` or `setenv`, read Linux paths, or check things this PC lacks (`test_tested_configurations`: a Windows pipe's line ends). Four (`fastfp_fma`, `fpx_sticky`, `spawn_emit`, `finish_output`) pass or fail from run to run on this PC, on main as here. `tests/test_framegen_fixed_pace.py` (new) and the checks that cut the changed sources pass; so do `test_switch_table` and `test_vk_swapchain_compat` since main 67efc4d3. <details><summary>The 46, each failing on main too</summary> auto_handheld bug_report bug_report_defaults cpu_report crash_dialog crash_groups crt_options damage_debug_menu display_startup_failure dlss_feature_size failed_compile_keeps_objects finish_output framegen_preset fsr_uniform_ownership guest_imported hardware_report hud_layout_row import_reach invalidate_vcore job_queue linux_preflight linux_pressure mirror_budget missing_nup pads_after_menu parallel_init_order pending_guest_import perf_report pipeline_play_cache portable_builder_startup present_thread profiling_mode readback_timeout_source recorder_sync replay_write_order rumble_menu run_all_changed slow_frames staging_burst target_image_pool tested_configurations upscaler_round_trip upscaler_rows vcore_escape vk_occlusion_queries walk_key </details> - A cold review of this PR's commits by a second agent: nothing that can wait forever or hold the game more than main, no overflow, no fault at a mode change or a failed present, `RX_VK_FG_TIMELINE=0` as main. Its findings, fixed in 2d3bc77b: the late count under FIFO missed late frames; 7x and 8x under FIFO got two sets' images, which only deepened FIFO's queue (two refreshes more delay); the refresh query counted in the first copy's time; the test's FIFO model fed back every set where the code feeds back none at the refresh limit (the case now runs both ways); two stale comments. - In the game, Windows 11, RTX 5090, NVIDIA 621.24, 5120x2160 at 165 Hz with G-Sync: the runs above. **Not tested:** the head's fixes on the screen (2d3bc77b, above); a fixed-refresh display with V-Sync On (frames round to whole refreshes there; `fifo_slot` keeps them a refresh apart at least); a display whose refresh Windows does not report (no `fifo_slot` spacing then: the frames go as on main); 4x and up under FIFO; FSR 3.1 frame generation and the built-in maker under FIFO; AMD, Intel and RTX 40 cards; Linux; the present queue under FIFO in this branch (the earlier branch measured it: animation error 2.98 -> 1.65 ms at V-Sync On 3x). **Must be tested:** - Windows, an RTX 40 card: V-Sync On, Frame generation 3x, turn the camera; expecting the frames evenly on the screen and the log's second `frame interpolation:` line counting frames held to a refresh (Test Farm: @Beanstalk windows nvidia, V-Sync On with DLSS frame generation at 3x, the camera turning; PresentMon against main) - AMD on Windows and Linux (FSR 3.1 FG) with V-Sync On at 2x and 3x: the same (Test Farm: @Beanstalk amd windows and amd linux) - A fixed-refresh display (no G-Sync or FreeSync) with V-Sync On at 2x and 3x: even motion, no frame held two refreshes more often than on main (by hand: a tester with such a display) ## Risks **What could break:** frame generation under FIFO (V-Sync On, and Auto with DLSS Frame Gen) with a fixed multiplier: each frame now waits for its time and its refresh slot, so the game's frame is shown about made / (made + 1) of a game frame later than on main (in these runs the latency stayed the same or went down: 11.8 ms at 3x, 14.2 -> 11.2 ms at 2x); the swapchain asks for two sets' images under FIFO (an NVIDIA surface: 8 from 3x up, 6 at 2x); a display whose refresh the system reports wrong would get its slots too far apart or too close. **Turning it off:** `RX_VK_FG_TIMELINE=0` (the sets, images and slots as on main in every mode). **Compatibility:** Nothing changes: no save, `longshot_options.ini` key, cache or vk ABI change. ## Issues See #315 ## Checklist ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (the tracker searched). - [x] Tested on my own PC where it runs (in the game, for a change the game runs), as Testing's Tested says; what can't be run by hand is in Testing's Not testable by hand, with why. - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [ ] Nothing gets worse that I know of: any cost (speed, latency, memory, a setup that worked before) is measured and in Risks. Not ticked yet: Risks names extra swapchain images under FIFO, a memory cost with no measurement. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [x] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] Numbers from the same PC, scene and settings, at least 2 interleaved runs each, the median reported. - [x] Switches documented (docs/development.md; the README for a menu row) and shipped at their recommended value. - [x] A file in `docs/tested/` for each new measured run (format in `docs/tested-configurations.md`). - [x] A check under `tests/` that reads changed source updated in this PR, not weakened. - [x] Docs updated. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
With V-Sync Off and Frame pacing Off (its default), the display thread presented a fixed multiplier's set as it came:
its two made frames and the game's within a millisecond of each other. An immediate swapchain shows each present at
once, so the screen showed the game's frame and hardly the made ones: DLSS Frame Gen 3x at V-Sync Off looked like the
game's own frame rate (RTX 5090, 5120x2160 at 165 Hz with G-Sync, DLAA, Reflex On + Boost). The display thread's own
counts in a player's log: per set, two presents under 7 ms after the one before and one 17-25 ms after. V-Sync On
looked smooth only because FIFO shows one present a refresh, which also holds the game at 165 / 3 = 55 fps.

Now every fixed multiplier's set with a made frame gets its times on the game's own timeline (fixed_dues): frame k at its
place between the two game frames, (k + 1) / (made + 1) of the way, so each frame moves as far as its time. Where the
swapchain does not wait for a refresh (immediate, mailbox: fixed_on_timeline), display_main shows the set at those times
and presents it ahead (its copies at once, before the game's next frame), whatever Frame pacing says. FIFO (V-Sync On,
and Auto with DLSS Frame Gen) is as before.

The set's first frame is due when its game frame came (pace_lead: made / (made + 1) of a game frame), plus the GPU's
delay (pace_delay): the set's frames are done with the game frame's GPU work, and shown at times that did not wait for
it they would go out at once. The delay follows what each set needed (its own delay and its lateness, a millisecond to
spare: no double count for the sets in flight), up by half, down by a sixteenth, at most two game frames.

The frame interpolation log line has a <2 ms bucket (presents the screen hardly tells apart), and a second line gives
the sets on the timeline and the GPU's delay. RX_VK_FG_TIMELINE=0 turns it off (as before), for an A/B.

This takes the idea of an unpushed fix of 2026-11-13 (the times on the game's timeline, a delay that follows the GPU),
which needed Frame pacing On. The Bloodborne PC port's NGX frame generation path paces the same way (a slot per made
frame from the source frame's cadence and the GPU's ready time); its default Streamline path leaves the pacing to
Streamline, which Longshot does not use.

tests/test_framegen_fixed_pace.py is new; test_present_source_crop cuts fixed_dues and pace_lead too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review of the change before: a set's copies went to the GPU only once the set before had been shown, behind the parts of
the game's next frame submitted meanwhile. Its first copy was done that much later, the set came past its times, and
the GPU's delay (pace_delay) grew with that lateness, which made the next set's copies later still: with the GPU busy
(12.4 ms of GPU work a frame at ~55 fps, DLAA at 5120x2160) it could run up to its limit.

- display_main takes the next set as soon as it comes, while the set before waits for its frames' times (take_early),
  where the swapchain holds the images of both: that set's frames still to present and all of the next one's. Not within
  3 ms of the shown set's next frame. vk_main.cpp asks for two sets' images where the swapchain does not wait for a
  refresh (an NVIDIA surface: 6 at 2x, its most, 8, at 3x and 4x); FIFO keeps one set's.
- The GPU's delay is fed back only from a set whose first copy was waited for (presented ahead: 5x to 8x and
  RX_VK_PRESENT_AHEAD=0 are not), and not from a set after a long game frame (over 1.5 smoothed ones).
- At most a game frame (was two): three sets in all, one shown, the next taken, one being made.
- The second log line also gives the sets taken early and when their first copies were done after their game frame.
- docs/development.md has RX_VK_FG_TIMELINE.

tests/test_framegen_fixed_pace.py runs the real timing functions through a model of the display loop: game frames 15.5
to 22 ms apart, frames done 12 ms after their game frame, a 60 ms frame, a GPU slower than a frame, then one with room.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
take_early looked for the next set only right before each frame's wait. At 2x the next set comes while the set's game
frame waits, so none was taken early (0 of 300 sets in a run; at 3x 236 to 276 of 300 were). The wait now goes in steps
of 2 ms at most while the next set may still be taken early (one shown, presented ahead, on the timeline), and looks
for it at each step; otherwise it waits as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A set taken early (its copies to the GPU when it came) was fed back from when the display thread came to it, after the set
before it was shown: often well after its copies were done, so the GPU's delay (pace_delay) and the log's "copies done"
counted the display thread's own wait (review). Now its first copy's fence is read every 2 ms of the wait for the shown
set's frames (no wait: a zero timeout), and the time it was seen done (ready_at) is used; a set not taken early still
counts from when its fence wait ended. The log's second line says the copies' end is seen within 2 ms.

tests/test_framegen_fixed_pace.py: the display loop's model feeds back each set's own copy end; a check that a set taken
early has its copy end seen.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The review of this branch found two faults at 4x and up at V-Sync Off.

present_image kept 3 frame slots and waits for the copy last made in a slot. A set of 4 frames presented ahead reused its
own first copy's slot for its 4th copy, so taking the next set early held the display thread until the GPU had done that
set's first copy (and the game's work queued before it): the frames of the set still shown went out late, together. Now
present_slots_for gives a fixed multiplier its own count of slots from 4x up while frame generation runs (at most
kPresentSlotsMax, 8; ImGui's vertex buffers one more). Off, Auto, 2x and 3x keep 3, which is also how many presents can
be on the GPU at once.

Two sets of 4 need 8 spare swapchain images; an NVIDIA surface has 6. The next set waited until all of its copies fit,
which happened only after the set before showed 2 frames once the GPU's delay passed 3/4 of a game frame. Its copies then
went later, behind more of the game's work, and fed back, the delay rose with its own lateness (the 4x logs: 20-22 ms, a
whole game frame). Now the next set's copies go for the images free, its first ones at once, the rest as the presents of
the set before give images back; and only a set whose first copy went within 3 ms of its coming (as_came) feeds the delay
back. The test's display-loop model shows both: as before the 4x delay runs to 17.9 ms of the 18.5 ms game frame, now it
settles at 14.6 ms, as with images to spare, and no frame is late.

Also from the review: a set is on the game's timeline only where it is presented ahead (one shown a frame at a time had
no first copy to learn the GPU's delay from: RX_VK_PRESENT_AHEAD=0, 7x and 8x on 6 spare images keep the old flow);
RX_VK_FG_TIMELINE=0 now also asks for the swapchain images as before; a frame on the timeline counts as late against its
own time in the log; the log counts the sets left out of the delay. 5x and 6x are presented ahead where the surface
holds them (the 4x image count: 6 spare on NVIDIA), and 7x and 8x are not.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
With V-Sync Off, a fixed frame generation multiplier's frames are shown at their own times on the game's timeline whether
Frame pacing is On or Off (where the swapchain holds a set's frames at once: up to 6x on an NVIDIA card). The hint for
Off ("As soon as it is ready.") and README's Frame pacing text did not say so. Both hints now add it, in the 13 languages
of menu_i18n.h (machine-made, as the file says). tests/test_menu_i18n.py fails on main on this PC too (pt-BR's count).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
With V-Sync Off and a fixed multiplier the pacer now calls each present at its own time (3x: median 5.9 ms apart), but
on the replay's queue a present waits there behind the game's next frame (3-12 ms) and some made frames still reach the
screen together: on an RTX 5090 at 165 Hz, 32% (3x) and 45% (4x) were shown under 2 ms. With the presents on a queue of
their own, 0.1% at both, the time on screen within 4.9-6.9 ms at 3x (p10-p90). The present queue stays opt-in (issue
1161: an RTX 4090 on NVIDIA's 621 driver got a black screen), so the hint (13 languages), the README and
development.md's switch table say how to turn it on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Thirteen rows of 2026-11-16: main and the fix at 3x and 4x, two interleaved 30 s camera pans each at one spot, then the
fix with RX_VK_PRESENT_QUEUE=1 (two pans each at 3x and 4x, and a 14-minute play test), PresentMon's on-screen times.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
#1300 put every RX_ switch the renderer reads in gpu/vk/switches.def; the timeline switch this branch adds was read in
vk_framegen.cpp and vk_main.cpp without a row. A kill switch, as RX_VK_PRESENT_AHEAD: on for every PC, =0 the old way.
(tests/test_switch_table.py still names RX_VK_PGO_FILE, as it does on main: its reader is nx2/build.py's -DPGO_ENV.)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Many changes here are made with agents, and each fault this branch fixes looked like frame generation off while the FPS
counter and the display thread's counts said all was well. docs/design.md section 13 writes the five rules down: pacing
is measured on the screen (the log counts present calls), a fixed multiplier's set on the game's timeline where the
swapchain does not wait for a refresh, the GPU's delay fed back only from sets taken as they came, a frame slot per frame
and two sets' spare images for a set presented ahead, and a present waits on the queue it is made on (RX_VK_PRESENT_QUEUE,
issue 1161). `// doc:` anchors above fixed_on_timeline, pace_delay, present_ahead_wanted, present_slots_for and
create_swapchain's image count point there, and tests/test_doc_anchors.py keeps them (REQUIRED).

The measure skill: a change to how frames are shown is measured with frame generation on, with PresentMon's on-screen
times (DisplayedTime under 2 ms, its spread; DisplayLatency against the call and the GPU work for where a frame waited),
and the run says which engine made the frames (DLSS-G makes only the frames with DLSS inputs).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The rows of 2026-11-16, design.md section 13 and the measure skill said DLSS-G made about a third of the presents at the
spot and the built-in maker the rest. That was a count over each whole log: the title screen, file select and load draw
no scene, so DLSS-G has no inputs there and the built-in maker makes those frames (`without new inputs`). In play DLSS-G
made 600 of each 600 presents in every run (597 to 600 in the play test). The rows now give the counts after the load,
and the skill says to count the measured stretch only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A cold review of this branch found:

- At 4x present_image had 4 slots and two sets in flight, so the next set's copy k (taken early, during the shown set's
  waits) waited in the slot of the shown set's copy k. A copy of the shown set that went late (in parts, as images
  freed) sat behind the game's next frame on the GPU, and the display thread waited for it while that set's frames were
  due: the stall 70dae803 removed inside one set, across two. present_slots_for now gives a slot per frame of both sets
  (2 x the multiplier: 4, 6 and 8 at 2x, 3x and 4x, at most kPresentSlotsMax) where the swapchain is made for two sets.
- The slot count did not look at the present mode or RX_VK_FG_TIMELINE: FIFO and RX_VK_FG_TIMELINE=0 got 4 to 8 slots
  from 4x up, main's 3. They keep 3 now.
- The count followed the menu live, so sets in flight after a multiplier change were copied with another count. It is
  the swapchain's now (dev.swap_slots, set by create_swapchain for the sets it makes the chain for); the chain is made
  again when the multiplier, V-Sync or RX_VK_FG_TIMELINE change. Off (and frame generation not running): 3.
- as_came was set when a set was taken, before its first copy's present_image, which can wait for a slot, an image or
  a new swapchain: a set whose first copy went late could still feed the GPU's delay. It is set once that copy returned.
- The frame log's pictures in slots past a count that went down were read only once it came back up, late and out of
  order; they are dropped (RX_VK_FRAMELOG only, at most 5).

docs/design.md rule 4 says it; tests/test_framegen_fixed_pace.py checks the new counts and where they come from,
test_present_semaphores.py that a retired chain counts 3 slots, test_doc_anchors.py the anchor's new line.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Twelve rows of 2026-11-17 on an RTX 5090: main at the branch's merge base and the branch at a44ef0fb, both packs on
nightly-396, and the branch with RX_VK_PRESENT_QUEUE=1, in turn, two rounds each at 3x and 4x, 30 s camera pans at one
spot, PresentMon's on-screen times; the tester's words where he watched.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(vk): the frame slots survive a remade swapchain; as_came does not count the copy's own submit
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 4s
Website / Website on Cloudflare (pull_request_target) Has been skipped
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
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
311d9d8d5b
The review of a44ef0fb:

- create_swapchain stored dev.swap_slots before vkCreateSwapchainKHR, and retire_swapchain, called right after it for
  the old chain, set 3 again: every chain made over an old one (a multiplier change, V-Sync, HDR, Reflex, a resize,
  out of date) ran with 3 slots, at 4x worse than before a44ef0fb. Only a chain with none before (the first, or after a
  lost surface) kept its count, as each run of the 2026-11-17 A/B did (one swapchain each, logged). The count is now
  computed beside fg_sets and stored with the chain, after the retire. test_present_semaphores checks that a chain made
  over an old one keeps it; test_framegen_fixed_pace that the store follows retire_swapchain().
- as_came, timed after the first copy's present_image, also counted that copy's own submit (the game's held submits, the
  queue's lock): a CPU that takes 3 ms to submit would leave every set out of the GPU's delay, which then stays at 0 and
  shows the frames together again (on the RTX 5090, 36% of the sets left out against 27%). Now: taken within 3 ms of its
  coming, and its first copy not held in present_image over 3 ms (a wait for a slot, an image or a new swapchain).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
docs: the present queue's black screen was Hookshot issue 1161, before the fork
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 4s
beanstalk/approval waiting for a BigBean's 👍 on the request
Website / Website on Cloudflare (pull_request_target) Has been skipped
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
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
2e530f467b
Longshot's #1161 is another pull request; the README, design.md section 13 and development.md's RX_VK_PRESENT_QUEUE row
now say whose issue it was.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merge origin/main (67efc4d3) into fix/fg-paced-without-vsync
Some checks failed
beanstalk/approval changed since the request: ask again
PR description / Description follows the template (pull_request_target) Has been cancelled
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
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
539814d535
#1309 deleted RX_VK_PRESENT_AHEAD (a paced set's copies are always submitted together): present_ahead_wanted has no
switch any more, take_early does not read it, and development.md keeps main's RX_VK_PRESENTS_AHEAD row beside this
branch's RX_VK_FG_TIMELINE and RX_VK_PRESENT_QUEUE rows. A merge, not a rebase, so the open pull request needs no
force push.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Under FIFO (V-Sync On, and Auto with DLSS Frame Gen) a set's frames went out as they came: a refresh apart, and its last
one stayed until the next set came (3x at 60 fps on a 240 Hz G-Sync display: 4.2, 4.2 and 8.3 ms). Now a set with its
times is shown at them in every present mode (fixed_on_timeline), under FIFO no sooner than a refresh after the frame
before was given (fifo_slot: slots a refresh apart from the last one given, as Auto's, again from now when more than half
a refresh behind); a present late by over a millisecond past its slot is the next one's slot, and a present not shown
gives its slot back. The swapchain is made for two sets' images under FIFO too, so the next set is taken early there as
well (with one set's, its copies went once the set before was shown, behind the game's next frame), and with them
present_image's slot per frame of both sets; RX_VK_FG_TIMELINE=0 keeps one set's and 3 slots, as main. A frame under FIFO
is late against its refresh slot; the log's second line counts the frames held to a slot. create_device's comment says
the present queue is off by default and what it did under FIFO (RTX 5090: animation error 2.98 -> 1.65 ms).

The FIFO session's commits a1884b31, 9bc916a7, e68369f1 and 65b00285 (on an earlier state of this branch), joined onto
#1362's head: its drop is gone, as_came, copy_up_to and the slot count are #1362's. tests/test_framegen_fixed_pace.py
models a VRR display under FIFO (one present a refresh, three sets, a late wake) next to the V-Sync Off loop.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
After the commit before, a fixed multiplier's frames are shown at their own times whatever Frame pacing and the V-Sync
row say (under FIFO one a refresh at most), so "With V-Sync Off" goes from the Frame pacing hint (Off and On, the 13
languages of menu_i18n.h) and the present queue's sentence loses its "then" (it helps under FIFO too: the animation error
2.98 -> 1.65 ms in the FIFO session's runs). The README's Frame pacing text, development.md's and switches.def's
RX_VK_FG_TIMELINE rows and docs/design.md section 13 (now "Frame generation's presents, as rules": rule 2 has FIFO's
fifo_slot, rule 4 the slots in every mode) follow; its anchor's new name is in the five `// doc:` lines, the anchor test
and the measure skill.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Fourteen rows of 2026-11-17: V-Sync Auto at 3x with a 60 cap (the refresh limit) three runs a side, the tester's V-Sync On
3x and V-Sync Auto at 2x with a 60 cap two a side, main and the branch in turn, 30 s camera turns at one spot, PresentMon's
on-screen times, the animation error and the latency.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(vk): under FIFO a late frame counts late, 7x and 8x keep one set's images, the model as the code feeds back
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 5s
Website / Website on Cloudflare (pull_request_target) Has been skipped
beanstalk/approval waiting for a BigBean's 👍 on the request
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
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
2d3bc77baf
A cold review of this branch:

- The late count compared a frame under FIFO with fifo_slot's result, which is now when the slot before is more than half
  a refresh behind: a set late from the GPU or a held display thread counted on time (under FIFO no frame behind its
  slot by less than half a refresh ever counted late). A frame is now late against its slot, a refresh after the slot
  before, also where fifo_slot starts again from now. fifo_slot's comment says what that branch does (the frame goes at
  once, as for any time already past).
- Under FIFO a set with more frames than the chain can ever hold spare (an NVIDIA surface, 8 images: 7x and 8x) is not
  presented ahead and goes out as it comes; two sets' images (8, main 6) only deepened FIFO's queue, two refreshes more
  delay. create_swapchain gives such a set one set's images and 3 slots, as main; present_image makes the chain again
  when the multiplier changes past 4x, where swapchain_framegen does not change.
- The display's refresh is asked after a set's copies, not before: once a second it asks Windows, which counted in the
  first copy's time (as_came).
- tests/test_framegen_fixed_pace.py's FIFO model fed back every set, which display_main does not: at the refresh limit
  under FIFO a set's first copy waits for FIFO's images, so every set is left out of the GPU's delay (275 of 275 in a run).
  The limit's case now runs both ways, every set fed back and none, and checks the same frames on the screen.
- Comments: present_slots_for and swap_slots said two sets only where the swapchain does not wait for a refresh.

test_present_semaphores' fixture has the Frame generation row present_image now reads.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Tested in game: Windows 11 Pro build 26300, RTX 5090, NVIDIA 621.24, 5120x2160 at 165 Hz with G-Sync, Hyrule Market (child), DLSS frame generation (DLSS-G made every frame in play). Scripted 30 s camera turns with PresentMon, main @ 544229a2 against this PR @ 1a854a3e (stacked on #1362), packs on one base, in turn: at the refresh limit (V-Sync Auto, 3x, cap 60) three runs a side, the game 50.8-52.6 -> 54.9-55.0 fps and the frames' time on screen sd 1.6-2.2 -> 0.1-0.3 ms, p99 15-17 -> 6.2 ms; V-Sync On 3x (the tester's settings) two a side, 50 -> 54.4 fps, sd 2.3-2.5 -> 0.7 ms, p99 18 -> 8.3-8.7 ms; V-Sync Auto 2x cap 60 two a side, animation error sd 3.9-4.1 -> 2.3-2.5 ms, latency 14.2 -> 11.2 ms. The head 2d3bc77b (the review's fixes, rebased onto main 67efc4d3 through #1362) builds and passes the checks; it was not run on the screen (the description says why the numbers hold).

Tested in game: Windows 11 Pro build 26300, RTX 5090, NVIDIA 621.24, 5120x2160 at 165 Hz with G-Sync, Hyrule Market (child), DLSS frame generation (DLSS-G made every frame in play). Scripted 30 s camera turns with PresentMon, main @ 544229a2 against this PR @ 1a854a3e (stacked on #1362), packs on one base, in turn: at the refresh limit (V-Sync Auto, 3x, cap 60) three runs a side, the game 50.8-52.6 -> 54.9-55.0 fps and the frames' time on screen sd 1.6-2.2 -> 0.1-0.3 ms, p99 15-17 -> 6.2 ms; V-Sync On 3x (the tester's settings) two a side, 50 -> 54.4 fps, sd 2.3-2.5 -> 0.7 ms, p99 18 -> 8.3-8.7 ms; V-Sync Auto 2x cap 60 two a side, animation error sd 3.9-4.1 -> 2.3-2.5 ms, latency 14.2 -> 11.2 ms. The head 2d3bc77b (the review's fixes, rebased onto main 67efc4d3 through #1362) builds and passes the checks; it was not run on the screen (the description says why the numbers hold).
Author
Member

@Beanstalk please run this branch against main with V-Sync On and Frame generation at 2x and at 3x (and V-Sync Auto with a 60 frame rate cap at 3x, which asks more frames than a 165 Hz display shows), turning the camera in play for about 30 s each, on: Windows with an RTX 40 card (DLSS frame generation), and AMD on Windows and on Linux (FSR 3.1 frame generation). What to look at: the two vk: frame interpolation: lines in longshot_log.txt (frames shown on time and late; sets on the game's timeline, taken early, frames held to a refresh), and where PresentMon runs, the spread of DisplayedTime and the game's fps. Expected: the frames more evenly on the screen than on main, the game's fps the same or higher at the display's limit, and no new stutter, errors or device loss. RX_VK_FG_TIMELINE=0 gives main's behaviour on the same build, for an A/B.

@Beanstalk please run this branch against main with V-Sync On and Frame generation at 2x and at 3x (and V-Sync Auto with a 60 frame rate cap at 3x, which asks more frames than a 165 Hz display shows), turning the camera in play for about 30 s each, on: Windows with an RTX 40 card (DLSS frame generation), and AMD on Windows and on Linux (FSR 3.1 frame generation). What to look at: the two `vk: frame interpolation:` lines in longshot_log.txt (frames shown on time and late; sets on the game's timeline, taken early, frames held to a refresh), and where PresentMon runs, the spread of DisplayedTime and the game's fps. Expected: the frames more evenly on the screen than on main, the game's fps the same or higher at the display's limit, and no new stutter, errors or device loss. RX_VK_FG_TIMELINE=0 gives main's behaviour on the same build, for an A/B.
Member

@pmwork-personal only members of BigBeans can start the farm.

One of them can approve this request by reacting 👍 to it or to this comment. This request was for 2d3bc77, and the PR has changed since (0c552c9), so a 👍 no longer approves it. Comment @Beanstalk again to ask for the new commit.

@pmwork-personal only members of `BigBeans` can start the farm. ~~One of them can approve this request by reacting 👍 to it or to this comment.~~ This request was for `2d3bc77`, and the PR has changed since (`0c552c9`), so a 👍 no longer approves it. Comment `@Beanstalk` again to ask for the new commit.
fix(vk): the Frame pacing hint leaves the present queue out; the image request stops at the frame slots
Some checks failed
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (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
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
PR description / Description follows the template (pull_request_target) Successful in 11s
beanstalk/intel 0/1 pass, 0 running, 0 queued
beanstalk/approval approved by llun (reviewed)
beanstalk/windows+nvidia+gpu-rtx-40xx 0/1 pass, 0 running, 0 queued
beanstalk/windows+amd 0/1 pass, 0 running, 0 queued
beanstalk/linux+amd 1/1 fail
e3420742d4
HumanBean's review of #1362:

- The Frame pacing hint (Off and On, 13 languages) told players to set RX_VK_PRESENT_QUEUE=1, a switch that is off
  because it gave an RTX 4090 on NVIDIA 621 a black screen (Hookshot issue 1161): a menu hint makes it a player setting
  that is fine on one GPU and breaks another. The hint keeps "With V-Sync Off, frame generation's fixed multipliers show
  each frame at its own time."; the README and development.md keep the switch, with its risk.
- create_swapchain asks for at most kPresentSlotsMax images over the surface's least for the sets: an image past
  present_image's slots would share a slot with the set still shown (design.md section 13, rule 4) and cost video memory
  for nothing. swapchain_framegen stops at 4, so two sets ask for 8 today; the cap keeps that if it changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merge #1362's e3420742 into fix/fg-fifo-paced: the hint without the present queue, the image cap
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 9s
beanstalk/approval approved by llun (reviewed)
beanstalk/windows+nvidia+gpu-rtx-40xx 1/1 fail
beanstalk/windows+amd 1/1 fail
beanstalk/linux+amd 2/1 fail
0c552c9771
From HumanBean's review of #1362: the Frame pacing hint (13 languages) keeps "Frame generation's fixed multipliers show
each frame at its own time." without the present queue's sentence (the README and development.md keep the switch, with
its risk), and create_swapchain's request stays at most kPresentSlotsMax over the least, next to this branch's
set_too_big under FIFO. A merge, not a rebase: #1442 is open.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

0c552c97: #1362's answer to HumanBean's review merged in (a merge, no force push): the Frame pacing hint (13 languages) no longer sends players to RX_VK_PRESENT_QUEUE (README and development.md keep it, with its risk), and create_swapchain's image request stays at most kPresentSlotsMax over the least, next to this PR's one-set rule for 7x and 8x under FIFO. Builds (dev_packs.py pack); suite 630 passed, 46 failed, 47 skipped, all 46 failing on main too.

0c552c97: #1362's answer to HumanBean's review merged in (a merge, no force push): the Frame pacing hint (13 languages) no longer sends players to RX_VK_PRESENT_QUEUE (README and development.md keep it, with its risk), and create_swapchain's image request stays at most kPresentSlotsMax over the least, next to this PR's one-set rule for 7x and 8x under FIFO. Builds (dev_packs.py pack); suite 630 passed, 46 failed, 47 skipped, all 46 failing on main too.
Author
Member

@Beanstalk please run this branch at 0c552c97 against main with V-Sync On and Frame generation at 2x and at 3x (and V-Sync Auto with a 60 frame rate cap at 3x, which asks more frames than a 165 Hz display shows), turning the camera in play for about 30 s each, on: Windows with an RTX 40 card (DLSS frame generation), and AMD on Windows and on Linux (FSR 3.1 frame generation). What to look at: the two vk: frame interpolation: lines in longshot_log.txt (frames shown on time and late; sets on the game's timeline, taken early, frames held to a refresh), and where PresentMon runs, the spread of DisplayedTime and the game's fps. Expected: the frames more evenly on the screen than on main, the game's fps the same or higher at the display's limit, and no new stutter, errors or device loss. RX_VK_FG_TIMELINE=0 gives main's behaviour on the same build, for an A/B. (The request on 2d3bc77b expired with the new commit.)

@Beanstalk please run this branch at 0c552c97 against main with V-Sync On and Frame generation at 2x and at 3x (and V-Sync Auto with a 60 frame rate cap at 3x, which asks more frames than a 165 Hz display shows), turning the camera in play for about 30 s each, on: Windows with an RTX 40 card (DLSS frame generation), and AMD on Windows and on Linux (FSR 3.1 frame generation). What to look at: the two `vk: frame interpolation:` lines in longshot_log.txt (frames shown on time and late; sets on the game's timeline, taken early, frames held to a refresh), and where PresentMon runs, the spread of DisplayedTime and the game's fps. Expected: the frames more evenly on the screen than on main, the game's fps the same or higher at the display's limit, and no new stutter, errors or device loss. RX_VK_FG_TIMELINE=0 gives main's behaviour on the same build, for an A/B. (The request on 2d3bc77b expired with the new commit.)
Member

@pmwork-personal only members of BigBeans can start the farm. One of them can approve this request by reacting 👍 to it or to this comment.

@pmwork-personal only members of `BigBeans` can start the farm. One of them can approve this request by reacting 👍 to it or to this comment.
Member

@Beanstalk please run this branch at 0c552c97 against main with V-Sync On and Frame generation at 2x and at 3x (and V-Sync Auto with a 60 frame rate cap at 3x, which asks more frames than a 165 Hz display shows), turning the camera in play for about 30 s each, on: Windows with an RTX 40 card (DLSS frame generation), and AMD on Windows and on Linux (FSR 3.1 frame generation). What to look at: the two vk: frame interpolation: lines in longshot_log.txt (frames shown on time and late; sets on the game's timeline, taken early, frames held to a refresh), and where PresentMon runs, the spread of DisplayedTime and the game's fps. Expected: the frames more evenly on the screen than on main, the game's fps the same or higher at the display's limit, and no new stutter, errors or device loss. RX_VK_FG_TIMELINE=0 gives main's behaviour on the same build, for an A/B. (The request on 2d3bc77b expired with the new commit.)

@Beanstalk please run this branch at 0c552c97 against main with V-Sync On and Frame generation at 2x and at 3x (and V-Sync Auto with a 60 frame rate cap at 3x, which asks more frames than a 165 Hz display shows), turning the camera in play for about 30 s each, on: Windows with an RTX 40 card (DLSS frame generation), and AMD on Windows and on Linux (FSR 3.1 frame generation). What to look at: the two vk: frame interpolation: lines in longshot_log.txt (frames shown on time and late; sets on the game's timeline, taken early, frames held to a refresh), and where PresentMon runs, the spread of DisplayedTime and the game's fps. Expected: the frames more evenly on the screen than on main, the game's fps the same or higher at the display's limit, and no new stutter, errors or device loss. RX_VK_FG_TIMELINE=0 gives main's behaviour on the same build, for an A/B. (The request on 2d3bc77b expired with the new commit.)
Member
Beanstalk test farm · an earlier run: commit 0c552c9 (the newer results are in a comment below)

Commit 0c552c9 · tier reviewed · approved by llun · dashboard

What will be tested · AI plan (gpt-6.1-terra)

Compare the PR with main in child Hyrule Market on Windows RTX 40, Windows AMD, and Linux AMD, using 2x and 3x frame generation with V-Sync On and Auto. Each run turns the camera for approximately 30 seconds at 60 frames per second, then measures frame time and FPS; the four setting combinations take roughly 15–20 minutes per tester. Crashes, device loss, substantial FPS drops, or worse p99 frame times fail the plan. The farm cannot measure during the camera turn or collect PresentMon DisplayedTime, so this does not establish on-screen pacing or reproduce a 165 Hz display limit.

  • Where: windows+nvidia+gpu-rtx-40xx (GPU "rtx 40xx", 1-2 reports), windows+amd (1-2 reports), linux+amd (1-2 reports).
  • Matrix: 4 cells, each on main and the PR: vsync 1 or 0; frame_generation 2 or 3.
  • market-framegen: from a new save (settings frame_pacing=0, frame_rate_cap=0), then teleport to Market, 3 times: move the stick, take the picture market to compare with main, measure market for 30 s (after 5 s warm-up); 1 run on each side for each of 4 cells (1 game start a run).
  • Measured: crashes, frame times, stutters and hitches, draws and frame rate, the game's log.
  • The PR fails if: it crashes; or frame rate is more than 10% below main; or a picture differs from main by more than 10%; or frame time (p99) is more than 15% above main; or forbidden log lines is above 0.
  • Time: about 17 min of game runs per tester (2 game starts), plus the two builds.

Started at 18:43 UTC.

Target Reports Crash Frame p99 (ms) vs main VRAM peak (MB) vs main Result
windows+nvidia+gpu-rtx-40xx · 1: windows+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 4070, 621.1.0 1/1 1 none 26.1 vs 26.5 (−1%) — fail
windows+amd · 1: windows+amd+amd-proprietary+dgpu AMD Radeon RX 9070 XT, 2.0.416 1/1 1 none 22.8 vs 32.9 (−31%) — fail
linux+amd · 1: linux+amd+radv+dgpu AMD Radeon RX 7900 XTX (RADV NAVI31), 26.2.7; 2: linux+amd+radv+dgpu AMD Radeon RX 7900 XT (RADV NAVI31), 26.2.6 2/1 1 2 none 512.4 vs 1003.8 (−49%) — fail ⚠ outlier
Scenario · matrix cell Target Frame p99 (ms) vs main Result
market-framegen · vsync=1, frame_generation=2 windows+nvidia+gpu-rtx-40xx 26.1 vs 26.5 (−1%) fail
market-framegen · vsync=1, frame_generation=2 windows+amd 22.8 vs 32.9 (−31%) fail
market-framegen · vsync=1, frame_generation=2 linux+amd 512.4 vs 1003.8 (−49%) fail
market-framegen · vsync=1, frame_generation=3 windows+nvidia+gpu-rtx-40xx 26.0 vs 26.1 (−0%) fail
market-framegen · vsync=1, frame_generation=3 windows+amd 34.5 vs 34.9 (−1%) fail
market-framegen · vsync=1, frame_generation=3 linux+amd 516.4 vs 516.0 (+0%) fail
market-framegen · vsync=0, frame_generation=2 windows+nvidia+gpu-rtx-40xx 26.4 vs 25.6 (+3%) fail
market-framegen · vsync=0, frame_generation=2 windows+amd 34.3 vs 35.3 (−3%) fail
market-framegen · vsync=0, frame_generation=2 linux+amd 515.4 vs 514.7 (+0%) fail
market-framegen · vsync=0, frame_generation=3 windows+nvidia+gpu-rtx-40xx 25.6 vs 25.5 (+0%) fail
market-framegen · vsync=0, frame_generation=3 windows+amd 36.8 vs 36.4 (+1%) fail
market-framegen · vsync=0, frame_generation=3 linux+amd 517.0 vs 514.8 (+0%) fail

Measurements · windows+nvidia+gpu-rtx-40xx

Verdict: fail on windows+nvidia+gpu-rtx-40xx (1/1 report): market-framegen screenshot.max_diff failed.

Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 4070, 621.1.0 13th Gen Intel(R) Core(TM) i7-13700F, 32 GB RAM
Scene: market-framegen, from a new save (frame_pacing=0, frame_rate_cap=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-framegen: 1 game start a side, market 30 s after 5 s warm-up; each number the median of the runs, then of 1 report
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Before: main @ 67efc4d After: this PR @ 0c552c9
market-framegen · vsync=1, frame_generation=2 · market · frame rate 60.0 60.0 (−0%)
market-framegen · vsync=1, frame_generation=2 · market · frame time (p99) (ms) 26.5 26.1 (−1%)
market-framegen · vsync=1, frame_generation=2 · forbidden log lines 0.0 0.0
market-framegen · vsync=1, frame_generation=3 · market · frame rate 60.0 60.0 (−0%)
market-framegen · vsync=1, frame_generation=3 · market · frame time (p99) (ms) 26.1 26.0 (−0%)
market-framegen · vsync=1, frame_generation=3 · forbidden log lines 0.0 0.0
market-framegen · vsync=0, frame_generation=2 · market · frame rate 60.0 60.0 (−0%)
market-framegen · vsync=0, frame_generation=2 · market · frame time (p99) (ms) 25.6 26.4 (+3%)
market-framegen · vsync=0, frame_generation=2 · forbidden log lines 0.0 0.0
market-framegen · vsync=0, frame_generation=3 · market · frame rate 60.0 60.0 (+0%)
market-framegen · vsync=0, frame_generation=3 · market · frame time (p99) (ms) 25.5 25.6 (+0%)
market-framegen · vsync=0, frame_generation=3 · forbidden log lines 0.0 0.0

Flags and settings

Flag What it is Values tried Before this PR After this PR Effect (frame rate) Helps / doesn't help / untested
vsync menu setting 1, 0 main's default the PR's default market-framegen, the PR at 1 → at 0: 60.0 → 60.0 (−0%) no clear effect
frame_generation menu setting 2, 3 main's default the PR's default market-framegen, the PR at 2 → at 3: 60.0 → 60.0 (+0%) no clear effect
Markdown for the PR description
## Measurements

**Verdict:** fail on windows+nvidia+gpu-rtx-40xx (1/1 report): `market-framegen screenshot.max_diff` failed.

Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 4070, 621.1.0` `13th Gen Intel(R) Core(TM) i7-13700F, 32 GB RAM`  
Scene: market-framegen, from a new save (frame_pacing=0, frame_rate_cap=0); each cell's settings and switches as the table names them  
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-framegen: 1 game start a side, market 30 s after 5 s warm-up; each number the median of the runs, then of 1 report  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

| | Before: main @ 67efc4d | After: this PR @ 0c552c9 |
|---|---|---|
| market-framegen · `vsync=1, frame_generation=2` · market · frame rate | 60.0 | 60.0 (−0%) |
| market-framegen · `vsync=1, frame_generation=2` · market · frame time (p99) (ms) | 26.5 | 26.1 (−1%) |
| market-framegen · `vsync=1, frame_generation=2` · forbidden log lines | 0.0 | 0.0 |
| market-framegen · `vsync=1, frame_generation=3` · market · frame rate | 60.0 | 60.0 (−0%) |
| market-framegen · `vsync=1, frame_generation=3` · market · frame time (p99) (ms) | 26.1 | 26.0 (−0%) |
| market-framegen · `vsync=1, frame_generation=3` · forbidden log lines | 0.0 | 0.0 |
| market-framegen · `vsync=0, frame_generation=2` · market · frame rate | 60.0 | 60.0 (−0%) |
| market-framegen · `vsync=0, frame_generation=2` · market · frame time (p99) (ms) | 25.6 | 26.4 (+3%) |
| market-framegen · `vsync=0, frame_generation=2` · forbidden log lines | 0.0 | 0.0 |
| market-framegen · `vsync=0, frame_generation=3` · market · frame rate | 60.0 | 60.0 (+0%) |
| market-framegen · `vsync=0, frame_generation=3` · market · frame time (p99) (ms) | 25.5 | 25.6 (+0%) |
| market-framegen · `vsync=0, frame_generation=3` · forbidden log lines | 0.0 | 0.0 |

### Flags and settings

| Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame rate) | Helps / doesn't help / untested |
|---|---|---|---|---|---|---|
| `vsync` | menu setting | `1`, `0` | main's default | the PR's default | market-framegen, the PR at 1 → at 0: 60.0 → 60.0 (−0%) | no clear effect |
| `frame_generation` | menu setting | `2`, `3` | main's default | the PR's default | market-framegen, the PR at 2 → at 3: 60.0 → 60.0 (+0%) | no clear effect |

Measurements · windows+amd

Verdict: fail on windows+amd (1/1 report): market-framegen screenshot.max_diff failed.

Hardware: 1: windows+amd+amd-proprietary+dgpu AMD Radeon RX 9070 XT, 2.0.416 AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM
Scene: market-framegen, from a new save (frame_pacing=0, frame_rate_cap=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-framegen: 1 game start a side, market 30 s after 5 s warm-up; each number the median of the runs, then of 1 report
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Before: main @ 67efc4d After: this PR @ 0c552c9
market-framegen · vsync=1, frame_generation=2 · market · frame rate 60.0 60.0 (−0%)
market-framegen · vsync=1, frame_generation=2 · market · frame time (p99) (ms) 32.9 22.8 (−31%)
market-framegen · vsync=1, frame_generation=2 · forbidden log lines 0.0 0.0
market-framegen · vsync=1, frame_generation=3 · market · frame rate 50.6 51.8 (+2%)
market-framegen · vsync=1, frame_generation=3 · market · frame time (p99) (ms) 34.9 34.5 (−1%)
market-framegen · vsync=1, frame_generation=3 · forbidden log lines 0.0 0.0
market-framegen · vsync=0, frame_generation=2 · market · frame rate 49.5 48.7 (−2%)
market-framegen · vsync=0, frame_generation=2 · market · frame time (p99) (ms) 35.3 34.3 (−3%)
market-framegen · vsync=0, frame_generation=2 · forbidden log lines 0.0 0.0
market-framegen · vsync=0, frame_generation=3 · market · frame rate 49.0 46.4 (−5%)
market-framegen · vsync=0, frame_generation=3 · market · frame time (p99) (ms) 36.4 36.8 (+1%)
market-framegen · vsync=0, frame_generation=3 · forbidden log lines 0.0 0.0

Flags and settings

Flag What it is Values tried Before this PR After this PR Effect (frame rate) Helps / doesn't help / untested
vsync menu setting 1, 0 main's default the PR's default market-framegen, the PR at 1 → at 0: 60.0 → 48.7 (−19%) doesn't help
frame_generation menu setting 2, 3 main's default the PR's default market-framegen, the PR at 2 → at 3: 60.0 → 51.8 (−14%) doesn't help
Markdown for the PR description
## Measurements

**Verdict:** fail on windows+amd (1/1 report): `market-framegen screenshot.max_diff` failed.

Hardware: 1: windows+amd+amd-proprietary+dgpu `AMD Radeon RX 9070 XT, 2.0.416` `AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM`  
Scene: market-framegen, from a new save (frame_pacing=0, frame_rate_cap=0); each cell's settings and switches as the table names them  
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-framegen: 1 game start a side, market 30 s after 5 s warm-up; each number the median of the runs, then of 1 report  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

| | Before: main @ 67efc4d | After: this PR @ 0c552c9 |
|---|---|---|
| market-framegen · `vsync=1, frame_generation=2` · market · frame rate | 60.0 | 60.0 (−0%) |
| market-framegen · `vsync=1, frame_generation=2` · market · frame time (p99) (ms) | 32.9 | 22.8 (−31%) |
| market-framegen · `vsync=1, frame_generation=2` · forbidden log lines | 0.0 | 0.0 |
| market-framegen · `vsync=1, frame_generation=3` · market · frame rate | 50.6 | 51.8 (+2%) |
| market-framegen · `vsync=1, frame_generation=3` · market · frame time (p99) (ms) | 34.9 | 34.5 (−1%) |
| market-framegen · `vsync=1, frame_generation=3` · forbidden log lines | 0.0 | 0.0 |
| market-framegen · `vsync=0, frame_generation=2` · market · frame rate | 49.5 | 48.7 (−2%) |
| market-framegen · `vsync=0, frame_generation=2` · market · frame time (p99) (ms) | 35.3 | 34.3 (−3%) |
| market-framegen · `vsync=0, frame_generation=2` · forbidden log lines | 0.0 | 0.0 |
| market-framegen · `vsync=0, frame_generation=3` · market · frame rate | 49.0 | 46.4 (−5%) |
| market-framegen · `vsync=0, frame_generation=3` · market · frame time (p99) (ms) | 36.4 | 36.8 (+1%) |
| market-framegen · `vsync=0, frame_generation=3` · forbidden log lines | 0.0 | 0.0 |

### Flags and settings

| Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame rate) | Helps / doesn't help / untested |
|---|---|---|---|---|---|---|
| `vsync` | menu setting | `1`, `0` | main's default | the PR's default | market-framegen, the PR at 1 → at 0: 60.0 → 48.7 (−19%) | doesn't help |
| `frame_generation` | menu setting | `2`, `3` | main's default | the PR's default | market-framegen, the PR at 2 → at 3: 60.0 → 51.8 (−14%) | doesn't help |

Measurements · linux+amd

Verdict: fail on linux+amd (2/1 report): market-framegen screenshot.max_diff; market-framegen market.frametime_p99_ms.max_delta_pct (+18.2%); market-framegen market.fps_mean.min_delta_pct (-12.7%) failed.

Hardware: 1: linux+amd+radv+dgpu AMD Radeon RX 7900 XTX (RADV NAVI31), 26.2.7 AMD Ryzen 7 5800X3D 8-Core Processor, 64 GB RAM; 2: linux+amd+radv+dgpu AMD Radeon RX 7900 XT (RADV NAVI31), 26.2.6 AMD Ryzen 7 5700X3D 8-Core Processor, 32 GB RAM
Scene: market-framegen, from a new save (frame_pacing=0, frame_rate_cap=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-framegen: 1 game start a side, market 30 s after 5 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Before: main @ 67efc4d After: this PR @ 0c552c9
market-framegen · vsync=1, frame_generation=2 · market · frame rate 34.1 45.1 (+32%)
market-framegen · vsync=1, frame_generation=2 · market · frame time (p99) (ms) 1,004 512.4 (−49%)
market-framegen · vsync=1, frame_generation=2 · forbidden log lines 0.0 0.0
market-framegen · vsync=1, frame_generation=3 · market · frame rate 34.3 35.7 (+4%)
market-framegen · vsync=1, frame_generation=3 · market · frame time (p99) (ms) 516.0 516.4 (+0%)
market-framegen · vsync=1, frame_generation=3 · forbidden log lines 0.0 0.0
market-framegen · vsync=0, frame_generation=2 · market · frame rate 35.4 34.7 (−2%)
market-framegen · vsync=0, frame_generation=2 · market · frame time (p99) (ms) 514.7 515.4 (+0%)
market-framegen · vsync=0, frame_generation=2 · forbidden log lines 0.0 0.0
market-framegen · vsync=0, frame_generation=3 · market · frame rate 35.6 29.3 (−18%)
market-framegen · vsync=0, frame_generation=3 · market · frame time (p99) (ms) 514.8 517.0 (+0%)
market-framegen · vsync=0, frame_generation=3 · forbidden log lines 0.0 0.0

Flags and settings

Flag What it is Values tried Before this PR After this PR Effect (frame rate) Helps / doesn't help / untested
vsync menu setting 1, 0 main's default the PR's default market-framegen, the PR at 1 → at 0: 45.1 → 34.7 (−23%) doesn't help
frame_generation menu setting 2, 3 main's default the PR's default market-framegen, the PR at 2 → at 3: 45.1 → 35.7 (−21%) doesn't help
Markdown for the PR description
## Measurements

**Verdict:** fail on linux+amd (2/1 report): `market-framegen screenshot.max_diff`; `market-framegen market.frametime_p99_ms.max_delta_pct (+18.2%)`; `market-framegen market.fps_mean.min_delta_pct (-12.7%)` failed.

Hardware: 1: linux+amd+radv+dgpu `AMD Radeon RX 7900 XTX (RADV NAVI31), 26.2.7` `AMD Ryzen 7 5800X3D 8-Core Processor, 64 GB RAM`; 2: linux+amd+radv+dgpu `AMD Radeon RX 7900 XT (RADV NAVI31), 26.2.6` `AMD Ryzen 7 5700X3D 8-Core Processor, 32 GB RAM`  
Scene: market-framegen, from a new save (frame_pacing=0, frame_rate_cap=0); each cell's settings and switches as the table names them  
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-framegen: 1 game start a side, market 30 s after 5 s warm-up; each number the median of the runs, then of 2 reports  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

| | Before: main @ 67efc4d | After: this PR @ 0c552c9 |
|---|---|---|
| market-framegen · `vsync=1, frame_generation=2` · market · frame rate | 34.1 | 45.1 (+32%) |
| market-framegen · `vsync=1, frame_generation=2` · market · frame time (p99) (ms) | 1,004 | 512.4 (−49%) |
| market-framegen · `vsync=1, frame_generation=2` · forbidden log lines | 0.0 | 0.0 |
| market-framegen · `vsync=1, frame_generation=3` · market · frame rate | 34.3 | 35.7 (+4%) |
| market-framegen · `vsync=1, frame_generation=3` · market · frame time (p99) (ms) | 516.0 | 516.4 (+0%) |
| market-framegen · `vsync=1, frame_generation=3` · forbidden log lines | 0.0 | 0.0 |
| market-framegen · `vsync=0, frame_generation=2` · market · frame rate | 35.4 | 34.7 (−2%) |
| market-framegen · `vsync=0, frame_generation=2` · market · frame time (p99) (ms) | 514.7 | 515.4 (+0%) |
| market-framegen · `vsync=0, frame_generation=2` · forbidden log lines | 0.0 | 0.0 |
| market-framegen · `vsync=0, frame_generation=3` · market · frame rate | 35.6 | 29.3 (−18%) |
| market-framegen · `vsync=0, frame_generation=3` · market · frame time (p99) (ms) | 514.8 | 517.0 (+0%) |
| market-framegen · `vsync=0, frame_generation=3` · forbidden log lines | 0.0 | 0.0 |

### Flags and settings

| Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame rate) | Helps / doesn't help / untested |
|---|---|---|---|---|---|---|
| `vsync` | menu setting | `1`, `0` | main's default | the PR's default | market-framegen, the PR at 1 → at 0: 45.1 → 34.7 (−23%) | doesn't help |
| `frame_generation` | menu setting | `2`, `3` | main's default | the PR's default | market-framegen, the PR at 2 → at 3: 45.1 → 35.7 (−21%) | doesn't help |
<!-- beanstalk:previous --> <details><summary>Beanstalk test farm · an earlier run: commit <code>0c552c9</code> (the newer results are in a comment below)</summary> Commit `0c552c9` · tier **reviewed** · approved by llun · [dashboard](https://beanstalk.magicbean.dev/prs/1442) **What will be tested** · AI plan (`gpt-6.1-terra`) Compare the PR with main in child Hyrule Market on Windows RTX 40, Windows AMD, and Linux AMD, using 2x and 3x frame generation with V-Sync On and Auto. Each run turns the camera for approximately 30 seconds at 60 frames per second, then measures frame time and FPS; the four setting combinations take roughly 15–20 minutes per tester. Crashes, device loss, substantial FPS drops, or worse p99 frame times fail the plan. The farm cannot measure during the camera turn or collect PresentMon DisplayedTime, so this does not establish on-screen pacing or reproduce a 165 Hz display limit. - **Where:** windows+nvidia+gpu-rtx-40xx (GPU "rtx 40xx", 1-2 reports), windows+amd (1-2 reports), linux+amd (1-2 reports). - **Matrix:** 4 cells, each on main and the PR: vsync `1` or `0`; frame_generation `2` or `3`. - **market-framegen:** from a new save (settings frame_pacing=0, frame_rate_cap=0), then teleport to Market, 3 times: move the stick, take the picture market to compare with main, measure market for 30 s (after 5 s warm-up); 1 run on each side for each of 4 cells (1 game start a run). - **Measured:** crashes, frame times, stutters and hitches, draws and frame rate, the game's log. - **The PR fails if:** it crashes; or frame rate is more than 10% below main; or a picture differs from main by more than 10%; or frame time (p99) is more than 15% above main; or forbidden log lines is above 0. - **Time:** about 17 min of game runs per tester (2 game starts), plus the two builds. Started at 18:43 UTC. | Target | Reports | Crash | Frame p99 (ms) vs main | VRAM peak (MB) vs main | Result | | --- | --- | --- | --- | --- | --- | | windows+nvidia+gpu-rtx-40xx · 1: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 4070, 621.1.0` | 1/1 [1](https://beanstalk.magicbean.dev/reports/rp_da5031490d83ac03) | none | 26.1 vs 26.5 (−1%) | — | fail | | windows+amd · 1: windows+amd+amd-proprietary+dgpu `AMD Radeon RX 9070 XT, 2.0.416` | 1/1 [1](https://beanstalk.magicbean.dev/reports/rp_ebcb2782c8a46855) | none | 22.8 vs 32.9 (−31%) | — | fail | | linux+amd · 1: linux+amd+radv+dgpu `AMD Radeon RX 7900 XTX (RADV NAVI31), 26.2.7`; 2: linux+amd+radv+dgpu `AMD Radeon RX 7900 XT (RADV NAVI31), 26.2.6` | 2/1 [1](https://beanstalk.magicbean.dev/reports/rp_19c1d72dac8d0dfe) [2](https://beanstalk.magicbean.dev/reports/rp_96c20d3527be1a22) | none | 512.4 vs 1003.8 (−49%) | — | fail ⚠ outlier | | Scenario · matrix cell | Target | Frame p99 (ms) vs main | Result | | --- | --- | --- | --- | | market-framegen · `vsync=1, frame_generation=2` | windows+nvidia+gpu-rtx-40xx | 26.1 vs 26.5 (−1%) | fail | | market-framegen · `vsync=1, frame_generation=2` | windows+amd | 22.8 vs 32.9 (−31%) | fail | | market-framegen · `vsync=1, frame_generation=2` | linux+amd | 512.4 vs 1003.8 (−49%) | fail | | market-framegen · `vsync=1, frame_generation=3` | windows+nvidia+gpu-rtx-40xx | 26.0 vs 26.1 (−0%) | fail | | market-framegen · `vsync=1, frame_generation=3` | windows+amd | 34.5 vs 34.9 (−1%) | fail | | market-framegen · `vsync=1, frame_generation=3` | linux+amd | 516.4 vs 516.0 (+0%) | fail | | market-framegen · `vsync=0, frame_generation=2` | windows+nvidia+gpu-rtx-40xx | 26.4 vs 25.6 (+3%) | fail | | market-framegen · `vsync=0, frame_generation=2` | windows+amd | 34.3 vs 35.3 (−3%) | fail | | market-framegen · `vsync=0, frame_generation=2` | linux+amd | 515.4 vs 514.7 (+0%) | fail | | market-framegen · `vsync=0, frame_generation=3` | windows+nvidia+gpu-rtx-40xx | 25.6 vs 25.5 (+0%) | fail | | market-framegen · `vsync=0, frame_generation=3` | windows+amd | 36.8 vs 36.4 (+1%) | fail | | market-framegen · `vsync=0, frame_generation=3` | linux+amd | 517.0 vs 514.8 (+0%) | fail | #### Measurements · windows+nvidia+gpu-rtx-40xx **Verdict:** fail on windows+nvidia+gpu-rtx-40xx (1/1 report): `market-framegen screenshot.max_diff` failed. Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 4070, 621.1.0` `13th Gen Intel(R) Core(TM) i7-13700F, 32 GB RAM` Scene: market-framegen, from a new save (frame_pacing=0, frame_rate_cap=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-framegen: 1 game start a side, market 30 s after 5 s warm-up; each number the median of the runs, then of 1 report How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 67efc4d | After: this PR @ 0c552c9 | |---|---|---| | market-framegen · `vsync=1, frame_generation=2` · market · frame rate | 60.0 | 60.0 (−0%) | | market-framegen · `vsync=1, frame_generation=2` · market · frame time (p99) (ms) | 26.5 | 26.1 (−1%) | | market-framegen · `vsync=1, frame_generation=2` · forbidden log lines | 0.0 | 0.0 | | market-framegen · `vsync=1, frame_generation=3` · market · frame rate | 60.0 | 60.0 (−0%) | | market-framegen · `vsync=1, frame_generation=3` · market · frame time (p99) (ms) | 26.1 | 26.0 (−0%) | | market-framegen · `vsync=1, frame_generation=3` · forbidden log lines | 0.0 | 0.0 | | market-framegen · `vsync=0, frame_generation=2` · market · frame rate | 60.0 | 60.0 (−0%) | | market-framegen · `vsync=0, frame_generation=2` · market · frame time (p99) (ms) | 25.6 | 26.4 (+3%) | | market-framegen · `vsync=0, frame_generation=2` · forbidden log lines | 0.0 | 0.0 | | market-framegen · `vsync=0, frame_generation=3` · market · frame rate | 60.0 | 60.0 (+0%) | | market-framegen · `vsync=0, frame_generation=3` · market · frame time (p99) (ms) | 25.5 | 25.6 (+0%) | | market-framegen · `vsync=0, frame_generation=3` · forbidden log lines | 0.0 | 0.0 | ### Flags and settings | Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame rate) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `vsync` | menu setting | `1`, `0` | main's default | the PR's default | market-framegen, the PR at 1 → at 0: 60.0 → 60.0 (−0%) | no clear effect | | `frame_generation` | menu setting | `2`, `3` | main's default | the PR's default | market-framegen, the PR at 2 → at 3: 60.0 → 60.0 (+0%) | no clear effect | <details><summary>Markdown for the PR description</summary> ```markdown ## Measurements **Verdict:** fail on windows+nvidia+gpu-rtx-40xx (1/1 report): `market-framegen screenshot.max_diff` failed. Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 4070, 621.1.0` `13th Gen Intel(R) Core(TM) i7-13700F, 32 GB RAM` Scene: market-framegen, from a new save (frame_pacing=0, frame_rate_cap=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-framegen: 1 game start a side, market 30 s after 5 s warm-up; each number the median of the runs, then of 1 report How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 67efc4d | After: this PR @ 0c552c9 | |---|---|---| | market-framegen · `vsync=1, frame_generation=2` · market · frame rate | 60.0 | 60.0 (−0%) | | market-framegen · `vsync=1, frame_generation=2` · market · frame time (p99) (ms) | 26.5 | 26.1 (−1%) | | market-framegen · `vsync=1, frame_generation=2` · forbidden log lines | 0.0 | 0.0 | | market-framegen · `vsync=1, frame_generation=3` · market · frame rate | 60.0 | 60.0 (−0%) | | market-framegen · `vsync=1, frame_generation=3` · market · frame time (p99) (ms) | 26.1 | 26.0 (−0%) | | market-framegen · `vsync=1, frame_generation=3` · forbidden log lines | 0.0 | 0.0 | | market-framegen · `vsync=0, frame_generation=2` · market · frame rate | 60.0 | 60.0 (−0%) | | market-framegen · `vsync=0, frame_generation=2` · market · frame time (p99) (ms) | 25.6 | 26.4 (+3%) | | market-framegen · `vsync=0, frame_generation=2` · forbidden log lines | 0.0 | 0.0 | | market-framegen · `vsync=0, frame_generation=3` · market · frame rate | 60.0 | 60.0 (+0%) | | market-framegen · `vsync=0, frame_generation=3` · market · frame time (p99) (ms) | 25.5 | 25.6 (+0%) | | market-framegen · `vsync=0, frame_generation=3` · forbidden log lines | 0.0 | 0.0 | ### Flags and settings | Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame rate) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `vsync` | menu setting | `1`, `0` | main's default | the PR's default | market-framegen, the PR at 1 → at 0: 60.0 → 60.0 (−0%) | no clear effect | | `frame_generation` | menu setting | `2`, `3` | main's default | the PR's default | market-framegen, the PR at 2 → at 3: 60.0 → 60.0 (+0%) | no clear effect | ``` </details> #### Measurements · windows+amd **Verdict:** fail on windows+amd (1/1 report): `market-framegen screenshot.max_diff` failed. Hardware: 1: windows+amd+amd-proprietary+dgpu `AMD Radeon RX 9070 XT, 2.0.416` `AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM` Scene: market-framegen, from a new save (frame_pacing=0, frame_rate_cap=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-framegen: 1 game start a side, market 30 s after 5 s warm-up; each number the median of the runs, then of 1 report How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 67efc4d | After: this PR @ 0c552c9 | |---|---|---| | market-framegen · `vsync=1, frame_generation=2` · market · frame rate | 60.0 | 60.0 (−0%) | | market-framegen · `vsync=1, frame_generation=2` · market · frame time (p99) (ms) | 32.9 | 22.8 (−31%) | | market-framegen · `vsync=1, frame_generation=2` · forbidden log lines | 0.0 | 0.0 | | market-framegen · `vsync=1, frame_generation=3` · market · frame rate | 50.6 | 51.8 (+2%) | | market-framegen · `vsync=1, frame_generation=3` · market · frame time (p99) (ms) | 34.9 | 34.5 (−1%) | | market-framegen · `vsync=1, frame_generation=3` · forbidden log lines | 0.0 | 0.0 | | market-framegen · `vsync=0, frame_generation=2` · market · frame rate | 49.5 | 48.7 (−2%) | | market-framegen · `vsync=0, frame_generation=2` · market · frame time (p99) (ms) | 35.3 | 34.3 (−3%) | | market-framegen · `vsync=0, frame_generation=2` · forbidden log lines | 0.0 | 0.0 | | market-framegen · `vsync=0, frame_generation=3` · market · frame rate | 49.0 | 46.4 (−5%) | | market-framegen · `vsync=0, frame_generation=3` · market · frame time (p99) (ms) | 36.4 | 36.8 (+1%) | | market-framegen · `vsync=0, frame_generation=3` · forbidden log lines | 0.0 | 0.0 | ### Flags and settings | Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame rate) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `vsync` | menu setting | `1`, `0` | main's default | the PR's default | market-framegen, the PR at 1 → at 0: 60.0 → 48.7 (−19%) | doesn't help | | `frame_generation` | menu setting | `2`, `3` | main's default | the PR's default | market-framegen, the PR at 2 → at 3: 60.0 → 51.8 (−14%) | doesn't help | <details><summary>Markdown for the PR description</summary> ```markdown ## Measurements **Verdict:** fail on windows+amd (1/1 report): `market-framegen screenshot.max_diff` failed. Hardware: 1: windows+amd+amd-proprietary+dgpu `AMD Radeon RX 9070 XT, 2.0.416` `AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM` Scene: market-framegen, from a new save (frame_pacing=0, frame_rate_cap=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-framegen: 1 game start a side, market 30 s after 5 s warm-up; each number the median of the runs, then of 1 report How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 67efc4d | After: this PR @ 0c552c9 | |---|---|---| | market-framegen · `vsync=1, frame_generation=2` · market · frame rate | 60.0 | 60.0 (−0%) | | market-framegen · `vsync=1, frame_generation=2` · market · frame time (p99) (ms) | 32.9 | 22.8 (−31%) | | market-framegen · `vsync=1, frame_generation=2` · forbidden log lines | 0.0 | 0.0 | | market-framegen · `vsync=1, frame_generation=3` · market · frame rate | 50.6 | 51.8 (+2%) | | market-framegen · `vsync=1, frame_generation=3` · market · frame time (p99) (ms) | 34.9 | 34.5 (−1%) | | market-framegen · `vsync=1, frame_generation=3` · forbidden log lines | 0.0 | 0.0 | | market-framegen · `vsync=0, frame_generation=2` · market · frame rate | 49.5 | 48.7 (−2%) | | market-framegen · `vsync=0, frame_generation=2` · market · frame time (p99) (ms) | 35.3 | 34.3 (−3%) | | market-framegen · `vsync=0, frame_generation=2` · forbidden log lines | 0.0 | 0.0 | | market-framegen · `vsync=0, frame_generation=3` · market · frame rate | 49.0 | 46.4 (−5%) | | market-framegen · `vsync=0, frame_generation=3` · market · frame time (p99) (ms) | 36.4 | 36.8 (+1%) | | market-framegen · `vsync=0, frame_generation=3` · forbidden log lines | 0.0 | 0.0 | ### Flags and settings | Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame rate) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `vsync` | menu setting | `1`, `0` | main's default | the PR's default | market-framegen, the PR at 1 → at 0: 60.0 → 48.7 (−19%) | doesn't help | | `frame_generation` | menu setting | `2`, `3` | main's default | the PR's default | market-framegen, the PR at 2 → at 3: 60.0 → 51.8 (−14%) | doesn't help | ``` </details> #### Measurements · linux+amd **Verdict:** fail on linux+amd (2/1 report): `market-framegen screenshot.max_diff`; `market-framegen market.frametime_p99_ms.max_delta_pct (+18.2%)`; `market-framegen market.fps_mean.min_delta_pct (-12.7%)` failed. Hardware: 1: linux+amd+radv+dgpu `AMD Radeon RX 7900 XTX (RADV NAVI31), 26.2.7` `AMD Ryzen 7 5800X3D 8-Core Processor, 64 GB RAM`; 2: linux+amd+radv+dgpu `AMD Radeon RX 7900 XT (RADV NAVI31), 26.2.6` `AMD Ryzen 7 5700X3D 8-Core Processor, 32 GB RAM` Scene: market-framegen, from a new save (frame_pacing=0, frame_rate_cap=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-framegen: 1 game start a side, market 30 s after 5 s warm-up; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 67efc4d | After: this PR @ 0c552c9 | |---|---|---| | market-framegen · `vsync=1, frame_generation=2` · market · frame rate | 34.1 | 45.1 (+32%) | | market-framegen · `vsync=1, frame_generation=2` · market · frame time (p99) (ms) | 1,004 | 512.4 (−49%) | | market-framegen · `vsync=1, frame_generation=2` · forbidden log lines | 0.0 | 0.0 | | market-framegen · `vsync=1, frame_generation=3` · market · frame rate | 34.3 | 35.7 (+4%) | | market-framegen · `vsync=1, frame_generation=3` · market · frame time (p99) (ms) | 516.0 | 516.4 (+0%) | | market-framegen · `vsync=1, frame_generation=3` · forbidden log lines | 0.0 | 0.0 | | market-framegen · `vsync=0, frame_generation=2` · market · frame rate | 35.4 | 34.7 (−2%) | | market-framegen · `vsync=0, frame_generation=2` · market · frame time (p99) (ms) | 514.7 | 515.4 (+0%) | | market-framegen · `vsync=0, frame_generation=2` · forbidden log lines | 0.0 | 0.0 | | market-framegen · `vsync=0, frame_generation=3` · market · frame rate | 35.6 | 29.3 (−18%) | | market-framegen · `vsync=0, frame_generation=3` · market · frame time (p99) (ms) | 514.8 | 517.0 (+0%) | | market-framegen · `vsync=0, frame_generation=3` · forbidden log lines | 0.0 | 0.0 | ### Flags and settings | Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame rate) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `vsync` | menu setting | `1`, `0` | main's default | the PR's default | market-framegen, the PR at 1 → at 0: 45.1 → 34.7 (−23%) | doesn't help | | `frame_generation` | menu setting | `2`, `3` | main's default | the PR's default | market-framegen, the PR at 2 → at 3: 45.1 → 35.7 (−21%) | doesn't help | <details><summary>Markdown for the PR description</summary> ```markdown ## Measurements **Verdict:** fail on linux+amd (2/1 report): `market-framegen screenshot.max_diff`; `market-framegen market.frametime_p99_ms.max_delta_pct (+18.2%)`; `market-framegen market.fps_mean.min_delta_pct (-12.7%)` failed. Hardware: 1: linux+amd+radv+dgpu `AMD Radeon RX 7900 XTX (RADV NAVI31), 26.2.7` `AMD Ryzen 7 5800X3D 8-Core Processor, 64 GB RAM`; 2: linux+amd+radv+dgpu `AMD Radeon RX 7900 XT (RADV NAVI31), 26.2.6` `AMD Ryzen 7 5700X3D 8-Core Processor, 32 GB RAM` Scene: market-framegen, from a new save (frame_pacing=0, frame_rate_cap=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-framegen: 1 game start a side, market 30 s after 5 s warm-up; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 67efc4d | After: this PR @ 0c552c9 | |---|---|---| | market-framegen · `vsync=1, frame_generation=2` · market · frame rate | 34.1 | 45.1 (+32%) | | market-framegen · `vsync=1, frame_generation=2` · market · frame time (p99) (ms) | 1,004 | 512.4 (−49%) | | market-framegen · `vsync=1, frame_generation=2` · forbidden log lines | 0.0 | 0.0 | | market-framegen · `vsync=1, frame_generation=3` · market · frame rate | 34.3 | 35.7 (+4%) | | market-framegen · `vsync=1, frame_generation=3` · market · frame time (p99) (ms) | 516.0 | 516.4 (+0%) | | market-framegen · `vsync=1, frame_generation=3` · forbidden log lines | 0.0 | 0.0 | | market-framegen · `vsync=0, frame_generation=2` · market · frame rate | 35.4 | 34.7 (−2%) | | market-framegen · `vsync=0, frame_generation=2` · market · frame time (p99) (ms) | 514.7 | 515.4 (+0%) | | market-framegen · `vsync=0, frame_generation=2` · forbidden log lines | 0.0 | 0.0 | | market-framegen · `vsync=0, frame_generation=3` · market · frame rate | 35.6 | 29.3 (−18%) | | market-framegen · `vsync=0, frame_generation=3` · market · frame time (p99) (ms) | 514.8 | 517.0 (+0%) | | market-framegen · `vsync=0, frame_generation=3` · forbidden log lines | 0.0 | 0.0 | ### Flags and settings | Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame rate) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `vsync` | menu setting | `1`, `0` | main's default | the PR's default | market-framegen, the PR at 1 → at 0: 45.1 → 34.7 (−23%) | doesn't help | | `frame_generation` | menu setting | `2`, `3` | main's default | the PR's default | market-framegen, the PR at 2 → at 3: 45.1 → 35.7 (−21%) | doesn't help | ``` </details> </details>
HumanBean requested changes 2026-11-17 18:37:30 +00:00
Dismissed
HumanBean left a comment

Verdict: Request changes. The smoothness gain is real and well measured. But this turns the timeline on for the most common frame generation setup (V-Sync Auto with DLSS Frame Gen is FIFO), and the latency evidence it gives, DisplayLatency, can't see the cost the change adds. A likely cost nobody has measured has to be measured before this merges.

What it does: under V-Sync On and Auto, a fixed multiplier's frames go out at their own times, no sooner than a refresh apart, instead of queueing in FIFO. The game holds 55 fps at the display's limit instead of 51-53, and frames on the screen go from sd 2.3 ms to 0.7 ms. It makes the code better if it doesn't cost latency.

Reviewed: 0c552c97 against #1362's head e3420742 (this PR's own commits; #1362 itself is reviewed there). Read in full: the changes to vk_framegen.cpp (fixed_on_timeline, fifo_slot, display_main's slot handling), vk_main.cpp (create_swapchain's set_too_big and fg_sets, create_device's comment), vk_replay.cpp (present_slots_for's comment, present_image's remake key), display_refresh_mhz on both platforms, switches.def and the hint. Skimmed: the test model, docs/design.md section 13, the README, development.md, the measure skill, the 14 docs/tested/ rows, the 13 languages. Nothing run (a code review).
Fixed in this review: nothing.
Checked and fine:

  • fifo_slot and its use: a present that isn't shown gives its slot back, and a late one moves the next slot.
  • vsync_now's new term can't collide with the others: swapchain_framegen()*2+1 stays under 16, and Auto is opts.framegen == 1.
  • set_too_big uses the surface's own spare count, so 7x and 8x on an NVIDIA surface keep one set's images, as on main.
  • The image request stays at most kPresentSlotsMax over the least (#1362's e3420742).
  • The refresh is known on Linux too, through the host window's refresh_mhz.
  • The hint no longer points at RX_VK_PRESENT_QUEUE.
  • RX_VK_FG_TIMELINE=0 gives main's images, slots and path in every mode.

Blocking

  1. Latency under FIFO is not measured. Risks says it "stayed the same or went down: 11.8 ms at 3x, 14.2 -> 11.2 ms at 2x", from DisplayLatency. PresentMon measures that from the frame's CPUStartTime, which, for an app that gives it no markers, is the end of the present call before. It covers the last few ms before each present, not the time since the game handed the frame over. It can't see what this PR adds: the game's frame held for its lead (made / (made + 1) of a game frame, ~12 ms at 3x and 55 fps) plus late_ns (14.9 ms in the r6A-pr1 log). That every 3x run reads 11.8 ms on both sides fits that. (My #1362 review asked for DisplayLatency too; that was wrong for this.) Main's FIFO queue also delayed the game's frame behind its made ones, so the real difference may be small. But it has to be shown, since this reaches most RTX 40 and 50 players with V-Sync Auto. Two ways that measure it:

    • PresentMon's MsPCLatency (the runs had Reflex On, so the markers are there);
    • a log stat of the game frame's time from framegen_queue to its present_commit, main against this PR.

    Put the result in Measurements and Risks. If it is worse than main, that is a regression to fix, not a trade-off to state.

Suggestions

  • vk_main.cpp:1075, inline: under FIFO with the refresh unknown (display_refresh_mhz() 0), fifo_slot doesn't space the frames. With two sets' images, FIFO can then queue more presents than on main, so latency is deeper than main's, not "as on main" as Not tested says. Taking one set's images there (fg_sets = 1 when FIFO and the refresh is 0) would keep that case as main.

Testing: one PC (RTX 5090, Windows, 165 Hz G-Sync), and its numbers are good. The Test Farm run llun approved (RTX 40, AMD Windows and Linux) is running, but it says itself that it can't measure on-screen pacing, only fps and frame times. The run that holds this merge is a fixed-refresh display with V-Sync On, already in Must be tested. A present timed between vblanks behaves differently there than on VRR, and FIFO's queue no longer covers a frame that misses one. That setup is common: TVs, and the Steam Deck's own panel. A Steam Deck run would cover it and Linux at once.
Overlaps and merge order: stacked on #1362, which merges first. The latency point stands there too, for V-Sync Off.

**Verdict: Request changes.** The smoothness gain is real and well measured. But this turns the timeline on for the most common frame generation setup (V-Sync Auto with DLSS Frame Gen is FIFO), and the latency evidence it gives, `DisplayLatency`, can't see the cost the change adds. A likely cost nobody has measured has to be measured before this merges. What it does: under V-Sync On and Auto, a fixed multiplier's frames go out at their own times, no sooner than a refresh apart, instead of queueing in FIFO. The game holds 55 fps at the display's limit instead of 51-53, and frames on the screen go from sd 2.3 ms to 0.7 ms. It makes the code better if it doesn't cost latency. **Reviewed:** 0c552c97 against #1362's head e3420742 (this PR's own commits; #1362 itself is reviewed there). Read in full: the changes to `vk_framegen.cpp` (`fixed_on_timeline`, `fifo_slot`, `display_main`'s slot handling), `vk_main.cpp` (`create_swapchain`'s `set_too_big` and `fg_sets`, `create_device`'s comment), `vk_replay.cpp` (`present_slots_for`'s comment, `present_image`'s remake key), `display_refresh_mhz` on both platforms, `switches.def` and the hint. Skimmed: the test model, `docs/design.md` section 13, the README, development.md, the measure skill, the 14 `docs/tested/` rows, the 13 languages. Nothing run (a code review). **Fixed in this review:** nothing. **Checked and fine:** - `fifo_slot` and its use: a present that isn't shown gives its slot back, and a late one moves the next slot. - `vsync_now`'s new term can't collide with the others: `swapchain_framegen()*2+1` stays under 16, and Auto is `opts.framegen == 1`. - `set_too_big` uses the surface's own spare count, so 7x and 8x on an NVIDIA surface keep one set's images, as on main. - The image request stays at most `kPresentSlotsMax` over the least (#1362's e3420742). - The refresh is known on Linux too, through the host window's `refresh_mhz`. - The hint no longer points at `RX_VK_PRESENT_QUEUE`. - `RX_VK_FG_TIMELINE=0` gives main's images, slots and path in every mode. **Blocking** 1. **Latency under FIFO is not measured.** Risks says it "stayed the same or went down: 11.8 ms at 3x, 14.2 -> 11.2 ms at 2x", from `DisplayLatency`. PresentMon measures that from the frame's `CPUStartTime`, which, for an app that gives it no markers, is the end of the present call before. It covers the last few ms before each present, not the time since the game handed the frame over. It can't see what this PR adds: the game's frame held for its lead (made / (made + 1) of a game frame, ~12 ms at 3x and 55 fps) plus `late_ns` (14.9 ms in the r6A-pr1 log). That every 3x run reads 11.8 ms on both sides fits that. (My #1362 review asked for `DisplayLatency` too; that was wrong for this.) Main's FIFO queue also delayed the game's frame behind its made ones, so the real difference may be small. But it has to be shown, since this reaches most RTX 40 and 50 players with V-Sync Auto. Two ways that measure it: - PresentMon's `MsPCLatency` (the runs had Reflex On, so the markers are there); - a log stat of the game frame's time from `framegen_queue` to its `present_commit`, main against this PR. Put the result in Measurements and Risks. If it is worse than main, that is a regression to fix, not a trade-off to state. **Suggestions** - `vk_main.cpp:1075`, inline: under FIFO with the refresh unknown (`display_refresh_mhz()` 0), `fifo_slot` doesn't space the frames. With two sets' images, FIFO can then queue more presents than on main, so latency is deeper than main's, not "as on main" as Not tested says. Taking one set's images there (`fg_sets = 1` when FIFO and the refresh is 0) would keep that case as main. **Testing:** one PC (RTX 5090, Windows, 165 Hz G-Sync), and its numbers are good. The Test Farm run llun approved (RTX 40, AMD Windows and Linux) is running, but it says itself that it can't measure on-screen pacing, only fps and frame times. The run that holds this merge is a **fixed-refresh display with V-Sync On**, already in Must be tested. A present timed between vblanks behaves differently there than on VRR, and FIFO's queue no longer covers a frame that misses one. That setup is common: TVs, and the Steam Deck's own panel. A Steam Deck run would cover it and Linux at once. **Overlaps and merge order:** stacked on [#1362](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1362), which merges first. The latency point stands there too, for V-Sync Off.
@ -1056,0 +1072,4 @@
const bool timeline = !(timeline_env && env_value_off(timeline_env));
const bool set_too_big = mode == VK_PRESENT_MODE_FIFO_KHR && caps.maxImageCount &&
(uint32_t)std::max(opts.framegen, 0) > caps.maxImageCount - std::min(caps.maxImageCount, caps.minImageCount);
const uint32_t fg_sets = timeline && !set_too_big ? 2 : 1;
Owner

Under FIFO with the refresh unknown (display_refresh_mhz() returns 0), fifo_slot doesn't space the frames, so with two sets' images FIFO can queue more presents than on main: more latency than main, not "as on main" as Not tested says. Suggest one set's images there: fg_sets = 1 when the mode is FIFO and the refresh is 0.

Under FIFO with the refresh unknown (`display_refresh_mhz()` returns 0), `fifo_slot` doesn't space the frames, so with two sets' images FIFO can queue more presents than on main: more latency than main, not "as on main" as Not tested says. Suggest one set's images there: `fg_sets = 1` when the mode is FIFO and the refresh is 0.
Owner

Brought up to the ready-for-review standard (#1454): the checklist's Everyone list has two new boxes, added here from what this PR's description and comments show (please check they match what you know).

  • Tested on my own PC: ticked: Testing's Tested: an in-game run on Windows 11, RTX 5090, on an earlier head; later fixes not run on screen.
  • Nothing gets worse that I know of: not ticked: Risks names extra swapchain images under FIFO, a memory cost with no measurement. Measure that cost and state it in Risks, then tick it.
Brought up to the [ready-for-review standard](https://git.magicbean.dev/MagicBeanDev/Longshot/src/branch/main/CONTRIBUTING.md#ready-for-review-out-of-wip) (#1454): the checklist's Everyone list has two new boxes, added here from what this PR's description and comments show (please check they match what you know). - *Tested on my own PC*: ticked: Testing's Tested: an in-game run on Windows 11, RTX 5090, on an earlier head; later fixes not run on screen. - *Nothing gets worse that I know of*: not ticked: Risks names extra swapchain images under FIFO, a memory cost with no measurement. Measure that cost and state it in Risks, then tick it.
HumanBean force-pushed fix/fg-fifo-paced from 0c552c9771
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 9s
beanstalk/approval approved by llun (reviewed)
beanstalk/windows+nvidia+gpu-rtx-40xx 1/1 fail
beanstalk/windows+amd 1/1 fail
beanstalk/linux+amd 2/1 fail
to 09e3e11330
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 8s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 16s
CI / Workflow lint (actionlint) (pull_request) Successful in 16s
Third-party parts / As their notes say (pull_request) Successful in 25s
PR description / Description follows the template (pull_request_target) Failing after 3s
beanstalk/approval changed since the request: ask again
2026-11-17 21:22:48 +00:00
Compare
Member

Beanstalk test farm

Commit 09e3e11 · tier untrusted · approved by nobody yet · dashboard

A member of BigBeans can review this commit and comment @Beanstalk to test it.

<!-- beanstalk:sticky --> ### Beanstalk test farm Commit `09e3e11` · tier **untrusted** · approved by nobody yet · [dashboard](https://beanstalk.magicbean.dev/prs/1442) A member of `BigBeans` can review this commit and comment `@Beanstalk` to test it.
Owner

Rebased onto main e8e92f97 (#1362 has merged), and two fixes from my review on top, as the person I work for asked:

  • Rebase: this PR's four commits only. The merge of #1362 is gone, since it's on main now. Conflicts resolved: the hint takes this branch's settled text in all 13 languages; create_swapchain keeps both #1362's image cap and this PR's set_too_big; the check's text follows. Checked: in every file this PR changes, its own changes are line for line what they were at 0c552c97.
  • 09e3e113: under FIFO with the display's refresh unknown (display_refresh_mhz() 0), one set's images, as on main. My inline point at vk_main.cpp:1075.
  • 09e3e113, for the latency question: the first vk: frame interpolation: line now ends "the game's frames presented N ms after the game handed them over". RX_VK_FG_TIMELINE=0 runs main's path in the same build, so one build gives both sides. It's the present call, not the screen: under FIFO main's path queues more in the swapchain, so it reads main's side low, never this PR's high.

Not built or run here: the checks run on CI. The latency A/B itself still has to be run in the game.

Rebased onto main e8e92f97 (#1362 has merged), and two fixes from my review on top, as the person I work for asked: - **Rebase:** this PR's four commits only. The merge of #1362 is gone, since it's on main now. Conflicts resolved: the hint takes this branch's settled text in all 13 languages; `create_swapchain` keeps both #1362's image cap and this PR's `set_too_big`; the check's text follows. Checked: in every file this PR changes, its own changes are line for line what they were at 0c552c97. - **09e3e113:** under FIFO with the display's refresh unknown (`display_refresh_mhz()` 0), one set's images, as on main. My inline point at `vk_main.cpp:1075`. - **09e3e113, for the latency question:** the first `vk: frame interpolation:` line now ends "the game's frames presented N ms after the game handed them over". `RX_VK_FG_TIMELINE=0` runs main's path in the same build, so one build gives both sides. It's the present call, not the screen: under FIFO main's path queues more in the swapchain, so it reads main's side low, never this PR's high. Not built or run here: the checks run on CI. The latency A/B itself still has to be run in the game.
HumanBean left a comment

Verdict: Request changes. The smoothness gain under V-Sync On stands, and the farm shows no frame-rate or frame-time cost on RTX 40, AMD Windows or Linux. But the latency question that blocked it is still open. Under V-Sync Auto with DLSS Frame Gen, the most common frame generation setup, nobody has shown that the game's frame reaches the screen no later than on main. The new log line makes that one game run; it hasn't been run yet.

What it does for players: under V-Sync On and Auto, a fixed multiplier's frames go out at their own times, a refresh apart at least, instead of queueing in FIFO. At the display's limit the game holds 55 fps instead of 51-53, and frame times on screen go from sd 2.3 to 0.7 ms (RTX 5090). It makes the code better if the latency holds.

Reviewed: a re-review: 09e3e113 against my review's 0c552c97. The branch is rebased onto main e8e92f97 with the PR's four commits only. In every file it changes, its own changes match 0c552c97 line for line. Plus 09e3e113, which I wrote: create_swapchain's fifo_unpaced, and the log's handover-to-present mean in display_main. I also read the Test Farm's four reports for 0c552c97. Nothing built or run (a code review). 09e3e113 is my own code, so another reviewer should read it before this merges.
Fixed in this review: the rebase (described in the comment above), and 09e3e113: one set's images under FIFO when the display's refresh is unknown, which was my inline point. Pushed to the PR's branch.
Checked and fine:

  • Rebased: the hint keeps the settled text (every mode, no present queue) in all 13 languages, and create_swapchain keeps #1362's cap beside set_too_big.
  • display_refresh_mhz is declared before create_swapchain, and both platforms answer it (Windows from the window's monitor, Linux from the host window).
  • The new stat counts only a set's game frame (game[k] on the timeline, k == made on main's path), after a present that was shown, and its reset list grew with the struct.
  • The farm on 0c552c97:
    • fps is the same as main and p99 frame time the same or lower on RTX 4070, RX 9070 XT and RX 7900 XTX: Windows AMD p99 32.9 → 22.8 ms at V-Sync On 2x, Linux 1002 → 23.5 ms at V-Sync On 2x.
    • The second Linux PC ran at 8-30 fps with 1-second frames on both sides, so that PC is broken.
    • The screenshot check fails everywhere (0.28-0.87). The V-Sync Off cells fail too, and this PR doesn't change V-Sync Off against #1362. The farm compared against main 67efc4d, before #1362, and took the picture while the camera turned. The pictures aren't published, so I can't tell a different moment from a wrong picture.

Blocking

  1. The latency A/B, in the game. One build is enough now:

    • V-Sync On (or Auto with DLSS FG), 3x;
    • the camera turning, two runs each of the default and RX_VK_FG_TIMELINE=0, interleaved;
    • from the first vk: frame interpolation: line, "the game's frames presented N ms after the game handed them over", median per run.

    It reads main's side low (FIFO's queue behind the present isn't counted), so this PR at or below =0 settles it. Above =0 needs the screen (Reflex's PC latency) to decide. Put the numbers in Measurements and Risks. A run on this PR's RTX 5090 is ideal; an RTX 3090 with FSR 3.1 FG would do too. I can run that here if you want.

  2. A fixed-refresh display with V-Sync On (already in Must be tested). A frame that misses a vblank is no longer covered by FIFO's queue there, so it holds the merge. A TV or a Steam Deck (Linux, gamescope) would cover it.

Suggestions

  • Before the next farm run, ask the plan to take its picture with the camera still (or to compare against current main, which has #1362). Then a screenshot failure means something.

Testing:

  • The author's RTX 5090 runs (Windows, 165 Hz G-Sync) at 1a854a3e: smoothness and fps.
  • The farm on 0c552c97: no crash, no frame-time or fps cost; screenshots inconclusive.
  • Not run on 09e3e113 or the rebased head. CI will run the checks.
  • Missing: the latency A/B above, a fixed-refresh display, Intel.

Overlaps and merge order: #1362 is merged; this PR is now on its own.

**Verdict: Request changes.** The smoothness gain under V-Sync On stands, and the farm shows no frame-rate or frame-time cost on RTX 40, AMD Windows or Linux. But the latency question that blocked it is still open. Under V-Sync Auto with DLSS Frame Gen, the most common frame generation setup, nobody has shown that the game's frame reaches the screen no later than on main. The new log line makes that one game run; it hasn't been run yet. What it does for players: under V-Sync On and Auto, a fixed multiplier's frames go out at their own times, a refresh apart at least, instead of queueing in FIFO. At the display's limit the game holds 55 fps instead of 51-53, and frame times on screen go from sd 2.3 to 0.7 ms (RTX 5090). It makes the code better if the latency holds. **Reviewed:** a re-review: 09e3e113 against my review's 0c552c97. The branch is rebased onto main e8e92f97 with the PR's four commits only. In every file it changes, its own changes match 0c552c97 line for line. Plus 09e3e113, which I wrote: `create_swapchain`'s `fifo_unpaced`, and the log's handover-to-present mean in `display_main`. I also read the Test Farm's four reports for 0c552c97. Nothing built or run (a code review). **09e3e113 is my own code, so another reviewer should read it before this merges.** **Fixed in this review:** the rebase (described in the comment above), and 09e3e113: one set's images under FIFO when the display's refresh is unknown, which was my inline point. Pushed to the PR's branch. **Checked and fine:** - Rebased: the hint keeps the settled text (every mode, no present queue) in all 13 languages, and `create_swapchain` keeps #1362's cap beside `set_too_big`. - `display_refresh_mhz` is declared before `create_swapchain`, and both platforms answer it (Windows from the window's monitor, Linux from the host window). - The new stat counts only a set's game frame (`game[k]` on the timeline, `k == made` on main's path), after a present that was shown, and its reset list grew with the struct. - The farm on 0c552c97: - fps is the same as main and p99 frame time the same or lower on RTX 4070, RX 9070 XT and RX 7900 XTX: Windows AMD p99 32.9 → 22.8 ms at V-Sync On 2x, Linux 1002 → 23.5 ms at V-Sync On 2x. - The second Linux PC ran at 8-30 fps with 1-second frames on both sides, so that PC is broken. - The screenshot check fails everywhere (0.28-0.87). The V-Sync Off cells fail too, and this PR doesn't change V-Sync Off against #1362. The farm compared against main 67efc4d, before #1362, and took the picture while the camera turned. The pictures aren't published, so I can't tell a different moment from a wrong picture. **Blocking** 1. **The latency A/B, in the game.** One build is enough now: - V-Sync On (or Auto with DLSS FG), 3x; - the camera turning, two runs each of the default and `RX_VK_FG_TIMELINE=0`, interleaved; - from the first `vk: frame interpolation:` line, "the game's frames presented N ms after the game handed them over", median per run. It reads main's side low (FIFO's queue behind the present isn't counted), so this PR at or below `=0` settles it. Above `=0` needs the screen (Reflex's PC latency) to decide. Put the numbers in Measurements and Risks. A run on this PR's RTX 5090 is ideal; an RTX 3090 with FSR 3.1 FG would do too. I can run that here if you want. 2. **A fixed-refresh display with V-Sync On** (already in Must be tested). A frame that misses a vblank is no longer covered by FIFO's queue there, so it holds the merge. A TV or a Steam Deck (Linux, gamescope) would cover it. **Suggestions** - Before the next farm run, ask the plan to take its picture with the camera still (or to compare against current main, which has #1362). Then a screenshot failure means something. **Testing:** - The author's RTX 5090 runs (Windows, 165 Hz G-Sync) at 1a854a3e: smoothness and fps. - The farm on 0c552c97: no crash, no frame-time or fps cost; screenshots inconclusive. - Not run on 09e3e113 or the rebased head. CI will run the checks. - Missing: the latency A/B above, a fixed-refresh display, Intel. **Overlaps and merge order:** [#1362](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1362) is merged; this PR is now on its own.
HumanBean changed title from WIP: fix(vk): frame generation's fixed multipliers on the game's timeline under V-Sync On (FIFO) too to fix(vk): frame generation's fixed multipliers on the game's timeline under V-Sync On (FIFO) too 2026-11-17 21:47:59 +00:00
HumanBean deleted branch fix/fg-fifo-paced 2026-11-17 21:48:20 +00:00
Member

Verdict: comment, after the merge. I found no bug in the diff, and I read 09e3e113 (HumanBean's own commit, which he asked another reader for): it is fine. This merged at 21:48 UTC while his request for changes (review 1695) was open, so what it asks for is owed: the latency A/B in the game and a fixed-refresh display with V-Sync On. Ranked by risk, what is left on current main:

  1. The FIFO latency is unmeasured (his blocking item 1; highest, because it is on by default for the most common frame generation setup).
  2. A fixed-refresh display with V-Sync On (his blocking item 2): frames can now land two refreshes apart where main's queue hid it.
  3. The Test Farm's red (RTX 4070, AMD Windows, Linux): not about this change, but two Linux V-Sync Off cells need a rerun, because they may be #1362's and that is in main too.
  4. Main's Guide screenshots check went one issue redder with this merge (docs-only fix).
  5. Smaller: the swapchain's extra images (a cost nobody wrote down), Frame pacing On, a stale delay at the refresh limit, one needless swapchain remake, and #1476's relation.

What it does for players. With V-Sync On (and Auto with DLSS Frame Gen), a fixed multiplier's frames now go out at their own times on the game's timeline, but never sooner than a refresh after the frame before. On main they came back to back and the last frame of a set stayed on the screen until the next set. The author's numbers (RTX 5090, 165 Hz G-Sync): frame time on screen sd 2.3 ms to 0.7 ms at V-Sync On 3x, and the game at the refresh limit from 51-53 to 55 fps.

What I checked and found fine (line numbers on current main)

  • fixed_on_timeline (vk_framegen.cpp:225) lost its FIFO argument and both callers follow (on_line, 633; the test).
  • fifo_slot (235): no slot or no refresh gives the due time; otherwise the later of the due time and a refresh after the last slot; a slot more than half a refresh behind starts again from now. I broke it two ways (below) and the new test fails each.
  • Slot bookkeeping in display_main (783-820): the slot is taken before the wait, moves to the real present time when that is over 1 ms late (816), is given back when present_commit says nothing was shown (820), and the late count is against the slot (786-791). The mode is read at each present (788), so a chain made again for another mode is honoured.
  • create_swapchain (vk_main.cpp:1084-1100): set_too_big uses the surface's own spare count, so 7x and 8x on an NVIDIA surface keep one set's images; fifo_unpaced (09e3e113) answers the inline point of review 1681: with no known refresh, one set's images as main. The slot count is stored with the chain (1100).
  • vsync_now (vk_replay.cpp:5667): the multiplier and DLSS-G terms stay under 16, so they cannot collide with the V-Sync term (a multiple of 16); the new term is a multiple of 256, 1280 or more, so no two states share a key.
  • Everything the PR changes in display_main and create_swapchain is gated on FIFO (s.refresh && dev.swap_mode == FIFO, set_too_big, fifo_unpaced), so V-Sync Off and mailbox behave as main with #1362 does. The exceptions are a display_refresh_mhz() call per set (cached for a second) and the longer first log line.
  • RX_VK_FG_TIMELINE=0 gives main's path in every mode: no timeline, one set's images, 3 slots. So one build gives both sides of an A/B.
  • The log counters: the reset at vk_framegen.cpp:683 has 12 initialisers for the struct's 12 fields; the new mean counts only a set's game frame, after a present that was shown (831).
  • Docs, hint (13 languages), switches.def and the design.md anchor rename are consistent; test_doc_anchors follows the new anchor.

1. The latency A/B (owed). What I add on how to measure it

  • #1362's answer measured simulation start to the GPU's end of work and argued the screen sees a present at about the later of its call and its GPU work. That holds where the swapchain does not wait for a refresh (V-Sync Off). Under FIFO a present waits for its refresh and its queue, so that argument and that column cannot be reused here.
  • By construction the game's frame is presented a game-frame lead plus late_ns after it is handed over: fixed_dues(before, now, made, pace_lead(game_ns, made) + extra, ...) (vk_framegen.cpp:1439). With the numbers of the author's own run A (3x, 54.4 fps so an 18.4 ms frame, lead 2/3 of it = 12.3 ms, late_ns 14.9 ms from the log) that is about 27 ms after hand-over, before FIFO's own wait. What main's figure is, only the A/B can say.
  • The author's A log shows 788 of 822 frames held to a refresh (96%): runs A and D3 are refresh-limit runs, where the slots, not the due times, decide. The one run under the limit is D2 (2x, cap 60), and for it the only latency figure is DisplayLatency, which HumanBean explained cannot see this. So run both: under the limit (for example 3x with a cap so that 3 x fps is well under the refresh, the game's rate equal on both sides) and at it.
  • Instruments, one build, RX_VK_FG_TIMELINE=0 against default, alternating, at least three runs a side, medians and the worst run shown, and say whether RX_VK_PRESENT_QUEUE is on (#1476 would change it):
    (a) the new number in the first frame interpolation: line (vk_framegen.cpp:672, 831), on any GPU. It stops at the present call, so it reads main's side low under FIFO (as the comment says): a PR value at or under main's is a pass, a higher one is not a verdict;
    (b) for a higher one, RX_VK_REFLEX_LOG=1 on NVIDIA: its line already prints "simulation start to present end" next to "to the GPU's end" (vk_reflex.cpp:31, 130). #1362's answer quoted only the second; the first is the one this hold moves, because the Reflex present markers bracket the real present call (vk_reflex.cpp:277 and 287), which present_commit makes late (vk_replay.cpp:5925-5934). Neither number includes the time the frame then waits for its refresh, so a screen figure is still needed if (b) is higher;
    (c) HumanBean's "Reflex's PC latency" may not exist in PresentMon: the author said on #1362 that PresentMon 2.3 wrote no PC-latency column in those runs. Say so if it is not there.
  • Put the table in Measurements and the number in Risks. If it is worse than main under the limit, that is a regression to fix; RX_VK_FG_TIMELINE=0 is the stopgap until then.

2. A fixed-refresh display with V-Sync On (owed). The model in the test (tests/test_framegen_fixed_pace.py:155) is a VRR display: each present is shown at its present or a refresh after the one before, with no vblank grid. On a fixed refresh, main's queue is never empty, so its frames land on consecutive vblanks. This PR leaves the queue empty on purpose and spaces presents by the reported refresh, so a present's place against the vblank is not controlled, and near the edge a little jitter turns a one-refresh gap into two. The PR says as much ("frames round to whole refreshes there") but has no number. What the run should show, main against PR on the same display at 2x and 3x: the share of frames shown for 1, 2 and 3 refreshes (PresentMon DisplayedTime in refresh units), the longest gap, and the latency figures above. Windows reports whole Hz and the code guesses the /1.001 rate for a value one under a multiple of 6 (vk_main.cpp:1946-1948), so also say the display's exact refresh.

3. The Test Farm's red, and what it points to. HumanBean's review 1695 already says the main things: the picture rule fails everywhere, the V-Sync Off cells are #1362's, the baseline (main 67efc4d3) is before #1362, the camera turns while the picture is taken, and the second Linux PC is broken. I agree, and add what I found in the four reports (all on 0c552c9, whose changes are line for line those of the merged head except 09e3e113; each had V-Sync On and V-Sync Off cells at 2x and 3x):

  • The picture rule (screenshot.max_diff, limit 0.1) fails in all 12 cells on all four reports (0.28 to 0.87), and every report's "main against itself" field is empty, so there is no noise floor. The PR changes no draw or shader code (vk_framegen.cpp's display thread, vk_main.cpp's image count, vk_replay.cpp's slot count and remake key, texts and docs), so only which frame is captured can differ: [INFERENCE] from the diff, not tested. The same rule failed on #1362 (Linux AMD, 3x 0.52 and 4x 0.02; HumanBean asked there, and I found no answer before it merged) and on #1458 (the swapchain image waited for on the CPU; field-pacing, Windows AMD). To settle it: one main against main pair (or RX_VK_FG_TIMELINE=0 against default on one build) on one machine. If identical code is over 0.1, the threshold is the problem.
  • RTX 4070 (rp_da50...): fps 60.0 in all four cells, p99 within -1% to +3%, no hitches, no forbidden log lines; only the picture rule failed. It says nothing about pacing: the median frame time is 16.5 ms in all four cells, V-Sync Off and 3x included, so the farm's frame times are the game's own 60 fps and not the frames shown (the farm says itself that it cannot measure on-screen pacing).
  • AMD Windows, RX 9070 XT (rp_ebcb...): V-Sync On 2x p99 32.9 to 22.8 ms and stutter 18 to 1; V-Sync On 3x fps 50.6 to 51.8, p99 34.9 to 34.5, stutter 3 to 6 (one run a side). V-Sync Off cells are 2% and 5% lower in fps, inside the 10% rule and #1362's code. Only the picture rule failed.
  • Linux AMD, RX 7900 XTX (rp_19c1...): V-Sync On 2x main 36.3 fps with 13 hitches and p99 1002 ms against 60.0 fps, none and 23.5 ms here (main's side has them in this one cell only: a cold cache or a one-off on that PC, [INFERENCE]); V-Sync On 3x equal (60.0 fps, p99 23.1 ms on both). The V-Sync Off cells are the two real reds: 2x p99 19.7 to 23.3 ms (+18%, worst frame 20.9 to 40.1 ms), 3x fps 60.0 to 52.4, p99 +24%, four hitches (worst frame 1.0 s). These are #1362's path (non-FIFO) on one run a side, and #1362 is in main now: if they are real they are in main, not in this PR. This is the one farm item I would act on: a rerun on current main (V-Sync Off, 3x, FSR 3.1 FG on RADV) with a second run a side.
  • Linux AMD, RX 7900 XT (rp_96c2...): 6 to 30 fps and p99 about 1005 ms on both sides in every cell, "GPU resource waits" 36 to 104 ms a frame against 1.4 ms on the other Linux PC: that PC tells nothing.
  • Net: the four reports show no crash, no device loss and no FIFO regression, and none of them can show pacing or latency. The farm never ran on the merged head (09e3e11 is "untrusted, approved by nobody"), so the next run has to be asked for with a BigBeans member's approval, with the two frame interpolation: lines of the V-Sync On cells attached (the reports show only the end of the log), and with the picture taken with the camera still (HumanBean's suggestion) and a noise floor.

4. Main's Guide screenshots check is one issue redder. It passes on main 93bc8a7f, fails on c392df3a (5 issues from #1388 and #426) and on the merge with 6: gpu/vk/menu_i18n.h changed since the reviewed revision of settings-graphics.png (vk_menu.cpp and vk_internal.h are changed here too but were already flagged). On current main it is 10 issues with other merges since. The picture shows the Quality preset row and the Frame generation and frame rate cap rows, not the Frame pacing hint this PR rewords (that row is on the Debug tab, as the note on #1466 says for #1362's wording), so it should be retained with a new reviewed revision and a dated note, as #1466 did. The PR was merged with that status red.

5. Smaller follow-ups

  1. Extra swapchain images, the unticked box. By the code (vk_main.cpp:1068-1100), on an NVIDIA-like surface (least 2, most 8) FIFO asks for 4, 5 and 6 images on main at 2x, 3x and 4x and 6, 8 and 8 here: +2, +3 and +2 images. At 4 bytes a pixel that is +88 and +133 MB at 5120x2160, +66 and +100 MB at 3840x2160, +29 and +44 MB at 2560x1440 (my arithmetic, not a measurement). The author can close it by pasting the two vk: swapchain WxH, N images log lines (main and this PR) at 2x and 3x and the idle VRAM from the driver into Risks. On a card under 8 GB that cost is not nothing (HumanBean raised the same on #1362).
  2. Frame pacing On with V-Sync On changes behaviour and is not measured. With the pacing row On, main's FIFO path showed the frames on the even line; now present_ahead_wanted(pace || line, ...) and s.timed = s.auto_timed || s.line (vk_framegen.cpp:700-704) put those sets on the timeline instead, so "At an even interval" no longer holds for fixed multipliers. The hint and the docs say so, but every measured row is Frame pacing Off. One A/B at V-Sync On, 3x, Frame pacing On would show whether anyone who turned it on to calm FIFO loses something.
  3. Is late_ns (the GPU delay added to every frame's time) stale at the refresh limit? It is fed only from a set whose first copy went as it came (vk_framegen.cpp:770, as_came at 649), and the new test's own comment says that at the refresh limit under FIFO "every set is left out and the delay keeps its value" (tests/test_framegen_fixed_pace.py:313-315). Then the value from before the limit stays, and one learned during a hitch (it can go up to a whole game frame) stays until the game leaves the limit. The slots hide it while the limit holds, but it comes back in the first frames under the limit. Could the author paste the D3 log's two lines and say what late_ns was before and after the limit was reached? The latency runs in 1 would show it too.
  4. 5x and 6x under FIFO. They have images now (6 spare on an NVIDIA surface) and so go on the timeline under FIFO for the first time; "4x and up under FIFO" is in Not tested. Fine as it is if the description says so for 5x and 6x as well as 7x and 8x.
  5. vsync_now remakes the swapchain in modes where nothing changes (vk_replay.cpp:5667-5668). The term opts.framegen * 256 is added for any multiplier above 4x in every present mode, but only FIFO uses it (set_too_big). Stepping 5x to 6x in the menu at V-Sync Off or mailbox remakes the chain to an identical one. Suggestion:
    const int vsync_now = menu_vsync() * 16 + swapchain_framegen() * 2 + (swapchain_dlssg() ? 1 : 0) +
                          (dev.swap_mode == VK_PRESENT_MODE_FIFO_KHR && opts.framegen > 4 ? opts.framegen * 256 : 0);
    
  6. #1476 (the author's follow-up, open). It turns the presents' own queue on by default for NVIDIA 621.24+ on Windows, and says the 2x FIFO frames are still paired (6 ms, then 11 ms) by the wait on the game's queue until the queue is on. The runs in 1 and 2 should therefore be taken with and without it, and the #1442 description's "the present queue under FIFO" line in Not tested is now live. I did not review #1476.
  7. The description check failed at the merge. My run of the checker on the live body (before the title lost its WIP) listed three things to fix: the two Must-be-tested lines that say no result to expect, the unticked box, and no TL;DR and Breakdown; it also suggested the Windows and Linux box and warned that the measurements are on main 544229a2. The Must-be-tested list is the record of what is owed (latency A/B, fixed-refresh display, Intel, an RTX 40 card on a screen, AMD on a screen), so it is worth fixing even now.

Conflict with main: it was mechanical, and is gone. 0c552c97 against main (93bc8a7f) conflicted in 13 files (the measure skill, README, design.md, development.md, menu_i18n.h, switches.def, vk_framegen.cpp, vk_internal.h, vk_main.cpp, vk_menu.cpp, vk_replay.cpp, test_doc_anchors.py, test_framegen_fixed_pace.py) because #1362 was squashed into main while the PR carried its commits. HumanBean's force-push at 21:22 rebased the PR onto e8e92f97 (main with #1362). I compared the net changed lines of the old head over #1362's head (e3420742) with the new head's four earlier commits over their base: 437 changed lines each, and no line differs in either direction; the file lists are the same. The new head adds only 09e3e113. git merge-tree of the new head with main 93bc8a7f: no conflicts, and it merged. The API's "mergeable: false" was the WIP title.

Overlaps. Before the merge I took the 332 other open pull requests, 178 of which share a file name (README.md and docs/development.md are in most), fetched their heads and merged each against a scratch commit of main plus this head: none conflicted where it did not already conflict with main. I also searched their diffs for display_main, create_swapchain, present_slots_for, swap_spare, vsync_now, fg_sets and FG_TIMELINE: matches were #1390 (merged since), #1354, #1339 and #1334 (their diffs show the removal of present_ahead_wanted's environment parameter, which main already has from #1309), #1105 (callers of create_swapchain), #1043 (a drain condition on swap_spare, behind RX_VK_PRESENT_THREAD, off by default), #966 (one thread-start line) and #424 (a comment). I read those matching lines only, not the whole PRs; I saw no interaction. #1476 came after the scan (above).

What I ran

  • Read the whole diff of the head against main (28 files, +352 -113) and the surrounding code (display_main, framegen_record, create_swapchain, display_refresh_mhz, present_commit, the Reflex log); compared the squash with the head (same 453 changed lines); checked that the FIFO functions are unchanged on current main.
  • The new test, python -I -B tests/test_framegen_fixed_pace.py, on the head: passes. The same test file against main's source (an archive of main 93bc8a7f): fails at its first source check (display_main's fixed_on_timeline(set->by_time, timeline_off) line). So red on main, green on the head.
  • Two mutants of fifo_slot in a copy of the head: always returning the due time fails fifo_slot(10 * ms, 10 * ms, hz240, 10 * ms) == 10 * ms + hz240; moving the "slot far behind" limit to 1000 refreshes fails fifo_slot(10 * ms, 10 * ms, hz240, 30 * ms) == 30 * ms. (My first mutant died of an unused-variable compile error, which proves nothing; I redid it keeping the variables used.) The text checks pin display_main's slot code; its loop is modelled by a copy in the test (run_fifo), so a change of the real loop that keeps the pinned text is not caught.
  • The eleven tests the change touches (doc anchors, env_on, framegen auto, fixed pace, resources, menu i18n, present semaphores, readme menu rows, switch table, tested configurations, vk swapchain compat), through the runner's --exact --strict, on the head and on main 93bc8a7f: 11 passed, 0 failed on both.
  • The whole suite (python -I -B tests/run_all.py --jobs 6 --strict) on the head (before the merge) and on main 93bc8a7f, in two worktrees, compared by failing name: head 674 passed, 38 failed, 17 skipped; main 675 passed, 38 failed, 17 skipped. The same 38 test files fail on both (this Linux PC's own failures, not looked into one by one); the one test more on main is tests/test_target_retention.py from #1462, which the head's older base lacks (it passes on main). So the head adds no failure. I did not rerun it on the merge or on current main.
  • The Windows-target syntax check on the head against e8e92f97 (the changed drivers: test_framegen_fixed_pace.py, test_doc_anchors.py, test_present_semaphores.py): test_framegen_fixed_pace.py compiles for the Windows target (PASS, syntax only; execution not tested). test_present_semaphores.py FAILS the checker's CRT policy: its fixture includes longshot_env.h without defining _CRT_SECURE_NO_WARNINGS first. That is not this change: the PR's only edit in that file is the opts struct line, and the include is there in the base (read from the diff, not run on the base). Windows execution of both fixtures: not tested.
  • The Guide screenshots check (scripts/check_guide_screenshots.py --review-sources) on the head, on main 93bc8a7f, on c392df3a, on the merge and on current main: passes only on 93bc8a7f; 7, 5, 6 and 10 issues on the others (the head's 7 include files from #1362 and #1464 that its older base had not retained yet).
  • The live description through the repository's description checker (before the merge): three things to fix and the suggestions above.
  • Trial merges against main and against 178 open pull requests; the old head's merge and the patch comparison (above); CI statuses of the head (Guide screenshots and the description check red, the title, lint and third-party checks green, the Python source checks skipped as usual).
  • Read all of the thread, #1362's thread and reviews, #1476's description, and the four farm reports.

What I did not run: the game, any GPU, PresentMon or Reflex logs (this PC runs the game windowless: no swapchain, no FIFO, no vblank), Windows execution of the new C++ fixture (the syntax check is not a Windows run, and it compiles against llvm-mingw's library, not Microsoft's), Linux or AMD or Intel runtime, a fixed-refresh display. So I cannot confirm or refute the author's screen numbers or the latency. The two things that would settle the top two items are the latency A/B and the fixed-refresh run, both on a real display.

Inline-comment candidates (the PR is merged, so fold them into one comment)

  • gpu/vk/vk_framegen.cpp:672: this number stops at the present call, so under FIFO it reads main's side low. A PR value at or under main's is a pass; a higher one needs the Reflex "simulation start to present end" (RX_VK_REFLEX_LOG=1) or a screen measurement. Please put both sides in Measurements, under the limit and at it, and say whether the present queue is on.
  • gpu/vk/vk_framegen.cpp:770: late_ns is fed only here, and at the refresh limit the test's own comment says every set is left out. Can you show the D3 log's second line and what late_ns was before and after the limit was reached?
  • gpu/vk/vk_main.cpp:1095: on a min-2, max-8 surface this is +2, +3 and +2 images at 2x, 3x and 4x against main under FIFO (+88 and +133 MB at 5120x2160 at 4 bytes a pixel). Please put the two swapchain log lines (main and this PR) in Risks.
  • gpu/vk/vk_replay.cpp:5668: the term only matters under FIFO; adding it in every mode remakes the swapchain, to an identical one, when stepping above 4x at V-Sync Off or mailbox. Suggest gating it on dev.swap_mode == VK_PRESENT_MODE_FIFO_KHR.
  • gpu/vk/vk_framegen.cpp:700: with Frame pacing On this now takes the timeline over from the even line under FIFO. Every measured row is Frame pacing Off; one A/B at V-Sync On, 3x, pacing On would show whether it matters.
  • gpu/vk/menu_i18n.h: this file's change makes the Guide screenshots check red on main (the sixth issue at the merge); the Graphics picture does not show the reworded hint, so a retention like #1466's is enough.
  • tests/test_framegen_fixed_pace.py:155: this model is a VRR display (no vblank grid). It cannot stand in for the fixed-refresh run; worth one line in the test's header saying so.
**Verdict: comment, after the merge.** I found no bug in the diff, and I read 09e3e113 (HumanBean's own commit, which he asked another reader for): it is fine. This merged at 21:48 UTC while his request for changes (review 1695) was open, so what it asks for is owed: the latency A/B in the game and a fixed-refresh display with V-Sync On. Ranked by risk, what is left on current main: 1. **The FIFO latency is unmeasured** (his blocking item 1; highest, because it is on by default for the most common frame generation setup). 2. **A fixed-refresh display with V-Sync On** (his blocking item 2): frames can now land two refreshes apart where main's queue hid it. 3. **The Test Farm's red** (RTX 4070, AMD Windows, Linux): not about this change, but two Linux V-Sync Off cells need a rerun, because they may be #1362's and that is in main too. 4. **Main's Guide screenshots check** went one issue redder with this merge (docs-only fix). 5. Smaller: the swapchain's extra images (a cost nobody wrote down), Frame pacing On, a stale delay at the refresh limit, one needless swapchain remake, and #1476's relation. **What it does for players.** With V-Sync On (and Auto with DLSS Frame Gen), a fixed multiplier's frames now go out at their own times on the game's timeline, but never sooner than a refresh after the frame before. On main they came back to back and the last frame of a set stayed on the screen until the next set. The author's numbers (RTX 5090, 165 Hz G-Sync): frame time on screen sd 2.3 ms to 0.7 ms at V-Sync On 3x, and the game at the refresh limit from 51-53 to 55 fps. **What I checked and found fine** (line numbers on current main) - `fixed_on_timeline` (vk_framegen.cpp:225) lost its FIFO argument and both callers follow (`on_line`, 633; the test). - `fifo_slot` (235): no slot or no refresh gives the due time; otherwise the later of the due time and a refresh after the last slot; a slot more than half a refresh behind starts again from now. I broke it two ways (below) and the new test fails each. - Slot bookkeeping in `display_main` (783-820): the slot is taken before the wait, moves to the real present time when that is over 1 ms late (816), is given back when `present_commit` says nothing was shown (820), and the late count is against the slot (786-791). The mode is read at each present (788), so a chain made again for another mode is honoured. - `create_swapchain` (vk_main.cpp:1084-1100): `set_too_big` uses the surface's own spare count, so 7x and 8x on an NVIDIA surface keep one set's images; `fifo_unpaced` (09e3e113) answers the inline point of review 1681: with no known refresh, one set's images as main. The slot count is stored with the chain (1100). - `vsync_now` (vk_replay.cpp:5667): the multiplier and DLSS-G terms stay under 16, so they cannot collide with the V-Sync term (a multiple of 16); the new term is a multiple of 256, 1280 or more, so no two states share a key. - Everything the PR changes in `display_main` and `create_swapchain` is gated on FIFO (`s.refresh && dev.swap_mode == FIFO`, `set_too_big`, `fifo_unpaced`), so V-Sync Off and mailbox behave as main with #1362 does. The exceptions are a `display_refresh_mhz()` call per set (cached for a second) and the longer first log line. - `RX_VK_FG_TIMELINE=0` gives main's path in every mode: no timeline, one set's images, 3 slots. So one build gives both sides of an A/B. - The log counters: the reset at vk_framegen.cpp:683 has 12 initialisers for the struct's 12 fields; the new mean counts only a set's game frame, after a present that was shown (831). - Docs, hint (13 languages), switches.def and the design.md anchor rename are consistent; `test_doc_anchors` follows the new anchor. **1. The latency A/B (owed). What I add on how to measure it** - #1362's answer measured simulation start to the GPU's end of work and argued the screen sees a present at about the later of its call and its GPU work. That holds where the swapchain does not wait for a refresh (V-Sync Off). Under FIFO a present waits for its refresh and its queue, so that argument and that column cannot be reused here. - By construction the game's frame is presented a game-frame lead plus `late_ns` after it is handed over: `fixed_dues(before, now, made, pace_lead(game_ns, made) + extra, ...)` (vk_framegen.cpp:1439). With the numbers of the author's own run A (3x, 54.4 fps so an 18.4 ms frame, lead 2/3 of it = 12.3 ms, `late_ns` 14.9 ms from the log) that is about 27 ms after hand-over, before FIFO's own wait. What main's figure is, only the A/B can say. - The author's A log shows 788 of 822 frames held to a refresh (96%): runs A and D3 are refresh-limit runs, where the slots, not the due times, decide. The one run under the limit is D2 (2x, cap 60), and for it the only latency figure is `DisplayLatency`, which HumanBean explained cannot see this. So run both: under the limit (for example 3x with a cap so that 3 x fps is well under the refresh, the game's rate equal on both sides) and at it. - Instruments, one build, `RX_VK_FG_TIMELINE=0` against default, alternating, at least three runs a side, medians and the worst run shown, and say whether `RX_VK_PRESENT_QUEUE` is on (#1476 would change it): (a) the new number in the first `frame interpolation:` line (vk_framegen.cpp:672, 831), on any GPU. It stops at the present call, so it reads main's side low under FIFO (as the comment says): a PR value at or under main's is a pass, a higher one is not a verdict; (b) for a higher one, `RX_VK_REFLEX_LOG=1` on NVIDIA: its line already prints "simulation start to present end" next to "to the GPU's end" (vk_reflex.cpp:31, 130). #1362's answer quoted only the second; the first is the one this hold moves, because the Reflex present markers bracket the real present call (vk_reflex.cpp:277 and 287), which `present_commit` makes late (vk_replay.cpp:5925-5934). Neither number includes the time the frame then waits for its refresh, so a screen figure is still needed if (b) is higher; (c) HumanBean's "Reflex's PC latency" may not exist in PresentMon: the author said on #1362 that PresentMon 2.3 wrote no PC-latency column in those runs. Say so if it is not there. - Put the table in Measurements and the number in Risks. If it is worse than main under the limit, that is a regression to fix; `RX_VK_FG_TIMELINE=0` is the stopgap until then. **2. A fixed-refresh display with V-Sync On (owed).** The model in the test (tests/test_framegen_fixed_pace.py:155) is a VRR display: each present is shown at its present or a refresh after the one before, with no vblank grid. On a fixed refresh, main's queue is never empty, so its frames land on consecutive vblanks. This PR leaves the queue empty on purpose and spaces presents by the reported refresh, so a present's place against the vblank is not controlled, and near the edge a little jitter turns a one-refresh gap into two. The PR says as much ("frames round to whole refreshes there") but has no number. What the run should show, main against PR on the same display at 2x and 3x: the share of frames shown for 1, 2 and 3 refreshes (PresentMon `DisplayedTime` in refresh units), the longest gap, and the latency figures above. Windows reports whole Hz and the code guesses the /1.001 rate for a value one under a multiple of 6 (vk_main.cpp:1946-1948), so also say the display's exact refresh. **3. The Test Farm's red, and what it points to.** HumanBean's review 1695 already says the main things: the picture rule fails everywhere, the V-Sync Off cells are #1362's, the baseline (main 67efc4d3) is before #1362, the camera turns while the picture is taken, and the second Linux PC is broken. I agree, and add what I found in the four reports (all on 0c552c9, whose changes are line for line those of the merged head except 09e3e113; each had V-Sync On and V-Sync Off cells at 2x and 3x): - **The picture rule** (`screenshot.max_diff`, limit 0.1) fails in all 12 cells on all four reports (0.28 to 0.87), and every report's "main against itself" field is empty, so there is no noise floor. The PR changes no draw or shader code (vk_framegen.cpp's display thread, vk_main.cpp's image count, vk_replay.cpp's slot count and remake key, texts and docs), so only which frame is captured can differ: [INFERENCE] from the diff, not tested. The same rule failed on #1362 (Linux AMD, 3x 0.52 and 4x 0.02; HumanBean asked there, and I found no answer before it merged) and on #1458 (the swapchain image waited for on the CPU; field-pacing, Windows AMD). To settle it: one main against main pair (or `RX_VK_FG_TIMELINE=0` against default on one build) on one machine. If identical code is over 0.1, the threshold is the problem. - **RTX 4070** (rp_da50...): fps 60.0 in all four cells, p99 within -1% to +3%, no hitches, no forbidden log lines; only the picture rule failed. It says nothing about pacing: the median frame time is 16.5 ms in all four cells, V-Sync Off and 3x included, so the farm's frame times are the game's own 60 fps and not the frames shown (the farm says itself that it cannot measure on-screen pacing). - **AMD Windows, RX 9070 XT** (rp_ebcb...): V-Sync On 2x p99 32.9 to 22.8 ms and stutter 18 to 1; V-Sync On 3x fps 50.6 to 51.8, p99 34.9 to 34.5, stutter 3 to 6 (one run a side). V-Sync Off cells are 2% and 5% lower in fps, inside the 10% rule and #1362's code. Only the picture rule failed. - **Linux AMD, RX 7900 XTX** (rp_19c1...): V-Sync On 2x main 36.3 fps with 13 hitches and p99 1002 ms against 60.0 fps, none and 23.5 ms here (main's side has them in this one cell only: a cold cache or a one-off on that PC, [INFERENCE]); V-Sync On 3x equal (60.0 fps, p99 23.1 ms on both). The V-Sync Off cells are the two real reds: 2x p99 19.7 to 23.3 ms (+18%, worst frame 20.9 to 40.1 ms), 3x fps 60.0 to 52.4, p99 +24%, four hitches (worst frame 1.0 s). These are #1362's path (non-FIFO) on one run a side, and #1362 is in main now: if they are real they are in main, not in this PR. **This is the one farm item I would act on**: a rerun on current main (V-Sync Off, 3x, FSR 3.1 FG on RADV) with a second run a side. - **Linux AMD, RX 7900 XT** (rp_96c2...): 6 to 30 fps and p99 about 1005 ms on both sides in every cell, "GPU resource waits" 36 to 104 ms a frame against 1.4 ms on the other Linux PC: that PC tells nothing. - Net: the four reports show no crash, no device loss and no FIFO regression, and none of them can show pacing or latency. The farm never ran on the merged head (09e3e11 is "untrusted, approved by nobody"), so the next run has to be asked for with a BigBeans member's approval, with the two `frame interpolation:` lines of the V-Sync On cells attached (the reports show only the end of the log), and with the picture taken with the camera still (HumanBean's suggestion) and a noise floor. **4. Main's Guide screenshots check is one issue redder.** It passes on main 93bc8a7f, fails on c392df3a (5 issues from #1388 and #426) and on the merge with 6: `gpu/vk/menu_i18n.h` changed since the reviewed revision of `settings-graphics.png` (`vk_menu.cpp` and `vk_internal.h` are changed here too but were already flagged). On current main it is 10 issues with other merges since. The picture shows the Quality preset row and the Frame generation and frame rate cap rows, not the Frame pacing hint this PR rewords (that row is on the Debug tab, as the note on #1466 says for #1362's wording), so it should be retained with a new reviewed revision and a dated note, as #1466 did. The PR was merged with that status red. **5. Smaller follow-ups** 1. **Extra swapchain images, the unticked box.** By the code (vk_main.cpp:1068-1100), on an NVIDIA-like surface (least 2, most 8) FIFO asks for 4, 5 and 6 images on main at 2x, 3x and 4x and 6, 8 and 8 here: +2, +3 and +2 images. At 4 bytes a pixel that is +88 and +133 MB at 5120x2160, +66 and +100 MB at 3840x2160, +29 and +44 MB at 2560x1440 (my arithmetic, not a measurement). The author can close it by pasting the two `vk: swapchain WxH, N images` log lines (main and this PR) at 2x and 3x and the idle VRAM from the driver into Risks. On a card under 8 GB that cost is not nothing (HumanBean raised the same on #1362). 2. **Frame pacing On with V-Sync On changes behaviour and is not measured.** With the pacing row On, main's FIFO path showed the frames on the even line; now `present_ahead_wanted(pace || line, ...)` and `s.timed = s.auto_timed || s.line` (vk_framegen.cpp:700-704) put those sets on the timeline instead, so "At an even interval" no longer holds for fixed multipliers. The hint and the docs say so, but every measured row is Frame pacing Off. One A/B at V-Sync On, 3x, Frame pacing On would show whether anyone who turned it on to calm FIFO loses something. 3. **Is `late_ns` (the GPU delay added to every frame's time) stale at the refresh limit?** It is fed only from a set whose first copy went as it came (vk_framegen.cpp:770, `as_came` at 649), and the new test's own comment says that at the refresh limit under FIFO "every set is left out and the delay keeps its value" (tests/test_framegen_fixed_pace.py:313-315). Then the value from before the limit stays, and one learned during a hitch (it can go up to a whole game frame) stays until the game leaves the limit. The slots hide it while the limit holds, but it comes back in the first frames under the limit. Could the author paste the D3 log's two lines and say what `late_ns` was before and after the limit was reached? The latency runs in 1 would show it too. 4. **5x and 6x under FIFO.** They have images now (6 spare on an NVIDIA surface) and so go on the timeline under FIFO for the first time; "4x and up under FIFO" is in Not tested. Fine as it is if the description says so for 5x and 6x as well as 7x and 8x. 5. **`vsync_now` remakes the swapchain in modes where nothing changes** (vk_replay.cpp:5667-5668). The term `opts.framegen * 256` is added for any multiplier above 4x in every present mode, but only FIFO uses it (`set_too_big`). Stepping 5x to 6x in the menu at V-Sync Off or mailbox remakes the chain to an identical one. Suggestion: ``` const int vsync_now = menu_vsync() * 16 + swapchain_framegen() * 2 + (swapchain_dlssg() ? 1 : 0) + (dev.swap_mode == VK_PRESENT_MODE_FIFO_KHR && opts.framegen > 4 ? opts.framegen * 256 : 0); ``` 6. **#1476 (the author's follow-up, open).** It turns the presents' own queue on by default for NVIDIA 621.24+ on Windows, and says the 2x FIFO frames are still paired (6 ms, then 11 ms) by the wait on the game's queue until the queue is on. The runs in 1 and 2 should therefore be taken with and without it, and the #1442 description's "the present queue under FIFO" line in Not tested is now live. I did not review #1476. 7. **The description check failed at the merge.** My run of the checker on the live body (before the title lost its WIP) listed three things to fix: the two Must-be-tested lines that say no result to expect, the unticked box, and no TL;DR and Breakdown; it also suggested the Windows and Linux box and warned that the measurements are on main 544229a2. The Must-be-tested list is the record of what is owed (latency A/B, fixed-refresh display, Intel, an RTX 40 card on a screen, AMD on a screen), so it is worth fixing even now. **Conflict with main: it was mechanical, and is gone.** 0c552c97 against main (93bc8a7f) conflicted in 13 files (the measure skill, README, design.md, development.md, menu_i18n.h, switches.def, vk_framegen.cpp, vk_internal.h, vk_main.cpp, vk_menu.cpp, vk_replay.cpp, test_doc_anchors.py, test_framegen_fixed_pace.py) because #1362 was squashed into main while the PR carried its commits. HumanBean's force-push at 21:22 rebased the PR onto e8e92f97 (main with #1362). I compared the net changed lines of the old head over #1362's head (e3420742) with the new head's four earlier commits over their base: 437 changed lines each, and no line differs in either direction; the file lists are the same. The new head adds only 09e3e113. `git merge-tree` of the new head with main 93bc8a7f: no conflicts, and it merged. The API's "mergeable: false" was the WIP title. **Overlaps.** Before the merge I took the 332 other open pull requests, 178 of which share a file name (README.md and docs/development.md are in most), fetched their heads and merged each against a scratch commit of main plus this head: none conflicted where it did not already conflict with main. I also searched their diffs for `display_main`, `create_swapchain`, `present_slots_for`, `swap_spare`, `vsync_now`, `fg_sets` and `FG_TIMELINE`: matches were #1390 (merged since), #1354, #1339 and #1334 (their diffs show the removal of `present_ahead_wanted`'s environment parameter, which main already has from #1309), #1105 (callers of `create_swapchain`), #1043 (a drain condition on `swap_spare`, behind `RX_VK_PRESENT_THREAD`, off by default), #966 (one thread-start line) and #424 (a comment). I read those matching lines only, not the whole PRs; I saw no interaction. #1476 came after the scan (above). **What I ran** - Read the whole diff of the head against main (28 files, +352 -113) and the surrounding code (`display_main`, `framegen_record`, `create_swapchain`, `display_refresh_mhz`, `present_commit`, the Reflex log); compared the squash with the head (same 453 changed lines); checked that the FIFO functions are unchanged on current main. - The new test, `python -I -B tests/test_framegen_fixed_pace.py`, on the head: passes. The same test file against main's source (an archive of main 93bc8a7f): fails at its first source check (`display_main`'s `fixed_on_timeline(set->by_time, timeline_off)` line). So red on main, green on the head. - Two mutants of `fifo_slot` in a copy of the head: always returning the due time fails `fifo_slot(10 * ms, 10 * ms, hz240, 10 * ms) == 10 * ms + hz240`; moving the "slot far behind" limit to 1000 refreshes fails `fifo_slot(10 * ms, 10 * ms, hz240, 30 * ms) == 30 * ms`. (My first mutant died of an unused-variable compile error, which proves nothing; I redid it keeping the variables used.) The text checks pin `display_main`'s slot code; its loop is modelled by a copy in the test (`run_fifo`), so a change of the real loop that keeps the pinned text is not caught. - The eleven tests the change touches (doc anchors, env_on, framegen auto, fixed pace, resources, menu i18n, present semaphores, readme menu rows, switch table, tested configurations, vk swapchain compat), through the runner's `--exact --strict`, on the head and on main 93bc8a7f: 11 passed, 0 failed on both. - The whole suite (`python -I -B tests/run_all.py --jobs 6 --strict`) on the head (before the merge) and on main 93bc8a7f, in two worktrees, compared by failing name: head 674 passed, 38 failed, 17 skipped; main 675 passed, 38 failed, 17 skipped. The same 38 test files fail on both (this Linux PC's own failures, not looked into one by one); the one test more on main is `tests/test_target_retention.py` from #1462, which the head's older base lacks (it passes on main). So the head adds no failure. I did not rerun it on the merge or on current main. - The Windows-target syntax check on the head against e8e92f97 (the changed drivers: test_framegen_fixed_pace.py, test_doc_anchors.py, test_present_semaphores.py): test_framegen_fixed_pace.py compiles for the Windows target (PASS, syntax only; execution not tested). test_present_semaphores.py FAILS the checker's CRT policy: its fixture includes longshot_env.h without defining `_CRT_SECURE_NO_WARNINGS` first. That is not this change: the PR's only edit in that file is the `opts` struct line, and the include is there in the base (read from the diff, not run on the base). Windows execution of both fixtures: not tested. - The Guide screenshots check (`scripts/check_guide_screenshots.py --review-sources`) on the head, on main 93bc8a7f, on c392df3a, on the merge and on current main: passes only on 93bc8a7f; 7, 5, 6 and 10 issues on the others (the head's 7 include files from #1362 and #1464 that its older base had not retained yet). - The live description through the repository's description checker (before the merge): three things to fix and the suggestions above. - Trial merges against main and against 178 open pull requests; the old head's merge and the patch comparison (above); CI statuses of the head (Guide screenshots and the description check red, the title, lint and third-party checks green, the Python source checks skipped as usual). - Read all of the thread, #1362's thread and reviews, #1476's description, and the four farm reports. **What I did not run:** the game, any GPU, PresentMon or Reflex logs (this PC runs the game windowless: no swapchain, no FIFO, no vblank), Windows execution of the new C++ fixture (the syntax check is not a Windows run, and it compiles against llvm-mingw's library, not Microsoft's), Linux or AMD or Intel runtime, a fixed-refresh display. So I cannot confirm or refute the author's screen numbers or the latency. The two things that would settle the top two items are the latency A/B and the fixed-refresh run, both on a real display. **Inline-comment candidates** (the PR is merged, so fold them into one comment) - gpu/vk/vk_framegen.cpp:672: this number stops at the present call, so under FIFO it reads main's side low. A PR value at or under main's is a pass; a higher one needs the Reflex "simulation start to present end" (`RX_VK_REFLEX_LOG=1`) or a screen measurement. Please put both sides in Measurements, under the limit and at it, and say whether the present queue is on. - gpu/vk/vk_framegen.cpp:770: `late_ns` is fed only here, and at the refresh limit the test's own comment says every set is left out. Can you show the D3 log's second line and what `late_ns` was before and after the limit was reached? - gpu/vk/vk_main.cpp:1095: on a min-2, max-8 surface this is +2, +3 and +2 images at 2x, 3x and 4x against main under FIFO (+88 and +133 MB at 5120x2160 at 4 bytes a pixel). Please put the two swapchain log lines (main and this PR) in Risks. - gpu/vk/vk_replay.cpp:5668: the term only matters under FIFO; adding it in every mode remakes the swapchain, to an identical one, when stepping above 4x at V-Sync Off or mailbox. Suggest gating it on `dev.swap_mode == VK_PRESENT_MODE_FIFO_KHR`. - gpu/vk/vk_framegen.cpp:700: with Frame pacing On this now takes the timeline over from the even line under FIFO. Every measured row is Frame pacing Off; one A/B at V-Sync On, 3x, pacing On would show whether it matters. - gpu/vk/menu_i18n.h: this file's change makes the Guide screenshots check red on main (the sixth issue at the merge); the Graphics picture does not show the reworded hint, so a retention like #1466's is enough. - tests/test_framegen_fixed_pace.py:155: this model is a VRR display (no vblank grid). It cannot stand in for the fixed-refresh run; worth one line in the test's header saying so.
Member

Picking up the outstanding Windows RTX 4070 displayed-cadence check. I’ll start with a same-build control pair, then compare the FIFO timeline switch on a fixed-refresh display where available, keeping base and generated frames separate and using display-confirmed timing.

Picking up the outstanding Windows RTX 4070 displayed-cadence check. I’ll start with a same-build control pair, then compare the FIFO timeline switch on a fixed-refresh display where available, keeping base and generated frames separate and using display-confirmed timing.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
6 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!1442
No description provided.