Offer FSR 3.1 in the Screen tab only where its library can load.

On Linux the Screen tab listed the five FSR 3.1 upscaling modes and AMD's frame generation, but only the
Windows build loads amd_fidelityfx_vk.dll: a player who picked a mode got the scene at the mode's share of
the picture with nothing to scale it back up. vk_ffx_available answers from the load's result once it ran,
and before that from the library file being there, so the menu can ask every frame. Where it says no,
the menu lists neither, a mode that is still set shows "in use: off", the scene keeps the game's own
share (vk_dlaa_fsr3), frame generation keeps the plain swapchain with one log line, and the texts name
what does run.

Pull request #371 by mooki000, taken as it is; two hunks merged by hand (vk_fg_wanted, which now also
stays off after a failure, and a README line that had gained Texture filtering). It touches vk_dlaa.c,
which another session is changing: vk_dlaa_fsr3 gains the availability test and one log text changes.

On Windows the menu changes only where the DLL is missing. The Windows files compile; nothing was run.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-10 06:33:22 -05:00
parent 5b6dc0cfa0
commit d985e0ecb0
12 changed files with 140 additions and 43 deletions

View File

@@ -79,14 +79,21 @@ void fail(const char *what, unsigned r) {
} // namespace
// Follows the setting: gfx_present.c's window_settings_live remakes the swapchain when this stops matching vk_fg_active.
// It needs DLSS's or FSR 3.1's motion vectors, so it also needs one of them on. Not on a device made through
// It needs DLSS's or FSR 3.1's motion vectors, so it also needs one of them on, and the FSR 3.1 library: a build
// without it keeps the plain swapchain whatever the setting says, with one line in the log. Not on a device made through
// Streamline's proxies (NVIDIA's frame generation set at the start, vk_dlssg_dpa): AMD's swapchain there crashed in
// NVIDIA's driver when the menu switched from NVIDIA's frame generation to AMD's. That switch waits for a restart,
// as the menu says (menu.cpp row_framegen). Not after a failure (fail): the present code then takes AMD's swapchain
// down as it does for a switch in the menu, and a plain one follows.
extern "C" int vk_fg_wanted(void) {
return !F.failed && !strcmp(cfg_value("NX2NAVI_FRAMEGEN"), "fsr3") && cfg_bool("NX2NAVI_DLAA") && vk_dlaa_wanted() &&
!vk_dlssg_dpa();
if (F.failed || strcmp(cfg_value("NX2NAVI_FRAMEGEN"), "fsr3") || !cfg_bool("NX2NAVI_DLAA") || !vk_dlaa_wanted() ||
vk_dlssg_dpa())
return 0;
if (vk_ffx_framegen_available()) return 1;
static int told;
if (!__atomic_exchange_n(&told, 1, __ATOMIC_RELAXED))
rt_log("fg: AMD FSR 3.1 frame generation is set, but FSR 3.1 is not available here: off");
return 0;
}
// Always the three queues: the setting can be switched on during a run, and idle queues cost nothing.