From: Jason Ekstrand Date: Fri, 12 Feb 2016 05:18:02 +0000 (-0800) Subject: anv: Add a vk_icdGetInstanceProcAddr entrypoint X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3a2b23a447d612f6e339ccee6fc853108ff9c7bd;p=mesa.git 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. --- 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)