Merge pull request #13477 from OatmealDome/macos-11

CMakeLists: Bump minimum macOS to 11.0
This commit is contained in:
OatmealDome 2025-04-22 17:27:12 -04:00 committed by GitHub
commit da84a9f605
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 16 additions and 49 deletions

View file

@ -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"',

View file

@ -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")

View file

@ -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.

View file

@ -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
}

View file

@ -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;
@ -295,9 +291,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;
@ -305,14 +300,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);
@ -323,11 +312,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 (@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;
}
@ -570,14 +561,7 @@ std::optional<std::string> 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);