Enable the drivers' low-latency extensions only in a run that starts with the setting on.

With the setting off the device is made exactly as before the mode existed, so the mode cannot change anything for a player who never turns it on. Turning it on in the menu then takes a restart, and the row says so; in a run that started with it on, changes still apply at once.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-12 22:30:56 -05:00
parent b197136f56
commit 9100509b00
7 changed files with 33 additions and 9 deletions

View File

@@ -14,8 +14,10 @@ void vk_lowlat_release(void);
// What the menu's row shows (ui/menu.cpp row_low_latency). The first two are the paths that can run; the others say
// why none does: the driver has neither extension, DLSS Frame Generation's interposer owns low latency in this run
// (vk_dlssg.c, NX2NAVI_REFLEX), a frame generation presents the frames in the window swapchain's place, or the driver
// refused the mode or never ended its sleep (the log says which).
enum { VK_LOWLAT_NV, VK_LOWLAT_AMD, VK_LOWLAT_NO_DRIVER, VK_LOWLAT_DLSSG, VK_LOWLAT_FG, VK_LOWLAT_FAILED };
// refused the mode or never ended its sleep (the log says which), or the driver has a mode but the run started with
// the setting off, so the device was made without it (vk_device.c create_device): the next start with it on has it.
enum { VK_LOWLAT_NV, VK_LOWLAT_AMD, VK_LOWLAT_NO_DRIVER, VK_LOWLAT_DLSSG, VK_LOWLAT_FG, VK_LOWLAT_FAILED,
VK_LOWLAT_RESTART };
int vk_lowlat_status(void);
// The direct path is in effect now: the setting is on and nothing else owns the presents. Any thread, one atomic load.
int vk_lowlat_on(void);