loader: Extend pre-instance intercepts for 1.1
authorLenny Komow <lenny@lunarg.com>
Tue, 13 Feb 2018 22:58:47 +0000 (15:58 -0700)
committerMark Lobodzinski <mark@lunarg.com>
Fri, 4 May 2018 15:24:26 +0000 (09:24 -0600)
Add the ability to intercept vkEnumerateInstanceVersion through the
pre-instance intercept mechanism

include/vulkan/vk_layer.h

index 147dcd4..e8300c3 100644 (file)
@@ -144,6 +144,7 @@ typedef enum VkChainType {
     VK_CHAIN_TYPE_UNKNOWN = 0,
     VK_CHAIN_TYPE_ENUMERATE_INSTANCE_EXTENSION_PROPERTIES = 1,
     VK_CHAIN_TYPE_ENUMERATE_INSTANCE_LAYER_PROPERTIES = 2,
+    VK_CHAIN_TYPE_ENUMERATE_INSTANCE_VERSION = 3,
 } VkChainType;
 
 typedef struct VkChainHeader {
@@ -177,6 +178,18 @@ typedef struct VkEnumerateInstanceLayerPropertiesChain {
 #endif
 } VkEnumerateInstanceLayerPropertiesChain;
 
+typedef struct VkEnumerateInstanceVersionChain {
+    VkChainHeader header;
+    VkResult(VKAPI_PTR *pfnNextLayer)(const struct VkEnumerateInstanceVersionChain *, uint32_t *);
+    const struct VkEnumerateInstanceVersionChain *pNextLink;
+
+#if defined(__cplusplus)
+    inline VkResult CallDown(uint32_t *pApiVersion) const {
+        return pfnNextLayer(pNextLink, pApiVersion);
+    }
+#endif
+} VkEnumerateInstanceVersionChain;
+
 #ifdef __cplusplus
 }
 #endif