mirror of
https://github.com/ApfelTeeSaft/azahar.git
synced 2026-08-26 19:23:31 +00:00
macos: fix Vulkan/Metal renderer on macOS 26+ and bump MoltenVK (#2149)
* macos: fix Vulkan/Metal renderer on macOS 26+ and bump MoltenVK Four related changes that together let the Vulkan backend boot a game on Apple Silicon Macs running macOS 26.x. Each is needed independently; the combination was tested on a Mac16,6 (M4 Max) / macOS 26.4.1. CMakeModules/DownloadExternals.cmake: Bump bundled MoltenVK from v1.2.9 to v1.4.1. v1.2.9 does not recognize macOS 26 surface objects and traps with an Objective-C "unrecognized selector" inside vkGetPhysicalDeviceSurfaceCapabilitiesKHR. src/video_core/renderer_vulkan/vk_instance.cpp: Disable VK_EXT_tooling_info on MoltenVK. MoltenVK advertises the extension but does not expose vkGetPhysicalDeviceToolPropertiesEXT through its dispatcher, so the call inside CollectToolingInfo() trips a vulkan-hpp assertion in Debug and dereferences NULL in Release. src/citra_qt/bootmanager.cpp: Force-install a fresh CAMetalLayer on the NSView before handing it to createMetalSurfaceEXT. Qt 6.11's QWindow::MetalSurface does not always back the view with a CAMetalLayer on macOS 26, and MoltenVK 1.3+ aborts in MVKSurface::getNaturalExtent() if the layer is not the right class. Implemented via objc_msgSend so no .mm conversion is needed. src/citra_meta/CMakeLists.txt: Gate LaunchScreen.storyboard behind 'if (IOS)'. The storyboard is iOS-only and previously broke the Xcode generator on macOS with "iOS storyboards do not support target device type 'mac'." * Move Metal layer creation logic into MetalUtil::CreateMetalLayer ObjC++ function This change makes the code much more readable, as the logic is now in its native language --------- Co-authored-by: SergeyMild <> Co-authored-by: OpenSauce04 <[email protected]>
This commit is contained in:
co-authored by
SergeyMild <>
OpenSauce04
parent
28960bf166
commit
04f3a93854
@@ -174,7 +174,7 @@ function(download_moltenvk)
|
||||
set(MOLTENVK_TAR "${CMAKE_BINARY_DIR}/externals/MoltenVK.tar")
|
||||
if (NOT EXISTS "${CMAKE_BINARY_DIR}/externals/MoltenVK")
|
||||
if (NOT EXISTS ${MOLTENVK_TAR})
|
||||
file(DOWNLOAD https://github.com/KhronosGroup/MoltenVK/releases/download/v1.2.9/MoltenVK-all.tar
|
||||
file(DOWNLOAD https://github.com/KhronosGroup/MoltenVK/releases/download/v1.4.1/MoltenVK-all.tar
|
||||
${MOLTENVK_TAR} SHOW_PROGRESS)
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user