From 63e87a22c60394bc4f427ee5f8d6ddbce7b0ac7f Mon Sep 17 00:00:00 2001 From: Duck912 <350528965+Duck912@users.noreply.github.com> Date: Tue, 3 Nov 2026 12:13:35 -0500 Subject: video_core: NVIDIA DLSS through NVIDIA Streamline in place of a game's DLSS Adds a Graphics setting, "Use NVIDIA DLSS in place of a game's DLSS" (nvidia_dlss, off by default). When it is on, in Windows builds configured with EGLANTINE_STREAMLINE_SDK, the evaluation Eglantine already replaces with FSR 3.1 goes to NVIDIA DLSS on GeForce RTX cards, with the same inputs (colour, depth, motion vectors, jitter). When DLSS can't run, FSR 3.1 runs as before. Only Streamline's MIT-licensed headers are compiled in; nothing of NVIDIA's is linked or shipped. At run time Eglantine looks for sl.interposer.dll in the user folder's "streamline" folder (or EDEN_STREAMLINE_DIR, or "streamline" next to the executable), checks its Streamline signature and starts Streamline with manual hooking. Streamline's plugins come from that folder or the NVIDIA app's downloads. DLSS itself is nvngx_dlss.dll in the same folder, else the newest DLSS 310 or later that the NVIDIA app has downloaded, checked for NVIDIA's Authenticode signature and copied as streamline/nvidia-app/nvngx_dlss.dll. Like other tools that call DLSS outside a game, it uses its own fixed project id with the custom engine type. - Preset K for all modes (EDEN_NX2_DLSS_PRESET overrides it): the default Performance model (M) and L draw thin dark horizontal lines in some frames at 2x resolution scale; K doesn't. - HDR input with auto exposure; the mode follows the render/output ratio. - Buffer device address stays enabled when DLSS needs it, for DLSS only. - The upscaler waits for the device instead of submitting when it is destroyed: by then the game's channels are released, and a submit read the state tracker's stale flags (a crash when stopping a game). With the setting off, or in builds without the SDK path (the setting is hidden there), nothing changes. Testing: Windows 11, RTX 5080, Fire Emblem: Fortune's Weave docked at 1x (720p -> 1440p) and 2x (1440p -> 2880p), CLI runs and GUI play, stopping and restarting games with DLSS on. Not tested on other GPUs or games. Assisted-by: Claude Opus 5.5 (implementation, debugging) Signed-off-by: Duck912 <350528965+Duck912@users.noreply.github.com> --- src/common/fs/fs_paths.h | 1 + src/common/fs/path_util.cpp | 1 + src/common/fs/path_util.h | 1 + 3 files changed, 3 insertions(+) (limited to 'src/common/fs') diff --git a/src/common/fs/fs_paths.h b/src/common/fs/fs_paths.h index ae25846fc2..763a8759dd 100644 --- a/src/common/fs/fs_paths.h +++ b/src/common/fs/fs_paths.h @@ -28,6 +28,7 @@ #define SCREENSHOTS_DIR "screenshots" #define SDMC_DIR "sdmc" #define SHADER_DIR "shader" +#define STREAMLINE_DIR "streamline" #define TAS_DIR "tas" #define ICONS_DIR "icons" diff --git a/src/common/fs/path_util.cpp b/src/common/fs/path_util.cpp index 82ea8f6cb2..f77da2e301 100644 --- a/src/common/fs/path_util.cpp +++ b/src/common/fs/path_util.cpp @@ -168,6 +168,7 @@ public: GenerateEdenPath(EdenPath::SDMCDir, eden_path / SDMC_DIR); GenerateEdenPath(EdenPath::TASDir, eden_path / TAS_DIR); GenerateEdenPath(EdenPath::IconsDir, eden_path / ICONS_DIR); + GenerateEdenPath(EdenPath::StreamlineDir, eden_path / STREAMLINE_DIR); // config GenerateEdenPath(EdenPath::ConfigDir, eden_path_config); // cache diff --git a/src/common/fs/path_util.h b/src/common/fs/path_util.h index e8fa5614ae..940dbb9186 100644 --- a/src/common/fs/path_util.h +++ b/src/common/fs/path_util.h @@ -34,6 +34,7 @@ enum class EdenPath { ShaderDir, // Where shaders are stored. TASDir, // Where TAS scripts are stored. IconsDir, // Where Icons for Windows shortcuts are stored. + StreamlineDir, // Where the user-supplied NVIDIA Streamline loader is stored. }; // migration/compat dirs -- cgit v1.2.3