From dcccc4687ddcb328d6d3b9753ae964b7e1a56028 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Mon, 11 May 2026 22:27:21 +0200 Subject: [PATCH] Fix swapchain creation on the latest iOS to run on UI thread --- .../Engine/GraphicsDevice/Vulkan/GPUSwapChainVulkan.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Source/Engine/GraphicsDevice/Vulkan/GPUSwapChainVulkan.cpp b/Source/Engine/GraphicsDevice/Vulkan/GPUSwapChainVulkan.cpp index d270ea89e..0e9ec0ec8 100644 --- a/Source/Engine/GraphicsDevice/Vulkan/GPUSwapChainVulkan.cpp +++ b/Source/Engine/GraphicsDevice/Vulkan/GPUSwapChainVulkan.cpp @@ -401,7 +401,15 @@ bool GPUSwapChainVulkan::CreateSwapChain(int32 width, int32 height) VkBool32 supportsPresent; VALIDATE_VULKAN_RESULT(vkGetPhysicalDeviceSurfaceSupportKHR(gpu, _device->PresentQueue->GetFamilyIndex(), _surface, &supportsPresent)); ASSERT(supportsPresent); +#if PLATFORM_IOS + Function func = [this, &device, &swapChainInfo]() + { + VALIDATE_VULKAN_RESULT(vkCreateSwapchainKHR(device, &swapChainInfo, nullptr, &_swapChain)); + }; + iOSPlatform::RunOnUIThread(func, true); +#else VALIDATE_VULKAN_RESULT(vkCreateSwapchainKHR(device, &swapChainInfo, nullptr, &_swapChain)); +#endif // Cache data _width = width;