fix(vk): DLSS FG's multiplier stops at its runtime's most + 1: 6x on an RTX 50, 2x on an RTX 40 #1486
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!1486
Loading…
Reference in a new issue
No description provided.
Delete branch "pmwork-personal/Longshot:fix/dlss-fg-runtime-cap"
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?
Type: fix · Risk: low · Tested on: Windows 11, RTX 5090 (NVIDIA 621.24) · Needs: Windows, an RTX 40 card
TL;DR
With NVIDIA DLSS Frame Generation chosen, a Frame generation setting above what NVIDIA's runtime makes (7x or 8x on an RTX 50, 3x and up on an RTX 40) was never made by DLSS FG: FSR 3.1 or the built-in generator made every frame, while the menu still showed the higher setting. Now, while DLSS FG makes the frames, the row stops at the runtime's limit (6x on an RTX 50, 2x on an RTX 40), and a higher saved value shows and runs as that limit. On an RTX 5090 with 8x saved, the row shows 6x and DLSS FG makes every frame (on main, none). A new check fails on main and passes here.
Breakdown
Why
NGX tells the most frames its DLSS-G runtime makes between two of the game's (MultiFrameCountMax: 1 on an RTX 40, 5 on an RTX 50). For a multiplier past it,
dlss_fg_framesskipped NGX (FG_SKIP_TOO_MANY) and the renderer's own or FSR 3.1 frame generation made the whole set, so "DLSS FG" in the row was not true. A player reported it today on an RTX 4070 Ti (driver 617.42, nightly-411) at 3x: their log saysavailable, up to 1 made frames between two of the game'sand2 made frames asked, but its runtime makes 1 at most ...: the renderer's own makes them, and their FPS counter showedFSR 3.1 FG. The same happens at 7x and 8x on an RTX 50.How to reproduce
Seen on: Windows, RTX 4070 Ti, 617.42 (a player's report); RTX 5090 here.
Settings and switches: Upscaler DLSS or DLAA, Frame generation by: DLSS FG, Frame generation 3x on an RTX 40 (8x on an RTX 50), FPS counter on.
Steps: play anywhere with a 3D scene.
Expected: DLSS FG makes the frames.
Actual: the FPS counter says FSR 3.1 FG (or Built-in FG), and the log has
made frames asked, but its runtime makes ... at most.What changed
The multiplier that runs is now
framegen_now(): the row's value, capped at DLSS-G's runtime's most + 1 while DLSS-G is to make the frames. Every place that used the row's multiplier for the work (the sets, the swapchain's images and present mode) uses it, and the menu shows it.dlss_fg_most()(gpu/vk/vk_dlss.cpp): the runtime's most made frames while DLSS-G is asked for, DLSS runs on the device, a temporal Upscaler gives it inputs (temporal_wanted()), NGX said yes and it was not given up; 0 otherwise and before NGX answers (0 in a build without NVIDIA's SDK).framegen_capped()andframegen_now()(gpu/vk/vk_framegen.cpp, declared invk_framegen.h);multiplier()runs atframegen_now().swapchain_framegen(),swapchain_dlssg()andcreate_swapchain'sset_too_big(gpu/vk/vk_main.cpp), andpresent_image's swapchain key (gpu/vk/vk_replay.cpp) useframegen_now(): a saved 8x that DLSS FG makes at 6x is a set of 6, and the chain is made again when the multiplier that runs changes (NGX's answer, DLSS FG given up, another engine chosen).gpu/vk/vk_menu.cpp):tx_framegenandhn_framegenshow the value that runs;set_row's arrows step from the value shown, past the top go round to Off and down from Off to the top (as at 8x);menu_setting_set(the control bridge) sets a value as asked. At Auto the row names who makes its frames, "Auto (FSR 3.1 FG)" or "Auto (Built-in FG)" (framegen_maker(); DLSS FG makes fixed multipliers only), and plain "Auto" while none are made. The row's help says the limit; the Frame generation by line for Auto says "a fixed 2x and up" instead of "2x to 8x". These texts in the 13 languages ofgpu/vk/menu_i18n.h.docs/graphics-and-controls.md.tests/test_framegen_dlss_cap.py(new: the realframegen_cappedcompiled and run, the call sites by text);tests/test_vsync_row.pycompiles the realdlss_fg_most,framegen_cappedandframegen_now(4x on a runtime of 1 now runs as 2x by DLSS-G, FIFO under V-Sync Auto;dlss_fg_runsstill refuses a set past the runtime's most);tests/test_framegen_preset.pyruns the row's arrows at 6x, 2x and no limit (and gets theframegen_by_dlss_offeredstand-in it lacked on main); stand-ins intest_framegen_auto.py,test_present_semaphores.py,test_rumble_menu.py,test_upscaler_round_trip.pyandtest_crt_options.py(the first two of those three pass again with theframegen_by_dlss_offeredstand-in;test_crt_optionsstill stops at its own cut, as on main), and in the guide's screenshot tool (scripts/screenshots/menu.cpp).Since #1442,
create_swapchain'sset_too_bigread the row's multiplier. It now readsframegen_now(), so a saved 8x that DLSS FG makes at 6x gets the chain of a 6x set (two sets' images under FIFO, as a saved 6x on main), andpresent_image's swapchain key changes when the multiplier as it runs changes. Indlss_fg_frames, a set without a temporal Upscaler now givesFG_SKIP_INPUTSbefore the too-many test: then the multiplier is not capped, and the missing inputs are the reason the row's line and the log give.Measurements
Verdict: nothing to measure for speed: this changes which frame generator runs and what the menu shows, checked in the game and by the checks below.
Flags and settings
A menu row's range changes; no switch, ini key or build flag.
framegen=)Testing
Tested: In the game on Windows 11, RTX 5090 (NVIDIA 621.24), 5120x2160 at 165 Hz, my settings (DLSS, Frame generation by DLSS FG, FPS counter on) with Frame generation 8x saved; each runtime a dev pack on the same base (
scripts/dev_packs.py). Main (415a8944): the row showed 8x, the FPS counter FSR 3.1 FG, the frames were FSR 3.1's (also over the HUD), and the log said7 made frames asked, but its runtime makes 5 at mostandof the last 600 presents 0 made by DLSS-G. This PR (6556a50d, before the rebases ontoc7db6c02and6d949cf9, which touched none of these lines; since then only a log line's number and comments changed): the row showed 6x, the counter DLSS FG, the logfeature made ... 5 made frame(s) a setand600 made by DLSS-Gof each 600 presents, and no too-many line; 8x stayed saved. Game-free:tests/test_framegen_dlss_cap.pyfails on main and passes here;python -I -B tests/run_all.pyfails only checks that fail on main on this PC (51 checks, all failing on main6d949cf9here too: compilers, headers and stand-ins this PC lacks), andtest_framegen_preset,test_rumble_menuandtest_upscaler_round_trippass again. The row's arrows in the game (this PR, the start screen): Left from Auto gives Off, Left from Off 6x (the top), Right at 6x Off. At Auto on the start screen the row says plain "Auto": the game ran faster than the 165 Hz display there, so Auto made no frames; "Auto (FSR 3.1 FG)" while Auto makes frames in play is checked by the game-free checks only.Screenshots (the Insert menu at Frame generation, 8x saved, the start screen; the FPS counter at the top right):
Before: main @
415a8944(8x saved: the row shows 8x; the counter, Built-in FG)After: this PR @ 6556a50d (8x saved: the row shows 6x, its help names the limit; the counter, DLSS FG paused, as on the start screen there is no 3D scene to make frames from)
Not testable by hand: an RTX 40 card (this PC has an RTX 5090): the Test Farm run below stands in.
Not tested: Linux. With V-Sync Off, DLSS FG's 6x paced unevenly here; this PR leaves that path as it is (the same swapchain and multiplier as main with 6x saved), and the frame pacing work follows it up. With V-Sync On at 165 Hz, 6x holds the game at the refresh over 6.
Must be tested:
made frames asked, but its runtime makesline in longshot_log.txt (Test Farm: @Beanstalk windows nvidia gpu-rtx-40xx).Risks
What could break: with DLSS FG chosen, the multiplier that runs can change once when NGX answers (before its answer the row's value runs); the swapchain is then made again, as it already was for NGX's no. If DLSS FG is given up later, the saved value runs again with the renderer's own.
Turning it off: revert the commit.
Compatibility: nothing changes in the options file: a saved 7x or 8x stays and runs as 8x again with another frame generator or GPU.
Checklist
Everyone
type(scope): description) of the status line's type.can't be run by hand is in Testing's Not testable by hand, with why.
in Risks.
main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named).third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.mainand passing here.tests/that reads changed source updated in this PR, not weakened.🤖 Generated with Claude Code
Tested in game: RTX 5090, NVIDIA 621.24, Windows 11, 5120x2160 at 165 Hz, DLSS (DLAA), Frame generation by DLSS FG, 8x saved, the start screen and play: main
415a8944showed 8x with FSR 3.1 or the built-in generator making the frames (log: 7 made frames asked, but its runtime makes 5 at most; 0 of 600 presents by DLSS-G). This PR showed 6x, the FPS counter DLSS FG, and DLSS-G made 600 of 600 presents (5 made frames a set); the row's arrows: Right at 6x goes to Off, Left from Off to 6x.Added the Before/After screenshots of the Insert menu (8x saved, the start screen, RTX 5090): main shows 8x, this PR 6x.
@Beanstalk windows nvidia gpu-rtx-40xx: please run this PR on an RTX 40 card, 5 minutes.
Settings: Upscaler NVIDIA DLSS or DLAA, Frame generation by DLSS FG, FPS counter on, and
frame_generation=8in longshot_options.ini (8x saved, set before the start). Play about a minute in a 3D place (Kokiri Forest is fine), then open the Insert menu at Frame generation.Expected with this PR:
DLSS Frame Gen (NGX): available, up to 1 made frames, theof the last 600 presents ... made by DLSS-Glines count more than 0, and there is nomade frames asked, but its runtime makesline.On main the same settings show 8x, the counter names FSR 3.1 FG or Built-in FG, and the log has the
made frames askedline.Beanstalk test farm
Commit
0647e37· tier reviewed · approved by pmwork-personal · dashboardWhat will be tested · AI plan (
gpt-6.1-terra)The plan requests a Windows RTX 40 PC, but none is listed online, so it will wait for one. It runs about a minute in Kokiri Forest with 8x saved and DLSS settings, comparing main and the PR in roughly 12 minutes. DLSS is not built on the farm, so this cannot verify the requested DLSS FG cap, counter, logs, or menu arrows; only a crash fails the plan. No tester online now matches windows+nvidia+gpu-rtx-40xx: that target waits for one.
Done. Comment
@Beanstalkto run it again.