|
| 1 | +#ifndef VULKAN_METAL_H_ |
| 2 | +#define VULKAN_METAL_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_EXT_metal_surface 1 |
| 23 | +#ifdef __OBJC__ |
| 24 | +@class CAMetalLayer; |
| 25 | +#else |
| 26 | +typedef void CAMetalLayer; |
| 27 | +#endif |
| 28 | + |
| 29 | +#define VK_EXT_METAL_SURFACE_SPEC_VERSION 1 |
| 30 | +#define VK_EXT_METAL_SURFACE_EXTENSION_NAME "VK_EXT_metal_surface" |
| 31 | +typedef VkFlags VkMetalSurfaceCreateFlagsEXT; |
| 32 | +typedef struct VkMetalSurfaceCreateInfoEXT { |
| 33 | + VkStructureType sType; |
| 34 | + const void* pNext; |
| 35 | + VkMetalSurfaceCreateFlagsEXT flags; |
| 36 | + const CAMetalLayer* pLayer; |
| 37 | +} VkMetalSurfaceCreateInfoEXT; |
| 38 | + |
| 39 | +typedef VkResult (VKAPI_PTR *PFN_vkCreateMetalSurfaceEXT)(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); |
| 40 | + |
| 41 | +#ifndef VK_NO_PROTOTYPES |
| 42 | +VKAPI_ATTR VkResult VKAPI_CALL vkCreateMetalSurfaceEXT( |
| 43 | + VkInstance instance, |
| 44 | + const VkMetalSurfaceCreateInfoEXT* pCreateInfo, |
| 45 | + const VkAllocationCallbacks* pAllocator, |
| 46 | + VkSurfaceKHR* pSurface); |
| 47 | +#endif |
| 48 | + |
| 49 | + |
| 50 | +#define VK_EXT_metal_objects 1 |
| 51 | +#ifdef __OBJC__ |
| 52 | +@protocol MTLDevice; |
| 53 | +typedef id<MTLDevice> MTLDevice_id; |
| 54 | +#else |
| 55 | +typedef void* MTLDevice_id; |
| 56 | +#endif |
| 57 | + |
| 58 | +#ifdef __OBJC__ |
| 59 | +@protocol MTLCommandQueue; |
| 60 | +typedef id<MTLCommandQueue> MTLCommandQueue_id; |
| 61 | +#else |
| 62 | +typedef void* MTLCommandQueue_id; |
| 63 | +#endif |
| 64 | + |
| 65 | +#ifdef __OBJC__ |
| 66 | +@protocol MTLBuffer; |
| 67 | +typedef id<MTLBuffer> MTLBuffer_id; |
| 68 | +#else |
| 69 | +typedef void* MTLBuffer_id; |
| 70 | +#endif |
| 71 | + |
| 72 | +#ifdef __OBJC__ |
| 73 | +@protocol MTLTexture; |
| 74 | +typedef id<MTLTexture> MTLTexture_id; |
| 75 | +#else |
| 76 | +typedef void* MTLTexture_id; |
| 77 | +#endif |
| 78 | + |
| 79 | +typedef struct __IOSurface* IOSurfaceRef; |
| 80 | +#ifdef __OBJC__ |
| 81 | +@protocol MTLSharedEvent; |
| 82 | +typedef id<MTLSharedEvent> MTLSharedEvent_id; |
| 83 | +#else |
| 84 | +typedef void* MTLSharedEvent_id; |
| 85 | +#endif |
| 86 | + |
| 87 | +#define VK_EXT_METAL_OBJECTS_SPEC_VERSION 1 |
| 88 | +#define VK_EXT_METAL_OBJECTS_EXTENSION_NAME "VK_EXT_metal_objects" |
| 89 | + |
| 90 | +typedef enum VkExportMetalObjectTypeFlagBitsEXT { |
| 91 | + VK_EXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT = 0x00000001, |
| 92 | + VK_EXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT = 0x00000002, |
| 93 | + VK_EXPORT_METAL_OBJECT_TYPE_METAL_BUFFER_BIT_EXT = 0x00000004, |
| 94 | + VK_EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT = 0x00000008, |
| 95 | + VK_EXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT = 0x00000010, |
| 96 | + VK_EXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT = 0x00000020, |
| 97 | + VK_EXPORT_METAL_OBJECT_TYPE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF |
| 98 | +} VkExportMetalObjectTypeFlagBitsEXT; |
| 99 | +typedef VkFlags VkExportMetalObjectTypeFlagsEXT; |
| 100 | +typedef struct VkExportMetalObjectCreateInfoEXT { |
| 101 | + VkStructureType sType; |
| 102 | + const void* pNext; |
| 103 | + VkExportMetalObjectTypeFlagBitsEXT exportObjectType; |
| 104 | +} VkExportMetalObjectCreateInfoEXT; |
| 105 | + |
| 106 | +typedef struct VkExportMetalObjectsInfoEXT { |
| 107 | + VkStructureType sType; |
| 108 | + const void* pNext; |
| 109 | +} VkExportMetalObjectsInfoEXT; |
| 110 | + |
| 111 | +typedef struct VkExportMetalDeviceInfoEXT { |
| 112 | + VkStructureType sType; |
| 113 | + const void* pNext; |
| 114 | + MTLDevice_id mtlDevice; |
| 115 | +} VkExportMetalDeviceInfoEXT; |
| 116 | + |
| 117 | +typedef struct VkExportMetalCommandQueueInfoEXT { |
| 118 | + VkStructureType sType; |
| 119 | + const void* pNext; |
| 120 | + VkQueue queue; |
| 121 | + MTLCommandQueue_id mtlCommandQueue; |
| 122 | +} VkExportMetalCommandQueueInfoEXT; |
| 123 | + |
| 124 | +typedef struct VkExportMetalBufferInfoEXT { |
| 125 | + VkStructureType sType; |
| 126 | + const void* pNext; |
| 127 | + VkDeviceMemory memory; |
| 128 | + MTLBuffer_id mtlBuffer; |
| 129 | +} VkExportMetalBufferInfoEXT; |
| 130 | + |
| 131 | +typedef struct VkImportMetalBufferInfoEXT { |
| 132 | + VkStructureType sType; |
| 133 | + const void* pNext; |
| 134 | + MTLBuffer_id mtlBuffer; |
| 135 | +} VkImportMetalBufferInfoEXT; |
| 136 | + |
| 137 | +typedef struct VkExportMetalTextureInfoEXT { |
| 138 | + VkStructureType sType; |
| 139 | + const void* pNext; |
| 140 | + VkImage image; |
| 141 | + VkImageView imageView; |
| 142 | + VkBufferView bufferView; |
| 143 | + VkImageAspectFlagBits plane; |
| 144 | + MTLTexture_id mtlTexture; |
| 145 | +} VkExportMetalTextureInfoEXT; |
| 146 | + |
| 147 | +typedef struct VkImportMetalTextureInfoEXT { |
| 148 | + VkStructureType sType; |
| 149 | + const void* pNext; |
| 150 | + VkImageAspectFlagBits plane; |
| 151 | + MTLTexture_id mtlTexture; |
| 152 | +} VkImportMetalTextureInfoEXT; |
| 153 | + |
| 154 | +typedef struct VkExportMetalIOSurfaceInfoEXT { |
| 155 | + VkStructureType sType; |
| 156 | + const void* pNext; |
| 157 | + VkImage image; |
| 158 | + IOSurfaceRef ioSurface; |
| 159 | +} VkExportMetalIOSurfaceInfoEXT; |
| 160 | + |
| 161 | +typedef struct VkImportMetalIOSurfaceInfoEXT { |
| 162 | + VkStructureType sType; |
| 163 | + const void* pNext; |
| 164 | + IOSurfaceRef ioSurface; |
| 165 | +} VkImportMetalIOSurfaceInfoEXT; |
| 166 | + |
| 167 | +typedef struct VkExportMetalSharedEventInfoEXT { |
| 168 | + VkStructureType sType; |
| 169 | + const void* pNext; |
| 170 | + VkSemaphore semaphore; |
| 171 | + VkEvent event; |
| 172 | + MTLSharedEvent_id mtlSharedEvent; |
| 173 | +} VkExportMetalSharedEventInfoEXT; |
| 174 | + |
| 175 | +typedef struct VkImportMetalSharedEventInfoEXT { |
| 176 | + VkStructureType sType; |
| 177 | + const void* pNext; |
| 178 | + MTLSharedEvent_id mtlSharedEvent; |
| 179 | +} VkImportMetalSharedEventInfoEXT; |
| 180 | + |
| 181 | +typedef void (VKAPI_PTR *PFN_vkExportMetalObjectsEXT)(VkDevice device, VkExportMetalObjectsInfoEXT* pMetalObjectsInfo); |
| 182 | + |
| 183 | +#ifndef VK_NO_PROTOTYPES |
| 184 | +VKAPI_ATTR void VKAPI_CALL vkExportMetalObjectsEXT( |
| 185 | + VkDevice device, |
| 186 | + VkExportMetalObjectsInfoEXT* pMetalObjectsInfo); |
| 187 | +#endif |
| 188 | + |
| 189 | +#ifdef __cplusplus |
| 190 | +} |
| 191 | +#endif |
| 192 | + |
| 193 | +#endif |
0 commit comments