Commit 67000f29 authored by Georg Lehmann's avatar Georg Lehmann Committed by Alexandre Julliard

winevulkan: Implement vk_icdGetPhysicalDeviceProcAddr.

When using the windows vulkan loader vk_icdGetPhysicalDeviceProcAddr is used for unknown physical device functions. Fixes Red Dead Redemption 2 with vkd3d-proton. The game replaces wine's vulkan-1.dll with a windows version that doesn't know functions used by vkd3d-proton. Signed-off-by: 's avatarGeorg Lehmann <dadschoorse@gmail.com> Signed-off-by: 's avatarJoshua Ashton <joshua@froggi.es> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 88da78ef
......@@ -2676,6 +2676,7 @@ class VkGenerator(object):
def generate_vulkan_spec(self, f):
self._generate_copyright(f, spec_file=True)
f.write("@ stdcall -private vk_icdGetInstanceProcAddr(ptr str) wine_vk_icdGetInstanceProcAddr\n")
f.write("@ stdcall -private vk_icdGetPhysicalDeviceProcAddr(ptr str) wine_vk_icdGetPhysicalDeviceProcAddr\n")
f.write("@ stdcall -private vk_icdNegotiateLoaderICDInterfaceVersion(ptr) wine_vk_icdNegotiateLoaderICDInterfaceVersion\n")
f.write("@ cdecl -norelay native_vkGetInstanceProcAddrWINE(ptr str)\n")
......
......@@ -37,9 +37,7 @@ DEFINE_DEVPROPKEY(DEVPROPKEY_GPU_LUID, 0x60b193cb, 0x5276, 0x4d0f, 0x96, 0xfc, 0
DEFINE_DEVPROPKEY(WINE_DEVPROPKEY_GPU_VULKAN_UUID, 0x233a9ef3, 0xafc4, 0x4abd, 0xb5, 0x64, 0xc3, 0x2f, 0x21, 0xf1, 0x53, 0x5c, 2);
/* For now default to 4 as it felt like a reasonable version feature wise to support.
* Don't support the optional vk_icdGetPhysicalDeviceProcAddr introduced in this version
* as it is unlikely we will implement physical device extensions, which the loader is not
* aware of. Version 5 adds more extensive version checks. Something to tackle later.
* Version 5 adds more extensive version checks. Something to tackle later.
*/
#define WINE_VULKAN_ICD_VERSION 4
......@@ -1239,6 +1237,13 @@ PFN_vkVoidFunction WINAPI wine_vkGetInstanceProcAddr(VkInstance instance, const
return NULL;
}
void * WINAPI wine_vk_icdGetPhysicalDeviceProcAddr(VkInstance instance, const char *name)
{
TRACE("%p, %s\n", instance, debugstr_a(name));
return wine_vk_get_phys_dev_proc_addr(name);
}
void * WINAPI wine_vk_icdGetInstanceProcAddr(VkInstance instance, const char *name)
{
TRACE("%p, %s\n", instance, debugstr_a(name));
......
......@@ -9,6 +9,7 @@
#
@ stdcall -private vk_icdGetInstanceProcAddr(ptr str) wine_vk_icdGetInstanceProcAddr
@ stdcall -private vk_icdGetPhysicalDeviceProcAddr(ptr str) wine_vk_icdGetPhysicalDeviceProcAddr
@ stdcall -private vk_icdNegotiateLoaderICDInterfaceVersion(ptr) wine_vk_icdNegotiateLoaderICDInterfaceVersion
@ cdecl -norelay native_vkGetInstanceProcAddrWINE(ptr str)
@ stdcall -private wine_vkAcquireNextImage2KHR(ptr ptr ptr)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment