Thanks for re-sending this. After a month or so to think it over, I think this is the right solution given the information we have coming to us from the specification. I also expect that this will fix some of the failing Vulkan CTS test cases where the finer rules for vk*GetProcAddress were exercised.
Signed-off-by: Liam Middlebrook lmiddlebrook@nvidia.com
On 8/20/21 4:24 AM, Georg Lehmann wrote:
Signed-off-by: Georg Lehmann dadschoorse@gmail.com
dlls/winex11.drv/vulkan.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/dlls/winex11.drv/vulkan.c b/dlls/winex11.drv/vulkan.c index bdc287afeea..1bbdba2ce1d 100644 --- a/dlls/winex11.drv/vulkan.c +++ b/dlls/winex11.drv/vulkan.c @@ -435,12 +435,25 @@ static VkResult X11DRV_vkGetDeviceGroupSurfacePresentModesKHR(VkDevice device, 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) { void *proc_addr;
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))) return proc_addr;
@@ -453,6 +466,9 @@ static void *X11DRV_vkGetInstanceProcAddr(VkInstance instance, const char *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))) return proc_addr;