comparison fuhtark_test/Vulkan-Headers-1.4.334/include/vulkan/vulkan_metal.h @ 1501:f40d9d814c08 default tip

did: correct vulkan-api generator
author sam <sam@basx.dev>
date Wed, 26 Nov 2025 23:34:29 +0700
parents
children
comparison
equal deleted inserted replaced
1500:91c8c3b7cbf0 1501:f40d9d814c08
1 #ifndef VULKAN_METAL_H_
2 #define VULKAN_METAL_H_ 1
3
4 /*
5 ** Copyright 2015-2025 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 // VK_EXT_metal_surface is a preprocessor guard. Do not pass it to API calls.
23 #define VK_EXT_metal_surface 1
24 #ifdef __OBJC__
25 @class CAMetalLayer;
26 #else
27 typedef void CAMetalLayer;
28 #endif
29
30 #define VK_EXT_METAL_SURFACE_SPEC_VERSION 1
31 #define VK_EXT_METAL_SURFACE_EXTENSION_NAME "VK_EXT_metal_surface"
32 typedef VkFlags VkMetalSurfaceCreateFlagsEXT;
33 typedef struct VkMetalSurfaceCreateInfoEXT {
34 VkStructureType sType;
35 const void* pNext;
36 VkMetalSurfaceCreateFlagsEXT flags;
37 const CAMetalLayer* pLayer;
38 } VkMetalSurfaceCreateInfoEXT;
39
40 typedef VkResult (VKAPI_PTR *PFN_vkCreateMetalSurfaceEXT)(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
41
42 #ifndef VK_NO_PROTOTYPES
43 #ifndef VK_ONLY_EXPORTED_PROTOTYPES
44 VKAPI_ATTR VkResult VKAPI_CALL vkCreateMetalSurfaceEXT(
45 VkInstance instance,
46 const VkMetalSurfaceCreateInfoEXT* pCreateInfo,
47 const VkAllocationCallbacks* pAllocator,
48 VkSurfaceKHR* pSurface);
49 #endif
50 #endif
51
52
53 // VK_EXT_metal_objects is a preprocessor guard. Do not pass it to API calls.
54 #define VK_EXT_metal_objects 1
55 #ifdef __OBJC__
56 @protocol MTLDevice;
57 typedef __unsafe_unretained id<MTLDevice> MTLDevice_id;
58 #else
59 typedef void* MTLDevice_id;
60 #endif
61
62 #ifdef __OBJC__
63 @protocol MTLCommandQueue;
64 typedef __unsafe_unretained id<MTLCommandQueue> MTLCommandQueue_id;
65 #else
66 typedef void* MTLCommandQueue_id;
67 #endif
68
69 #ifdef __OBJC__
70 @protocol MTLBuffer;
71 typedef __unsafe_unretained id<MTLBuffer> MTLBuffer_id;
72 #else
73 typedef void* MTLBuffer_id;
74 #endif
75
76 #ifdef __OBJC__
77 @protocol MTLTexture;
78 typedef __unsafe_unretained id<MTLTexture> MTLTexture_id;
79 #else
80 typedef void* MTLTexture_id;
81 #endif
82
83 typedef struct __IOSurface* IOSurfaceRef;
84 #ifdef __OBJC__
85 @protocol MTLSharedEvent;
86 typedef __unsafe_unretained id<MTLSharedEvent> MTLSharedEvent_id;
87 #else
88 typedef void* MTLSharedEvent_id;
89 #endif
90
91 #define VK_EXT_METAL_OBJECTS_SPEC_VERSION 2
92 #define VK_EXT_METAL_OBJECTS_EXTENSION_NAME "VK_EXT_metal_objects"
93
94 typedef enum VkExportMetalObjectTypeFlagBitsEXT {
95 VK_EXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT = 0x00000001,
96 VK_EXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT = 0x00000002,
97 VK_EXPORT_METAL_OBJECT_TYPE_METAL_BUFFER_BIT_EXT = 0x00000004,
98 VK_EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT = 0x00000008,
99 VK_EXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT = 0x00000010,
100 VK_EXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT = 0x00000020,
101 VK_EXPORT_METAL_OBJECT_TYPE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
102 } VkExportMetalObjectTypeFlagBitsEXT;
103 typedef VkFlags VkExportMetalObjectTypeFlagsEXT;
104 typedef struct VkExportMetalObjectCreateInfoEXT {
105 VkStructureType sType;
106 const void* pNext;
107 VkExportMetalObjectTypeFlagBitsEXT exportObjectType;
108 } VkExportMetalObjectCreateInfoEXT;
109
110 typedef struct VkExportMetalObjectsInfoEXT {
111 VkStructureType sType;
112 const void* pNext;
113 } VkExportMetalObjectsInfoEXT;
114
115 typedef struct VkExportMetalDeviceInfoEXT {
116 VkStructureType sType;
117 const void* pNext;
118 MTLDevice_id mtlDevice;
119 } VkExportMetalDeviceInfoEXT;
120
121 typedef struct VkExportMetalCommandQueueInfoEXT {
122 VkStructureType sType;
123 const void* pNext;
124 VkQueue queue;
125 MTLCommandQueue_id mtlCommandQueue;
126 } VkExportMetalCommandQueueInfoEXT;
127
128 typedef struct VkExportMetalBufferInfoEXT {
129 VkStructureType sType;
130 const void* pNext;
131 VkDeviceMemory memory;
132 MTLBuffer_id mtlBuffer;
133 } VkExportMetalBufferInfoEXT;
134
135 typedef struct VkImportMetalBufferInfoEXT {
136 VkStructureType sType;
137 const void* pNext;
138 MTLBuffer_id mtlBuffer;
139 } VkImportMetalBufferInfoEXT;
140
141 typedef struct VkExportMetalTextureInfoEXT {
142 VkStructureType sType;
143 const void* pNext;
144 VkImage image;
145 VkImageView imageView;
146 VkBufferView bufferView;
147 VkImageAspectFlagBits plane;
148 MTLTexture_id mtlTexture;
149 } VkExportMetalTextureInfoEXT;
150
151 typedef struct VkImportMetalTextureInfoEXT {
152 VkStructureType sType;
153 const void* pNext;
154 VkImageAspectFlagBits plane;
155 MTLTexture_id mtlTexture;
156 } VkImportMetalTextureInfoEXT;
157
158 typedef struct VkExportMetalIOSurfaceInfoEXT {
159 VkStructureType sType;
160 const void* pNext;
161 VkImage image;
162 IOSurfaceRef ioSurface;
163 } VkExportMetalIOSurfaceInfoEXT;
164
165 typedef struct VkImportMetalIOSurfaceInfoEXT {
166 VkStructureType sType;
167 const void* pNext;
168 IOSurfaceRef ioSurface;
169 } VkImportMetalIOSurfaceInfoEXT;
170
171 typedef struct VkExportMetalSharedEventInfoEXT {
172 VkStructureType sType;
173 const void* pNext;
174 VkSemaphore semaphore;
175 VkEvent event;
176 MTLSharedEvent_id mtlSharedEvent;
177 } VkExportMetalSharedEventInfoEXT;
178
179 typedef struct VkImportMetalSharedEventInfoEXT {
180 VkStructureType sType;
181 const void* pNext;
182 MTLSharedEvent_id mtlSharedEvent;
183 } VkImportMetalSharedEventInfoEXT;
184
185 typedef void (VKAPI_PTR *PFN_vkExportMetalObjectsEXT)(VkDevice device, VkExportMetalObjectsInfoEXT* pMetalObjectsInfo);
186
187 #ifndef VK_NO_PROTOTYPES
188 #ifndef VK_ONLY_EXPORTED_PROTOTYPES
189 VKAPI_ATTR void VKAPI_CALL vkExportMetalObjectsEXT(
190 VkDevice device,
191 VkExportMetalObjectsInfoEXT* pMetalObjectsInfo);
192 #endif
193 #endif
194
195
196 // VK_EXT_external_memory_metal is a preprocessor guard. Do not pass it to API calls.
197 #define VK_EXT_external_memory_metal 1
198 #define VK_EXT_EXTERNAL_MEMORY_METAL_SPEC_VERSION 1
199 #define VK_EXT_EXTERNAL_MEMORY_METAL_EXTENSION_NAME "VK_EXT_external_memory_metal"
200 typedef struct VkImportMemoryMetalHandleInfoEXT {
201 VkStructureType sType;
202 const void* pNext;
203 VkExternalMemoryHandleTypeFlagBits handleType;
204 void* handle;
205 } VkImportMemoryMetalHandleInfoEXT;
206
207 typedef struct VkMemoryMetalHandlePropertiesEXT {
208 VkStructureType sType;
209 void* pNext;
210 uint32_t memoryTypeBits;
211 } VkMemoryMetalHandlePropertiesEXT;
212
213 typedef struct VkMemoryGetMetalHandleInfoEXT {
214 VkStructureType sType;
215 const void* pNext;
216 VkDeviceMemory memory;
217 VkExternalMemoryHandleTypeFlagBits handleType;
218 } VkMemoryGetMetalHandleInfoEXT;
219
220 typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryMetalHandleEXT)(VkDevice device, const VkMemoryGetMetalHandleInfoEXT* pGetMetalHandleInfo, void** pHandle);
221 typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryMetalHandlePropertiesEXT)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, const void* pHandle, VkMemoryMetalHandlePropertiesEXT* pMemoryMetalHandleProperties);
222
223 #ifndef VK_NO_PROTOTYPES
224 #ifndef VK_ONLY_EXPORTED_PROTOTYPES
225 VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryMetalHandleEXT(
226 VkDevice device,
227 const VkMemoryGetMetalHandleInfoEXT* pGetMetalHandleInfo,
228 void** pHandle);
229 #endif
230
231 #ifndef VK_ONLY_EXPORTED_PROTOTYPES
232 VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryMetalHandlePropertiesEXT(
233 VkDevice device,
234 VkExternalMemoryHandleTypeFlagBits handleType,
235 const void* pHandle,
236 VkMemoryMetalHandlePropertiesEXT* pMemoryMetalHandleProperties);
237 #endif
238 #endif
239
240 #ifdef __cplusplus
241 }
242 #endif
243
244 #endif