1 // Copyright (C) 2018 The Android Open Source Project 2 // Copyright (C) 2018 Google Inc. 3 // 4 // Licensed under the Apache License, Version 2.0 (the "License"); 5 // you may not use this file except in compliance with the License. 6 // You may obtain a copy of the License at 7 // 8 // http://www.apache.org/licenses/LICENSE-2.0 9 // 10 // Unless required by applicable law or agreed to in writing, software 11 // distributed under the License is distributed on an "AS IS" BASIS, 12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 // See the License for the specific language governing permissions and 14 // limitations under the License. 15 #pragma once 16 17 #include <vulkan/vulkan.h> 18 19 #ifdef __cplusplus 20 extern "C" { 21 #endif 22 23 #define VK_ANDROID_native_buffer 1 24 #define VK_ANDROID_NATIVE_BUFFER_EXTENSION_NUMBER 11 25 26 /* NOTE ON VK_ANDROID_NATIVE_BUFFER_SPEC_VERSION 6 27 * 28 * This version of the extension transitions from gralloc0 to gralloc1 usage 29 * flags (int -> 2x uint64_t). The WSI implementation will temporarily continue 30 * to fill out deprecated fields in VkNativeBufferANDROID, and will call the 31 * deprecated vkGetSwapchainGrallocUsageANDROID if the new 32 * vkGetSwapchainGrallocUsage2ANDROID is not supported. This transitionary 33 * backwards-compatibility support is temporary, and will likely be removed in 34 * (along with all gralloc0 support) in a future release. 35 */ 36 #define VK_ANDROID_NATIVE_BUFFER_SPEC_VERSION 7 37 #define VK_ANDROID_NATIVE_BUFFER_EXTENSION_NAME "VK_ANDROID_native_buffer" 38 39 #define VK_ANDROID_NATIVE_BUFFER_ENUM(type,id) ((type)(1000000000 + (1000 * (VK_ANDROID_NATIVE_BUFFER_EXTENSION_NUMBER - 1)) + (id))) 40 #define VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID VK_ANDROID_NATIVE_BUFFER_ENUM(VkStructureType, 0) 41 #define VK_STRUCTURE_TYPE_SWAPCHAIN_IMAGE_CREATE_INFO_ANDROID VK_ANDROID_NATIVE_BUFFER_ENUM(VkStructureType, 1) 42 #define VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENTATION_PROPERTIES_ANDROID VK_ANDROID_NATIVE_BUFFER_ENUM(VkStructureType, 2) 43 44 typedef enum VkSwapchainImageUsageFlagBitsANDROID { 45 VK_SWAPCHAIN_IMAGE_USAGE_SHARED_BIT_ANDROID = 0x00000001, 46 VK_SWAPCHAIN_IMAGE_USAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF 47 } VkSwapchainImageUsageFlagBitsANDROID; 48 typedef VkFlags VkSwapchainImageUsageFlagsANDROID; 49 50 typedef struct { 51 VkStructureType sType; // must be VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID 52 const void* pNext; 53 54 // Buffer handle and stride returned from gralloc alloc() 55 const uint32_t* handle; 56 int stride; 57 58 // Gralloc format and usage requested when the buffer was allocated. 59 int format; 60 int usage; // DEPRECATED in SPEC_VERSION 6 61 // -- Added in SPEC_VERSION 6 -- 62 uint64_t consumer; 63 uint64_t producer; 64 } VkNativeBufferANDROID; 65 66 typedef struct { 67 VkStructureType sType; // must be VK_STRUCTURE_TYPE_SWAPCHAIN_IMAGE_CREATE_INFO_ANDROID 68 const void* pNext; 69 70 VkSwapchainImageUsageFlagsANDROID usage; 71 } VkSwapchainImageCreateInfoANDROID; 72 73 typedef struct { 74 VkStructureType sType; // must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENTATION_PROPERTIES_ANDROID 75 const void* pNext; 76 77 VkBool32 sharedImage; 78 } VkPhysicalDevicePresentationPropertiesANDROID; 79 80 // -- DEPRECATED in SPEC_VERSION 6 -- 81 typedef VkResult (VKAPI_PTR *PFN_vkGetSwapchainGrallocUsageANDROID)(VkDevice device, VkFormat format, VkImageUsageFlags imageUsage, int* grallocUsage); 82 // -- ADDED in SPEC_VERSION 6 -- 83 typedef VkResult (VKAPI_PTR *PFN_vkGetSwapchainGrallocUsage2ANDROID)(VkDevice device, VkFormat format, VkImageUsageFlags imageUsage, VkSwapchainImageUsageFlagsANDROID swapchainImageUsage, uint64_t* grallocConsumerUsage, uint64_t* grallocProducerUsage); 84 typedef VkResult (VKAPI_PTR *PFN_vkAcquireImageANDROID)(VkDevice device, VkImage image, int nativeFenceFd, VkSemaphore semaphore, VkFence fence); 85 typedef VkResult (VKAPI_PTR *PFN_vkQueueSignalReleaseImageANDROID)(VkQueue queue, uint32_t waitSemaphoreCount, const VkSemaphore* pWaitSemaphores, VkImage image, int* pNativeFenceFd); 86 87 #define VK_GOOGLE_address_space 1 88 89 typedef VkResult (VKAPI_PTR *PFN_vkMapMemoryIntoAddressSpaceGOOGLE)(VkDevice device, VkDeviceMemory memory, uint64_t* pAddress); 90 91 #define VK_GOOGLE_color_buffer 1 92 #define VK_GOOGLE_COLOR_BUFFER_EXTENSION_NUMBER 219 93 94 #define VK_GOOGLE_COLOR_BUFFER_ENUM(type,id) ((type)(1000000000 + (1000 * (VK_GOOGLE_COLOR_BUFFER_EXTENSION_NUMBER - 1)) + (id))) 95 #define VK_STRUCTURE_TYPE_IMPORT_COLOR_BUFFER_GOOGLE VK_GOOGLE_COLOR_BUFFER_ENUM(VkStructureType, 0) 96 #define VK_STRUCTURE_TYPE_IMPORT_PHYSICAL_ADDRESS_GOOGLE VK_GOOGLE_COLOR_BUFFER_ENUM(VkStructureType, 1) 97 98 typedef struct { 99 VkStructureType sType; // must be VK_STRUCTURE_TYPE_IMPORT_COLOR_BUFFER_GOOGLE 100 const void* pNext; 101 uint32_t colorBuffer; 102 } VkImportColorBufferGOOGLE; 103 104 typedef struct { 105 VkStructureType sType; // must be VK_STRUCTURE_TYPE_IMPORT_PHYSICAL_ADDRESS_GOOGLE 106 const void* pNext; 107 uint64_t physicalAddress; 108 VkDeviceSize size; 109 VkFormat format; 110 VkImageTiling tiling; 111 uint32_t tilingParameter; 112 } VkImportPhysicalAddressGOOGLE; 113 114 typedef VkResult (VKAPI_PTR *PFN_vkRegisterImageColorBufferGOOGLE)(VkDevice device, VkImage image, uint32_t colorBuffer); 115 typedef VkResult (VKAPI_PTR *PFN_vkRegisterBufferColorBufferGOOGLE)(VkDevice device, VkBuffer image, uint32_t colorBuffer); 116 117 #define VK_ANDROID_external_memory_android_hardware_buffer 1 118 struct AHardwareBuffer; 119 struct VkAndroidHardwareBufferPropertiesANDROID; 120 struct VkMemoryGetAndroidHardwareBufferInfoANDROID; 121 122 #ifdef __Fuchsia__ 123 124 typedef struct VkAndroidHardwareBufferUsageANDROID { 125 VkStructureType sType; 126 void* pNext; 127 uint64_t androidHardwareBufferUsage; 128 } VkAndroidHardwareBufferUsageANDROID; 129 130 typedef struct VkAndroidHardwareBufferPropertiesANDROID { 131 VkStructureType sType; 132 void* pNext; 133 VkDeviceSize allocationSize; 134 uint32_t memoryTypeBits; 135 } VkAndroidHardwareBufferPropertiesANDROID; 136 137 typedef struct VkAndroidHardwareBufferFormatPropertiesANDROID { 138 VkStructureType sType; 139 void* pNext; 140 VkFormat format; 141 uint64_t externalFormat; 142 VkFormatFeatureFlags formatFeatures; 143 VkComponentMapping samplerYcbcrConversionComponents; 144 VkSamplerYcbcrModelConversion suggestedYcbcrModel; 145 VkSamplerYcbcrRange suggestedYcbcrRange; 146 VkChromaLocation suggestedXChromaOffset; 147 VkChromaLocation suggestedYChromaOffset; 148 } VkAndroidHardwareBufferFormatPropertiesANDROID; 149 150 typedef struct VkImportAndroidHardwareBufferInfoANDROID { 151 VkStructureType sType; 152 const void* pNext; 153 struct AHardwareBuffer* buffer; 154 } VkImportAndroidHardwareBufferInfoANDROID; 155 156 typedef struct VkMemoryGetAndroidHardwareBufferInfoANDROID { 157 VkStructureType sType; 158 const void* pNext; 159 VkDeviceMemory memory; 160 } VkMemoryGetAndroidHardwareBufferInfoANDROID; 161 162 typedef struct VkExternalFormatANDROID { 163 VkStructureType sType; 164 void* pNext; 165 uint64_t externalFormat; 166 } VkExternalFormatANDROID; 167 168 169 typedef VkResult (VKAPI_PTR *PFN_vkGetAndroidHardwareBufferPropertiesANDROID)(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties); 170 typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryAndroidHardwareBufferANDROID)(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer); 171 172 #ifndef VK_NO_PROTOTYPES 173 VKAPI_ATTR VkResult VKAPI_CALL vkGetAndroidHardwareBufferPropertiesANDROID( 174 VkDevice device, 175 const struct AHardwareBuffer* buffer, 176 VkAndroidHardwareBufferPropertiesANDROID* pProperties); 177 178 VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryAndroidHardwareBufferANDROID( 179 VkDevice device, 180 const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, 181 struct AHardwareBuffer** pBuffer); 182 #endif 183 184 /** 185 * Buffer pixel formats. 186 */ 187 enum AHardwareBuffer_Format { 188 /** 189 * Corresponding formats: 190 * Vulkan: VK_FORMAT_R8G8B8A8_UNORM 191 * OpenGL ES: GL_RGBA8 192 */ 193 AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM = 1, 194 /** 195 * 32 bits per pixel, 8 bits per channel format where alpha values are 196 * ignored (always opaque). 197 * Corresponding formats: 198 * Vulkan: VK_FORMAT_R8G8B8A8_UNORM 199 * OpenGL ES: GL_RGB8 200 */ 201 AHARDWAREBUFFER_FORMAT_R8G8B8X8_UNORM = 2, 202 /** 203 * Corresponding formats: 204 * Vulkan: VK_FORMAT_R8G8B8_UNORM 205 * OpenGL ES: GL_RGB8 206 */ 207 AHARDWAREBUFFER_FORMAT_R8G8B8_UNORM = 3, 208 /** 209 * Corresponding formats: 210 * Vulkan: VK_FORMAT_R5G6B5_UNORM_PACK16 211 * OpenGL ES: GL_RGB565 212 */ 213 AHARDWAREBUFFER_FORMAT_R5G6B5_UNORM = 4, 214 /** 215 * Corresponding formats: 216 * Vulkan: VK_FORMAT_R16G16B16A16_SFLOAT 217 * OpenGL ES: GL_RGBA16F 218 */ 219 AHARDWAREBUFFER_FORMAT_R16G16B16A16_FLOAT = 0x16, 220 /** 221 * Corresponding formats: 222 * Vulkan: VK_FORMAT_A2B10G10R10_UNORM_PACK32 223 * OpenGL ES: GL_RGB10_A2 224 */ 225 AHARDWAREBUFFER_FORMAT_R10G10B10A2_UNORM = 0x2b, 226 /** 227 * Opaque binary blob format. 228 * Must have height 1 and one layer, with width equal to the buffer 229 * size in bytes. Corresponds to Vulkan buffers and OpenGL buffer 230 * objects. Can be bound to the latter using GL_EXT_external_buffer. 231 */ 232 AHARDWAREBUFFER_FORMAT_BLOB = 0x21, 233 /** 234 * Corresponding formats: 235 * Vulkan: VK_FORMAT_D16_UNORM 236 * OpenGL ES: GL_DEPTH_COMPONENT16 237 */ 238 AHARDWAREBUFFER_FORMAT_D16_UNORM = 0x30, 239 /** 240 * Corresponding formats: 241 * Vulkan: VK_FORMAT_X8_D24_UNORM_PACK32 242 * OpenGL ES: GL_DEPTH_COMPONENT24 243 */ 244 AHARDWAREBUFFER_FORMAT_D24_UNORM = 0x31, 245 /** 246 * Corresponding formats: 247 * Vulkan: VK_FORMAT_D24_UNORM_S8_UINT 248 * OpenGL ES: GL_DEPTH24_STENCIL8 249 */ 250 AHARDWAREBUFFER_FORMAT_D24_UNORM_S8_UINT = 0x32, 251 /** 252 * Corresponding formats: 253 * Vulkan: VK_FORMAT_D32_SFLOAT 254 * OpenGL ES: GL_DEPTH_COMPONENT32F 255 */ 256 AHARDWAREBUFFER_FORMAT_D32_FLOAT = 0x33, 257 /** 258 * Corresponding formats: 259 * Vulkan: VK_FORMAT_D32_SFLOAT_S8_UINT 260 * OpenGL ES: GL_DEPTH32F_STENCIL8 261 */ 262 AHARDWAREBUFFER_FORMAT_D32_FLOAT_S8_UINT = 0x34, 263 /** 264 * Corresponding formats: 265 * Vulkan: VK_FORMAT_S8_UINT 266 * OpenGL ES: GL_STENCIL_INDEX8 267 */ 268 AHARDWAREBUFFER_FORMAT_S8_UINT = 0x35, 269 }; 270 /** 271 * Buffer usage flags, specifying how the buffer will be accessed. 272 */ 273 enum AHardwareBuffer_UsageFlags { 274 /// The buffer will never be locked for direct CPU reads using the 275 /// AHardwareBuffer_lock() function. Note that reading the buffer 276 /// using OpenGL or Vulkan functions or memory mappings is still 277 /// allowed. 278 AHARDWAREBUFFER_USAGE_CPU_READ_NEVER = 0UL, 279 /// The buffer will sometimes be locked for direct CPU reads using 280 /// the AHardwareBuffer_lock() function. Note that reading the 281 /// buffer using OpenGL or Vulkan functions or memory mappings 282 /// does not require the presence of this flag. 283 AHARDWAREBUFFER_USAGE_CPU_READ_RARELY = 2UL, 284 /// The buffer will often be locked for direct CPU reads using 285 /// the AHardwareBuffer_lock() function. Note that reading the 286 /// buffer using OpenGL or Vulkan functions or memory mappings 287 /// does not require the presence of this flag. 288 AHARDWAREBUFFER_USAGE_CPU_READ_OFTEN = 3UL, 289 /// CPU read value mask. 290 AHARDWAREBUFFER_USAGE_CPU_READ_MASK = 0xFUL, 291 /// The buffer will never be locked for direct CPU writes using the 292 /// AHardwareBuffer_lock() function. Note that writing the buffer 293 /// using OpenGL or Vulkan functions or memory mappings is still 294 /// allowed. 295 AHARDWAREBUFFER_USAGE_CPU_WRITE_NEVER = 0UL << 4, 296 /// The buffer will sometimes be locked for direct CPU writes using 297 /// the AHardwareBuffer_lock() function. Note that writing the 298 /// buffer using OpenGL or Vulkan functions or memory mappings 299 /// does not require the presence of this flag. 300 AHARDWAREBUFFER_USAGE_CPU_WRITE_RARELY = 2UL << 4, 301 /// The buffer will often be locked for direct CPU writes using 302 /// the AHardwareBuffer_lock() function. Note that writing the 303 /// buffer using OpenGL or Vulkan functions or memory mappings 304 /// does not require the presence of this flag. 305 AHARDWAREBUFFER_USAGE_CPU_WRITE_OFTEN = 3UL << 4, 306 /// CPU write value mask. 307 AHARDWAREBUFFER_USAGE_CPU_WRITE_MASK = 0xFUL << 4, 308 /// The buffer will be read from by the GPU as a texture. 309 AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE = 1UL << 8, 310 /** 311 * The buffer will be written to by the GPU as a framebuffer 312 * attachment. 313 * 314 * Note that the name of this flag is somewhat misleading: it does 315 * not imply that the buffer contains a color format. A buffer with 316 * depth or stencil format that will be used as a framebuffer 317 * attachment should also have this flag. 318 */ 319 AHARDWAREBUFFER_USAGE_GPU_COLOR_OUTPUT = 1UL << 9, 320 /** 321 * The buffer is protected from direct CPU access or being read by 322 * non-secure hardware, such as video encoders. 323 * 324 * This flag is incompatible with CPU read and write flags. It is 325 * mainly used when handling DRM video. Refer to the EGL extension 326 * EGL_EXT_protected_content and GL extension 327 * GL_EXT_protected_textures for more information on how these 328 * buffers are expected to behave. 329 */ 330 AHARDWAREBUFFER_USAGE_PROTECTED_CONTENT = 1UL << 14, 331 /// The buffer will be read by a hardware video encoder. 332 AHARDWAREBUFFER_USAGE_VIDEO_ENCODE = 1UL << 16, 333 /** 334 * The buffer will be used for direct writes from sensors. 335 * When this flag is present, the format must be AHARDWAREBUFFER_FORMAT_BLOB. 336 */ 337 AHARDWAREBUFFER_USAGE_SENSOR_DIRECT_DATA = 1UL << 23, 338 /** 339 * The buffer will be used as a shader storage or uniform buffer object. 340 * When this flag is present, the format must be AHARDWAREBUFFER_FORMAT_BLOB. 341 */ 342 AHARDWAREBUFFER_USAGE_GPU_DATA_BUFFER = 1UL << 24, 343 /** 344 * The buffer will be used as a cube map texture. 345 * When this flag is present, the buffer must have a layer count 346 * that is a multiple of 6. Note that buffers with this flag must be 347 * bound to OpenGL textures using the extension 348 * GL_EXT_EGL_image_storage instead of GL_KHR_EGL_image. 349 */ 350 AHARDWAREBUFFER_USAGE_GPU_CUBE_MAP = 1UL << 25, 351 /** 352 * The buffer contains a complete mipmap hierarchy. 353 * Note that buffers with this flag must be bound to OpenGL textures using 354 * the extension GL_EXT_EGL_image_storage instead of GL_KHR_EGL_image. 355 */ 356 AHARDWAREBUFFER_USAGE_GPU_MIPMAP_COMPLETE = 1UL << 26, 357 AHARDWAREBUFFER_USAGE_VENDOR_0 = 1ULL << 28, 358 AHARDWAREBUFFER_USAGE_VENDOR_1 = 1ULL << 29, 359 AHARDWAREBUFFER_USAGE_VENDOR_2 = 1ULL << 30, 360 AHARDWAREBUFFER_USAGE_VENDOR_3 = 1ULL << 31, 361 AHARDWAREBUFFER_USAGE_VENDOR_4 = 1ULL << 48, 362 AHARDWAREBUFFER_USAGE_VENDOR_5 = 1ULL << 49, 363 AHARDWAREBUFFER_USAGE_VENDOR_6 = 1ULL << 50, 364 AHARDWAREBUFFER_USAGE_VENDOR_7 = 1ULL << 51, 365 AHARDWAREBUFFER_USAGE_VENDOR_8 = 1ULL << 52, 366 AHARDWAREBUFFER_USAGE_VENDOR_9 = 1ULL << 53, 367 AHARDWAREBUFFER_USAGE_VENDOR_10 = 1ULL << 54, 368 AHARDWAREBUFFER_USAGE_VENDOR_11 = 1ULL << 55, 369 AHARDWAREBUFFER_USAGE_VENDOR_12 = 1ULL << 56, 370 AHARDWAREBUFFER_USAGE_VENDOR_13 = 1ULL << 57, 371 AHARDWAREBUFFER_USAGE_VENDOR_14 = 1ULL << 58, 372 AHARDWAREBUFFER_USAGE_VENDOR_15 = 1ULL << 59, 373 AHARDWAREBUFFER_USAGE_VENDOR_16 = 1ULL << 60, 374 AHARDWAREBUFFER_USAGE_VENDOR_17 = 1ULL << 61, 375 AHARDWAREBUFFER_USAGE_VENDOR_18 = 1ULL << 62, 376 AHARDWAREBUFFER_USAGE_VENDOR_19 = 1ULL << 63, 377 }; 378 /** 379 * Buffer description. Used for allocating new buffers and querying 380 * parameters of existing ones. 381 */ 382 typedef struct AHardwareBuffer_Desc { 383 uint32_t width; ///< Width in pixels. 384 uint32_t height; ///< Height in pixels. 385 /** 386 * Number of images in an image array. AHardwareBuffers with one 387 * layer correspond to regular 2D textures. AHardwareBuffers with 388 * more than layer correspond to texture arrays. If the layer count 389 * is a multiple of 6 and the usage flag 390 * AHARDWAREBUFFER_USAGE_GPU_CUBE_MAP is present, the buffer is 391 * a cube map or a cube map array. 392 */ 393 uint32_t layers; 394 uint32_t format; ///< One of AHardwareBuffer_Format. 395 uint64_t usage; ///< Combination of AHardwareBuffer_UsageFlags. 396 uint32_t stride; ///< Row stride in pixels, ignored for AHardwareBuffer_allocate() 397 uint32_t rfu0; ///< Initialize to zero, reserved for future use. 398 uint64_t rfu1; ///< Initialize to zero, reserved for future use. 399 } AHardwareBuffer_Desc; 400 401 #endif // __Fuchsia__ 402 403 #define VK_GOOGLE_sized_descriptor_update_template 1 404 405 typedef void (VKAPI_PTR *PFN_vkUpdateDescriptorSetWithTemplateSizedGOOGLE)( 406 VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, 407 uint32_t imageInfoCount, 408 uint32_t bufferInfoCount, 409 uint32_t bufferViewCount, 410 const uint32_t* pImageInfoEntryIndices, 411 const uint32_t* pBufferInfoEntryIndices, 412 const uint32_t* pBufferViewEntryIndices, 413 const VkDescriptorImageInfo* pImageInfos, 414 const VkDescriptorBufferInfo* pBufferInfos, 415 const VkBufferView* pBufferViews); 416 417 #define VK_GOOGLE_async_command_buffers 1 418 419 typedef void (VKAPI_PTR *PFN_vkBeginCommandBufferAsyncGOOGLE)( 420 VkCommandBuffer commandBuffer, 421 const VkCommandBufferBeginInfo* pBeginInfo); 422 typedef void (VKAPI_PTR *PFN_vkEndCommandBufferAsyncGOOGLE)( 423 VkCommandBuffer commandBuffer); 424 typedef void (VKAPI_PTR *PFN_vkResetCommandBufferAsyncGOOGLE)( 425 VkCommandBuffer commandBuffer, 426 VkCommandBufferResetFlags flags); 427 428 #ifdef VK_USE_PLATFORM_FUCHSIA 429 #define VK_FUCHSIA_buffer_collection 1 430 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBufferCollectionFUCHSIA) 431 432 #define VK_FUCHSIA_BUFFER_COLLECTION_SPEC_VERSION 1 433 #define VK_FUCHSIA_BUFFER_COLLECTION_EXTENSION_NAME "VK_FUCHSIA_buffer_collection" 434 435 typedef struct VkBufferCollectionImageCreateInfoFUCHSIA { 436 VkStructureType sType; 437 const void* pNext; 438 VkBufferCollectionFUCHSIA collection; 439 uint32_t index; 440 } VkBufferCollectionImageCreateInfoFUCHSIA; 441 442 #define VK_STRUCTURE_TYPE_BUFFER_COLLECTION_IMAGE_CREATE_INFO_FUCHSIA \ 443 ((VkStructureType)1001004005) 444 #endif // VK_USE_PLATFORM_FUCHSIA 445 446 #ifdef VK_USE_PLATFORM_ANDROID_KHR 447 448 typedef struct VkImportMemoryZirconHandleInfoFUCHSIA { 449 VkStructureType sType; 450 const void* pNext; 451 VkExternalMemoryHandleTypeFlagBits handleType; 452 uint32_t handle; 453 } VkImportMemoryZirconHandleInfoFUCHSIA; 454 455 typedef uint32_t VkBufferCollectionFUCHSIA; 456 457 typedef struct VkImportMemoryBufferCollectionFUCHSIA { 458 VkStructureType sType; 459 const void* pNext; 460 VkBufferCollectionFUCHSIA collection; 461 uint32_t index; 462 } VkImportMemoryBufferCollectionFUCHSIA; 463 464 #define VK_STRUCTURE_TYPE_IMPORT_MEMORY_BUFFER_COLLECTION_FUCHSIA \ 465 ((VkStructureType)1001000000) 466 #define VK_STRUCTURE_TYPE_TEMP_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA \ 467 ((VkStructureType)1001000000) 468 #define VK_EXTERNAL_MEMORY_HANDLE_TYPE_TEMP_ZIRCON_VMO_BIT_FUCHSIA \ 469 ((VkStructureType)0x00000800) 470 #define VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TEMP_ZIRCON_EVENT_BIT_FUCHSIA \ 471 ((VkStructureType)0x00000020) 472 473 #endif // VK_USE_PLATFORM_ANDROID_KHR 474 475 #ifdef __cplusplus 476 } // extern "C" 477 #endif 478