summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-02-11 21:18:02 -0800
committerJason Ekstrand <[email protected]>2016-02-11 21:20:12 -0800
commit3a2b23a447d612f6e339ccee6fc853108ff9c7bd (patch)
tree07b6bfc462a3016867ee16c9129f455315613a88 /src
parent25b09d1b5d74a946700f0956799cf00db0edae1a (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/vulkan/anv_device.c14
1 files changed, 14 insertions, 0 deletions
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)