Offer DLSS multi frame generation at 2x, 3x and 4x.

framegen_multiplier (2, 3 or 4, live) sets how many frames the display gets per rendered frame while NVIDIA DLSS frame generation runs, and a DLSS multiplier row under Frame generation in the Screen tab sets it. nx2navi_dlssg.dll now passes that count to Streamline and reports the GPU's limit (numFramesToGenerateMax) through a new optional export, nx2sl_frames_max; with an older DLL the game keeps to 2x. A value above the limit is clamped to it with a log line, and the menu lists only what the GPU and driver allow, with a note saying why the rest are missing. The Frame generation row now says "in use: off" and why when DLSS frame generation was set but does not run.

The pacer divides the frame limit by the multiplier in effect, as it already halved it for FSR 3.1, so the display gets the limit and VSync at the display's rate drops no generated frames; RivaTuner Statistics Server stays out while DLSS frame generation runs, since it counts generated frames. With DLSS 2x a limit of 60 now shows 60 on screen instead of 120.

nx2navi_dlssg.dll has to be rebuilt (tools/build_dlssg.py) for 3x and 4x.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-09 11:58:47 -05:00
parent 26eb249026
commit c745a9ef2f
13 changed files with 244 additions and 31 deletions

View File

@@ -54,10 +54,16 @@ typedef void (*PFN_nx2sl_sleep)(uint32_t frame, int hold);
// The frame's submissions went out (at the game's present; with asynchronous replay, when the replay reaches it): its
// render-submit-end marker.
typedef void (*PFN_nx2sl_submit_end)(uint32_t frame);
// Each host present, before the present call: the frame's constants and tags, and frame generation on or off. Then
// Each host present, before the present call: the frame's constants and tags, and frame generation on or off. enable is
// the number of frames to generate between two rendered ones (0 off; 1, 2 or 3 for 2x, 3x or 4x), at most what
// nx2sl_frames_max reports; a DLL without nx2sl_frames_max (an older build) generates one for any nonzero value. Then
// nx2sl_present_marker(0) before and (1) after the present.
typedef int (*PFN_nx2sl_frame)(VkCommandBuffer cb, const Nx2SlImage *depth, const Nx2SlImage *mv, const Nx2SlImage *hudless,
const Nx2SlCamera *cam, uint32_t out_w, uint32_t out_h, int enable, uint32_t frame);
// The most frames DLSS-G can generate between two rendered ones on this GPU and driver (Streamline's
// numFramesToGenerateMax: 1 on a GPU that does 2x, 3 on one that does 4x); 0 until Streamline reports it. Asked after
// the device exists and refreshed after each present. Optional: an older DLL lacks it, and the game then asks for one.
typedef uint32_t (*PFN_nx2sl_frames_max)(void);
typedef void (*PFN_nx2sl_present_marker)(int after, uint32_t frame);
// The frames the display got, generated ones included, counted after each present (on the present thread)
typedef uint64_t (*PFN_nx2sl_shown)(void);