From 67de6356f8474fa11bb8c64e835f30a910a32b1f Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Thu, 31 Dec 2020 17:17:34 +0100 Subject: [PATCH] vulkan/device-select: fix vkGetInstanceProcAddr self-resolving vkGetInstanceProcAddr(instance, "vkGetInstanceProcAddr") should return our vkGetInstanceProcAddr not the next in the chain. CC: mesa-stable Signed-off-by: Georg Lehmann Part-of: --- src/vulkan/device-select-layer/device_select_layer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vulkan/device-select-layer/device_select_layer.c b/src/vulkan/device-select-layer/device_select_layer.c index 5b708bcd58b..c381ac33fd1 100644 --- a/src/vulkan/device-select-layer/device_select_layer.c +++ b/src/vulkan/device-select-layer/device_select_layer.c @@ -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)