Repository navigation
feat(menu): Frame generation by and the FPS counter name who makes the frames - #2788
Conversation
…e frames At Auto, nothing said whether NVIDIA DLSS Frame Generation or the built-in interpolation made the frames: without nvngx_dlssg.dll, without a temporal Upscaler, in the game's menus or at the Auto multiplier it is the built-in one, silently. - vk_framegen.cpp: framegen_maker, who made the last 64 sets' frames (DLSS FG, FSR 3.1 FG, Built-in FG; none after half a second without). - vk_dlss.cpp: dlss_fg_why_not, why the last set asked of DLSS-G went to the renderer's own (off, the device, NGX's start, too many frames for its runtime, no temporal Upscaler picture, refused); a made set clears it, a set with nothing to blend from leaves it. - The menu: the row reads "Auto: DLSS FG" / "Auto: Built-in FG" (the choice "Built-in FG"), its line says why not DLSS FG, and the FPS counter's second line is "Base 60, DLSS FG" (was "game 60"). - Tests: test_dlssg_runtime follows the new returns and checks the reasons; present_source_crop_test checks the maker of each set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test_menu_i18n: the tables kept "Built-in" and "game %.0f", texts the menu no longer writes. - The texts are the menu's now: vk_dlss.cpp gives the reason as a code (dlss_fg_skip, FgSkip in vk_dlss.h), vk_menu.cpp framegen_skip_text says it, so menu_i18n.h can translate it. - menu_i18n.h: "Auto: %s", "Base %.0f", "Base %.0f, %s", "Built-in FG", "Not DLSS FG now: %s" and each reason in all 13 tables; the two old texts let go, the counts kept. - The FPS counter's second line goes through i18n::tr: it draws past ui::'s translation, so "game %.0f" was never shown translated. Its buffer is 96 bytes for UTF-8. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Joey-Magnus
left a comment
There was a problem hiding this comment.
I merged this into current main and ran every check that reads vk_menu.cpp, vk_dlss.cpp, vk_framegen.cpp or menu_i18n.h (33 checks, test_menu_i18n, test_dlssg_runtime and present_source_crop_test among them). All pass, and CI is green.
The threading is fine. note_maker only runs on the recording thread, at vk_framegen.cpp:898 and in the Auto branch. The ring itself isn't shared, and the menu thread only reads the relaxed maker_count atomics and the timestamp. Each early return of dlss_fg_frames now names its reason, and the !blend and closed returns deliberately leave the old one, which matches the description. The screenshots and the table of cases on an RTX 5060 Ti cover what a player sees.
One heads-up for the maintainers: this conflicts with #2665 (FSR 4 / FSR 3.1 as Frame generation by choices) in vk_framegen.cpp, vk_menu.cpp, readme.md and tests/test_framegen_preset.py. Whichever lands second needs a rebase. FgMaker and framegen_maker_name are already shaped for an "FSR 4 FG" entry, so it should be mechanical. It merges cleanly with #2658.
Conflicts: gpu/vk/menu_i18n.h's kLangs counts (each set to the entries its table holds now: main's count plus this branch's 11 texts), tests/present_source_crop_test.cpp (main's antilag_frame stub and this branch's note_maker stub, both kept), docs/tested-configurations.md (both sides' rows kept). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With Frame generation by at Auto, nothing on screen said whether NVIDIA DLSS Frame Generation or the built-in interpolation made the frames. It falls back to the built-in one silently: without
nvngx_dlssg.dll(v2.1.0 and the current nightly copy only DLSS's runtime), without a temporal Upscaler, in the game's own menus, or at Frame generation's Auto. A player on an RTX 5060 Ti couldn't tell DLSS FG wasn't running until the log saidnot available (0xbad00004).What it shows
Auto: DLSS FG,Auto: Built-in FGorAuto: FSR 3.1 FG(the FSR 3.1 interpolation at 2x). The choice itself is nowBuilt-in FG. Off:Auto, as before.Not DLSS FG now: DLSS Frame Generation makes a fixed 2x to 8x, not Frame generation's Auto., or no picture from a temporal Upscaler (also the game's menus),nvngx_dlssg.dll/ an RTX 40 missing, more frames than its runtime makes, NGX refusing. Every line it can have is a variant, so the help box keeps its height.game 60; nowBase 60, DLSS FG(orFSR 3.1 FG,Built-in FG). "Base" for the game's own rate, the name frame generation tools use.One name per engine, " FG", on the row and the counter. When #2665 adds FSR 4 as a frame generator,
FSR 4 FGfits the same way (FgMakerandframegen_maker_name).How
vk_framegen.cpp:framegen_maker(). Eachframegen_recordnotes who made its set (DLSS-G'sdlss_fg_frames,fsr3fi_frame, the renderer's own passes, or none) in a ring of the last 64 sets; the menu's thread reads the counts and takes the most. Nothing noted for half a second (Off): none.vk_dlss.cpp:dlss_fg_skip(), the reason as a code (FgSkipinvk_dlss.h). Each return ofdlss_fg_framesthat leaves the set to the renderer's own names its reason (skip(FG_SKIP_...)); a set DLSS-G makes clears it; a set with nothing to blend from (a loading hitch) leaves it as it was. The build without the NGX SDK says so.vk_menu.cpp:tx_framegen_by,hn_framegen_by(the reasons' texts inframegen_skip_text, so they can be translated) and the FPS counter's line.menu_i18n.h: every new text in all 13 languages (Auto: %s,Base %.0f,Base %.0f, %s,Built-in FG,Not DLSS FG now: %sand each reason);Built-inandgame %.0f, no longer written, let go. Product names (DLSS FG,FSR 3.1 FG,Upscaler) stay as the tables already keep them.i18n::tr: it draws with its ownTab, pastui::'s translation, so main'sgame %.0fwas never shown translated. Its buffer is 96 bytes, for UTF-8.readme.md: the row and the counter.test_dlssg_runtimefollowed the new returns and now checks that the reasons are named and cleared;present_source_crop_testchecks the maker noted for FSR 3.1's set and for the built-in fallback.Screenshots
3440x1440, Fire Temple. Frame generation 2x: the row and the counter say DLSS FG.
Frame generation Auto: the built-in one makes the frames, and the line says why.
In Polish (top, 2x) and Russian (bottom, Frame generation Auto): the counter's line and the row's line translated.
Testing
In game, native Windows 11, RTX 5060 Ti 16 GB, driver 617.42, a build of this branch on main (51da046) with NVIDIA's SDK and
nvngx_dlssg.dll310.9.16, DLSS Quality, a save in the Fire Temple. The row's text read through the control bridge (option get frame_generation_by), the screenshots of the window:Auto: DLSS FGBase 63, DLSS FG, 126-129 FPSAuto: DLSS FGAuto: Built-in FG+ whyBase 71, Built-in FG, 240 FPSAuto: Built-in FGAuto: Built-in FGBuilt-in FGAutoNo fault through 6x, 4x, 2x, Auto and Off. Menu language Polish:
Auto: Wbudowany FG,Bazowe 63, DLSS FG,Teraz bez DLSS FG: ...; Russian:База 69, Встроенный FGand its line. The log agrees:of the last 600 presents 600 made by DLSS-Gat 2x.Tests:
test_menu_i18npasses (it failed on the first push: the tables still hadBuilt-inandgame %.0f). The checks that readvk_menu.cpp,vk_dlss.cpp,vk_framegen.cpp,menu_i18n.hor the readme, run here: all pass but one;test_input_backgroundfails the same on main on this PC (it was in my earlier PRs' list of machine-only failures). A row for the run is indocs/tested-configurations.md.Not covered: FSR 3.1 FG on screen (no AMD GPU here; its maker is checked in
present_source_crop_test), the reasons for an RTX 30 card or a missing runtime on screen (read from the code paths, and the missing runtime from this PC's earlier log). The race when stepping the multiplier up is #2658's, not touched here.🤖 Generated with Claude Code