aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLenny Komow <[email protected]>2017-12-19 16:38:37 -0700
committerMark Lobodzinski <[email protected]>2018-05-04 09:24:25 -0600
commit877223eff1e44fefa17b992d55ce86badebfe169 (patch)
treedf5e7b81e55927757dead85ceee1fceec7f933ff
parent1ccf86fb60d099b4108fd27955724e8f40f7103a (diff)
downloadVulkan-Headers-877223eff1e44fefa17b992d55ce86badebfe169.tar.gz
Vulkan-Headers-877223eff1e44fefa17b992d55ce86badebfe169.zip
loader: Add pre-instance functions for layers
Allow implicit layers (not explicit) to intercept calls before an instance has been created. Change-Id: I41f5bb0f5a6314fbab8003ebe71059dd04afc860
-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 a7ac291..147dcd4 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