From db8bd8a726673e8627652d5679e43a012d8f21ad Mon Sep 17 00:00:00 2001 From: OatmealDome Date: Wed, 1 Jun 2022 22:46:12 -0400 Subject: [PATCH 1/6] BuildMacOSUniversalBinary: Bump minimum macOS to 10.14 --- BuildMacOSUniversalBinary.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BuildMacOSUniversalBinary.py b/BuildMacOSUniversalBinary.py index 2425b5bea9..8632995407 100755 --- a/BuildMacOSUniversalBinary.py +++ b/BuildMacOSUniversalBinary.py @@ -64,7 +64,7 @@ DEFAULT_CONFIG = { # Minimum macOS version for each architecture slice "arm64_mac_os_deployment_target": "11.0.0", - "x86_64_mac_os_deployment_target": "10.13.0", + "x86_64_mac_os_deployment_target": "10.14.0", # CMake Generator to use for building "generator": "Unix Makefiles", From 77d0170285f6336a8dbb4daae2fb12f944a870b9 Mon Sep 17 00:00:00 2001 From: OatmealDome Date: Wed, 1 Jun 2022 22:49:45 -0400 Subject: [PATCH 2/6] CMakeLists: Remove comment pertaining to macOS versions prior to 10.14 --- CMakeLists.txt | 7 ------- 1 file changed, 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1085d51c92..df7c1b8823 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,13 +13,6 @@ endif() # Minimum OS X version. # This is inserted into the Info.plist as well. - -# MacOS prior to 10.14 did not support aligned alloc which is used to implement -# std::unique_ptr in the arm64 C++ standard library. x86_64 builds can override -# this to 10.13.0 using -DCMAKE_OSX_DEPLOYMENT_TARGET="10.13.0" without issue. -# This is done in the universal binary building script to build a binary that -# runs on 10.13 on x86_64 computers, while still containing an arm64 slice. - set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14.0" CACHE STRING "") set(CMAKE_USER_MAKE_RULES_OVERRIDE "CMake/FlagsOverride.cmake") From 6e2febd4045c368e9f4c8dd5f751b1d6c6af14ec Mon Sep 17 00:00:00 2001 From: OatmealDome Date: Wed, 1 Jun 2022 22:49:56 -0400 Subject: [PATCH 3/6] VideoBackendBase: Remove __builtin_available for macOS 10.14 --- Source/Core/VideoCommon/VideoBackendBase.cpp | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/Source/Core/VideoCommon/VideoBackendBase.cpp b/Source/Core/VideoCommon/VideoBackendBase.cpp index 7136545c25..3a2eafd025 100644 --- a/Source/Core/VideoCommon/VideoBackendBase.cpp +++ b/Source/Core/VideoCommon/VideoBackendBase.cpp @@ -215,10 +215,7 @@ const std::vector>& VideoBackendBase::GetAvail std::vector> backends; // OGL > D3D11 > D3D12 > Vulkan > SW > Null - // - // On macOS Mojave and newer, we prefer Vulkan over OGL due to outdated drivers. - // However, on macOS High Sierra and older, we still prefer OGL due to its older Metal version - // missing several features required by the Vulkan backend. + // On macOS, we prefer Vulkan over OpenGL due to OpenGL support being deprecated by Apple. #ifdef HAS_OPENGL backends.push_back(std::make_unique()); #endif @@ -228,17 +225,11 @@ const std::vector>& VideoBackendBase::GetAvail #endif #ifdef HAS_VULKAN #ifdef __APPLE__ - // If we can run the Vulkan backend, emplace it at the beginning of the vector so - // it takes precedence over OpenGL. - if (__builtin_available(macOS 10.14, *)) - { - backends.emplace(backends.begin(), std::make_unique()); - } - else + // Emplace the Vulkan backend at the beginning so it takes precedence over OpenGL. + backends.emplace(backends.begin(), std::make_unique()); +#else + backends.push_back(std::make_unique()); #endif - { - backends.push_back(std::make_unique()); - } #endif #ifdef HAS_OPENGL backends.push_back(std::make_unique()); From 1cb3058abe827470a0aba458cc6c3cb0cc884763 Mon Sep 17 00:00:00 2001 From: OatmealDome Date: Wed, 1 Jun 2022 22:51:10 -0400 Subject: [PATCH 4/6] MemoryUtil: Remove __builtin_available for macOS 10.14 --- Source/Core/Common/MemoryUtil.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Source/Core/Common/MemoryUtil.cpp b/Source/Core/Common/MemoryUtil.cpp index 858135bc0e..f94af85822 100644 --- a/Source/Core/Common/MemoryUtil.cpp +++ b/Source/Core/Common/MemoryUtil.cpp @@ -41,11 +41,7 @@ void* AllocateExecutableMemory(size_t size) #else int map_flags = MAP_ANON | MAP_PRIVATE; #if defined(__APPLE__) - // This check is in place to prepare for x86_64 MAP_JIT support. While MAP_JIT did exist - // prior to 10.14, it had restrictions on the number of JIT allocations that were removed - // in 10.14. - if (__builtin_available(macOS 10.14, *)) - map_flags |= MAP_JIT; + map_flags |= MAP_JIT; #endif void* ptr = mmap(nullptr, size, PROT_READ | PROT_WRITE | PROT_EXEC, map_flags, -1, 0); if (ptr == MAP_FAILED) From 803a0de5a44faba987556d9f5f11e19f7cc004a9 Mon Sep 17 00:00:00 2001 From: OatmealDome Date: Wed, 1 Jun 2022 22:52:13 -0400 Subject: [PATCH 5/6] VKMain: Remove check for macOS 10.14 --- Source/Core/VideoBackends/Vulkan/VKMain.cpp | 35 --------------------- 1 file changed, 35 deletions(-) diff --git a/Source/Core/VideoBackends/Vulkan/VKMain.cpp b/Source/Core/VideoBackends/Vulkan/VKMain.cpp index 56cf93a376..bc76aa5610 100644 --- a/Source/Core/VideoBackends/Vulkan/VKMain.cpp +++ b/Source/Core/VideoBackends/Vulkan/VKMain.cpp @@ -280,30 +280,6 @@ void VideoBackend::Shutdown() UnloadVulkanLibrary(); } -#if defined(VK_USE_PLATFORM_METAL_EXT) -static bool IsRunningOnMojaveOrHigher() -{ - // id processInfo = [NSProcessInfo processInfo] - id processInfo = reinterpret_cast(objc_msgSend)( - objc_getClass("NSProcessInfo"), sel_getUid("processInfo")); - if (!processInfo) - return false; - - struct OSVersion // NSOperatingSystemVersion - { - size_t major_version; // NSInteger majorVersion - size_t minor_version; // NSInteger minorVersion - size_t patch_version; // NSInteger patchVersion - }; - - // const bool meets_requirement = [processInfo isOperatingSystemAtLeastVersion:required_version]; - constexpr OSVersion required_version = {10, 14, 0}; - const bool meets_requirement = reinterpret_cast(objc_msgSend)( - processInfo, sel_getUid("isOperatingSystemAtLeastVersion:"), required_version); - return meets_requirement; -} -#endif - void VideoBackend::PrepareWindow(WindowSystemInfo& wsi) { #if defined(VK_USE_PLATFORM_METAL_EXT) @@ -345,17 +321,6 @@ void VideoBackend::PrepareWindow(WindowSystemInfo& wsi) // Store the layer pointer, that way MoltenVK doesn't call [NSView layer] outside the main thread. wsi.render_surface = layer; - - // The Metal version included with MacOS 10.13 and below does not support several features we - // require. Furthermore, the drivers seem to choke on our shaders (mainly Intel). So, we warn - // the user that this is an unsupported configuration, but permit them to continue. - if (!IsRunningOnMojaveOrHigher()) - { - PanicAlertFmtT( - "You are attempting to use the Vulkan (Metal) backend on an unsupported operating system. " - "For all functionality to be enabled, you must use macOS 10.14 (Mojave) or newer. Please " - "do not report any issues encountered unless they also occur on 10.14+."); - } #endif } } // namespace Vulkan From cb7e82760156da33f2f54fd3dbd9ae76c1fc55e3 Mon Sep 17 00:00:00 2001 From: OatmealDome Date: Wed, 1 Jun 2022 23:22:19 -0400 Subject: [PATCH 6/6] README: Update minimum macOS version --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index d0a4bdc724..875df7de6e 100644 --- a/Readme.md +++ b/Readme.md @@ -15,7 +15,7 @@ Please read the [FAQ](https://dolphin-emu.org/docs/faq/) before using Dolphin. * OS * Windows (10 or higher). * Linux. - * macOS (10.13 High Sierra or higher). + * macOS (10.14 Mojave or higher). * Unix-like systems other than Linux are not officially supported but might work. * Processor * A CPU with SSE2 support.