aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/vulkan_common/streamline_api.h
diff options
context:
space:
mode:
authorcirakg <cirakg@cirakg.xyz>2026-11-03 21:58:24 +0100
committercirakg <cirakg@cirakg.xyz>2026-11-03 21:58:24 +0100
commitcdfb1ae93444c0aa02dfe592af36d70ab36549fd (patch)
tree2fa8d7062d907d5ab8d85d64c66be87ea4cdf0d1 /src/video_core/vulkan_common/streamline_api.h
parent51341ec09b25de1d9b01d0c00ee828dd5b861d5c (diff)
parent4383b9787afbf6c63291bf803c8330afb4f21a16 (diff)
Merge upstream Djihads80/Eglantine nx2 into nx2HEADnx2
# Conflicts: # .github/workflows/release-binaries.yml
Diffstat (limited to 'src/video_core/vulkan_common/streamline_api.h')
-rw-r--r--src/video_core/vulkan_common/streamline_api.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/video_core/vulkan_common/streamline_api.h b/src/video_core/vulkan_common/streamline_api.h
new file mode 100644
index 0000000000..0a82c1dd7d
--- /dev/null
+++ b/src/video_core/vulkan_common/streamline_api.h
@@ -0,0 +1,36 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+// Streamline's API as loaded from the user's sl.interposer.dll. Only for the
+// Streamline sources: it pulls in <windows.h> and Streamline's (MIT-licensed) headers.
+
+#pragma once
+
+#include <windows.h>
+
+#include "video_core/vulkan_common/vulkan_wrapper.h"
+
+#include <sl.h>
+#include <sl_dlss.h>
+#include <sl_helpers_vk.h>
+
+namespace Vulkan::Streamline {
+
+struct Api {
+ PFun_slInit* init{};
+ PFun_slShutdown* shutdown{};
+ PFun_slIsFeatureSupported* is_feature_supported{};
+ PFun_slGetFeatureRequirements* get_feature_requirements{};
+ PFun_slGetFeatureVersion* get_feature_version{};
+ PFun_slGetFeatureFunction* get_feature_function{};
+ PFun_slGetNewFrameToken* get_new_frame_token{};
+ PFun_slSetConstants* set_constants{};
+ PFun_slEvaluateFeature* evaluate_feature{};
+ PFun_slFreeResources* free_resources{};
+ PFun_slSetVulkanInfo* set_vulkan_info{};
+};
+
+/// The loaded functions; only valid while IsDlssAvailable().
+[[nodiscard]] const Api& GetApi();
+
+} // namespace Vulkan::Streamline