mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-28 12:58:05 +03:00
Merge pull request #13477 from OatmealDome/macos-11
CMakeLists: Bump minimum macOS to 11.0
This commit is contained in:
commit
da84a9f605
5 changed files with 16 additions and 49 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue