wine-staging/patches/ml-patches/0017-winevulkan-Expose-driver-vkGetInstanceProcAddr-via-w.patch
Alistair Leslie-Hughes 7da7ae71d2 Added ml-patches patchset
Patches directly from the mailing list with second sign-off if
supplied.
2018-08-03 10:39:36 +10:00

63 lines
2.5 KiB
Diff

From 29c5d550d65f9d03be8319eeec75904ecdc88ce9 Mon Sep 17 00:00:00 2001
From: Jacek Caban <jacek@codeweavers.com>
Date: Fri, 27 Jul 2018 15:30:49 +0200
Subject: [PATCH 17/24] winevulkan: Expose driver vkGetInstanceProcAddr via
winevulkan exports.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
---
dlls/winevulkan/make_vulkan | 1 +
dlls/winevulkan/vulkan.c | 10 ++++++++++
dlls/winevulkan/winevulkan.spec | 1 +
3 files changed, 12 insertions(+)
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan
index fe742b7..fae6ab0 100755
--- a/dlls/winevulkan/make_vulkan
+++ b/dlls/winevulkan/make_vulkan
@@ -2282,6 +2282,7 @@ class VkGenerator(object):
self._generate_copyright(f, spec_file=True)
f.write("@ stdcall vk_icdGetInstanceProcAddr(ptr str) wine_vk_icdGetInstanceProcAddr\n")
f.write("@ stdcall vk_icdNegotiateLoaderICDInterfaceVersion(ptr) wine_vk_icdNegotiateLoaderICDInterfaceVersion\n")
+ f.write("@ cdecl -norelay native_vkGetInstanceProcAddrWINE(ptr str)\n")
# Export symbols for all Vulkan Core functions.
for func in self.registry.funcs.values():
diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c
index 0bb68c2..bd652a5 100644
--- a/dlls/winevulkan/vulkan.c
+++ b/dlls/winevulkan/vulkan.c
@@ -1163,3 +1163,13 @@ static void *wine_vk_get_global_proc_addr(const char *name)
}
return NULL;
}
+
+/*
+ * Wrapper around driver vkGetInstanceProcAddr implementation.
+ * Allows winelib applications to access Vulkan functions with Wine
+ * additions and native ABI.
+ */
+void *native_vkGetInstanceProcAddrWINE(VkInstance instance, const char *name)
+{
+ return vk_funcs->p_vkGetInstanceProcAddr(instance, name);
+}
diff --git a/dlls/winevulkan/winevulkan.spec b/dlls/winevulkan/winevulkan.spec
index 8aab0fe..f979458 100644
--- a/dlls/winevulkan/winevulkan.spec
+++ b/dlls/winevulkan/winevulkan.spec
@@ -36,6 +36,7 @@
@ stdcall vk_icdGetInstanceProcAddr(ptr str) wine_vk_icdGetInstanceProcAddr
@ stdcall vk_icdNegotiateLoaderICDInterfaceVersion(ptr) wine_vk_icdNegotiateLoaderICDInterfaceVersion
+@ cdecl -norelay native_vkGetInstanceProcAddrWINE(ptr str)
@ stdcall wine_vkAcquireNextImage2KHR(ptr ptr ptr)
@ stdcall wine_vkAcquireNextImageKHR(ptr int64 int64 int64 int64 ptr)
@ stdcall wine_vkAllocateCommandBuffers(ptr ptr ptr)
--
1.9.1