From 3a2b23a447d612f6e339ccee6fc853108ff9c7bd Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 11 Feb 2016 21:18:02 -0800 Subject: [PATCH] anv: Add a vk_icdGetInstanceProcAddr entrypoint Aparently there are some issues in symbol resolution if an application packages its own loader and you have a system-installed one. I don't really understand the details, but it's not onorous to add. --- src/vulkan/anv_device.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/vulkan/anv_device.c b/src/vulkan/anv_device.c index 21184c4a201..d313d570e29 100644 --- a/src/vulkan/anv_device.c +++ b/src/vulkan/anv_device.c @@ -611,6 +611,20 @@ PFN_vkVoidFunction anv_GetInstanceProcAddr( return anv_lookup_entrypoint(pName); } +/* The loader wants us to expose a second GetInstanceProcAddr function + * to work around certain LD_PRELOAD issues seen in apps. + */ +VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetInstanceProcAddr( + VkInstance instance, + const char* pName); + +VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetInstanceProcAddr( + VkInstance instance, + const char* pName) +{ + return anv_GetInstanceProcAddr(instance, pName); +} + PFN_vkVoidFunction anv_GetDeviceProcAddr( VkDevice device, const char* pName) -- 2.30.2