Atlas - vulkan_metal.h
Home / ext / SDL / src / video / khronos / vulkan Lines: 1 | Size: 6236 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)][FILE BEGIN]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 17extern "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 27typedef 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" 40typedef VkFlags VkMetalSurfaceCreateFlagsEXT; 41typedef struct VkMetalSurfaceCreateInfoEXT { 42 VkStructureType sType; 43 const void* pNext; 44 VkMetalSurfaceCreateFlagsEXT flags; 45 const CAMetalLayer SDL_UNSAFE_UNRETAINED *pLayer; 46} VkMetalSurfaceCreateInfoEXT; 47 48typedef VkResult (VKAPI_PTR *PFN_vkCreateMetalSurfaceEXT)(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); 49 50#ifndef VK_NO_PROTOTYPES 51VKAPI_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; 63typedef __unsafe_unretained id<MTLDevice> MTLDevice_id; 64#else 65typedef void* MTLDevice_id; 66#endif 67 68#ifdef __OBJC__ 69@protocol MTLCommandQueue; 70typedef __unsafe_unretained id<MTLCommandQueue> MTLCommandQueue_id; 71#else 72typedef void* MTLCommandQueue_id; 73#endif 74 75#ifdef __OBJC__ 76@protocol MTLBuffer; 77typedef __unsafe_unretained id<MTLBuffer> MTLBuffer_id; 78#else 79typedef void* MTLBuffer_id; 80#endif 81 82#ifdef __OBJC__ 83@protocol MTLTexture; 84typedef __unsafe_unretained id<MTLTexture> MTLTexture_id; 85#else 86typedef void* MTLTexture_id; 87#endif 88 89typedef struct __IOSurface* IOSurfaceRef; 90#ifdef __OBJC__ 91#pragma clang diagnostic push 92#pragma clang diagnostic ignored "-Wunguarded-availability" 93@protocol MTLSharedEvent; 94typedef __unsafe_unretained id<MTLSharedEvent> MTLSharedEvent_id; 95#pragma clang diagnostic pop 96#else 97typedef 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 103typedef 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; 112typedef VkFlags VkExportMetalObjectTypeFlagsEXT; 113typedef struct VkExportMetalObjectCreateInfoEXT { 114 VkStructureType sType; 115 const void* pNext; 116 VkExportMetalObjectTypeFlagBitsEXT exportObjectType; 117} VkExportMetalObjectCreateInfoEXT; 118 119typedef struct VkExportMetalObjectsInfoEXT { 120 VkStructureType sType; 121 const void* pNext; 122} VkExportMetalObjectsInfoEXT; 123 124typedef struct VkExportMetalDeviceInfoEXT { 125 VkStructureType sType; 126 const void* pNext; 127 MTLDevice_id mtlDevice; 128} VkExportMetalDeviceInfoEXT; 129 130typedef struct VkExportMetalCommandQueueInfoEXT { 131 VkStructureType sType; 132 const void* pNext; 133 VkQueue queue; 134 MTLCommandQueue_id mtlCommandQueue; 135} VkExportMetalCommandQueueInfoEXT; 136 137typedef struct VkExportMetalBufferInfoEXT { 138 VkStructureType sType; 139 const void* pNext; 140 VkDeviceMemory memory; 141 MTLBuffer_id mtlBuffer; 142} VkExportMetalBufferInfoEXT; 143 144typedef struct VkImportMetalBufferInfoEXT { 145 VkStructureType sType; 146 const void* pNext; 147 MTLBuffer_id mtlBuffer; 148} VkImportMetalBufferInfoEXT; 149 150typedef 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 160typedef struct VkImportMetalTextureInfoEXT { 161 VkStructureType sType; 162 const void* pNext; 163 VkImageAspectFlagBits plane; 164 MTLTexture_id mtlTexture; 165} VkImportMetalTextureInfoEXT; 166 167typedef struct VkExportMetalIOSurfaceInfoEXT { 168 VkStructureType sType; 169 const void* pNext; 170 VkImage image; 171 IOSurfaceRef ioSurface; 172} VkExportMetalIOSurfaceInfoEXT; 173 174typedef struct VkImportMetalIOSurfaceInfoEXT { 175 VkStructureType sType; 176 const void* pNext; 177 IOSurfaceRef ioSurface; 178} VkImportMetalIOSurfaceInfoEXT; 179 180typedef struct VkExportMetalSharedEventInfoEXT { 181 VkStructureType sType; 182 const void* pNext; 183 VkSemaphore semaphore; 184 VkEvent event; 185 MTLSharedEvent_id mtlSharedEvent; 186} VkExportMetalSharedEventInfoEXT; 187 188typedef struct VkImportMetalSharedEventInfoEXT { 189 VkStructureType sType; 190 const void* pNext; 191 MTLSharedEvent_id mtlSharedEvent; 192} VkImportMetalSharedEventInfoEXT; 193 194typedef void (VKAPI_PTR *PFN_vkExportMetalObjectsEXT)(VkDevice device, VkExportMetalObjectsInfoEXT* pMetalObjectsInfo); 195 196#ifndef VK_NO_PROTOTYPES 197VKAPI_ATTR void VKAPI_CALL vkExportMetalObjectsEXT( 198 VkDevice device, 199 VkExportMetalObjectsInfoEXT* pMetalObjectsInfo); 200#endif 201 202#ifdef __cplusplus 203} 204#endif 205 206#endif 207[FILE END](C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.