1 #ifndef VULKAN_FUCHSIA_H_ 2 #define VULKAN_FUCHSIA_H_ 1 3 4 /* 5 ** Copyright 2015-2021 The Khronos Group Inc. 6 ** 7 ** SPDX-License-Identifier: Apache-2.0 8 */ 9 10 /* 11 ** This header is generated from the Khronos Vulkan XML API Registry. 12 ** 13 */ 14 15 16 #ifdef __cplusplus 17 extern "C" { 18 #endif 19 20 21 22 #define VK_FUCHSIA_imagepipe_surface 1 23 #define VK_FUCHSIA_IMAGEPIPE_SURFACE_SPEC_VERSION 1 24 #define VK_FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME "VK_FUCHSIA_imagepipe_surface" 25 typedef VkFlags VkImagePipeSurfaceCreateFlagsFUCHSIA; 26 typedef struct VkImagePipeSurfaceCreateInfoFUCHSIA { 27 VkStructureType sType; 28 const void* pNext; 29 VkImagePipeSurfaceCreateFlagsFUCHSIA flags; 30 zx_handle_t imagePipeHandle; 31 } VkImagePipeSurfaceCreateInfoFUCHSIA; 32 33 typedef VkResult (VKAPI_PTR *PFN_vkCreateImagePipeSurfaceFUCHSIA)(VkInstance instance, const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); 34 35 #ifndef VK_NO_PROTOTYPES 36 VKAPI_ATTR VkResult VKAPI_CALL vkCreateImagePipeSurfaceFUCHSIA( 37 VkInstance instance, 38 const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, 39 const VkAllocationCallbacks* pAllocator, 40 VkSurfaceKHR* pSurface); 41 #endif 42 43 44 #define VK_FUCHSIA_external_memory 1 45 #define VK_FUCHSIA_EXTERNAL_MEMORY_SPEC_VERSION 1 46 #define VK_FUCHSIA_EXTERNAL_MEMORY_EXTENSION_NAME "VK_FUCHSIA_external_memory" 47 typedef struct VkImportMemoryZirconHandleInfoFUCHSIA { 48 VkStructureType sType; 49 const void* pNext; 50 VkExternalMemoryHandleTypeFlagBits handleType; 51 zx_handle_t handle; 52 } VkImportMemoryZirconHandleInfoFUCHSIA; 53 54 typedef struct VkMemoryZirconHandlePropertiesFUCHSIA { 55 VkStructureType sType; 56 void* pNext; 57 uint32_t memoryTypeBits; 58 } VkMemoryZirconHandlePropertiesFUCHSIA; 59 60 typedef struct VkMemoryGetZirconHandleInfoFUCHSIA { 61 VkStructureType sType; 62 const void* pNext; 63 VkDeviceMemory memory; 64 VkExternalMemoryHandleTypeFlagBits handleType; 65 } VkMemoryGetZirconHandleInfoFUCHSIA; 66 67 typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryZirconHandleFUCHSIA)(VkDevice device, const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, zx_handle_t* pZirconHandle); 68 typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, zx_handle_t zirconHandle, VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties); 69 70 #ifndef VK_NO_PROTOTYPES 71 VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryZirconHandleFUCHSIA( 72 VkDevice device, 73 const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, 74 zx_handle_t* pZirconHandle); 75 76 VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryZirconHandlePropertiesFUCHSIA( 77 VkDevice device, 78 VkExternalMemoryHandleTypeFlagBits handleType, 79 zx_handle_t zirconHandle, 80 VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties); 81 #endif 82 83 84 #define VK_FUCHSIA_external_semaphore 1 85 #define VK_FUCHSIA_EXTERNAL_SEMAPHORE_SPEC_VERSION 1 86 #define VK_FUCHSIA_EXTERNAL_SEMAPHORE_EXTENSION_NAME "VK_FUCHSIA_external_semaphore" 87 typedef struct VkImportSemaphoreZirconHandleInfoFUCHSIA { 88 VkStructureType sType; 89 const void* pNext; 90 VkSemaphore semaphore; 91 VkSemaphoreImportFlags flags; 92 VkExternalSemaphoreHandleTypeFlagBits handleType; 93 zx_handle_t zirconHandle; 94 } VkImportSemaphoreZirconHandleInfoFUCHSIA; 95 96 typedef struct VkSemaphoreGetZirconHandleInfoFUCHSIA { 97 VkStructureType sType; 98 const void* pNext; 99 VkSemaphore semaphore; 100 VkExternalSemaphoreHandleTypeFlagBits handleType; 101 } VkSemaphoreGetZirconHandleInfoFUCHSIA; 102 103 typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreZirconHandleFUCHSIA)(VkDevice device, const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo); 104 typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreZirconHandleFUCHSIA)(VkDevice device, const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, zx_handle_t* pZirconHandle); 105 106 #ifndef VK_NO_PROTOTYPES 107 VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreZirconHandleFUCHSIA( 108 VkDevice device, 109 const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo); 110 111 VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreZirconHandleFUCHSIA( 112 VkDevice device, 113 const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, 114 zx_handle_t* pZirconHandle); 115 #endif 116 117 118 #define VK_FUCHSIA_buffer_collection 1 119 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBufferCollectionFUCHSIA) 120 #define VK_FUCHSIA_BUFFER_COLLECTION_SPEC_VERSION 2 121 #define VK_FUCHSIA_BUFFER_COLLECTION_EXTENSION_NAME "VK_FUCHSIA_buffer_collection" 122 123 typedef enum VkImageFormatConstraintsFlagBitsFUCHSIA { 124 VK_IMAGE_FORMAT_CONSTRAINTS_FLAG_BITS_MAX_ENUM_FUCHSIA = 0x7FFFFFFF 125 } VkImageFormatConstraintsFlagBitsFUCHSIA; 126 typedef VkFlags VkImageFormatConstraintsFlagsFUCHSIA; 127 128 typedef enum VkImageConstraintsInfoFlagBitsFUCHSIA { 129 VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_RARELY_FUCHSIA = 0x00000001, 130 VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_OFTEN_FUCHSIA = 0x00000002, 131 VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_RARELY_FUCHSIA = 0x00000004, 132 VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_OFTEN_FUCHSIA = 0x00000008, 133 VK_IMAGE_CONSTRAINTS_INFO_PROTECTED_OPTIONAL_FUCHSIA = 0x00000010, 134 VK_IMAGE_CONSTRAINTS_INFO_FLAG_BITS_MAX_ENUM_FUCHSIA = 0x7FFFFFFF 135 } VkImageConstraintsInfoFlagBitsFUCHSIA; 136 typedef VkFlags VkImageConstraintsInfoFlagsFUCHSIA; 137 typedef struct VkBufferCollectionCreateInfoFUCHSIA { 138 VkStructureType sType; 139 const void* pNext; 140 zx_handle_t collectionToken; 141 } VkBufferCollectionCreateInfoFUCHSIA; 142 143 typedef struct VkImportMemoryBufferCollectionFUCHSIA { 144 VkStructureType sType; 145 const void* pNext; 146 VkBufferCollectionFUCHSIA collection; 147 uint32_t index; 148 } VkImportMemoryBufferCollectionFUCHSIA; 149 150 typedef struct VkBufferCollectionImageCreateInfoFUCHSIA { 151 VkStructureType sType; 152 const void* pNext; 153 VkBufferCollectionFUCHSIA collection; 154 uint32_t index; 155 } VkBufferCollectionImageCreateInfoFUCHSIA; 156 157 typedef struct VkBufferCollectionConstraintsInfoFUCHSIA { 158 VkStructureType sType; 159 const void* pNext; 160 uint32_t minBufferCount; 161 uint32_t maxBufferCount; 162 uint32_t minBufferCountForCamping; 163 uint32_t minBufferCountForDedicatedSlack; 164 uint32_t minBufferCountForSharedSlack; 165 } VkBufferCollectionConstraintsInfoFUCHSIA; 166 167 typedef struct VkBufferConstraintsInfoFUCHSIA { 168 VkStructureType sType; 169 const void* pNext; 170 VkBufferCreateInfo createInfo; 171 VkFormatFeatureFlags requiredFormatFeatures; 172 VkBufferCollectionConstraintsInfoFUCHSIA bufferCollectionConstraints; 173 } VkBufferConstraintsInfoFUCHSIA; 174 175 typedef struct VkBufferCollectionBufferCreateInfoFUCHSIA { 176 VkStructureType sType; 177 const void* pNext; 178 VkBufferCollectionFUCHSIA collection; 179 uint32_t index; 180 } VkBufferCollectionBufferCreateInfoFUCHSIA; 181 182 typedef struct VkSysmemColorSpaceFUCHSIA { 183 VkStructureType sType; 184 const void* pNext; 185 uint32_t colorSpace; 186 } VkSysmemColorSpaceFUCHSIA; 187 188 typedef struct VkBufferCollectionPropertiesFUCHSIA { 189 VkStructureType sType; 190 void* pNext; 191 uint32_t memoryTypeBits; 192 uint32_t bufferCount; 193 uint32_t createInfoIndex; 194 uint64_t sysmemPixelFormat; 195 VkFormatFeatureFlags formatFeatures; 196 VkSysmemColorSpaceFUCHSIA sysmemColorSpaceIndex; 197 VkComponentMapping samplerYcbcrConversionComponents; 198 VkSamplerYcbcrModelConversion suggestedYcbcrModel; 199 VkSamplerYcbcrRange suggestedYcbcrRange; 200 VkChromaLocation suggestedXChromaOffset; 201 VkChromaLocation suggestedYChromaOffset; 202 } VkBufferCollectionPropertiesFUCHSIA; 203 204 typedef struct VkImageFormatConstraintsInfoFUCHSIA { 205 VkStructureType sType; 206 const void* pNext; 207 VkImageCreateInfo imageCreateInfo; 208 VkFormatFeatureFlags requiredFormatFeatures; 209 VkImageFormatConstraintsFlagsFUCHSIA flags; 210 uint64_t sysmemPixelFormat; 211 uint32_t colorSpaceCount; 212 const VkSysmemColorSpaceFUCHSIA* pColorSpaces; 213 } VkImageFormatConstraintsInfoFUCHSIA; 214 215 typedef struct VkImageConstraintsInfoFUCHSIA { 216 VkStructureType sType; 217 const void* pNext; 218 uint32_t formatConstraintsCount; 219 const VkImageFormatConstraintsInfoFUCHSIA* pFormatConstraints; 220 VkBufferCollectionConstraintsInfoFUCHSIA bufferCollectionConstraints; 221 VkImageConstraintsInfoFlagsFUCHSIA flags; 222 } VkImageConstraintsInfoFUCHSIA; 223 224 typedef VkResult (VKAPI_PTR *PFN_vkCreateBufferCollectionFUCHSIA)(VkDevice device, const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBufferCollectionFUCHSIA* pCollection); 225 typedef VkResult (VKAPI_PTR *PFN_vkSetBufferCollectionImageConstraintsFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo); 226 typedef VkResult (VKAPI_PTR *PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo); 227 typedef void (VKAPI_PTR *PFN_vkDestroyBufferCollectionFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkAllocationCallbacks* pAllocator); 228 typedef VkResult (VKAPI_PTR *PFN_vkGetBufferCollectionPropertiesFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, VkBufferCollectionPropertiesFUCHSIA* pProperties); 229 230 #ifndef VK_NO_PROTOTYPES 231 VKAPI_ATTR VkResult VKAPI_CALL vkCreateBufferCollectionFUCHSIA( 232 VkDevice device, 233 const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo, 234 const VkAllocationCallbacks* pAllocator, 235 VkBufferCollectionFUCHSIA* pCollection); 236 237 VKAPI_ATTR VkResult VKAPI_CALL vkSetBufferCollectionImageConstraintsFUCHSIA( 238 VkDevice device, 239 VkBufferCollectionFUCHSIA collection, 240 const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo); 241 242 VKAPI_ATTR VkResult VKAPI_CALL vkSetBufferCollectionBufferConstraintsFUCHSIA( 243 VkDevice device, 244 VkBufferCollectionFUCHSIA collection, 245 const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo); 246 247 VKAPI_ATTR void VKAPI_CALL vkDestroyBufferCollectionFUCHSIA( 248 VkDevice device, 249 VkBufferCollectionFUCHSIA collection, 250 const VkAllocationCallbacks* pAllocator); 251 252 VKAPI_ATTR VkResult VKAPI_CALL vkGetBufferCollectionPropertiesFUCHSIA( 253 VkDevice device, 254 VkBufferCollectionFUCHSIA collection, 255 VkBufferCollectionPropertiesFUCHSIA* pProperties); 256 #endif 257 258 #ifdef __cplusplus 259 } 260 #endif 261 262 #endif 263