feat(vk): Frame generation's Auto runs DLSS FG at the most frames the display shows at the game's cap #2795
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2795
Loading…
Reference in a new issue
No description provided.
Delete branch "Jiro113/Longshot:fix/auto-framegen-dlssg"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
On an RTX 40 or 50 with Frame generation at Auto and Frame generation by at DLSS FG, main never lets NVIDIA DLSS
Frame Generation make Auto's frames: DLSS-G only makes fixed multipliers, so Auto falls back to the renderer's own (a
frame for each refresh, by FSR 3.1 or the built-in one) and the row says "Auto (FSR 3.1 FG)". A player who picked DLSS FG
gets FSR 3.1's frames unless they also pick a Fixed multiplier by hand.
To see it on main: RTX 40, a 240 Hz display, DLSS on, Frame generation Auto, by DLSS FG, frame rate cap 60. The row reads
"Auto (FSR 3.1 FG)", the log says
fsr3fi: of the last 600 presents 600 made by FSR 3.1and the swapchain is mailbox.This changes Auto, at DLSS FG and once NGX has answered (
dlss_fg_most> 0), to run DLSS-G at a fixed multiplier: thehighest M from 2 to the runtime's most + 1 with cap × M ≤ refresh × 1.005 (2x at 60 fps from 120 Hz; on an RTX 50, 3x
from 180 Hz and 4x from 240 Hz; Uncapped takes 2x from 120 Hz). Where 2x does not fit (a 60 Hz display, or cap 144 at
240 Hz), Auto stays the renderer's own, as today, and the Frame generation by row says why. A new value is taken once it
has held for 2 s, so a refresh rate that comes and goes does not remake the sets and the swapchain each time. At that
multiplier Auto is a fixed multiplier everywhere that counts:
framegen_now()gives it, so the sets, the pacing, DLSS-G'sdepth and motion (
dlss_fg_inputs) and V-Sync Auto's FIFO are a Fixed one's. The row reads "Auto (DLSS FG)". NVIDIAStreamline is unchanged: it starts only for a Fixed multiplier saved, and Auto chosen while it runs turns it off until
the next start, as on main. In a build with Streamline, Auto saved runs NGX's DLSS-G as above (Auto through Streamline
is a later pull request).
While Auto is the renderer's own because DLSS FG's 2x does not fit, DLSS-G's feature stays made for the way back, so a
change of the cap or the display between the two makes no NGX feature on the frame's thread (BeanBot's L2), once Auto
itself has run DLSS-G since it was chosen; Off, a Fixed multiplier, a Fixed one's feature when Auto comes at 1 and DLSS
FG making no frames let it go as before. Auto reads the frame rate cap the menu publishes under its lock, not the row
(L1), and the display's refresh is read for Auto alone.
RX_VK_FG_AUTO_DLSS=0keeps main's Auto.On
main462919343, where #2738 and#2183 are merged. See
#1687.
Read first:
gpu/vk/framegen_rows.h(auto_dlss_multiplier,auto_settle),gpu/vk/vk_framegen.cpp(
framegen_now,framegen_auto_dlss_update,framegen_auto_dlss_keeps),gpu/vk/vk_replay.cpp(do_present'sdlss_fg_idleline), thengpu/vk/menu/framegen.cpp.Testing
Tested: Windows 11, RTX 4090, NVIDIA 621.24, a 5120x1440 240 Hz VRR display, SDR; a pack on the shared base with
NGX (
LONGSHOT_NGX_SDK), through the PC's job queue, the control bridge, thekokiri-startsave.NVIDIA DLSS: NGX started,vk: frame generation: Auto by DLSS FG at 2x (240.00 Hz, cap 60),vk: V-Sync Auto with DLSS Frame Generation at 2x: FIFO, the swapchain is FIFO with 6 images, andof the last 600 presents 600 made by DLSS-G.Auto by the renderer's own (DLSS FG's 2x does not fit 240.00 Hz at cap 144), the feature let go, mailbox, the row "Auto (FSR 3.1 FG)"; at 120 back to 2x and FIFO; Uncapped and 60stay at 2x (no line, as expected). Each change follows 2 s after the cap's.
RX_VK_FG_AUTO_DLSS=0: "Auto (FSR 3.1 FG)" at every cap, main's log (mailbox, no "Auto by DLSS FG" line).LONGSHOT_SL_SDK, Streamline v2.14.16's files besidelongshot.exe), cap 60, on a2560x1440 120 Hz display (the log's
screen 2560x1440 at 120 Hz), one run of each:vk: Streamline started for DLSS Frame Generation, thenStreamline DLSS Frame Generation: on, 2x. Auto set in the game:Streamline DLSS Frame Generation: off (the Frame generation rows do not ask for it), the row reads "Auto" (not "Auto (DLSS FG)"), noAuto by DLSS FGline, and no frame generation untilthe next start (
3960 presents, 60.0 fps). WithRX_VK_FG_AUTO_DLSS=0, the same lines: main's.Auto by DLSS FG at 2x (120.00 Hz, cap 60), FIFO with 6 images, andof the last 600 presents 600 made by DLSS-G(NGX's). WithRX_VK_FG_AUTO_DLSS=0: FSR 3.1 in mailbox, main's.DLSS-G (Auto and Fixed 2x), all
Hardware: Independent Flip(Measurements, "The frames on the screen").0bc29b961, the log'slongshot v3.2.0-199-g0bc29b961; a pack on the shared base22d0d200with NGX), on a 2560x1440 120 Hz virtual display (the log'sscreen 2560x1440 at 120 Hz), full screen, thekokiri-startsave teleported to Hyrule Field, Frame generationAuto, by DLSS FG, cap 60, one run:
NVIDIA DLSS: NGX started,vk: frame generation: Auto by DLSS FG at 2x (120.00 Hz, cap 60),vk: V-Sync Auto with DLSS Frame Generation at 2x: FIFO, the swapchain FIFO with 6 images,of the last 600 presents 600 made by DLSS-G, and a clean exit.kokiri-start, DLSS, Frame generation Auto, by DLSS FG, cap 60, the menu opened and walked byRX_VK_MENU_SCRIPTandthe display grabbed between two presses.
mainis the shared base's runtime,22d0d200(main's commits since then addrows to the Gameplay and Audio tabs, none to Graphics): Frame generation reads "Auto (FSR 3.1 FG)" and its log says
of the last 600 presents 600 made by FSR 3.1. Here (0bc29b961): "Auto (DLSS FG)" with its help line, Framegeneration by says DLSS FG makes the frames, and the log says
Auto by DLSS FG at 2x (120.00 Hz, cap 60)andof the last 600 presents 600 made by DLSS-G. Both runs exited cleanly.maincb0a27630(head87357e9b3,the log's
longshot v3.2.0-171-g87357e9b3; a pack on the shared basea425fa2awith NGX), on the 2560x1440 120 Hzvirtual display, full screen, sound off, Hyrule Field, Frame generation Auto, by DLSS FG, cap 60 → 144 → 60 → 144 → 60
→ 144 (10 s each), then quit at 144, one run (not a measurement):
NVIDIA DLSS: NGX started, DLSS-G's feature madeonce (
feature made for 2560x1440 from 1707x960 inputs) and let go only for the exit (DLSS Frame Gen (NGX): let go for the exit, while Auto was the renderer's own),of the last 600 presents 599 made by DLSS-Gafter the returns to2x, the longest frame within 6 s of each change 21.7 to 33.5 ms, no Vulkan error and a clean exit (code 0). The same
run at 272f5f906, before the cold review's fixes: 19.5 to 29.6 ms.
main462919343(headf5af8ffd1): every code commit is the same in the range-diff, the guide'srecord alone conflicted, and this head's renderer builds through the queue; the run above was not repeated.
20 to 38 ms, at
0bc29b961(the same base) 123 to 138 ms into DLSS-G and 64 to 78 ms out.mise run test(tests/run_all.py --changed origin/main, Windows, llvm-mingw) at this head (f5af8ffd1): 252passed, 15 failed, 12 skipped. The 15 fail on
main462919343too, run alone there with the same checks:test_bug_report,test_crash_record,test_crt_options,test_dev_ab,test_framegen_resourcesandtest_present_source_crop(drain_framegen_setsnot declared in their fixtures),test_input_background,test_input_movie,test_keyboard_menu_option,test_keyboard_option,test_linux_pressure,test_menu_keys,test_option_ids,test_switch_tableandtest_upscaler_round_trip. Every other frame generation and DLSS checkpasses. The 12 skipped need Linux or a tool this PC lacks (spirv-val, glslang).
test_framegen_auto_dlsscompiles and runs the rule, the 2 s hold, the update and the row's reason, withRX_VK_FG_AUTO_DLSSunset, 1 and 0; it fails with the slack widened to 1.006 and with the update moved afterdo_present's firstframegen_record(both tried). The three places that read Auto's multiplier (framegen_record'srate,
init's log line,dlss_fg_inputs' guard) are text checks, not run. Since the review it also compiles the realfps_cap_now,publish_fps_capandmenu_fps_capwith a row that counts the reads made withoutmenu_mu(L1), anddo_present's owndlss_fg_idleline withframegen_auto_dlss_keeps(L2): each failed at the commit before its fixand passes with it, with clang++ (llvm-mingw's
g++is clang too: GCC is left to CI); with L2's key line broken itfails again. After a cold review of those fixes it also checks that a Fixed multiplier's feature is not kept at Auto's
1, that Off and Fixed read no refresh, and that the control bridge's setting publishes the cap: it failed at the commit
before and passes since, and each of the three fixes broken alone fails it again.
Still to test:
Auto by DLSS FG at 4xand the row "Auto (DLSS FG)"; cap 120, expecting2x after 2 s; at 144 Hz cap 60, expecting 2x (@Beanstalk)
line (@Beanstalk)
Auto by DLSS FG at 2xandDLSS-G making the presents (@Beanstalk, or dazemc by hand)
60 Hz at cap 60 (by hand)
VK_ERROR_DEVICE_LOST) at its exit in 2 of 61 Auto by DLSS FG runs above,after
DLSS Frame Gen (NGX): let go for the exit(Measurements, "The frames on the screen"); a Fixed 2x by DLSS FGon
main, quit the same way 30 times, expecting no loss, or the same rate (by hand)2x and main's Auto (by hand, from the captures above)
FG through PresentMon, expecting the same spread, as at 240 Hz VRR (by hand)
expecting 120 frames a second and the same spread (by hand)
mailbox swapchain is composed (
Composed: Copy with GPU GDI) on this driver without frame generation too (by hand)Measurements
Verdict: at DLSS FG's 2x, Auto runs as a Fixed 2x does: every number within the spread of a Fixed 2x by DLSS FG, in a
light and a crowded area. Against main's Auto (FSR 3.1 at 4x), 120 presents a second instead of about 238, a steadier
call cadence, about 1.5 ms less wait before each present, 0.6 to 0.8 ms less GPU time, and about 0.5 to 0.6 GB more
video memory (DLSS-G's). On the screen (below), Auto's presents are flipped by the driver (Independent Flip) and paced
by G-SYNC, as a Fixed 2x's are, and their intervals spread as a Fixed 2x's do. main's Auto is composed by Windows on the
refresh grid, a different path to the screen, so its spread is given as information, not as the bar.
Setup: Windows 11, RTX 4090, NVIDIA 621.24, 5120x1440 at 240 Hz (VRR), SDR. A pack of this head (8658e99e9) on the shared
base (main
22d0d200+ #2183), NGX. DLSS, Render resolution 67 %,Frame generation Auto, by DLSS FG, cap 60, V-Sync Auto, Reflex off. Each run one
--mode timingjob, from thekokiri-startsave teleported to the scene, warmed up until no frame waits for a pipeline, then 60 s measured; threearms interleaved (order reversed every other round), 5 runs each, the median. "Before" is main's Auto, by
RX_VK_FG_AUTO_DLSS=0in the same pack (its log is main's); "Fixed 2x" isRX_VK_FRAMEGEN_MULT=2, what Auto must match.Base fps, 1 % low and p99 from the frame trace; GPU time from the log's
vk: GPU timelines (the game's own passes,DLSS-G's work not in them); the wait and the cadence from
RX_VK_FG_LATENCY_LOG(at the present call, not on thescreen); video memory from the log's last
vk: budget: VRAMline (by the driver, DLSS-G included). Every run loggedNVIDIA DLSS: NGX started, and in the measured stretch 600 of 600 presents made by DLSS-G (Auto, Fixed 2x) or by FSR 3.1(main's Auto); no compile or encode ran beside them.
Rebased onto main
01d6878b3and #2738 since: none of main's 25commits since
22d0d200touches frame generation, DLSS-G or the present path (vk_replay.cppreads two audio optionsatomically, a Pause in background row off by default adds one call a frame, a Quadro M2000M workaround is Linux only);
#2183's code is the same line for line, and #2738 changes the menu's text, so the numbers above still hold. 8658e99e9,
the head measured, is this change before that rebase: the rebase moved its menu commit onto #2738's wording (the menu's
text and lines only), and the commits since change only tests, docs and the guide's records. Rebased again onto
main450e63b82(#2738 and #2183 merged): the range-diff is the same for every code commit (only three docs commitsdiffer, by their conflicts), and
main's 17 commits since touch neithervk_framegen.cppnorvk_dlss.cpp; invk_replay.cppthey change the simulated turf's submits, notdo_present, and invk_dlssg.cppcomments only. Thenonto
maincb0a27630(#2821, #2819), with no conflict: the range-diff is the same for every commit, and those twochange AMD's texture and device paths and the measure skill's docs. Then onto
main462919343(#2183 merged, #2833):only the guide's record conflicted, and every code commit is the same in the range-diff; #2183's changes to
vk_replay.cppandvk_dlssg.cppretire the present probe at the window's close and at NVIDIA Streamline's, not theNGX DLSS-G path this change touches, and #2833 is the builder's.
Baseline: main's Auto is this head with
RX_VK_FG_AUTO_DLSS=0, whose log is main's (FSR 3.1, mailbox): the same pack, so only the switch differs. The Fixed 2x column (RX_VK_FRAMEGEN_MULT=2) is what Auto must match.Hyrule Field (light):
Market (crowded):
Auto against Fixed 2x: within 2 % on every number but two, both inside the runs' spread and of opposite signs from one
area to the other: the wait's p99 (+2.6 % in Hyrule Field, −6.1 % in Market) and the call interval's deviation (+4.0 %,
runs from 0.206 to 0.349 ms against 0.213 to 0.266; −0.03 % in Market). Auto made no change during any run, and ran the
same present mode, images and sets as the Fixed 2x; the one difference is before the measurement, at the start, where
Auto makes a mailbox swapchain and then a FIFO one once its value is taken.
Base fps is 60.00 everywhere (the cap): it does not tell the arms apart.
A change of Auto's multiplier, Hyrule Field, the same setup: five cycles of each change, each value held 10 s, one
--mode timingjob for each arm; the longest frame of the frame trace in the 6 s after each change, against the 6 sbefore.
RX_VK_FG_AUTO_DLSS=0), cap 60 ↔ 144: the cap aloneIn Auto the long frame falls 2.1 to 2.4 s after the cap's change, when Auto takes the new value (its
vk: frame generation: Auto ...line each time). A change of Auto's multiplier costs one long frame, what a Fixed 2x by DLSS FGcosts today when it is turned on or off by hand; neither the cap alone nor a swapchain made again without DLSS-G costs
one, so the cost is DLSS-G's (its feature made or let go, its sets) and FIFO ↔ mailbox.
A change of Auto's multiplier with DLSS-G's feature kept (BeanBot's L2): the table above is before that fix. The
long frame was NGX making DLSS-G's feature on the replay's thread (139 to 246 ms, a Tracy capture on the virtual display)
and letting it go (39 to 69 ms); since the fix, Auto keeps the feature while it is the renderer's own. The same five
changes each way, on the 240 Hz VRR display (RTX 4090, 621.24, 5120x1440, Hyrule Field, cap 60 ↔ 144, 10 s each), one
--mode timingjob per run, before and after interleaved (ABBA), the queue's noise at zero for all four,NVIDIA DLSS: NGX startedin each log. A driver-level setting is not the same as in the runs above: value 0, the PC started on2026-11-29 at 15:23; before and after ran in the same state, and the before column matches the table above but for one
exit at 127.9 ms. After is 04159c082, this fix before the rebases: the same code as
71769b9de. The coldreview's fixes since do not change this run's path: it starts in Auto at cap 60, so Auto has run DLSS-G before each 144,
and the cap the bridge sets is published at once, not at the next
menu_tick, under a frame earlier.0bc29b961Not covered: a run that starts at cap 144 and reaches DLSS-G in play, which makes the feature once (as a Fixed 2x by DLSS
FG turned on by hand).
The frames on the screen. The capture used PresentMon 2.6.0, with
--qpc_timeand a session of its own startedbefore the game. It ran with the same pack and settings, the game full screen on the display above and in front, and
measured 60 s after the warm-up. Each arm ran 5 times, interleaved, and the table gives the median.
A second series fixed the refresh for
longshot.exealone (a driver profile, taken away afterwards and checked gone)to measure the display without VRR: 240 Hz at cap 90 (2x fits there, though 180 does not divide 240) and 120 Hz at cap
60.
"sd" is the standard deviation of
MsBetweenDisplayChangein the measured stretch. "On the grid" is the share ofintervals within 0.25 ms of a multiple of the refresh period.
Auto against a Fixed 2x on the screen, the bar: a Fixed 2x by DLSS FG takes the same path to the screen, so it is
what Auto's spread is measured against. They are the same within the spread.
1.60 ms against 1.04 to 1.37, and one Fixed 2x run at 2.13).
and swapchain, but no Fixed 2x ran beside it (Still to test).
How the presents reach the screen:
Composed: Copy with GPU GDIin all 60 of its runs, in a window or full screen, with the game infront: Windows composes it on the refresh grid, and G-SYNC does not pace it.
Hardware: Independent Flipin all 70 runs.Against main's Auto, as information: main's Auto is composed on the refresh grid and Auto is flipped and paced by
G-SYNC, so the two spreads do not measure the same thing. Auto's intervals spread more in 5 of the 6 cases:
(2x), paced by G-SYNC. Relative to the mean interval, the spread is +27 % in Hyrule Field and −39 % in Market.
against 47).
Latency: the latency on the screen is not read here (Still to test); the wait at the present call is in the
tables above.
GPU lost at the exit: 2 of 61 runs of Auto by DLSS FG lost the GPU when the game quit, after the measured stretch.
None of the 20 Fixed 2x runs and none of the 60 runs of main's Auto did.
control: quit asked by a client, thenDLSS Frame Gen (NGX): let go for the exit, slow submits anda capture's wait for write-back ... timed out, thenVK_ERROR_DEVICE_LOST.dlss_fg_close), but since L2's fix a game quit while Auto is therenderer's own lets DLSS-G's feature go there, where before it was already let go. The cause is not known (Still
to test).
Risks
Streamline), where 2x fits the display at the cap. Their Auto changes from FSR 3.1's frames, one for each refresh, to
DLSS-G's at a fixed multiplier, and V-Sync Auto from mailbox to FIFO, as a Fixed multiplier by DLSS FG does today.
Everyone else's Auto is main's. Turn it off with
RX_VK_FG_AUTO_DLSS=0; a revert is enough. Nothing in saves orlongshot_options.inichanges.DLSS FG takes the same). Auto now presents at the base rate × M instead of one frame for each refresh, so at cap 60 on
240 Hz an RTX 40 shows 120 frames a second instead of 240, and on a 144 or 165 Hz display 120 instead of 144 or 165. A
game below its cap shows the base rate × M too (45 fps gives 90), as a Fixed 2x does. A refresh that is not a multiple
of the frames shown was measured fixed at 240 Hz, cap 90 (180 on 240, Measurements); 144 and 165 Hz are not (Still to
test).
multiplier in the menu does today; it waits 2 s first, so a value that comes and goes is not followed. With DLSS-G's
feature kept, the longest frame around such a change is 19 to 28 ms on the 240 Hz display (Measurements, "with DLSS-G's feature
kept"), against 60 to 128 ms leaving DLSS-G and 124 to 138 ms entering it before. The first time Auto reaches DLSS-G
in play still makes the feature once: one frame of about 120 to 160 ms, as a Fixed 2x by DLSS FG turned on by hand.
0.5 to 0.6 GB of video memory at 5120x1440 stays taken (the driver's figure at cap 144 on the 240 Hz display: 10.3 to 10.6 GB
before, 11.0 to 11.2 GB after), once Auto has run DLSS-G since it was chosen. Off, a Fixed multiplier, a Fixed one's
feature when Auto comes at 1 and DLSS FG making no frames let it go.
frames after it are a Fixed one's start.
as a Fixed 2x does Uncapped today.
Frame generation row, so Auto by DLSS FG counts as Auto. With the row at Low and NVIDIA's driver on Windows, the game's
queue keeps the driver's priority at Auto by DLSS FG where a Fixed 2x by DLSS FG takes Low, and going between Auto and
Off asks for no restart. Auto by DLSS FG with the row at Low is not measured.
measure_help), and Framegeneration's new Auto line is one of them. Estimated in English at the box's 476 pt width: about 176 pt for Frame
generation's help with that line, against 332 pt for the tallest, so the box keeps its height; not measured for every
language. In the screenshots at 2560x1440 the box is the same height on
mainand here. The guide's Graphics image iskept without a new capture (its inputs recorded in
docs/user/images/guide/manifest.json).hn_pacestill says that pacing applies to "fixed multipliers"; it is also true of Auto by DLSS FG, butthe line is in 13 languages and is left for the wording pull request.
2x's do. Against main's Auto, composed by Windows on the refresh grid, their intervals spread more in 5 of the 6 cases
measured, with the cap held better at 240 Hz fixed (Measurements). Auto keeps FIFO: a player who turns it on gets what
a Fixed 2x by DLSS FG gives today.
a Fixed 2x by DLSS FG on
maintakes the same exit path (Still to test). Since L2's fix, more exits let the featurego there: a game quit while Auto is the renderer's own too.
Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). (The 15 failures also fail onmain, named in Testing.)main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
gpu/vk/switches.def.tests/that reads changed source is updated, not weakened.through the queue, in the pack Testing ran; Linux by CI, whose run of this head waits for a maintainer.)
mainand here, for a change that shows on screen. (The Insert menu's Framegeneration and Frame generation by rows, in #2795 (comment); Testing says how they were taken.)
Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
Two mutations of the change went uncaught: queue_priority_switch_row taking a value device_policy_env ignores ("bogus", "lowest") as Low or Off, and menu/threads.cpp's queue_priority_env never reading the switch in the game's build. - test_menu_env_overrides: queue_priority_switch_row's reading, the stand-in cut from device_policy.h: a level (any case, medium to realtime too) Low, an off word Off, and an empty, unknown or unset value nothing, the row staying the player's. - test_menu_modules: the menu model is built with MENU_LAYOUT_ONLY, without device_policy.h, so the game's branch of queue_priority_env is checked in menu/threads.cpp's text: queue_priority_switch_row(...) >= 0. Both pass at 950e0d227's source. A third mutation, create_device's frame generation level read without the row, stays uncaught because nothing can see it: queue_priority_look reads that level only where the level follows frame generation, which needs the row at Low already. Co-Authored-By: Claude Opus 5.5 <[email protected]>fd68f82cd94050edba9b7aaea4514356dbf220bedc6d5743ab89b6a845154dc68a2acbef9a23e32e520b37118e22d0d200and for frame generation under Streamline 7c60614605e203e04b00b48ff11701d6878b44180edc373a3b31cbeWith NVIDIA Streamline making the frames, the FPS counter reads "Base 60, DLSS FG (Streamline)". While the menu is open it is drawn under the banner, at the top right, and at Large in a 1920x1080 window it covers the end of the help box's title ("Frame generation by"); #2183's "Base 60, DLSS FG" does not reach it. The check now wants framegen_maker_name to be DLSS FG under Streamline, the Frame generation by row's choice still DLSS FG (Streamline), and no name the counter shows longer than DLSS FG paused, the longest it had before this branch. Co-Authored-By: Claude Opus 5.5 <[email protected]>Under NVIDIA Streamline the FPS counter read "Base 60, DLSS FG (Streamline)". While the menu is open it is drawn under the banner, at the top right, and at Large in a 1920x1080 window that covered the end of the help box's title ("Frame generation by"). framegen_maker_name now names DLSS FG's frames DLSS FG whoever makes them, as #2183 did: the counter takes no more room than before this branch, in any language. The Frame generation by row's choice still reads DLSS FG (Streamline) and its line says Streamline makes the frames, so the menu still says who makes them; "SL" or another short tag would be a name the menu uses nowhere else. Nothing to translate: neither name is in the tables. The Graphics guide image is kept: the fixture draws no FPS counter, and the Frame generation by row is hidden in the capture. The fingerprints of vk_menu.cpp, menu/framegen.cpp and menu/framegen.h (comments) and the review revision are recorded again; graphics-and-controls.md and upscalers.md say what the counter reads. Co-Authored-By: Claude Opus 5.5 <[email protected]>Under NVIDIA Streamline, Reflex's frame limit is not the row's: apply_reflex asks Streamline for at least On, and frame_limit_us reads DLSS-G's mode alone, so at Off the frames shown are held under the refresh as at On. Off's line said only that Off is On. And every line that names the limit is read with the Insert menu open, where dlssg_before_present turns DLSS-G off ("the Insert menu is open"), and the limit with it, while dlssg_making() keeps its value: the limit applies once the menu is closed. test_framegen_by_row now asks, at Off as at On and On + Boost, for the limit while DLSS-G makes frames and none otherwise, and for "With this menu closed" in every line that names it; test_menu_i18n asks for the new texts in every table. Both fail here. It also checks the case the Frame generation by row had none for: Streamline running before any frame is made (framegen_maker() None) at DLSS FG, where the choice reads DLSS FG (Streamline) and the line is the choice's own. That one passes here: it pins what the row already does. Co-Authored-By: Claude Opus 5.5 <[email protected]>Under NVIDIA Streamline, Off is On and Reflex's frame limit follows DLSS-G alone (apply_reflex, frame_limit_us), so Off's line now has the same two forms as On's: without the limit while DLSS-G makes no frames, and with it while it makes them ("NVIDIA Streamline keeps Reflex on: Off is On here. With this menu closed and V-Sync On or Auto, ..."). The lines are read with the Insert menu open, where DLSS-G is off and so is the limit (dlssg_before_present): the three lines that name it now say "With this menu closed and V-Sync On or Auto". hn_reflex's Streamline lines are one table for Off, On and On + Boost; its variants are the value's, then making none, then making frames, for each value. The three lines in the 13 translations (menu_i18n.h, sorted); upscalers.md's "What the menu says" and the guide's NVIDIA Reflex row say the same. Co-Authored-By: Claude Opus 5.5 <[email protected]>bb84fcbaad3b6470ec0d23091e69864593a68f39d89f64Tested in game: Windows 11, RTX 4090, NVIDIA 621.24. At this head (
0bc29b961): full screen on a 2560x1440 120 Hz virtual display, Hyrule Field, DLSS, Frame generation Auto by DLSS FG, cap 60:Auto by DLSS FG at 2x (120.00 Hz, cap 60), FIFO, 600 of 600 presents made by DLSS-G, a clean exit. Before the rebase onto #2738 (8658e99e9): the Measurements' series on a 5120x1440 240 Hz VRR display, Hyrule Field and Market, cap 60, DLSS-G at 2x in every Auto run's measured stretch.Screenshots of the same spot on
mainand here: Windows 11, RTX 4090, NVIDIA 621.24, full screen on a 2560x1440 120 Hz display, fromkokiri-start, DLSS, Frame generation Auto, by DLSS FG, cap 60 (Testing says how they were taken).main: the shared base's runtime,22d0d200(main's commits since then add rows to the Gameplay and Audio tabs, none to Graphics). Its log: FSR 3.1 makes the presents.0bc29b961. Its log:Auto by DLSS FG at 2x (120.00 Hz, cap 60), 600 of 600 presents made by DLSS-G.main22d0d200@review
Recommendation: Request changes. The new selection reads the frame-rate setting across threads without synchronization. It also introduces a measured 121–159 ms transition hitch and reduces displayed frames from about 230 to 120 per second on the tested 240 Hz RTX 4090 setup.
Auto can use NVIDIA DLSS Frame Generation through NGX without requiring the player to choose a fixed multiplier. The tested path works, but it changes pacing, uses about 0.5–0.6 GB more VRAM, and can show substantially fewer frames than the previous Auto mode.
Blocking (2): must change before merging.
gpu/vk/vk_framegen.cpp:1229: The replay thread reads the menu's plain fps_cap field while the display thread can write it. (more on the line) Do: Publish the effective cap through an atomic or protect both the menu write and replay-thread read with the same lock.@fixor@rebasetry first). (for the author)Testing before merging (2) (runs on the systems it can change)
gpu/vk/framegen_rows.h:100: Automatically switching the multiplier introduces a visible long frame during play. (more on the line) Do: Move feature and resource preparation off the critical transition, or otherwise avoid the synchronous recreation, then repeat the five-cycle transition measurement. (@fixdoes its part first: Prepare the DLSS-G feature and its resources ahead of the switch or avoid blocking the frame on their recreation.)gpu/vk/vk_framegen.cpp:1231: The new NGX path still needs the supported hardware and exit checks listed in the PR. (more on the line) Do: Compare repeated base Fixed 2x exits with this Auto path, and run Auto on Linux RTX 40 and Windows RTX 50 at the listed multipliers.Decisions for the author (1) (they don't hold the recommendation)
gpu/vk/framegen_rows.h:78: The default trades away a large portion of Auto's displayed frames on RTX 40 high-refresh displays. (more on the line) Do: Choose whether DLSS-G should replace the previous refresh-matching behavior in this case; preserve the previous default where the available multiplier leaves that much refresh unused if the smoother output is preferred. (@fixdoes its part first: Keep the previous Auto path when the available DLSS-G multiplier cannot approach the display refresh.)@fixcan do L1, L2 and L3.Checks: Still running: 10 checks.
More: does it help, other systems, switches, what was read
Does it help: Yes for the requested feature: the head ran DLSS-G at 2x and made 600 of 600 presents on the tested Windows RTX 4090. The five-run measurements also show the costs: about 230 to 120 displayed frames per second at 240 Hz VRR and 121.5–159.1 ms frames when switching into DLSS-G.
Other systems: The selection affects NGX frame generation, swapchain mode, pacing and memory on supported NVIDIA GPUs. Streamline behavior was tested on Windows; Linux NGX and RTX 50 multipliers remain untested. AMD, Intel and RTX 30 fallback runs are also outstanding. Two of 61 DLSS-G runs lost the device on exit, with no comparable baseline yet.
Switches: RX_VK_FG_AUTO_DLSS is added, defaults on, and 0 restores the previous Auto behavior. Its default needs reconsideration in light of the measured loss of displayed frames and transition hitch; it is documented in switches.def and the reference table.
Reviewed:
0bc29b961dagainst01d6878b3f: Read AGENTS.md, CONTRIBUTING.md, the PR template, the relevant standards sections, framegen_rows.h, the Auto DLSS diff, and surrounding selection, input and pacing paths. Skimmed the remaining stacked changes, tests, translations and guide records; the full changed code and every repository rule were not reviewed. docs/review-checklist.md and the adjacent Tooling checkout were absent.; nothing run (a code review).Checked and fine:
Testing: Read-only review; no builds, scripts or tests were run. The supplied CI checks are still running.
Overlaps and merge order: Stacked on #2738, which is stacked on #2183; merge those first.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
@ -69,0 +75,4 @@/// shows: cap x M at most the refresh x 1.005, the slack taking a /1.001 mode (119.88 Hz) as its round rate. 2x from 120 Hz/// at 60, 3x from 180 Hz, 4x from 240 Hz. Uncapped: 2x from 120 Hzinline int auto_dlss_multiplier(int refresh_mhz, int cap_fps, int dlss_most) {if (dlss_most <= 0) return 0;L3 (blocking): The default trades away a large portion of Auto's displayed frames on RTX 40 high-refresh displays.
When: At 60 fps on the tested 240 Hz RTX 4090, the runtime only offers 2x, so this rule selects 120 displayed frames per second where the previous Auto showed about 225–231. Existing Auto users receive this change without changing their settings.
Do: Choose whether DLSS-G should replace the previous refresh-matching behavior in this case; preserve the previous default where the available multiplier leaves that much refresh unused if the smoother output is preferred.
@ -69,0 +97,4 @@s.pending = -1;} else if (s.value <= 0 || candidate == 0) {s.value = candidate, s.pending = -1;} else if (candidate != s.pending) { // (a new value: its hold starts now)L2 (blocking): Automatically switching the multiplier introduces a visible long frame during play.
When: On the tested RTX 4090, changing the cap from 144 to 60 causes Auto to switch to DLSS-G after the hold and produces a 121.5–159.1 ms frame in each of five changes; the cap change alone produced no frame over 50 ms.
Do: Move feature and resource preparation off the critical transition, or otherwise avoid the synchronous recreation, then repeat the five-cycle transition measurement.
@ -1187,0 +1226,4 @@static framegen_rows::AutoSettle settle;const int before = settle.value;int rule = -1; // (not Auto: none)const int refresh = display_refresh_mhz(), cap = menu_fps_cap();L1 (blocking): The replay thread reads the menu's plain fps_cap field while the display thread can write it.
When: Changing Game frame rate cap in the menu writes opts.fps_cap while each present calls menu_fps_cap(), whose fps_cap_now() reads that same int without a lock or atomic access. This is a C++ data race and can make the selected multiplier undefined.
Do: Publish the effective cap through an atomic or protect both the menu write and replay-thread read with the same lock.
@ -1187,0 +1228,4 @@int rule = -1; // (not Auto: none)const int refresh = display_refresh_mhz(), cap = menu_fps_cap();if (framegen_running() == 1) // (Streamline makes its own frames, framegen_now: none of this file's then)rule = off || dlssg_active() ? 0 : framegen_rows::auto_dlss_multiplier(refresh, cap, dlss_fg_most());L4 (should fix): The new NGX path still needs the supported hardware and exit checks listed in the PR.
When: The author reports two device losses in 61 Auto DLSS-G exits, and has not yet compared Fixed 2x on the base. Linux RTX 40 and Windows RTX 50 Auto multipliers have not run.
Do: Compare repeated base Fixed 2x exits with this Auto path, and run Auto on Linux RTX 40 and Windows RTX 50 at the listed multipliers.
0bc29b961d87357e9b38Answer to BeanBot's review of 2026-11-29 (request changes, at
0bc29b96). The branch is now rebased ontomaincb0a2763(#2738, and #2183 with it, merged), head
87357e9b3. L1 and L2 are fixed, each as a test commit and then the fix; L3 iskept by the author's decision; L4 stays in Still to test; L5 is done by the rebase. A cold review of the fixes (a second
agent, nothing posted) found three more points, fixed in one more test-then-fix pair (
6f3d245bf, then8aba7f216): theyare under L1 and L2 below.
L1 (
gpu/vk/vk_framegen.cpp:1229): the cap read across threadsConfirmed. With frame generation on,
present_image(and with itmenu_tick) runs on the display thread(
vk_framegen.cppdisplay_main), and the control bridge'smenu_setting_setruns on its own: both writeopts.fps_capundermenu_mu.framegen_auto_dlss_updateread it on the replay's thread throughmenu_fps_cap()→fps_cap_now(), with no lock.Fixed in
0e64906ab, test first in47edeb53a:vk_menu.cpppublishes the cap in effect (fps_cap_now(), HOS_FPS_MAX included) in an atomic,fps_cap_published, undermenu_mu: atmenu_init, so the first present already has the options file's cap (Auto'ssettle takes its first value at once, so a 0 there would have made the sets and the swapchain twice), and at the end
of every
menu_tick, after its input and the bridge's settings. That is whatfps_level_nowalready does. Sincethe cold review, the bridge's
menu_setting_setalso publishes at once (8aba7f216), so a run with nomenu_tick(
HOS_HEADLESS) does not keep an old cap.menu_fps_cap()reads the atomic; the performance summary reads it too.menu_muon the replay's side: it is held for a wholemenu_tick, andvk_menu.cppalready records a present heldby it (
bridge_probe_first).tests/test_framegen_auto_dlss.pycompiles the realfps_cap_now,publish_fps_capandmenu_fps_capwith a rowvalue that counts the reads made without
menu_mu: it failed before the fix (menu_fps_cap reads the Game frame rate cap row (opts.fps_cap) outside menu_mu) and passes with it; it also checks thatmenu_init,menu_tickandmenu_setting_setpublish, a call left in a comment not counting.framegen_running()readsopts.framegenthe same way, and the replay reads other rows plainly(
opts.upscale,opts.sharpnessindo_present). That pattern predates this PR and is not widened here.L2 (
gpu/vk/framegen_rows.h:100): the long frame at Auto's changeFound with Tracy (RTX 4090, temporary zones not committed, on the 2560x1440 120 Hz virtual display, 3 changes each way).
The long frame is NGX, not the swapchain or the sets:
So it is DLSS-G's existing cost, which Fixed pays at the click. Auto paid it 2 s after the cap changed (the hold), and in
both directions, because
do_presentlet the feature go whenever DLSS-G was not making the frames (dlss_fg_idle).Fixed in
9dcf15d21, test first inf8f97af6b, limited after the cold review in8aba7f216:framegen_auto_dlss_keeps: while Auto is the renderer's own because DLSS FG's 2x does not fit (the rule's 1), thefeature is kept for the way back, once Auto itself has run DLSS-G since it was chosen (
auto_dlss_back). A feature aFixed multiplier made is let go when Auto comes at 1, as before this PR: on a 60 Hz display, say, the way back would
be cap 30 alone. Off, a fixed multiplier and DLSS FG making no frames (the rule's 0: no temporal
Upscaler, NGX gave up, Streamline) let it go, as before. DLSS-G's history starts again on the way back
(
dlss_fg_inputsdrops its last inputs below 2x, and the sequence gap resets), as each 600-present summary shows("1 told to reset").
The cost: DLSS-G's video memory stays taken while Auto shows the renderer's frames. On the 240 Hz display's run below, at cap 144
(Auto the renderer's own), the driver's figure is 10.3–10.6 GB before and 11.0–11.2 GB after: about 0.6 GB more (the
log's
vk: budget: VRAMlines, the renderer's own accounting the same on both sides). The first time Auto reachesDLSS-G in play still makes the feature once (at the start, when the options file's cap already gives 2x, it is made in
the first frames).
Not done: making the feature off the frame's thread. That would change how NGX is called across threads, for the
first change only.
Also from the cold review:
framegen_auto_dlss_updateasked Windows for the display's refresh once a second withFrame generation Off, the default; it now reads the refresh and the cap at Auto alone.
tests/test_framegen_auto_dlss.pycompilesdo_present's own line withframegen_auto_dlss_keeps. It fails beforethe fix (the feature let go at Auto's 1) and passes with it; since
6f3d245bfit also checks that a Fixed one's featureis not kept at Auto's 1 and that Off and Fixed read no refresh, failing at
9dcf15d21and passing at8aba7f216, with clang++ (llvm-mingw; itsg++is clang too, so GCCis left to CI). With the key line broken it fails again.
In the game (virtual display, 2560x1440 at 120 Hz, not a pacing measurement, 3 changes each way): the feature made
once and let go only for the exit, DLSS-G making 599 of 600 presents after each return, and the longest frame within
6 s of each change 20–38 ms; before the fix, the same run on the same base, 123–138 ms into DLSS-G and 64–78 ms out.
The five-change measurement on the 240 Hz display (RTX 4090, 621.24, 5120x1440 at 240 Hz VRR, Hyrule Field, cap 60 ↔ 144, 10 s
each), one timing job per run, before and after interleaved (ABBA), the queue's noise at zero for all four.
"Before" is
0bc29b961, the head you reviewed; "after" is 04159c082, this fix before the rebases (the same code as9dcf15d21: the range-diffs are the same for every code commit, andmain's commits since touch neithervk_framegen.cppnorvk_dlss.cpp; invk_replay.cppthey change the simulated turf's submits, notdo_present,and #2821's texture and device changes are AMD's). The cold review's fixes do not change this run's path: it starts
in Auto at cap 60, so Auto has run DLSS-G before each 144, and the cap the bridge sets is published at once instead of
at the next
menu_tick, under a frame earlier.A driver-level setting differs from the earlier Measurements' runs (value 0 here, the PC started on 2026-11-29 at
15:23); before and after ran in the same state, and the "before" numbers match the earlier ones (59.5–82.6 ms out,
121.5–159.1 ms in), but for one exit at 127.9 ms.
0bc29b96104159c082Not covered: a run that starts at cap 144 and reaches DLSS-G in play, which makes the feature once.
After the rebase and the cold review's fixes, one run on the virtual display at
87357e9b3(not a measurement): Auto byDLSS FG, cap 60 → 144 → 60 → 144 → 60 → 144, then quit at 144: DLSS-G's feature made once and let go only for the
exit, while Auto was the renderer's own; 599 of 600 presents made by DLSS-G after each return; the longest frame within
6 s of each change 21.7 to 33.5 ms (19.5 to 29.6 ms in the same run at 272f5f906, before the cold review's fixes); no
Vulkan error and a clean exit.
Not run in the game, only in the game-free test: Fixed → Auto at Auto's 1 (the feature let go), Off reading no
refresh, and the bridge's setting published with no
menu_tick(HOS_HEADLESS).L3 (
gpu/vk/framegen_rows.h:78): fewer frames shown than the old Auto on a 240 Hz RTX 40Kept, by the author's decision: on RTX, Auto takes DLSS FG wherever its 2x fits the display at the cap. The old Auto
shows about 230 frames a second at 240 Hz by making one for every refresh, but Windows composes them on the refresh grid
(
Composed: Copy with GPU GDIin all 60 runs), with no G-SYNC and with the renderer's own interpolation; Auto by DLSS FGshows 120, made by DLSS-G from the scene's depth and motion, flipped (
Hardware: Independent Flipin all 70 runs) andpaced by G-SYNC, as a Fixed 2x by DLSS FG is. A player on RTX who picks Auto gets the generator the card is made for;
one who wants a frame for every refresh can still choose Frame generation by: FSR 3.1 or Built-in, and
RX_VK_FG_AUTO_DLSS=0gives the old Auto back. The cost stays written in Risks. On an RTX 50 the rule goes to 4x at240 Hz (240 shown), which L4's runs will check.
L4 (
gpu/vk/vk_framegen.cpp:1231): the exit and other hardwareNot done yet; it stays in Still to test:
DLSS Frame Gen (NGX): let go for the exit): repeated exits of aFixed 2x by DLSS FG on
mainare to run beside Auto's, on the same PC, to say whether this PR changes it. L2's fix doesnot change
dlss_fg_close, but it sends more exits through it with the feature made: a game quit while Auto is therenderer's own now lets DLSS-G's feature go there, where before the fix it was already let go.
once a BigBean approves it.
L5: the conflict with the base branch
Rebased onto
main450e63b8, now that #2738 (and #2183 with it) is merged: only this PR's commits remain; then ontomaincb0a2763(#2821, #2819), with no conflict. The conflictswere the docs' (the Settings table, where
main's 45 fps cap is kept, and the guide's record of the Graphics image,recorded again in
docs/user/images/guide/source-review-auto-dlss-450e63b8.md); every code commit is the same in therange-diff.
WIP: feat(vk): Frame generation's Auto runs DLSS FG at the most frames the display shows at the game's capto feat(vk): Frame generation's Auto runs DLSS FG at the most frames the display shows at the game's cap87357e9b38f5af8ffd13Rebased onto
main462919343(#2183 merged, and #2833):87357e9b3→f5af8ffd1.docs/user/images/guide/manifest.json), in this PR'sfour
docs(guide)commits. Each was resolved frommain's version (#2183's record), with this change's ownfingerprints replayed over it; recorded in a new commit,
f5af8ffd1, and indocs/user/images/guide/source-review-auto-dlss-450e63b8.md.scripts/check_guide_screenshots.py --review-sourcesreports no
REVIEW REQUIREDinput, at this head as onmain.gpu/vk/vk_replay.cpp, changed on both sides, merged with no conflict:#2183 retires the present probe at the window's close and at NVIDIA Streamline's (
vk_replay.cpp,vk_dlssg.cpp),not the NGX DLSS-G path this change touches (
do_present'sdlss_fg_idleline is as it was), so no game run wasrepeated.
tests/run_all.py --changed origin/main, Windows, llvm-mingw, through the PC's queue): 252 passed,15 failed, 12 skipped. The 15 fail on
main462919343too, run alone there with the same checks (the list is inTesting).
test_framegen_auto_dlss,test_dlssg,test_present_probe_retirement,test_present_semaphoresandtest_guide_screenshotspass. This head's renderer builds (dev.py pack, through the queue).9719a7b59(test) and639b968b1(fix), L239a9f9360and71769b9de, thecold review's
d22b16c5candc495d9b11.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.