From 39e535d4aa2b3b0594758a0d4777c21ea226d25f Mon Sep 17 00:00:00 2001 From: OatmealDome Date: Tue, 1 Apr 2025 15:12:08 -0400 Subject: [PATCH 1/9] CMakeLists: Bump minimum macOS to 11.0 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f2fcabd64f..8303a3c423 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,7 @@ endif() # Minimum OS X version. # This is inserted into the Info.plist as well. -set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15.0" CACHE STRING "") +set(CMAKE_OSX_DEPLOYMENT_TARGET "11.0.0" CACHE STRING "") set(CMAKE_USER_MAKE_RULES_OVERRIDE "${CMAKE_CURRENT_SOURCE_DIR}/CMake/FlagsOverride.cmake") From 82ee77e4e165b59d7488432ff25b27982320f0d1 Mon Sep 17 00:00:00 2001 From: OatmealDome Date: Tue, 1 Apr 2025 15:15:37 -0400 Subject: [PATCH 2/9] BuildMacOSUniversalBinary: Remove architecture-specific macOS deployment target flags I can't see any situation in the foreseeable future where we need to target different macOS versions for each architecture. --- BuildMacOSUniversalBinary.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/BuildMacOSUniversalBinary.py b/BuildMacOSUniversalBinary.py index ddf30d9ea0..3c1f68b05c 100755 --- a/BuildMacOSUniversalBinary.py +++ b/BuildMacOSUniversalBinary.py @@ -60,10 +60,6 @@ DEFAULT_CONFIG = { # permissions needed for ARM builds "codesign_identity": "-", - # Minimum macOS version for each architecture slice - "arm64_mac_os_deployment_target": "11.0.0", - "x86_64_mac_os_deployment_target": "10.15.0", - # CMake Generator to use for building "generator": "Unix Makefiles", "build_type": "Release", @@ -146,11 +142,6 @@ def parse_args(conf=DEFAULT_CONFIG): help=f"Install path for {arch} qt5 libraries", default=conf[arch+"_qt5_path"]) - parser.add_argument( - f"--{arch}_mac_os_deployment_target", - help=f"Deployment architecture for {arch} slice", - default=conf[arch+"_mac_os_deployment_target"]) - return vars(parser.parse_args()) @@ -297,8 +288,6 @@ def build(config): "-DCMAKE_PREFIX_PATH="+prefix_path, "-DCMAKE_SYSTEM_PROCESSOR="+arch, "-DCMAKE_IGNORE_PATH="+ignore_path, - "-DCMAKE_OSX_DEPLOYMENT_TARGET=" - + config[arch+"_mac_os_deployment_target"], "-DMACOS_CODE_SIGNING_IDENTITY=" + config["codesign_identity"], '-DMACOS_CODE_SIGNING="ON"', From ad79a62d22d95c50396e42e7f3b6cb0de90d68a0 Mon Sep 17 00:00:00 2001 From: OatmealDome Date: Tue, 1 Apr 2025 15:16:07 -0400 Subject: [PATCH 3/9] README: Update minimum macOS version to 11.0 --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 5a4e5363b3..fde13cc3f8 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 1903 or higher). * Linux. - * macOS (10.15 Catalina or higher). + * macOS (11.0 Big Sur or higher). * Unix-like systems other than Linux are not officially supported but might work. * Processor * A CPU with SSE2 support. From 7213cdd439b59634d5f371cbd1ac7475b1930eef Mon Sep 17 00:00:00 2001 From: OatmealDome Date: Tue, 1 Apr 2025 15:17:04 -0400 Subject: [PATCH 4/9] MemoryUtil: Remove availability checks for macOS 11 --- Source/Core/Common/MemoryUtil.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Source/Core/Common/MemoryUtil.cpp b/Source/Core/Common/MemoryUtil.cpp index 2cd393d098..f4759c41a0 100644 --- a/Source/Core/Common/MemoryUtil.cpp +++ b/Source/Core/Common/MemoryUtil.cpp @@ -97,10 +97,7 @@ void JITPageWriteEnableExecuteDisable() #if defined(_M_ARM_64) && defined(__APPLE__) if (JITPageWriteNestCounter() == 0) { - if (__builtin_available(macOS 11.0, *)) - { - pthread_jit_write_protect_np(0); - } + pthread_jit_write_protect_np(0); } #endif JITPageWriteNestCounter()++; @@ -119,10 +116,7 @@ void JITPageWriteDisableExecuteEnable() #if defined(_M_ARM_64) && defined(__APPLE__) if (JITPageWriteNestCounter() == 0) { - if (__builtin_available(macOS 11.0, *)) - { - pthread_jit_write_protect_np(1); - } + pthread_jit_write_protect_np(1); } #endif } From dc8865718e38372a2bfddc039688958c041f2ffb Mon Sep 17 00:00:00 2001 From: OatmealDome Date: Tue, 1 Apr 2025 15:17:22 -0400 Subject: [PATCH 5/9] MTLUtil: Remove availability check for macOS 11 --- Source/Core/VideoBackends/Metal/MTLUtil.mm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/Core/VideoBackends/Metal/MTLUtil.mm b/Source/Core/VideoBackends/Metal/MTLUtil.mm index 469e4f7df8..2af02054e1 100644 --- a/Source/Core/VideoBackends/Metal/MTLUtil.mm +++ b/Source/Core/VideoBackends/Metal/MTLUtil.mm @@ -324,9 +324,8 @@ void Metal::Util::PopulateBackendInfoFeatures(const VideoConfig& config, Backend } } #if TARGET_OS_OSX - if (@available(macOS 11, *)) - if (vendor == DriverDetails::VENDOR_INTEL) - backend_info->bSupportsFramebufferFetch |= DetectIntelGPUFBFetch(device); + if (vendor == DriverDetails::VENDOR_INTEL) + backend_info->bSupportsFramebufferFetch |= DetectIntelGPUFBFetch(device); #endif if (DriverDetails::HasBug(DriverDetails::BUG_BROKEN_DYNAMIC_SAMPLER_INDEXING)) backend_info->bSupportsDynamicSamplerIndexing = false; From 0bc33fb6df9890569d370c9ccbcfa2e0d0333e42 Mon Sep 17 00:00:00 2001 From: OatmealDome Date: Tue, 1 Apr 2025 15:19:30 -0400 Subject: [PATCH 6/9] MTLUtil: Remove availability check for macOS 10.15 --- Source/Core/VideoBackends/Metal/MTLUtil.mm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/Core/VideoBackends/Metal/MTLUtil.mm b/Source/Core/VideoBackends/Metal/MTLUtil.mm index 2af02054e1..326b89a765 100644 --- a/Source/Core/VideoBackends/Metal/MTLUtil.mm +++ b/Source/Core/VideoBackends/Metal/MTLUtil.mm @@ -295,9 +295,8 @@ void Metal::Util::PopulateBackendInfoFeatures(const VideoConfig& config, Backend case TriState::Auto: #if TARGET_OS_OSX g_features.manual_buffer_upload = false; - if (@available(macOS 10.15, *)) - if (![device hasUnifiedMemory]) - g_features.manual_buffer_upload = true; + if (![device hasUnifiedMemory]) + g_features.manual_buffer_upload = true; #else // All iOS devices have unified memory g_features.manual_buffer_upload = false; From 53b66be47d41369821d7c91ccff7494d7b21e404 Mon Sep 17 00:00:00 2001 From: OatmealDome Date: Tue, 1 Apr 2025 15:21:02 -0400 Subject: [PATCH 7/9] MTLUtil: Remove availability checks for macOS 10.15 and iOS 13 --- Source/Core/VideoBackends/Metal/MTLUtil.mm | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Source/Core/VideoBackends/Metal/MTLUtil.mm b/Source/Core/VideoBackends/Metal/MTLUtil.mm index 326b89a765..cc42b9039b 100644 --- a/Source/Core/VideoBackends/Metal/MTLUtil.mm +++ b/Source/Core/VideoBackends/Metal/MTLUtil.mm @@ -304,14 +304,8 @@ void Metal::Util::PopulateBackendInfoFeatures(const VideoConfig& config, Backend break; } - g_features.subgroup_ops = false; - if (@available(macOS 10.15, iOS 13, *)) - { - // Requires SIMD-scoped reduction operations - g_features.subgroup_ops = - [device supportsFamily:MTLGPUFamilyMac2] || [device supportsFamily:MTLGPUFamilyApple7]; - backend_info->bSupportsFramebufferFetch = [device supportsFamily:MTLGPUFamilyApple1]; - } + g_features.subgroup_ops = + [device supportsFamily:MTLGPUFamilyMac2] || [device supportsFamily:MTLGPUFamilyApple7]; if (g_features.subgroup_ops) { DetectionResult result = DetectInvertedIsHelper(device); @@ -322,10 +316,13 @@ void Metal::Util::PopulateBackendInfoFeatures(const VideoConfig& config, Backend DriverDetails::OverrideBug(DriverDetails::BUG_INVERTED_IS_HELPER, is_helper_inverted); } } + + backend_info->bSupportsFramebufferFetch = [device supportsFamily:MTLGPUFamilyApple1]; #if TARGET_OS_OSX if (vendor == DriverDetails::VENDOR_INTEL) backend_info->bSupportsFramebufferFetch |= DetectIntelGPUFBFetch(device); #endif + if (DriverDetails::HasBug(DriverDetails::BUG_BROKEN_DYNAMIC_SAMPLER_INDEXING)) backend_info->bSupportsDynamicSamplerIndexing = false; } From 65f42ee2d2da98c3037e1fc7966ea4a943678fa7 Mon Sep 17 00:00:00 2001 From: OatmealDome Date: Tue, 1 Apr 2025 15:23:10 -0400 Subject: [PATCH 8/9] MTLUtil: Always use MSL 2.3 The minimum macOS (and minimum iOS on my personal fork) are enough to allow MSL 2.3 usage without availability checks. --- Source/Core/VideoBackends/Metal/MTLUtil.mm | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Source/Core/VideoBackends/Metal/MTLUtil.mm b/Source/Core/VideoBackends/Metal/MTLUtil.mm index cc42b9039b..e7e71649aa 100644 --- a/Source/Core/VideoBackends/Metal/MTLUtil.mm +++ b/Source/Core/VideoBackends/Metal/MTLUtil.mm @@ -565,14 +565,7 @@ std::optional Metal::Util::TranslateShaderToMSL(ShaderStage stage, spirv_cross::CompilerMSL compiler(std::move(*code)); - if (@available(macOS 11, iOS 14, *)) - options.set_msl_version(2, 3); - else if (@available(macOS 10.15, iOS 13, *)) - options.set_msl_version(2, 2); - else if (@available(macOS 10.14, iOS 12, *)) - options.set_msl_version(2, 1); - else - options.set_msl_version(2, 0); + options.set_msl_version(2, 3); options.use_framebuffer_fetch_subpasses = true; compiler.set_msl_options(options); From ec9fb08dabe15a287ed0dd5ae095a2cbde942817 Mon Sep 17 00:00:00 2001 From: OatmealDome Date: Thu, 10 Apr 2025 23:48:01 -0400 Subject: [PATCH 9/9] MTLUtil: Remove availability check for iOS 13 My personal fork requires minimum iOS 14, so this is not required. --- Source/Core/VideoBackends/Metal/MTLUtil.mm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Source/Core/VideoBackends/Metal/MTLUtil.mm b/Source/Core/VideoBackends/Metal/MTLUtil.mm index e7e71649aa..05e2115ab3 100644 --- a/Source/Core/VideoBackends/Metal/MTLUtil.mm +++ b/Source/Core/VideoBackends/Metal/MTLUtil.mm @@ -262,15 +262,11 @@ void Metal::Util::PopulateBackendInfoFeatures(const VideoConfig& config, Backend backend_info->bSupportsST3CTextures = true; backend_info->bSupportsBPTCTextures = true; #else - bool supports_apple4 = false; + backend_info->bSupportsDepthClamp = [device supportsFamily:MTLGPUFamilyApple4]; + bool supports_bcn = false; - if (@available(iOS 13, *)) - supports_apple4 = [device supportsFamily:MTLGPUFamilyApple4]; - else - supports_apple4 = [device supportsFeatureSet:MTLFeatureSet_iOS_GPUFamily4_v1]; if (@available(iOS 16.4, *)) supports_bcn = [device supportsBCTextureCompression]; - backend_info->bSupportsDepthClamp = supports_apple4; backend_info->bSupportsST3CTextures = supports_bcn; backend_info->bSupportsBPTCTextures = supports_bcn;