mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-15 19:19:58 -04:00
Bring the comments on frame generation, its restarts and RivaTuner Statistics Server's exit up to date.
vk_dlssg.c said frame_rate.c divides the frame limit by the multiplier, but the limit counts the frames the game draws and only a limit of display is divided (frame_rate.c limit_game_hz). vk_fg.cpp said FSR 3.1 frame generation applies after a restart, but FRAMEGEN is live (gfx_present.c window_settings_live makes the swapchain again; only a device made for DLSS Frame Generation waits for a restart, vk_fg_wanted), and that its two queues come from the graphics family, while vk_device.c create_device takes them from another family that can present where the graphics family has one queue. rtss_limit.c's header said the profile is put back "from every path that ends the process" and stays "until the next run changes it", and named only the setting and frame generation as keeping RTSS out: it now names the exits that skip the restore (a kill, the device-lost watchdog, a crash inside the crash handler), that the next run takes the leftover limit for the player's own, low latency, the read-only thread of a kept-out run, and the lookup on the worker. (rtss_limit_want's "both reasons need a restart" went with the change that starts the worker for a kept-out first want.) Comments only: the three files compile, and check_content passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -19,13 +19,17 @@
|
||||
// rate RTSS itself measures for the game is checked against the limit: well above it for three seconds, and the game
|
||||
// takes the limiting back for the rest of the run.
|
||||
//
|
||||
// The calls run on a thread of their own, every half second, so a present never waits on profile files. On exit
|
||||
// (rtss_limit_restore, from every path that ends the process) the profile gets back what it held before the game
|
||||
// changed it: the old limit, or no profile of its own when there was none. A crash before that leaves the game's
|
||||
// limit in the profile until the next run changes it.
|
||||
// The calls run on a thread of their own, every half second, which also looks RTSS up (find_rtss), so a present never
|
||||
// waits on the registry or profile files. On every orderly exit (rtss_limit_restore) the profile gets back what it held
|
||||
// before the game changed it: the old limit, or no profile of its own when there was none; from then on no want reaches
|
||||
// it and the game's own limiter paces the frames left. An exit that skips it (a kill, the device-lost watchdog, a crash
|
||||
// inside the crash handler) leaves the game's limit in the profile, and the next run takes that limit for the player's
|
||||
// own.
|
||||
//
|
||||
// NX2NAVI_RTSS=0 keeps RTSS out of it. Frame generation keeps it out too: RTSS counts every presented frame, the
|
||||
// generated ones included, and would halve the limit.
|
||||
// NX2NAVI_RTSS=0 keeps RTSS out of it. Frame generation keeps it out too (RTSS counts every presented frame, the
|
||||
// generated ones included), and so does a driver's low latency (vk_lowlat.c), which holds the frames where they start.
|
||||
// Kept out, the thread never loads the hooks library: it only reads RTSS's own settings for the game, to tell when they
|
||||
// limit it a second time (watch).
|
||||
#include <stdatomic.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -11,8 +11,9 @@
|
||||
// Multi frame generation: NX2NAVI_FRAMEGEN_MULTIPLIER (2, 3 or 4, live) is how many frames the display gets per
|
||||
// rendered frame, so one, two or three generated ones. Streamline says how many this GPU and driver can generate
|
||||
// (numFramesToGenerateMax: one where only 2x runs, three on an RTX 50); a higher setting is clamped to it with a log
|
||||
// line. frame_rate.c divides the frame limit by the multiplier in effect (vk_dlssg_multiplier), so the display gets the
|
||||
// limit and the game renders a half, a third or a quarter of it.
|
||||
// line. The frame limit counts the frames the game draws and the generated ones come on top (frame_rate.c
|
||||
// limit_game_hz): 60 at 4x is 60 drawn and 240 shown. Only a limit of display is divided by the multiplier in effect
|
||||
// (vk_dlssg_multiplier), since a frame past the monitor's refresh is never seen.
|
||||
//
|
||||
// DLSS-G needs Reflex, whose low-latency mode paces the game (NX2NAVI_REFLEX, default 1; 0 off, 2 on with boost): the
|
||||
// game's frame sleeps in Reflex where it starts (its acquire of a window image), and each frame carries the latency
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
// Frame generation with AMD FSR 3.1 (NX2NAVI_FRAMEGEN = fsr3; applies after a restart): AMD's frame generation
|
||||
// swapchain (amd_fidelityfx_vk.dll, vk_ffx.cpp loads it) takes the place of gfx_present.c's swapchain. Every frame
|
||||
// the game presents, the swapchain presents a generated frame between it and the one before, on its own present
|
||||
// queue and pacing threads, so the screen shows twice the game's frame rate.
|
||||
// Frame generation with AMD FSR 3.1 (NX2NAVI_FRAMEGEN = fsr3, live: gfx_present.c window_settings_live makes the
|
||||
// swapchain again; a run whose device was made for DLSS Frame Generation waits for a restart, vk_fg_wanted): AMD's
|
||||
// frame generation swapchain (amd_fidelityfx_vk.dll, vk_ffx.cpp loads it) takes the place of gfx_present.c's
|
||||
// swapchain. Every frame the game presents, the swapchain presents a generated frame between it and the one before, on
|
||||
// its own present queue and pacing threads, so the screen shows twice the game's frame rate.
|
||||
//
|
||||
// The generated frame is built from the presented picture and the scene's depth and camera motion vectors, which
|
||||
// vk_dlaa.c makes for DLSS and FSR 3.1 upscaling, and without an upscaler for frame generation alone (vk_dlaa.c
|
||||
// fg_only_frame: the same pass at the scene's size, no jitter). The HUD is kept out through the picture without it
|
||||
// (vk_dlaa.c hudless); the menu is not generated, since generation pauses while it is open. The device creates two more queues of the graphics family for it (vk_device.c, vk_fg_queue_count).
|
||||
// (vk_dlaa.c hudless); the menu is not generated, since generation pauses while it is open. The device creates two more
|
||||
// queues for it (vk_device.c create_device, vk_fg_queue_count): of the graphics family where it has them, else of
|
||||
// another family that can present.
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user