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