diff options
| author | Duck <350528965+Duck912@users.noreply.github.com> | 2026-11-03 15:44:36 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-11-03 15:44:36 -0500 |
| commit | 05e3b9d8b08414d3163cde36de61514cb4aa2400 (patch) | |
| tree | 499efe72b68afd9e1741e5c1331adce7b6ee8ecc /src/video_core/vulkan_common/vulkan_instance.cpp | |
| parent | f347ae083af5595083a5706ff857462ed8c11596 (diff) | |
| parent | 1889602c7a0dc17850692594eae2e77e16ac13fc (diff) | |
Merge pull request #434 from Duck912/streamline-dlss
video_core: NVIDIA DLSS through NVIDIA Streamline in place of a game's DLSS
Diffstat (limited to 'src/video_core/vulkan_common/vulkan_instance.cpp')
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_instance.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/video_core/vulkan_common/vulkan_instance.cpp b/src/video_core/vulkan_common/vulkan_instance.cpp index 7f3d8ed41f..3ab924e37f 100644 --- a/src/video_core/vulkan_common/vulkan_instance.cpp +++ b/src/video_core/vulkan_common/vulkan_instance.cpp @@ -18,6 +18,11 @@ #include "core/frontend/emu_window.h" #include "video_core/vulkan_common/vulkan_instance.h" #include "video_core/vulkan_common/vulkan_wrapper.h" +#ifdef EGLANTINE_STREAMLINE +#include <algorithm> +#include <string> +#include "video_core/vulkan_common/streamline.h" +#endif namespace Vulkan { namespace { @@ -82,6 +87,21 @@ namespace { #endif if (enable_validation && AreExtensionsSupported(dld, properties, std::array{VK_EXT_DEBUG_UTILS_EXTENSION_NAME})) extensions.push_back(VK_EXT_DEBUG_UTILS_EXTENSION_NAME); +#ifdef EGLANTINE_STREAMLINE + // What NVIDIA's DLSS asks for through Streamline, where available. Static: the returned + // pointers must outlive this call. + static std::vector<std::string> streamline; + streamline = Streamline::InstanceExtensions(); + for (const std::string& name : streamline) { + const bool available = std::ranges::any_of(properties, [&](const VkExtensionProperties& p) { + return name == p.extensionName; + }); + const bool listed = std::ranges::any_of(extensions, [&](const char* e) { return name == e; }); + if (available && !listed) { + extensions.push_back(name.c_str()); + } + } +#endif return extensions; } |
