loader: Add dynamic dispatch for unknown device extension entrypoints
authorJon Ashburn <jon@lunarg.com>
Tue, 17 Nov 2015 22:31:02 +0000 (15:31 -0700)
committerMark Lobodzinski <mark@lunarg.com>
Fri, 4 May 2018 15:24:20 +0000 (09:24 -0600)
GetInstancePorcAddr() is specified to return trampoline entrypoints for all
Vulkan core and extension entrypoints that are dispatched on an instance object
or a child of that instance object. However, typically, device extensions would
be unknown to the loader (don't want to rev the loader everytime an IHV creates
a new device extension).

This patch allows loader to dynamically discover device extension entrypoints
and configure generic trampoline code for these discovered device extensions.

include/vulkan/vk_layer.h

index 4777cbb..60d30af 100644 (file)
@@ -17,8 +17,7 @@
 #  define VK_LAYER_EXPORT
 #endif
 
-typedef void * (*PFN_vkGPA)(void* obj, const char * pName);
-
+typedef void * (VKAPI_PTR *PFN_vkGPA)(void* obj, const char * pName);
 typedef struct VkBaseLayerObject_
 {
     PFN_vkGPA pGPA;