vulkan/device-select: fix vkGetInstanceProcAddr self-resolving
authorGeorg Lehmann <dadschoorse@gmail.com>
Thu, 31 Dec 2020 16:17:34 +0000 (17:17 +0100)
committerMarge Bot <eric+marge@anholt.net>
Mon, 11 Jan 2021 17:30:42 +0000 (17:30 +0000)
vkGetInstanceProcAddr(instance, "vkGetInstanceProcAddr") should return our
vkGetInstanceProcAddr not the next in the chain.

CC: mesa-stable
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8286>

src/vulkan/device-select-layer/device_select_layer.c

index 5b708bc..c381ac3 100644 (file)
@@ -490,6 +490,8 @@ static void  (*get_pdevice_proc_addr(VkInstance instance, const char* name))()
 
 static void  (*get_instance_proc_addr(VkInstance instance, const char* name))()
 {
+   if (strcmp(name, "vkGetInstanceProcAddr") == 0)
+      return (void(*)())get_instance_proc_addr;
    if (strcmp(name, "vkCreateInstance") == 0)
       return (void(*)())device_select_CreateInstance;
    if (strcmp(name, "vkDestroyInstance") == 0)