Go to the documentation of this file.
27 #include "../../SDL_internal.h"
29 #if SDL_VIDEO_VULKAN && SDL_VIDEO_DRIVER_UIKIT
42 const char* defaultPaths[] = {
48 #define DEFAULT_HANDLE RTLD_DEFAULT
50 int UIKit_Vulkan_LoadLibrary(
_THIS,
const char *
path)
59 return SDL_SetError(
"Vulkan Portability library is already loaded.");
71 "vkGetInstanceProcAddr");
78 const char *foundPath =
NULL;
97 return SDL_SetError(
"Failed to load Vulkan Portability library");
105 "vkGetInstanceProcAddr");
109 SDL_SetError(
"Failed to find %s in either executable or %s: %s",
110 "vkGetInstanceProcAddr",
111 "linked Vulkan Portability library",
112 (
const char *) dlerror());
122 SDL_SetError(
"No vkEnumerateInstanceExtensionProperties found.");
126 extensions = SDL_Vulkan_CreateInstanceExtensionsList(
135 for (
Uint32 i = 0;
i < extensionCount;
i++) {
145 if (!hasSurfaceExtension) {
146 SDL_SetError(
"Installed Vulkan Portability doesn't implement the "
149 }
else if (!hasIOSSurfaceExtension) {
150 SDL_SetError(
"Installed Vulkan Portability doesn't implement the "
162 void UIKit_Vulkan_UnloadLibrary(
_THIS)
177 static const char *
const extensionsForUIKit[] = {
185 return SDL_Vulkan_GetInstanceExtensions_Helper(
199 (VkInstance)instance,
200 "vkCreateIOSSurfaceMVK");
211 " extension is not enabled in the Vulkan instance.");
217 createInfo.
flags = 0;
218 createInfo.
pView = (__bridge
void *)UIKit_Mtl_AddMetalView(
window);
223 SDL_Vulkan_GetResultString(
result));
232 UIKit_Mtl_GetDrawableSize(
window,
w,
h);
PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr
PFN_vkVoidFunction(VKAPI_PTR * PFN_vkGetInstanceProcAddr)(VkInstance instance, const char *pName)
struct SDL_VideoDevice::@264 vulkan_config
GLuint GLuint GLsizei count
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr(VkInstance instance, const char *pName)
GLsizei const GLchar *const * path
GLfloat GLfloat GLfloat GLfloat h
The type used to identify a window.
#define VK_MVK_IOS_SURFACE_EXTENSION_NAME
VkIOSSurfaceCreateFlagsMVK flags
#define VK_KHR_SURFACE_EXTENSION_NAME
static SDL_VideoDevice * _this
GLsizei const GLuint * paths
EGLSurface EGLNativeWindowType * window
VkResult(VKAPI_PTR * PFN_vkEnumerateInstanceExtensionProperties)(const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties)
PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties
#define SDL_arraysize(array)
VKAPI_ATTR VkResult VKAPI_CALL vkCreateIOSSurfaceMVK(VkInstance instance, const VkIOSSurfaceCreateInfoMVK *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface)
void * SDL_LoadFunction(void *handle, const char *name)
VkResult(VKAPI_PTR * PFN_vkCreateIOSSurfaceMVK)(VkInstance instance, const VkIOSSurfaceCreateInfoMVK *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface)
@ VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
GLubyte GLubyte GLubyte GLubyte w