diff options
| author | 3gg <3gg@shellblade.net> | 2025-12-27 12:03:39 -0800 |
|---|---|---|
| committer | 3gg <3gg@shellblade.net> | 2025-12-27 12:03:39 -0800 |
| commit | 5a079a2d114f96d4847d1ee305d5b7c16eeec50e (patch) | |
| tree | 8926ab44f168acf787d8e19608857b3af0f82758 /contrib/SDL-3.2.8/src/video/khronos/vulkan/vulkan_metal.h | |
Initial commit
Diffstat (limited to 'contrib/SDL-3.2.8/src/video/khronos/vulkan/vulkan_metal.h')
| -rw-r--r-- | contrib/SDL-3.2.8/src/video/khronos/vulkan/vulkan_metal.h | 206 |
1 files changed, 206 insertions, 0 deletions
diff --git a/contrib/SDL-3.2.8/src/video/khronos/vulkan/vulkan_metal.h b/contrib/SDL-3.2.8/src/video/khronos/vulkan/vulkan_metal.h new file mode 100644 index 0000000..4cb9c69 --- /dev/null +++ b/contrib/SDL-3.2.8/src/video/khronos/vulkan/vulkan_metal.h | |||
| @@ -0,0 +1,206 @@ | |||
| 1 | #ifndef VULKAN_METAL_H_ | ||
| 2 | #define VULKAN_METAL_H_ 1 | ||
| 3 | |||
| 4 | /* | ||
| 5 | ** Copyright 2015-2024 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 SDL_UNSAFE_UNRETAINED | ||
| 31 | #if defined(__OBJC__) && defined(__has_feature) | ||
| 32 | #if __has_feature(objc_arc) | ||
| 33 | #undef SDL_UNSAFE_UNRETAINED | ||
| 34 | #define SDL_UNSAFE_UNRETAINED __unsafe_unretained | ||
| 35 | #endif | ||
| 36 | #endif | ||
| 37 | |||
| 38 | #define VK_EXT_METAL_SURFACE_SPEC_VERSION 1 | ||
| 39 | #define VK_EXT_METAL_SURFACE_EXTENSION_NAME "VK_EXT_metal_surface" | ||
| 40 | typedef VkFlags VkMetalSurfaceCreateFlagsEXT; | ||
| 41 | typedef struct VkMetalSurfaceCreateInfoEXT { | ||
| 42 | VkStructureType sType; | ||
| 43 | const void* pNext; | ||
| 44 | VkMetalSurfaceCreateFlagsEXT flags; | ||
| 45 | const CAMetalLayer SDL_UNSAFE_UNRETAINED *pLayer; | ||
| 46 | } VkMetalSurfaceCreateInfoEXT; | ||
| 47 | |||
| 48 | typedef VkResult (VKAPI_PTR *PFN_vkCreateMetalSurfaceEXT)(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); | ||
| 49 | |||
| 50 | #ifndef VK_NO_PROTOTYPES | ||
| 51 | VKAPI_ATTR VkResult VKAPI_CALL vkCreateMetalSurfaceEXT( | ||
| 52 | VkInstance instance, | ||
| 53 | const VkMetalSurfaceCreateInfoEXT* pCreateInfo, | ||
| 54 | const VkAllocationCallbacks* pAllocator, | ||
| 55 | VkSurfaceKHR* pSurface); | ||
| 56 | #endif | ||
| 57 | |||
| 58 | |||
| 59 | // VK_EXT_metal_objects is a preprocessor guard. Do not pass it to API calls. | ||
| 60 | #define VK_EXT_metal_objects 1 | ||
| 61 | #ifdef __OBJC__ | ||
| 62 | @protocol MTLDevice; | ||
| 63 | typedef __unsafe_unretained id<MTLDevice> MTLDevice_id; | ||
| 64 | #else | ||
| 65 | typedef void* MTLDevice_id; | ||
| 66 | #endif | ||
| 67 | |||
| 68 | #ifdef __OBJC__ | ||
| 69 | @protocol MTLCommandQueue; | ||
| 70 | typedef __unsafe_unretained id<MTLCommandQueue> MTLCommandQueue_id; | ||
| 71 | #else | ||
| 72 | typedef void* MTLCommandQueue_id; | ||
| 73 | #endif | ||
| 74 | |||
| 75 | #ifdef __OBJC__ | ||
| 76 | @protocol MTLBuffer; | ||
| 77 | typedef __unsafe_unretained id<MTLBuffer> MTLBuffer_id; | ||
| 78 | #else | ||
| 79 | typedef void* MTLBuffer_id; | ||
| 80 | #endif | ||
| 81 | |||
| 82 | #ifdef __OBJC__ | ||
| 83 | @protocol MTLTexture; | ||
| 84 | typedef __unsafe_unretained id<MTLTexture> MTLTexture_id; | ||
| 85 | #else | ||
| 86 | typedef void* MTLTexture_id; | ||
| 87 | #endif | ||
| 88 | |||
| 89 | typedef struct __IOSurface* IOSurfaceRef; | ||
| 90 | #ifdef __OBJC__ | ||
| 91 | #pragma clang diagnostic push | ||
| 92 | #pragma clang diagnostic ignored "-Wunguarded-availability" | ||
| 93 | @protocol MTLSharedEvent; | ||
| 94 | typedef __unsafe_unretained id<MTLSharedEvent> MTLSharedEvent_id; | ||
| 95 | #pragma clang diagnostic pop | ||
| 96 | #else | ||
| 97 | typedef void* MTLSharedEvent_id; | ||
| 98 | #endif | ||
| 99 | |||
| 100 | #define VK_EXT_METAL_OBJECTS_SPEC_VERSION 2 | ||
| 101 | #define VK_EXT_METAL_OBJECTS_EXTENSION_NAME "VK_EXT_metal_objects" | ||
| 102 | |||
| 103 | typedef enum VkExportMetalObjectTypeFlagBitsEXT { | ||
| 104 | VK_EXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT = 0x00000001, | ||
| 105 | VK_EXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT = 0x00000002, | ||
| 106 | VK_EXPORT_METAL_OBJECT_TYPE_METAL_BUFFER_BIT_EXT = 0x00000004, | ||
| 107 | VK_EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT = 0x00000008, | ||
| 108 | VK_EXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT = 0x00000010, | ||
| 109 | VK_EXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT = 0x00000020, | ||
| 110 | VK_EXPORT_METAL_OBJECT_TYPE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF | ||
| 111 | } VkExportMetalObjectTypeFlagBitsEXT; | ||
| 112 | typedef VkFlags VkExportMetalObjectTypeFlagsEXT; | ||
| 113 | typedef struct VkExportMetalObjectCreateInfoEXT { | ||
| 114 | VkStructureType sType; | ||
| 115 | const void* pNext; | ||
| 116 | VkExportMetalObjectTypeFlagBitsEXT exportObjectType; | ||
| 117 | } VkExportMetalObjectCreateInfoEXT; | ||
| 118 | |||
| 119 | typedef struct VkExportMetalObjectsInfoEXT { | ||
| 120 | VkStructureType sType; | ||
| 121 | const void* pNext; | ||
| 122 | } VkExportMetalObjectsInfoEXT; | ||
| 123 | |||
| 124 | typedef struct VkExportMetalDeviceInfoEXT { | ||
| 125 | VkStructureType sType; | ||
| 126 | const void* pNext; | ||
| 127 | MTLDevice_id mtlDevice; | ||
| 128 | } VkExportMetalDeviceInfoEXT; | ||
| 129 | |||
| 130 | typedef struct VkExportMetalCommandQueueInfoEXT { | ||
| 131 | VkStructureType sType; | ||
| 132 | const void* pNext; | ||
| 133 | VkQueue queue; | ||
| 134 | MTLCommandQueue_id mtlCommandQueue; | ||
| 135 | } VkExportMetalCommandQueueInfoEXT; | ||
| 136 | |||
| 137 | typedef struct VkExportMetalBufferInfoEXT { | ||
| 138 | VkStructureType sType; | ||
| 139 | const void* pNext; | ||
| 140 | VkDeviceMemory memory; | ||
| 141 | MTLBuffer_id mtlBuffer; | ||
| 142 | } VkExportMetalBufferInfoEXT; | ||
| 143 | |||
| 144 | typedef struct VkImportMetalBufferInfoEXT { | ||
| 145 | VkStructureType sType; | ||
| 146 | const void* pNext; | ||
| 147 | MTLBuffer_id mtlBuffer; | ||
| 148 | } VkImportMetalBufferInfoEXT; | ||
| 149 | |||
| 150 | typedef struct VkExportMetalTextureInfoEXT { | ||
| 151 | VkStructureType sType; | ||
| 152 | const void* pNext; | ||
| 153 | VkImage image; | ||
| 154 | VkImageView imageView; | ||
| 155 | VkBufferView bufferView; | ||
| 156 | VkImageAspectFlagBits plane; | ||
| 157 | MTLTexture_id mtlTexture; | ||
| 158 | } VkExportMetalTextureInfoEXT; | ||
| 159 | |||
| 160 | typedef struct VkImportMetalTextureInfoEXT { | ||
| 161 | VkStructureType sType; | ||
| 162 | const void* pNext; | ||
| 163 | VkImageAspectFlagBits plane; | ||
| 164 | MTLTexture_id mtlTexture; | ||
| 165 | } VkImportMetalTextureInfoEXT; | ||
| 166 | |||
| 167 | typedef struct VkExportMetalIOSurfaceInfoEXT { | ||
| 168 | VkStructureType sType; | ||
| 169 | const void* pNext; | ||
| 170 | VkImage image; | ||
| 171 | IOSurfaceRef ioSurface; | ||
| 172 | } VkExportMetalIOSurfaceInfoEXT; | ||
| 173 | |||
| 174 | typedef struct VkImportMetalIOSurfaceInfoEXT { | ||
| 175 | VkStructureType sType; | ||
| 176 | const void* pNext; | ||
| 177 | IOSurfaceRef ioSurface; | ||
| 178 | } VkImportMetalIOSurfaceInfoEXT; | ||
| 179 | |||
| 180 | typedef struct VkExportMetalSharedEventInfoEXT { | ||
| 181 | VkStructureType sType; | ||
| 182 | const void* pNext; | ||
| 183 | VkSemaphore semaphore; | ||
| 184 | VkEvent event; | ||
| 185 | MTLSharedEvent_id mtlSharedEvent; | ||
| 186 | } VkExportMetalSharedEventInfoEXT; | ||
| 187 | |||
| 188 | typedef struct VkImportMetalSharedEventInfoEXT { | ||
| 189 | VkStructureType sType; | ||
| 190 | const void* pNext; | ||
| 191 | MTLSharedEvent_id mtlSharedEvent; | ||
| 192 | } VkImportMetalSharedEventInfoEXT; | ||
| 193 | |||
| 194 | typedef void (VKAPI_PTR *PFN_vkExportMetalObjectsEXT)(VkDevice device, VkExportMetalObjectsInfoEXT* pMetalObjectsInfo); | ||
| 195 | |||
| 196 | #ifndef VK_NO_PROTOTYPES | ||
| 197 | VKAPI_ATTR void VKAPI_CALL vkExportMetalObjectsEXT( | ||
| 198 | VkDevice device, | ||
| 199 | VkExportMetalObjectsInfoEXT* pMetalObjectsInfo); | ||
| 200 | #endif | ||
| 201 | |||
| 202 | #ifdef __cplusplus | ||
| 203 | } | ||
| 204 | #endif | ||
| 205 | |||
| 206 | #endif | ||
