diff --git a/README.md b/README.md index 104fd074..84c1fbdb 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Report problems as issues, following [CONTRIBUTING.md](CONTRIBUTING.md). (github.com/NVIDIA/DLSS, NVIDIA RTX SDK license) when it finds an RTX GPU; untick it in the setup to skip it - AMD FSR 4 on Radeon RX 9000, 7000 and 6000 GPUs (FSR 3.1 on others), in the same modes as DLSS: the setup downloads AMD's signed FSR SDK libraries (github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK, AMD FSR SDK license) when it - finds an AMD GPU; pick *Upscaler: AMD FSR* in the menu (Windows; not yet checked in play) + finds an AMD GPU; pick *Upscaler: AMD FSR* in the menu. Windows only: AMD's FSR SDK has no Linux libraries yet - HDR10 output with peak, game and HUD brightness settings - 16:10 (Steam Deck, handhelds), 3:2 (Surface, Framework), 21:9 and 32:9 (ultrawide) game resolutions, with the camera and the interface in that shape - Anisotropic texture filtering up to 16x, for sharp ground into the distance diff --git a/runtime/resolution.c b/runtime/resolution.c index 2b645e62..54db28bf 100644 --- a/runtime/resolution.c +++ b/runtime/resolution.c @@ -68,15 +68,14 @@ static struct { // next to totk.exe on Windows, libnvidia-ngx-dlss.so. next to totk on Linux (vk_dlaa.c vk_dlaa_init): // without that file DLSS never runs, and a DLSS mode would leave the game's plain scaling at 50..67 % of the output. // With dlaa_backend = fsr the modes scale through AMD's FSR instead (vk_ffx.c), which needs its loader and upscaler -// DLLs next to totk.exe; on Linux FSR does not run. +// DLLs next to totk.exe; on Linux the setting is ignored and DLSS is checked (vk_dlaa.c fsr_backend). static int dlss_dll(void) { - int fsr = !strcmp(cfg_value("TOTK_DLAA_BACKEND"), "fsr"); #ifdef _WIN32 char exe[1024], path[1024 + 48]; if (!plat_exe_path(exe, sizeof exe)) return 1; char *last = plat_last_sep(exe); if (!last) return 1; - if (fsr) { + if (!strcmp(cfg_value("TOTK_DLAA_BACKEND"), "fsr")) { snprintf(path, sizeof path, "%.*s/amd_fidelityfx_loader_vk.dll", (int)(last - exe), exe); if (!plat_file_exists(path)) return 0; snprintf(path, sizeof path, "%.*s/amd_fidelityfx_upscaler_vk.dll", (int)(last - exe), exe); @@ -85,7 +84,6 @@ static int dlss_dll(void) { snprintf(path, sizeof path, "%.*s/nvngx_dlss.dll", (int)(last - exe), exe); return plat_file_exists(path); #else - if (fsr) return 0; char exe[1024]; if (!plat_exe_path(exe, sizeof exe)) return 1; char *last = plat_last_sep(exe); diff --git a/runtime/ui/menu.cpp b/runtime/ui/menu.cpp index b318c3b6..da5cec0b 100644 --- a/runtime/ui/menu.cpp +++ b/runtime/ui/menu.cpp @@ -681,8 +681,10 @@ static void tab_screen(float scale) { opt_slider("TOTK_PCSS", UI_MENU_PCSS, 0, 200, UI_MENU_PCSS_DESC, 10, "%.0f %%"); opt_slider("TOTK_CONTACT_SHADOWS", UI_MENU_CONTACT_SHADOWS, 0, 100, UI_MENU_CONTACT_SHADOWS_DESC, 10, "%.0f %%"); opt_toggle("TOTK_DLAA", UI_MENU_DLAA, UI_MENU_DLAA_DESC); +#ifdef _WIN32 // AMD ships FSR's Vulkan libraries for Windows only: Linux has DLSS alone (vk_dlaa.c fsr_backend) static const UiTextId backend[] = {UI_MENU_DLAA_BACKEND_DLSS, UI_MENU_DLAA_BACKEND_FSR}; opt_choice("TOTK_DLAA_BACKEND", UI_MENU_DLAA_BACKEND, backend, 2, UI_MENU_DLAA_BACKEND_DESC); +#endif static const UiTextId dlss[] = {UI_MENU_DLSS_DLAA, UI_MENU_DLSS_QUALITY, UI_MENU_DLSS_BALANCED, UI_MENU_DLSS_PERFORMANCE, UI_MENU_DLSS_ULTRA}; opt_choice("TOTK_DLSS", UI_MENU_DLSS, dlss, 5, UI_MENU_DLSS_DESC); diff --git a/runtime/vk_dlaa.c b/runtime/vk_dlaa.c index b229e35f..787af145 100644 --- a/runtime/vk_dlaa.c +++ b/runtime/vk_dlaa.c @@ -118,10 +118,18 @@ int vk_dlaa_wanted(void) { } // FSR instead of DLSS (TOTK_DLAA_BACKEND=fsr), fixed for the run like dlaa: the backend's extensions are chosen at -// device creation. On Linux FSR is not available, and this choice leaves DLAA off rather than falling back to DLSS. +// device creation. AMD ships FSR's Vulkan libraries for Windows only, so on Linux the setting is ignored (the menu has +// no row for it) and DLAA stays with DLSS. static int fsr_backend(void) { static int fsr = -1; - if (fsr < 0) fsr = !strcmp(cfg_value("TOTK_DLAA_BACKEND"), "fsr"); + if (fsr < 0) { + fsr = !strcmp(cfg_value("TOTK_DLAA_BACKEND"), "fsr"); +#ifndef _WIN32 + if (fsr && vk_dlaa_wanted()) + rt_log("dlaa: dlaa_backend = fsr runs on Windows only (AMD's FSR SDK has no Linux libraries): using DLSS"); + fsr = 0; +#endif + } return fsr; }