From dceddb7e31bcf50bfd19d47bb775f176e18e3cf1 Mon Sep 17 00:00:00 2001 From: Bohdan Soproniuk <68032402+cutieskye@users.noreply.github.com> Date: Wed, 19 Jun 2024 09:04:07 +0200 Subject: [PATCH] Update the instance extensions list for WSI (#1875) The VK_MVK_ios_surface and VK_MVK_macos_surface extensions have been deprecated by the VK_EXT_metal_surface extension. The VK_KHR_mir_surface extension has been removed from the Vulkan specification and, therefore, should not be used. --- CMakeLists.txt | 2 +- samples/utils/utils.cpp | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d5c8d76..d57aac1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,7 +56,7 @@ function( vulkan_hpp__setup_platform ) if( WIN32 ) target_compile_definitions( ${TARGET_NAME} PUBLIC VK_USE_PLATFORM_WIN32_KHR ) elseif( APPLE ) - target_compile_definitions( ${TARGET_NAME} PUBLIC VK_USE_PLATFORM_MACOS_MVK ) + target_compile_definitions( ${TARGET_NAME} PUBLIC VK_USE_PLATFORM_METAL_EXT ) elseif( UNIX ) target_compile_definitions( ${TARGET_NAME} PUBLIC VK_USE_PLATFORM_XCB_KHR ) else() diff --git a/samples/utils/utils.cpp b/samples/utils/utils.cpp index 3cc5c6c..eada913 100644 --- a/samples/utils/utils.cpp +++ b/samples/utils/utils.cpp @@ -482,12 +482,8 @@ namespace vk extensions.push_back( VK_KHR_SURFACE_EXTENSION_NAME ); #if defined( VK_USE_PLATFORM_ANDROID_KHR ) extensions.push_back( VK_KHR_ANDROID_SURFACE_EXTENSION_NAME ); -#elif defined( VK_USE_PLATFORM_IOS_MVK ) - extensions.push_back( VK_MVK_IOS_SURFACE_EXTENSION_NAME ); -#elif defined( VK_USE_PLATFORM_MACOS_MVK ) - extensions.push_back( VK_MVK_MACOS_SURFACE_EXTENSION_NAME ); -#elif defined( VK_USE_PLATFORM_MIR_KHR ) - extensions.push_back( VK_KHR_MIR_SURFACE_EXTENSION_NAME ); +#elif defined( VK_USE_PLATFORM_METAL_EXT ) + extensions.push_back( VK_EXT_METAL_SURFACE_EXTENSION_NAME ); #elif defined( VK_USE_PLATFORM_VI_NN ) extensions.push_back( VK_NN_VI_SURFACE_EXTENSION_NAME ); #elif defined( VK_USE_PLATFORM_WAYLAND_KHR )