summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFelix Dörre <[email protected]>2018-12-11 18:37:06 +0100
committerLenny Komow <[email protected]>2019-04-24 09:18:43 -0600
commite0e015e709a98d6502058b0564147f72d32032f2 (patch)
tree8035e8e70ce002dd0d5836c8e42f2ac80dbc5e4e
parentc277ce529db9a7849be1ff09cf46e1d64ae80955 (diff)
downloadVulkan-Headers-e0e015e709a98d6502058b0564147f72d32032f2.tar.gz
Vulkan-Headers-e0e015e709a98d6502058b0564147f72d32032f2.zip
headers: device creation callbacks for layers
-rw-r--r--include/vulkan/vk_layer.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/vulkan/vk_layer.h b/include/vulkan/vk_layer.h
index 823c88a..fa76520 100644
--- a/include/vulkan/vk_layer.h
+++ b/include/vulkan/vk_layer.h
@@ -82,7 +82,8 @@ typedef VkResult(VKAPI_PTR *PFN_PhysDevExt)(VkPhysicalDevice phys_device);
*/
typedef enum VkLayerFunction_ {
VK_LAYER_LINK_INFO = 0,
- VK_LOADER_DATA_CALLBACK = 1
+ VK_LOADER_DATA_CALLBACK = 1,
+ VK_LOADER_LAYER_CREATE_DEVICE_CALLBACK = 2
} VkLayerFunction;
typedef struct VkLayerInstanceLink_ {
@@ -107,7 +108,9 @@ typedef VkResult (VKAPI_PTR *PFN_vkSetInstanceLoaderData)(VkInstance instance,
void *object);
typedef VkResult (VKAPI_PTR *PFN_vkSetDeviceLoaderData)(VkDevice device,
void *object);
-
+typedef VkResult (VKAPI_PTR *PFN_vkLayerCreateDevice)(VkInstance instance, VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo,
+ const VkAllocationCallbacks *pAllocator, VkDevice *pDevice, PFN_vkGetInstanceProcAddr layerGIPA, PFN_vkGetDeviceProcAddr *nextGDPA);
+typedef void (VKAPI_PTR *PFN_vkLayerDestroyDevice)(VkDevice physicalDevice, const VkAllocationCallbacks *pAllocator, PFN_vkDestroyDevice destroyFunction);
typedef struct {
VkStructureType sType; // VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO
const void *pNext;
@@ -115,6 +118,10 @@ typedef struct {
union {
VkLayerInstanceLink *pLayerInfo;
PFN_vkSetInstanceLoaderData pfnSetInstanceLoaderData;
+ struct {
+ PFN_vkLayerCreateDevice pfnLayerCreateDevice;
+ PFN_vkLayerDestroyDevice pfnLayerDestroyDevice;
+ } layerDevice;
} u;
} VkLayerInstanceCreateInfo;