Metal: fix compiler crash when running iOS apps under Mac Catalyst (#9524)

This commit is contained in:
Ben Doherty
2025-12-16 10:41:14 -08:00
committed by GitHub
parent e24fdb3a9d
commit 9c4edf56ca
@@ -120,6 +120,12 @@ bool MetalShaderCompiler::isParallelShaderCompileSupported() const noexcept {
// explicitly set the minimum version we require.
#if defined(FILAMENT_IOS)
options.languageVersion = MTLLanguageVersion2_0;
// Mac Catalyst requires at least MSL 2.2.
if (@available(iOS 13.0, *)) {
if (UTILS_UNLIKELY([NSProcessInfo processInfo].isMacCatalystApp)) {
options.languageVersion = MTLLanguageVersion2_2;
}
}
#else
if (@available(macOS 11.0, *)) {
options.languageVersion = MTLLanguageVersion2_3;