1 #ifndef VULKAN_ANDROID_H_
2 #define VULKAN_ANDROID_H_ 1
5 ** Copyright (c) 2015-2019 The Khronos Group Inc.
7 ** Licensed under the Apache License, Version 2.0 (the "License");
8 ** you may not use this file except in compliance with the License.
9 ** You may obtain a copy of the License at
11 ** http://www.apache.org/licenses/LICENSE-2.0
13 ** Unless required by applicable law or agreed to in writing, software
14 ** distributed under the License is distributed on an "AS IS" BASIS,
15 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 ** See the License for the specific language governing permissions and
17 ** limitations under the License.
21 ** This header is generated from the Khronos Vulkan XML API Registry.
32 #define VK_KHR_android_surface 1
34 #define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6
35 #define VK_KHR_ANDROID_SURFACE_EXTENSION_NAME "VK_KHR_android_surface"
36 typedef VkFlags VkAndroidSurfaceCreateFlagsKHR
;
37 typedef struct VkAndroidSurfaceCreateInfoKHR
{
38 VkStructureType sType
;
40 VkAndroidSurfaceCreateFlagsKHR flags
;
41 struct ANativeWindow
* window
;
42 } VkAndroidSurfaceCreateInfoKHR
;
44 typedef VkResult (VKAPI_PTR
*PFN_vkCreateAndroidSurfaceKHR
)(VkInstance instance
, const VkAndroidSurfaceCreateInfoKHR
* pCreateInfo
, const VkAllocationCallbacks
* pAllocator
, VkSurfaceKHR
* pSurface
);
46 #ifndef VK_NO_PROTOTYPES
47 VKAPI_ATTR VkResult VKAPI_CALL
vkCreateAndroidSurfaceKHR(
49 const VkAndroidSurfaceCreateInfoKHR
* pCreateInfo
,
50 const VkAllocationCallbacks
* pAllocator
,
51 VkSurfaceKHR
* pSurface
);
55 #define VK_ANDROID_external_memory_android_hardware_buffer 1
56 struct AHardwareBuffer
;
57 #define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION 3
58 #define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME "VK_ANDROID_external_memory_android_hardware_buffer"
59 typedef struct VkAndroidHardwareBufferUsageANDROID
{
60 VkStructureType sType
;
62 uint64_t androidHardwareBufferUsage
;
63 } VkAndroidHardwareBufferUsageANDROID
;
65 typedef struct VkAndroidHardwareBufferPropertiesANDROID
{
66 VkStructureType sType
;
68 VkDeviceSize allocationSize
;
69 uint32_t memoryTypeBits
;
70 } VkAndroidHardwareBufferPropertiesANDROID
;
72 typedef struct VkAndroidHardwareBufferFormatPropertiesANDROID
{
73 VkStructureType sType
;
76 uint64_t externalFormat
;
77 VkFormatFeatureFlags formatFeatures
;
78 VkComponentMapping samplerYcbcrConversionComponents
;
79 VkSamplerYcbcrModelConversion suggestedYcbcrModel
;
80 VkSamplerYcbcrRange suggestedYcbcrRange
;
81 VkChromaLocation suggestedXChromaOffset
;
82 VkChromaLocation suggestedYChromaOffset
;
83 } VkAndroidHardwareBufferFormatPropertiesANDROID
;
85 typedef struct VkImportAndroidHardwareBufferInfoANDROID
{
86 VkStructureType sType
;
88 struct AHardwareBuffer
* buffer
;
89 } VkImportAndroidHardwareBufferInfoANDROID
;
91 typedef struct VkMemoryGetAndroidHardwareBufferInfoANDROID
{
92 VkStructureType sType
;
94 VkDeviceMemory memory
;
95 } VkMemoryGetAndroidHardwareBufferInfoANDROID
;
97 typedef struct VkExternalFormatANDROID
{
98 VkStructureType sType
;
100 uint64_t externalFormat
;
101 } VkExternalFormatANDROID
;
103 typedef VkResult (VKAPI_PTR
*PFN_vkGetAndroidHardwareBufferPropertiesANDROID
)(VkDevice device
, const struct AHardwareBuffer
* buffer
, VkAndroidHardwareBufferPropertiesANDROID
* pProperties
);
104 typedef VkResult (VKAPI_PTR
*PFN_vkGetMemoryAndroidHardwareBufferANDROID
)(VkDevice device
, const VkMemoryGetAndroidHardwareBufferInfoANDROID
* pInfo
, struct AHardwareBuffer
** pBuffer
);
106 #ifndef VK_NO_PROTOTYPES
107 VKAPI_ATTR VkResult VKAPI_CALL
vkGetAndroidHardwareBufferPropertiesANDROID(
109 const struct AHardwareBuffer
* buffer
,
110 VkAndroidHardwareBufferPropertiesANDROID
* pProperties
);
112 VKAPI_ATTR VkResult VKAPI_CALL
vkGetMemoryAndroidHardwareBufferANDROID(
114 const VkMemoryGetAndroidHardwareBufferInfoANDROID
* pInfo
,
115 struct AHardwareBuffer
** pBuffer
);