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.
This commit is contained in:
Jason Ekstrand
2016-02-11 21:18:02 -08:00
parent 25b09d1b5d
commit 3a2b23a447
+14
View File
@@ -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)