1b8e80941Smrg#ifndef VULKAN_ANDROID_H_ 2b8e80941Smrg#define VULKAN_ANDROID_H_ 1 3b8e80941Smrg 4b8e80941Smrg#ifdef __cplusplus 5b8e80941Smrgextern "C" { 6b8e80941Smrg#endif 7b8e80941Smrg 8b8e80941Smrg/* 9b8e80941Smrg** Copyright (c) 2015-2019 The Khronos Group Inc. 10b8e80941Smrg** 11b8e80941Smrg** Licensed under the Apache License, Version 2.0 (the "License"); 12b8e80941Smrg** you may not use this file except in compliance with the License. 13b8e80941Smrg** You may obtain a copy of the License at 14b8e80941Smrg** 15b8e80941Smrg** http://www.apache.org/licenses/LICENSE-2.0 16b8e80941Smrg** 17b8e80941Smrg** Unless required by applicable law or agreed to in writing, software 18b8e80941Smrg** distributed under the License is distributed on an "AS IS" BASIS, 19b8e80941Smrg** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20b8e80941Smrg** See the License for the specific language governing permissions and 21b8e80941Smrg** limitations under the License. 22b8e80941Smrg*/ 23b8e80941Smrg 24b8e80941Smrg/* 25b8e80941Smrg** This header is generated from the Khronos Vulkan XML API Registry. 26b8e80941Smrg** 27b8e80941Smrg*/ 28b8e80941Smrg 29b8e80941Smrg 30b8e80941Smrg 31b8e80941Smrg#define VK_KHR_android_surface 1 32b8e80941Smrgstruct ANativeWindow; 33b8e80941Smrg#define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6 34b8e80941Smrg#define VK_KHR_ANDROID_SURFACE_EXTENSION_NAME "VK_KHR_android_surface" 35b8e80941Smrgtypedef VkFlags VkAndroidSurfaceCreateFlagsKHR; 36b8e80941Smrgtypedef struct VkAndroidSurfaceCreateInfoKHR { 37b8e80941Smrg VkStructureType sType; 38b8e80941Smrg const void* pNext; 39b8e80941Smrg VkAndroidSurfaceCreateFlagsKHR flags; 40b8e80941Smrg struct ANativeWindow* window; 41b8e80941Smrg} VkAndroidSurfaceCreateInfoKHR; 42b8e80941Smrg 43b8e80941Smrgtypedef VkResult (VKAPI_PTR *PFN_vkCreateAndroidSurfaceKHR)(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); 44b8e80941Smrg 45b8e80941Smrg#ifndef VK_NO_PROTOTYPES 46b8e80941SmrgVKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR( 47b8e80941Smrg VkInstance instance, 48b8e80941Smrg const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, 49b8e80941Smrg const VkAllocationCallbacks* pAllocator, 50b8e80941Smrg VkSurfaceKHR* pSurface); 51b8e80941Smrg#endif 52b8e80941Smrg 53b8e80941Smrg 54b8e80941Smrg#define VK_ANDROID_external_memory_android_hardware_buffer 1 55b8e80941Smrgstruct AHardwareBuffer; 56b8e80941Smrg#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION 3 57b8e80941Smrg#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME "VK_ANDROID_external_memory_android_hardware_buffer" 58b8e80941Smrgtypedef struct VkAndroidHardwareBufferUsageANDROID { 59b8e80941Smrg VkStructureType sType; 60b8e80941Smrg void* pNext; 61b8e80941Smrg uint64_t androidHardwareBufferUsage; 62b8e80941Smrg} VkAndroidHardwareBufferUsageANDROID; 63b8e80941Smrg 64b8e80941Smrgtypedef struct VkAndroidHardwareBufferPropertiesANDROID { 65b8e80941Smrg VkStructureType sType; 66b8e80941Smrg void* pNext; 67b8e80941Smrg VkDeviceSize allocationSize; 68b8e80941Smrg uint32_t memoryTypeBits; 69b8e80941Smrg} VkAndroidHardwareBufferPropertiesANDROID; 70b8e80941Smrg 71b8e80941Smrgtypedef struct VkAndroidHardwareBufferFormatPropertiesANDROID { 72b8e80941Smrg VkStructureType sType; 73b8e80941Smrg void* pNext; 74b8e80941Smrg VkFormat format; 75b8e80941Smrg uint64_t externalFormat; 76b8e80941Smrg VkFormatFeatureFlags formatFeatures; 77b8e80941Smrg VkComponentMapping samplerYcbcrConversionComponents; 78b8e80941Smrg VkSamplerYcbcrModelConversion suggestedYcbcrModel; 79b8e80941Smrg VkSamplerYcbcrRange suggestedYcbcrRange; 80b8e80941Smrg VkChromaLocation suggestedXChromaOffset; 81b8e80941Smrg VkChromaLocation suggestedYChromaOffset; 82b8e80941Smrg} VkAndroidHardwareBufferFormatPropertiesANDROID; 83b8e80941Smrg 84b8e80941Smrgtypedef struct VkImportAndroidHardwareBufferInfoANDROID { 85b8e80941Smrg VkStructureType sType; 86b8e80941Smrg const void* pNext; 87b8e80941Smrg struct AHardwareBuffer* buffer; 88b8e80941Smrg} VkImportAndroidHardwareBufferInfoANDROID; 89b8e80941Smrg 90b8e80941Smrgtypedef struct VkMemoryGetAndroidHardwareBufferInfoANDROID { 91b8e80941Smrg VkStructureType sType; 92b8e80941Smrg const void* pNext; 93b8e80941Smrg VkDeviceMemory memory; 94b8e80941Smrg} VkMemoryGetAndroidHardwareBufferInfoANDROID; 95b8e80941Smrg 96b8e80941Smrgtypedef struct VkExternalFormatANDROID { 97b8e80941Smrg VkStructureType sType; 98b8e80941Smrg void* pNext; 99b8e80941Smrg uint64_t externalFormat; 100b8e80941Smrg} VkExternalFormatANDROID; 101b8e80941Smrg 102b8e80941Smrgtypedef VkResult (VKAPI_PTR *PFN_vkGetAndroidHardwareBufferPropertiesANDROID)(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties); 103b8e80941Smrgtypedef VkResult (VKAPI_PTR *PFN_vkGetMemoryAndroidHardwareBufferANDROID)(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer); 104b8e80941Smrg 105b8e80941Smrg#ifndef VK_NO_PROTOTYPES 106b8e80941SmrgVKAPI_ATTR VkResult VKAPI_CALL vkGetAndroidHardwareBufferPropertiesANDROID( 107b8e80941Smrg VkDevice device, 108b8e80941Smrg const struct AHardwareBuffer* buffer, 109b8e80941Smrg VkAndroidHardwareBufferPropertiesANDROID* pProperties); 110b8e80941Smrg 111b8e80941SmrgVKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryAndroidHardwareBufferANDROID( 112b8e80941Smrg VkDevice device, 113b8e80941Smrg const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, 114b8e80941Smrg struct AHardwareBuffer** pBuffer); 115b8e80941Smrg#endif 116b8e80941Smrg 117b8e80941Smrg#ifdef __cplusplus 118b8e80941Smrg} 119b8e80941Smrg#endif 120b8e80941Smrg 121b8e80941Smrg#endif 122