aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLenny Komow <[email protected]>2020-07-30 18:05:12 -0600
committerLenny Komow <[email protected]>2020-07-30 18:49:59 -0600
commitfc87182aab33a63b43db41d7a424eed27283aebf (patch)
tree3137a1847fcab8421fab1be636cef731043bb6a2
parent9b195c95a0779dc07c4f4b16f8dd639674e89077 (diff)
downloadVulkan-Headers-fc87182aab33a63b43db41d7a424eed27283aebf.tar.gz
Vulkan-Headers-fc87182aab33a63b43db41d7a424eed27283aebf.zip
Add a loader features interfacesdk-1.2.148.0sdk-1.2.148
This is needed to tell a layer if the loader is sorting physical devices, but it should be generalized so that other loader features could be marked in the future.
-rw-r--r--include/vulkan/vk_layer.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/include/vulkan/vk_layer.h b/include/vulkan/vk_layer.h
index fa76520..0651870 100644
--- a/include/vulkan/vk_layer.h
+++ b/include/vulkan/vk_layer.h
@@ -83,7 +83,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_LAYER_CREATE_DEVICE_CALLBACK = 2
+ VK_LOADER_LAYER_CREATE_DEVICE_CALLBACK = 2,
+ VK_LOADER_FEATURES = 3,
} VkLayerFunction;
typedef struct VkLayerInstanceLink_ {
@@ -111,6 +112,12 @@ typedef VkResult (VKAPI_PTR *PFN_vkSetDeviceLoaderData)(VkDevice device,
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 enum VkLoaderFeastureFlagBits {
+ VK_LOADER_FEATURE_PHYSICAL_DEVICE_SORTING = 0x00000001,
+} VkLoaderFlagBits;
+typedef VkFlags VkLoaderFeatureFlags;
+
typedef struct {
VkStructureType sType; // VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO
const void *pNext;
@@ -119,9 +126,10 @@ typedef struct {
VkLayerInstanceLink *pLayerInfo;
PFN_vkSetInstanceLoaderData pfnSetInstanceLoaderData;
struct {
- PFN_vkLayerCreateDevice pfnLayerCreateDevice;
- PFN_vkLayerDestroyDevice pfnLayerDestroyDevice;
- } layerDevice;
+ PFN_vkLayerCreateDevice pfnLayerCreateDevice;
+ PFN_vkLayerDestroyDevice pfnLayerDestroyDevice;
+ } layerDevice;
+ VkLoaderFeatureFlags loaderFeatures;
} u;
} VkLayerInstanceCreateInfo;