diff options
| author | Jon Ashburn <jon@lunarg.com> | 2016-03-29 11:16:01 -0600 |
|---|---|---|
| committer | Jon Ashburn <jon@lunarg.com> | 2016-04-01 10:47:17 -0600 |
| commit | 4323e2705d5b34e377c7cbe6cb3faa4b78995097 (patch) | |
| tree | f23a2fb23ac69b0b51cbbf3de1a7554afe9ff582 /include | |
| parent | b16e5173a411e3a9c164b8a00273da372c9bdf33 (diff) | |
| download | usermoji-4323e2705d5b34e377c7cbe6cb3faa4b78995097.tar.xz | |
loader: Add instance callback to set dispatchable objects
Change-Id: I73b8b6edfee491c53216b730c99a7ea34ade3b4e
Diffstat (limited to 'include')
| -rw-r--r-- | include/vulkan/vk_layer.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/vulkan/vk_layer.h b/include/vulkan/vk_layer.h index 2a458001..8538eecc 100644 --- a/include/vulkan/vk_layer.h +++ b/include/vulkan/vk_layer.h @@ -261,9 +261,15 @@ typedef enum VkLayerDbgAction_ { // ------------------------------------------------------------------------------------------------ // CreateInstance and CreateDevice support structures +/* Sub type of structure for instance and device loader ext of CreateInfo. + * When sType == VK_STRUCTURE_TYPE_LAYER_INSTANCE_CREATE_INFO + * or sType == VK_STRUCTURE_TYPE_LAYER_DEVICE_CREATE_INFO + * then VkLayerFunction indicates struct type pointed to by pNext + */ typedef enum VkLayerFunction_ { VK_LAYER_LINK_INFO = 0, - VK_LAYER_DEVICE_INFO = 1 + VK_LAYER_DEVICE_INFO = 1, + VK_LOADER_DISPATCH_CALLBACK = 2 } VkLayerFunction; typedef struct VkLayerInstanceLink_ { @@ -283,12 +289,16 @@ typedef struct VkLayerDeviceInfo_ { PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr; } VkLayerDeviceInfo; +typedef VkResult (VKAPI_PTR *PFN_vkSetInstanceLoaderData)(VkInstance instance, + void *object); + typedef struct { VkStructureType sType; // VK_STRUCTURE_TYPE_LAYER_INSTANCE_CREATE_INFO const void *pNext; VkLayerFunction function; union { VkLayerInstanceLink *pLayerInfo; + PFN_vkSetInstanceLoaderData pfnSetInstanceLoaderData; } u; } VkLayerInstanceCreateInfo; |
