mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-24 13:45:57 +00:00
Offer AMD FSR 4 and AMD FSR 3 as separate choices of the menu's Upscalers row
dlaa_backend gains fsr3, which pins the newest FSR 3 the upscaler DLL offers (3.1.6 with the SDK 2.4 libraries) on any GPU it supports; fsr keeps taking the newest FSR 4, so existing totk.ini files keep their upscaler. The row now reads Off, NVIDIA DLSS, AMD FSR 4, AMD FSR 3 on Windows, with the texts in all four menu languages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
94e66ebfde
commit
06ab655e04
11 files changed
+67
-52
No files matched your search
@@ -72,15 +72,15 @@ static struct {
|
||||
// The scene size is decided before the device exists, so NGX cannot be asked yet. NGX loads DLSS from nvngx_dlss.dll
|
||||
// next to totk.exe on Windows, libnvidia-ngx-dlss.so.<version> 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 the setting is ignored and DLSS is checked (vk_dlaa.c fsr_backend).
|
||||
// With dlaa_backend = fsr or fsr3 the modes scale through AMD's FSR instead (vk_ffx.c), which needs its loader and
|
||||
// upscaler 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) {
|
||||
#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 (!strcmp(cfg_value("TOTK_DLAA_BACKEND"), "fsr")) {
|
||||
if (!strncmp(cfg_value("TOTK_DLAA_BACKEND"), "fsr", 3)) {
|
||||
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);
|
||||
@@ -136,7 +136,7 @@ static double dlss_share(const char *m) {
|
||||
if (!strcmp(m, dlss[i].name)) {
|
||||
if (dll < 0 && !(dll = dlss_dll())) {
|
||||
#ifdef _WIN32
|
||||
if (!strcmp(cfg_value("TOTK_DLAA_BACKEND"), "fsr"))
|
||||
if (!strncmp(cfg_value("TOTK_DLAA_BACKEND"), "fsr", 3))
|
||||
rt_log("resolution: FSR %s needs amd_fidelityfx_loader_vk.dll and amd_fidelityfx_upscaler_vk.dll "
|
||||
"next to totk.exe, which are missing: the scene follows render_scale", m);
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user