From 30cc0769f3f0acf983d0331b77aeef548d0ddf93 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Sat, 6 Dec 2025 23:03:59 +0000 Subject: [PATCH] a/vk: Track VK_EXT_metal_surface Part-of: --- scripts/generate_vk_helpers.py | 2 ++ src/xrt/auxiliary/vk/vk_function_loaders.c | 5 +++++ src/xrt/auxiliary/vk/vk_helpers.h | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/scripts/generate_vk_helpers.py b/scripts/generate_vk_helpers.py index 41da6c3c6..8d2d795df 100755 --- a/scripts/generate_vk_helpers.py +++ b/scripts/generate_vk_helpers.py @@ -278,6 +278,8 @@ def get_instance_cmds(): None, Cmd("vkCreateWin32SurfaceKHR", requires=("VK_USE_PLATFORM_WIN32_KHR",)), None, + Cmd("vkCreateMetalSurfaceEXT", requires=("VK_USE_PLATFORM_METAL_EXT",)), + None, Cmd("vkGetPhysicalDeviceSurfaceCapabilities2EXT", requires=("VK_EXT_display_surface_counter",)), None, Cmd("vkCreateDebugUtilsMessengerEXT", requires=("VK_EXT_debug_utils",)), diff --git a/src/xrt/auxiliary/vk/vk_function_loaders.c b/src/xrt/auxiliary/vk/vk_function_loaders.c index 226e10491..e8847da9b 100644 --- a/src/xrt/auxiliary/vk/vk_function_loaders.c +++ b/src/xrt/auxiliary/vk/vk_function_loaders.c @@ -132,6 +132,11 @@ vk_get_instance_functions(struct vk_bundle *vk) #endif // defined(VK_USE_PLATFORM_WIN32_KHR) +#if defined(VK_USE_PLATFORM_METAL_EXT) + vk->vkCreateMetalSurfaceEXT = GET_INS_PROC(vk, vkCreateMetalSurfaceEXT); + +#endif // defined(VK_USE_PLATFORM_METAL_EXT) + #if defined(VK_EXT_display_surface_counter) vk->vkGetPhysicalDeviceSurfaceCapabilities2EXT = GET_INS_PROC(vk, vkGetPhysicalDeviceSurfaceCapabilities2EXT); diff --git a/src/xrt/auxiliary/vk/vk_helpers.h b/src/xrt/auxiliary/vk/vk_helpers.h index 9dcc93a72..949e596b7 100644 --- a/src/xrt/auxiliary/vk/vk_helpers.h +++ b/src/xrt/auxiliary/vk/vk_helpers.h @@ -323,6 +323,11 @@ struct vk_bundle #endif // defined(VK_USE_PLATFORM_WIN32_KHR) +#if defined(VK_USE_PLATFORM_METAL_EXT) + PFN_vkCreateMetalSurfaceEXT vkCreateMetalSurfaceEXT; + +#endif // defined(VK_USE_PLATFORM_METAL_EXT) + #if defined(VK_EXT_display_surface_counter) PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT vkGetPhysicalDeviceSurfaceCapabilities2EXT;