aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLenny Komow <lenny@lunarg.com>2017-12-19 16:38:37 -0700
committerLenny Komow <lenny@lunarg.com>2018-01-09 14:11:20 -0700
commitdd2c1dd9385616e97b719e28accab712c5d419c4 (patch)
tree368f35f1af129303ba5e4ce423a0009f866c92b7 /include
parent10b16b2689a5284edb5baeb08490f894eb923a42 (diff)
downloadusermoji-dd2c1dd9385616e97b719e28accab712c5d419c4.tar.xz
loader: Add pre-instance functions for layers
Allow implicit layers (not explicit) to intercept calls before an instance has been created. Change-Id: I41f5bb0f5a6314fbab8003ebe71059dd04afc860
Diffstat (limited to 'include')
-rw-r--r--include/vulkan/vk_layer.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/include/vulkan/vk_layer.h b/include/vulkan/vk_layer.h
index a7ac2915..147dcd43 100644
--- a/include/vulkan/vk_layer.h
+++ b/include/vulkan/vk_layer.h
@@ -48,6 +48,8 @@
#define CURRENT_LOADER_LAYER_INTERFACE_VERSION 2
#define MIN_SUPPORTED_LOADER_LAYER_INTERFACE_VERSION 1
+#define VK_CURRENT_CHAIN_VERSION 1
+
// Version negotiation values
typedef enum VkNegotiateLayerStructType {
LAYER_NEGOTIATE_UNINTIALIZED = 0,
@@ -138,6 +140,43 @@ extern "C" {
VKAPI_ATTR VkResult VKAPI_CALL vkNegotiateLoaderLayerInterfaceVersion(VkNegotiateLayerInterface *pVersionStruct);
+typedef enum VkChainType {
+ VK_CHAIN_TYPE_UNKNOWN = 0,
+ VK_CHAIN_TYPE_ENUMERATE_INSTANCE_EXTENSION_PROPERTIES = 1,
+ VK_CHAIN_TYPE_ENUMERATE_INSTANCE_LAYER_PROPERTIES = 2,
+} VkChainType;
+
+typedef struct VkChainHeader {
+ VkChainType type;
+ uint32_t version;
+ uint32_t size;
+} VkChainHeader;
+
+typedef struct VkEnumerateInstanceExtensionPropertiesChain {
+ VkChainHeader header;
+ VkResult(VKAPI_PTR *pfnNextLayer)(const struct VkEnumerateInstanceExtensionPropertiesChain *, const char *, uint32_t *,
+ VkExtensionProperties *);
+ const struct VkEnumerateInstanceExtensionPropertiesChain *pNextLink;
+
+#if defined(__cplusplus)
+ inline VkResult CallDown(const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties) const {
+ return pfnNextLayer(pNextLink, pLayerName, pPropertyCount, pProperties);
+ }
+#endif
+} VkEnumerateInstanceExtensionPropertiesChain;
+
+typedef struct VkEnumerateInstanceLayerPropertiesChain {
+ VkChainHeader header;
+ VkResult(VKAPI_PTR *pfnNextLayer)(const struct VkEnumerateInstanceLayerPropertiesChain *, uint32_t *, VkLayerProperties *);
+ const struct VkEnumerateInstanceLayerPropertiesChain *pNextLink;
+
+#if defined(__cplusplus)
+ inline VkResult CallDown(uint32_t *pPropertyCount, VkLayerProperties *pProperties) const {
+ return pfnNextLayer(pNextLink, pPropertyCount, pProperties);
+ }
+#endif
+} VkEnumerateInstanceLayerPropertiesChain;
+
#ifdef __cplusplus
}
#endif