• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef VULKAN_FUCHSIA_H_
2 #define VULKAN_FUCHSIA_H_ 1
3 
4 /*
5 ** Copyright 2015-2022 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 typedef VkFlags VkImageFormatConstraintsFlagsFUCHSIA;
123 
124 typedef enum VkImageConstraintsInfoFlagBitsFUCHSIA {
125     VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_RARELY_FUCHSIA = 0x00000001,
126     VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_OFTEN_FUCHSIA = 0x00000002,
127     VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_RARELY_FUCHSIA = 0x00000004,
128     VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_OFTEN_FUCHSIA = 0x00000008,
129     VK_IMAGE_CONSTRAINTS_INFO_PROTECTED_OPTIONAL_FUCHSIA = 0x00000010,
130     VK_IMAGE_CONSTRAINTS_INFO_FLAG_BITS_MAX_ENUM_FUCHSIA = 0x7FFFFFFF
131 } VkImageConstraintsInfoFlagBitsFUCHSIA;
132 typedef VkFlags VkImageConstraintsInfoFlagsFUCHSIA;
133 typedef struct VkBufferCollectionCreateInfoFUCHSIA {
134     VkStructureType    sType;
135     const void*        pNext;
136     zx_handle_t        collectionToken;
137 } VkBufferCollectionCreateInfoFUCHSIA;
138 
139 typedef struct VkImportMemoryBufferCollectionFUCHSIA {
140     VkStructureType              sType;
141     const void*                  pNext;
142     VkBufferCollectionFUCHSIA    collection;
143     uint32_t                     index;
144 } VkImportMemoryBufferCollectionFUCHSIA;
145 
146 typedef struct VkBufferCollectionImageCreateInfoFUCHSIA {
147     VkStructureType              sType;
148     const void*                  pNext;
149     VkBufferCollectionFUCHSIA    collection;
150     uint32_t                     index;
151 } VkBufferCollectionImageCreateInfoFUCHSIA;
152 
153 typedef struct VkBufferCollectionConstraintsInfoFUCHSIA {
154     VkStructureType    sType;
155     const void*        pNext;
156     uint32_t           minBufferCount;
157     uint32_t           maxBufferCount;
158     uint32_t           minBufferCountForCamping;
159     uint32_t           minBufferCountForDedicatedSlack;
160     uint32_t           minBufferCountForSharedSlack;
161 } VkBufferCollectionConstraintsInfoFUCHSIA;
162 
163 typedef struct VkBufferConstraintsInfoFUCHSIA {
164     VkStructureType                             sType;
165     const void*                                 pNext;
166     VkBufferCreateInfo                          createInfo;
167     VkFormatFeatureFlags                        requiredFormatFeatures;
168     VkBufferCollectionConstraintsInfoFUCHSIA    bufferCollectionConstraints;
169 } VkBufferConstraintsInfoFUCHSIA;
170 
171 typedef struct VkBufferCollectionBufferCreateInfoFUCHSIA {
172     VkStructureType              sType;
173     const void*                  pNext;
174     VkBufferCollectionFUCHSIA    collection;
175     uint32_t                     index;
176 } VkBufferCollectionBufferCreateInfoFUCHSIA;
177 
178 typedef struct VkSysmemColorSpaceFUCHSIA {
179     VkStructureType    sType;
180     const void*        pNext;
181     uint32_t           colorSpace;
182 } VkSysmemColorSpaceFUCHSIA;
183 
184 typedef struct VkBufferCollectionPropertiesFUCHSIA {
185     VkStructureType                  sType;
186     void*                            pNext;
187     uint32_t                         memoryTypeBits;
188     uint32_t                         bufferCount;
189     uint32_t                         createInfoIndex;
190     uint64_t                         sysmemPixelFormat;
191     VkFormatFeatureFlags             formatFeatures;
192     VkSysmemColorSpaceFUCHSIA        sysmemColorSpaceIndex;
193     VkComponentMapping               samplerYcbcrConversionComponents;
194     VkSamplerYcbcrModelConversion    suggestedYcbcrModel;
195     VkSamplerYcbcrRange              suggestedYcbcrRange;
196     VkChromaLocation                 suggestedXChromaOffset;
197     VkChromaLocation                 suggestedYChromaOffset;
198 } VkBufferCollectionPropertiesFUCHSIA;
199 
200 typedef struct VkImageFormatConstraintsInfoFUCHSIA {
201     VkStructureType                         sType;
202     const void*                             pNext;
203     VkImageCreateInfo                       imageCreateInfo;
204     VkFormatFeatureFlags                    requiredFormatFeatures;
205     VkImageFormatConstraintsFlagsFUCHSIA    flags;
206     uint64_t                                sysmemPixelFormat;
207     uint32_t                                colorSpaceCount;
208     const VkSysmemColorSpaceFUCHSIA*        pColorSpaces;
209 } VkImageFormatConstraintsInfoFUCHSIA;
210 
211 typedef struct VkImageConstraintsInfoFUCHSIA {
212     VkStructureType                               sType;
213     const void*                                   pNext;
214     uint32_t                                      formatConstraintsCount;
215     const VkImageFormatConstraintsInfoFUCHSIA*    pFormatConstraints;
216     VkBufferCollectionConstraintsInfoFUCHSIA      bufferCollectionConstraints;
217     VkImageConstraintsInfoFlagsFUCHSIA            flags;
218 } VkImageConstraintsInfoFUCHSIA;
219 
220 typedef VkResult (VKAPI_PTR *PFN_vkCreateBufferCollectionFUCHSIA)(VkDevice device, const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBufferCollectionFUCHSIA* pCollection);
221 typedef VkResult (VKAPI_PTR *PFN_vkSetBufferCollectionImageConstraintsFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo);
222 typedef VkResult (VKAPI_PTR *PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo);
223 typedef void (VKAPI_PTR *PFN_vkDestroyBufferCollectionFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkAllocationCallbacks* pAllocator);
224 typedef VkResult (VKAPI_PTR *PFN_vkGetBufferCollectionPropertiesFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, VkBufferCollectionPropertiesFUCHSIA* pProperties);
225 
226 #ifndef VK_NO_PROTOTYPES
227 VKAPI_ATTR VkResult VKAPI_CALL vkCreateBufferCollectionFUCHSIA(
228     VkDevice                                    device,
229     const VkBufferCollectionCreateInfoFUCHSIA*  pCreateInfo,
230     const VkAllocationCallbacks*                pAllocator,
231     VkBufferCollectionFUCHSIA*                  pCollection);
232 
233 VKAPI_ATTR VkResult VKAPI_CALL vkSetBufferCollectionImageConstraintsFUCHSIA(
234     VkDevice                                    device,
235     VkBufferCollectionFUCHSIA                   collection,
236     const VkImageConstraintsInfoFUCHSIA*        pImageConstraintsInfo);
237 
238 VKAPI_ATTR VkResult VKAPI_CALL vkSetBufferCollectionBufferConstraintsFUCHSIA(
239     VkDevice                                    device,
240     VkBufferCollectionFUCHSIA                   collection,
241     const VkBufferConstraintsInfoFUCHSIA*       pBufferConstraintsInfo);
242 
243 VKAPI_ATTR void VKAPI_CALL vkDestroyBufferCollectionFUCHSIA(
244     VkDevice                                    device,
245     VkBufferCollectionFUCHSIA                   collection,
246     const VkAllocationCallbacks*                pAllocator);
247 
248 VKAPI_ATTR VkResult VKAPI_CALL vkGetBufferCollectionPropertiesFUCHSIA(
249     VkDevice                                    device,
250     VkBufferCollectionFUCHSIA                   collection,
251     VkBufferCollectionPropertiesFUCHSIA*        pProperties);
252 #endif
253 
254 #ifdef __cplusplus
255 }
256 #endif
257 
258 #endif
259