Commit 71f79156 authored by Georg Lehmann's avatar Georg Lehmann Committed by Alexandre Julliard

winex11.drv: Only return vulkan functions if the host function is available.

parent c8ce9303
...@@ -435,12 +435,25 @@ static VkResult X11DRV_vkGetDeviceGroupSurfacePresentModesKHR(VkDevice device, ...@@ -435,12 +435,25 @@ static VkResult X11DRV_vkGetDeviceGroupSurfacePresentModesKHR(VkDevice device,
return pvkGetDeviceGroupSurfacePresentModesKHR(device, x11_surface->surface, flags); return pvkGetDeviceGroupSurfacePresentModesKHR(device, x11_surface->surface, flags);
} }
static const char *wine_vk_native_fn_name(const char *name)
{
if (!strcmp(name, "vkCreateWin32SurfaceKHR"))
return "vkCreateXlibSurfaceKHR";
if (!strcmp(name, "vkGetPhysicalDeviceWin32PresentationSupportKHR"))
return "vkGetPhysicalDeviceXlibPresentationSupportKHR";
return name;
}
static void *X11DRV_vkGetDeviceProcAddr(VkDevice device, const char *name) static void *X11DRV_vkGetDeviceProcAddr(VkDevice device, const char *name)
{ {
void *proc_addr; void *proc_addr;
TRACE("%p, %s\n", device, debugstr_a(name)); TRACE("%p, %s\n", device, debugstr_a(name));
if (!pvkGetDeviceProcAddr(device, wine_vk_native_fn_name(name)))
return NULL;
if ((proc_addr = X11DRV_get_vk_device_proc_addr(name))) if ((proc_addr = X11DRV_get_vk_device_proc_addr(name)))
return proc_addr; return proc_addr;
...@@ -453,6 +466,9 @@ static void *X11DRV_vkGetInstanceProcAddr(VkInstance instance, const char *name) ...@@ -453,6 +466,9 @@ static void *X11DRV_vkGetInstanceProcAddr(VkInstance instance, const char *name)
TRACE("%p, %s\n", instance, debugstr_a(name)); TRACE("%p, %s\n", instance, debugstr_a(name));
if (!pvkGetInstanceProcAddr(instance, wine_vk_native_fn_name(name)))
return NULL;
if ((proc_addr = X11DRV_get_vk_instance_proc_addr(instance, name))) if ((proc_addr = X11DRV_get_vk_instance_proc_addr(instance, name)))
return proc_addr; return proc_addr;
......
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