diff --git a/Source/ThirdParty/ANGLE/src/common/apple/apple_platform.h b/Source/ThirdParty/ANGLE/src/common/apple/apple_platform.h index db236bd2ad2c..e6ab16034af0 100644 --- a/Source/ThirdParty/ANGLE/src/common/apple/apple_platform.h +++ b/Source/ThirdParty/ANGLE/src/common/apple/apple_platform.h @@ -15,9 +15,9 @@ (((defined(ANGLE_PLATFORM_IOS) && !defined(ANGLE_PLATFORM_IOS_SIMULATOR)) || \ defined(ANGLE_PLATFORM_MACCATALYST)) && \ __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000) || \ - (defined(ANGLE_PLATFORM_WATCHOS) && !defined(ANGLE_PLATFORM_IOS_SIMULATOR) && \ + (defined(ANGLE_PLATFORM_WATCH) && !defined(ANGLE_PLATFORM_IOS_SIMULATOR) && \ __WATCH_OS_VERSION_MIN_REQUIRED >= 80000) || \ - (defined(TARGET_OS_TV) && !defined(ANGLE_PLATFORM_IOS_SIMULATOR) && \ + (defined(ANGLE_PLATFORM_APPLETV) && !defined(ANGLE_PLATFORM_IOS_SIMULATOR) && \ __TV_OS_VERSION_MIN_REQUIRED >= 150000)) && \ (defined(__has_include) && __has_include()) # define ANGLE_HAVE_MTLRESOURCE_SET_OWNERSHIP_IDENTITY 1 diff --git a/Source/ThirdParty/ANGLE/src/common/apple_platform_utils.mm b/Source/ThirdParty/ANGLE/src/common/apple_platform_utils.mm index d6cb316a76c1..a2ab01f28714 100644 --- a/Source/ThirdParty/ANGLE/src/common/apple_platform_utils.mm +++ b/Source/ThirdParty/ANGLE/src/common/apple_platform_utils.mm @@ -53,13 +53,13 @@ bool IsMetalRendererAvailable() gpuFamilySufficient = true; ANGLE_APPLE_ALLOW_DEPRECATED_END } -#elif defined(ANGLE_PLATFORM_IOS) && !TARGET_OS_SIMULATOR +#elif defined(ANGLE_PLATFORM_APPLE_EMBEDDED) && !TARGET_OS_SIMULATOR // Hardcode constant to sidestep compiler errors. Call will // return false on older macOS versions. const NSUInteger iosFamily3v1 = 4; if ([device supportsFeatureSet:static_cast(iosFamily3v1)]) gpuFamilySufficient = true; -#elif defined(ANGLE_PLATFORM_IOS) && TARGET_OS_SIMULATOR +#elif defined(ANGLE_PLATFORM_APPLE_EMBEDDED) && TARGET_OS_SIMULATOR // FIXME: Currently we do not have good simulator query, as it does not support // the whole feature set needed for iOS. gpuFamilySufficient = true; diff --git a/Source/ThirdParty/ANGLE/src/common/platform.h b/Source/ThirdParty/ANGLE/src/common/platform.h index d646643b1b3c..eb6bc95eac17 100644 --- a/Source/ThirdParty/ANGLE/src/common/platform.h +++ b/Source/ThirdParty/ANGLE/src/common/platform.h @@ -127,32 +127,32 @@ # include # if TARGET_OS_OSX # define ANGLE_PLATFORM_MACOS 1 -# elif TARGET_OS_IPHONE -# define ANGLE_PLATFORM_IOS 1 -# if TARGET_OS_SIMULATOR -# define ANGLE_PLATFORM_IOS_SIMULATOR 1 -# endif -# if TARGET_OS_MACCATALYST -# define ANGLE_PLATFORM_MACCATALYST 1 -# endif -# elif TARGET_OS_WATCH -# define ANGLE_PLATFORM_WATCHOS 1 -# if TARGET_OS_SIMULATOR -# define ANGLE_PLATFORM_IOS_SIMULATOR 1 -# endif -# elif TARGET_OS_TV -# define ANGLE_PLATFORM_APPLETV 1 -# if TARGET_OS_SIMULATOR -# define ANGLE_PLATFORM_IOS_SIMULATOR 1 +# else +# define ANGLE_PLATFORM_APPLE_EMBEDDED 1 +# if TARGET_OS_IOS +# define ANGLE_PLATFORM_IOS 1 +# if TARGET_OS_MACCATALYST +# define ANGLE_PLATFORM_MACCATALYST 1 +# endif +# elif TARGET_OS_WATCH +# define ANGLE_PLATFORM_WATCH 1 +# elif TARGET_OS_TV +# define ANGLE_PLATFORM_APPLETV 1 # endif # endif +# +# if TARGET_OS_SIMULATOR +# define ANGLE_PLATFORM_IOS_SIMULATOR 1 +# endif +# # // This might be useful globally. At the moment it is used # // to differentiate MacCatalyst on Intel and Apple Silicon. # if defined(__arm64__) || defined(__aarch64__) # define ANGLE_CPU_ARM64 1 # endif # // EAGL should be enabled on iOS, but not Mac Catalyst unless it is running on Apple Silicon. -# if (defined(ANGLE_PLATFORM_IOS) && !defined(ANGLE_PLATFORM_MACCATALYST)) || \ +# if ((defined(ANGLE_PLATFORM_IOS) || defined(ANGLE_PLATFORM_WATCH) \ + || defined(ANGLE_PLATFORM_APPLETV)) && !defined(ANGLE_PLATFORM_MACCATALYST)) || \ (defined(ANGLE_PLATFORM_MACCATALYST) && defined(ANGLE_CPU_ARM64)) # define ANGLE_ENABLE_EAGL # endif diff --git a/Source/ThirdParty/ANGLE/src/common/system_utils.cpp b/Source/ThirdParty/ANGLE/src/common/system_utils.cpp index 1b23fcf37dfa..92dbba5eb265 100644 --- a/Source/ThirdParty/ANGLE/src/common/system_utils.cpp +++ b/Source/ThirdParty/ANGLE/src/common/system_utils.cpp @@ -226,7 +226,7 @@ void *OpenSystemLibraryAndGetError(const char *libraryName, { libraryWithExtension += dotExtension; } -#if ANGLE_PLATFORM_IOS +#if ANGLE_PLATFORM_APPLE_EMBEDDED // On iOS, libraryWithExtension is a directory in which the library resides. // The actual library name doesn't have an extension at all. // E.g. "libEGL.framework/libEGL" diff --git a/Source/ThirdParty/ANGLE/src/common/system_utils_posix.cpp b/Source/ThirdParty/ANGLE/src/common/system_utils_posix.cpp index 952f09e3547a..0cf596a27215 100644 --- a/Source/ThirdParty/ANGLE/src/common/system_utils_posix.cpp +++ b/Source/ThirdParty/ANGLE/src/common/system_utils_posix.cpp @@ -197,7 +197,7 @@ void *OpenSystemLibraryWithExtensionAndGetError(const char *libraryName, std::string directory; if (searchType == SearchType::ModuleDir) { -#if ANGLE_PLATFORM_IOS +#if ANGLE_PLATFORM_APPLE_EMBEDDED // On iOS, shared libraries must be loaded from within the app bundle. directory = GetExecutableDirectory() + "/Frameworks/"; #elif ANGLE_PLATFORM_FUCHSIA diff --git a/Source/ThirdParty/ANGLE/src/gpu_info_util/SystemInfo_internal.h b/Source/ThirdParty/ANGLE/src/gpu_info_util/SystemInfo_internal.h index d300bd81a90a..596dbe98e5aa 100644 --- a/Source/ThirdParty/ANGLE/src/gpu_info_util/SystemInfo_internal.h +++ b/Source/ThirdParty/ANGLE/src/gpu_info_util/SystemInfo_internal.h @@ -33,7 +33,7 @@ bool CMDeviceIDToDeviceAndVendorID(const std::string &id, uint32_t *vendorId, ui bool GetSystemInfo_mac(SystemInfo *info); #endif -#if defined(ANGLE_PLATFORM_IOS) || (defined(ANGLE_PLATFORM_MACCATALYST) && defined(ANGLE_CPU_ARM64)) +#if defined(ANGLE_PLATFORM_APPLE_EMBEDDED) || (defined(ANGLE_PLATFORM_MACCATALYST) && defined(ANGLE_CPU_ARM64)) bool GetSystemInfo_ios(SystemInfo *info); #endif diff --git a/Source/ThirdParty/ANGLE/src/gpu_info_util/SystemInfo_ios.cpp b/Source/ThirdParty/ANGLE/src/gpu_info_util/SystemInfo_ios.cpp index b8ba342ebad9..ca31c8307320 100644 --- a/Source/ThirdParty/ANGLE/src/gpu_info_util/SystemInfo_ios.cpp +++ b/Source/ThirdParty/ANGLE/src/gpu_info_util/SystemInfo_ios.cpp @@ -8,7 +8,7 @@ #include "common/platform.h" -#if defined(ANGLE_PLATFORM_IOS) || (defined(ANGLE_PLATFORM_MACCATALYST) && defined(ANGLE_CPU_ARM64)) +#if defined(ANGLE_PLATFORM_APPLE_EMBEDDED) || (defined(ANGLE_PLATFORM_MACCATALYST) && defined(ANGLE_CPU_ARM64)) # include "gpu_info_util/SystemInfo_internal.h" @@ -30,5 +30,5 @@ bool GetSystemInfo_ios(SystemInfo *info) } // namespace angle -#endif // defined(ANGLE_PLATFORM_IOS) || (defined(ANGLE_PLATFORM_MACCATALYST) && - // defined(ANGLE_CPU_ARM64)) +#endif // defined(ANGLE_PLATFORM_APPLE_EMBEDDED) || + // (defined(ANGLE_PLATFORM_MACCATALYST) && defined(ANGLE_CPU_ARM64)) diff --git a/Source/ThirdParty/ANGLE/src/libANGLE/Caps.cpp b/Source/ThirdParty/ANGLE/src/libANGLE/Caps.cpp index 90e2923f635a..4f0aa18a2c9c 100644 --- a/Source/ThirdParty/ANGLE/src/libANGLE/Caps.cpp +++ b/Source/ThirdParty/ANGLE/src/libANGLE/Caps.cpp @@ -650,7 +650,7 @@ static bool DetermineDepthTextureANGLESupport(const TextureCapsMap &textureCaps) { constexpr GLenum requiredFormats[] = { GL_DEPTH_COMPONENT16, -#if !defined(ANGLE_PLATFORM_IOS) && \ +#if !defined(ANGLE_PLATFORM_APPLE_EMBEDDED) && \ (!defined(ANGLE_PLATFORM_MACCATALYST) || !defined(ANGLE_CPU_ARM64)) // anglebug.com/6082 // TODO(dino): Temporarily Removing the need for GL_DEPTH_COMPONENT32_OES @@ -669,7 +669,7 @@ static bool DetermineDepthTextureOESSupport(const TextureCapsMap &textureCaps) { constexpr GLenum requiredFormats[] = { GL_DEPTH_COMPONENT16, -#if !defined(ANGLE_PLATFORM_IOS) && \ +#if !defined(ANGLE_PLATFORM_APPLE_EMBEDDED) && \ (!defined(ANGLE_PLATFORM_MACCATALYST) || !defined(ANGLE_CPU_ARM64)) // anglebug.com/6082 // TODO(dino): Temporarily Removing the need for GL_DEPTH_COMPONENT32_OES diff --git a/Source/ThirdParty/ANGLE/src/libANGLE/Display.cpp b/Source/ThirdParty/ANGLE/src/libANGLE/Display.cpp index 0b8fc988a293..dcc10a528845 100644 --- a/Source/ThirdParty/ANGLE/src/libANGLE/Display.cpp +++ b/Source/ThirdParty/ANGLE/src/libANGLE/Display.cpp @@ -53,7 +53,7 @@ #if defined(ANGLE_ENABLE_OPENGL) # if defined(ANGLE_PLATFORM_WINDOWS) # include "libANGLE/renderer/gl/wgl/DisplayWGL.h" -# elif defined(ANGLE_PLATFORM_MACOS) || defined(ANGLE_PLATFORM_IOS) +# elif defined(ANGLE_PLATFORM_MACOS) || defined(ANGLE_PLATFORM_APPLE_EMBEDDED) # include "libANGLE/renderer/gl/apple/DisplayApple_api.h" # elif defined(ANGLE_PLATFORM_LINUX) # include "libANGLE/renderer/gl/egl/DisplayEGL.h" @@ -342,7 +342,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib displayType, impl = new rx::DisplayWGL(state); break; -# elif defined(ANGLE_PLATFORM_MACOS) || defined(ANGLE_PLATFORM_IOS) +# elif defined(ANGLE_PLATFORM_MACOS) || defined(ANGLE_PLATFORM_APPLE_EMBEDDED) impl = rx::CreateDisplayCGLOrEAGL(state); break; @@ -2050,7 +2050,7 @@ static ClientExtensions GenerateClientExtensions() extensions.platformANGLEDeviceTypeEGLANGLE = true; #endif -#if (defined(ANGLE_PLATFORM_IOS) && !defined(ANGLE_PLATFORM_MACCATALYST)) || \ +#if (defined(ANGLE_PLATFORM_APPLE_EMBEDDED) && !defined(ANGLE_PLATFORM_MACCATALYST)) || \ (defined(ANGLE_PLATFORM_MACCATALYST) && defined(ANGLE_CPU_ARM64)) extensions.platformANGLEDeviceContextVolatileEagl = true; #endif diff --git a/Source/ThirdParty/ANGLE/src/libANGLE/formatutils.cpp b/Source/ThirdParty/ANGLE/src/libANGLE/formatutils.cpp index 7a37d5f08103..3164ec7f8aac 100644 --- a/Source/ThirdParty/ANGLE/src/libANGLE/formatutils.cpp +++ b/Source/ThirdParty/ANGLE/src/libANGLE/formatutils.cpp @@ -1379,7 +1379,7 @@ static InternalFormatInfoMap BuildInternalFormatInfoMap() AddRGBAXFormat(&map, GL_RGBA, false, FB< 8, 8, 8, 8, 0, 0>(), GL_RGBA, GL_BYTE, GL_SIGNED_NORMALIZED, false, NeverSupported, NeverSupported, NeverSupported, NeverSupported, NeverSupported); AddRGBAXFormat(&map, GL_SRGB, false, FB< 8, 8, 8, 0, 0, 0>(), GL_SRGB, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, true, RequireExt<&Extensions::sRGBEXT>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported); AddRGBAXFormat(&map, GL_SRGB_ALPHA_EXT, false, FB< 8, 8, 8, 8, 0, 0>(), GL_SRGB_ALPHA_EXT, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, true, RequireExt<&Extensions::sRGBEXT>, AlwaysSupported, RequireExt<&Extensions::sRGBEXT>, NeverSupported, NeverSupported); -#if (defined(ANGLE_PLATFORM_IOS) && !defined(ANGLE_PLATFORM_MACCATALYST)) || (defined(ANGLE_PLATFORM_MACCATALYST) && defined(ANGLE_CPU_ARM64)) +#if (defined(ANGLE_PLATFORM_APPLE_EMBEDDED) && !defined(ANGLE_PLATFORM_MACCATALYST)) || (defined(ANGLE_PLATFORM_MACCATALYST) && defined(ANGLE_CPU_ARM64)) angle::SystemInfo info; if (angle::GetSystemInfo(&info)) { diff --git a/Source/ThirdParty/ANGLE/src/libANGLE/renderer/driver_utils.cpp b/Source/ThirdParty/ANGLE/src/libANGLE/renderer/driver_utils.cpp index e5cd0b7ce8fa..d96ad8af008a 100644 --- a/Source/ThirdParty/ANGLE/src/libANGLE/renderer/driver_utils.cpp +++ b/Source/ThirdParty/ANGLE/src/libANGLE/renderer/driver_utils.cpp @@ -343,7 +343,7 @@ OSVersion GetMacOSVersion() } #endif -#if !defined(ANGLE_PLATFORM_IOS) +#if !defined(ANGLE_PLATFORM_APPLE_EMBEDDED) OSVersion GetiOSVersion() { // Return a default version diff --git a/Source/ThirdParty/ANGLE/src/libANGLE/renderer/driver_utils.h b/Source/ThirdParty/ANGLE/src/libANGLE/renderer/driver_utils.h index 21eee22084ec..d9dfffba246e 100644 --- a/Source/ThirdParty/ANGLE/src/libANGLE/renderer/driver_utils.h +++ b/Source/ThirdParty/ANGLE/src/libANGLE/renderer/driver_utils.h @@ -249,9 +249,9 @@ inline bool IsFuchsia() #endif } -inline bool IsIOS() +inline bool IsAppleEmbedded() { -#if defined(ANGLE_PLATFORM_IOS) +#if defined(ANGLE_PLATFORM_APPLE_EMBEDDED) return true; #else return false; diff --git a/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/apple/DisplayApple_api.cpp b/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/apple/DisplayApple_api.cpp index 55dcd901ff7d..e38160a76362 100644 --- a/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/apple/DisplayApple_api.cpp +++ b/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/apple/DisplayApple_api.cpp @@ -18,7 +18,7 @@ # if defined(ANGLE_PLATFORM_MACCATALYST) && defined(ANGLE_CPU_ARM64) # include "libANGLE/renderer/gl/eagl/DisplayEAGL.h" # endif -#elif defined(ANGLE_PLATFORM_IOS) +#else # include "libANGLE/renderer/gl/eagl/DisplayEAGL.h" #endif @@ -48,7 +48,7 @@ DisplayImpl *CreateDisplayCGLOrEAGL(const egl::DisplayState &state) # else return new rx::DisplayCGL(state); # endif -#elif defined(ANGLE_PLATFORM_IOS) +#else// defined(ANGLE_PLATFORM_APPLE_EMBEDDED) return new rx::DisplayEAGL(state); #endif } diff --git a/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/renderergl_utils.cpp b/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/renderergl_utils.cpp index 22d98bf5faa9..66394f1e2dc4 100644 --- a/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/renderergl_utils.cpp +++ b/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/renderergl_utils.cpp @@ -2275,7 +2275,7 @@ void InitializeFeatures(const FunctionsGL *functions, angle::FeaturesGL *feature // crbug.com/1202928 ANGLE_FEATURE_CONDITION(features, disableWorkerContexts, (IsWindows() && (isIntel || isAMD)) || (IsLinux() && isNvidia) || - IsIOS() || IsAndroid() || IsAndroidEmulator(functions)); + IsAppleEmbedded() || IsAndroid() || IsAndroidEmulator(functions)); bool limitMaxTextureSize = isIntel && IsLinux() && GetLinuxOSVersion() < OSVersion(5, 0, 0); ANGLE_FEATURE_CONDITION(features, limitWebglMaxTextureSizeTo4096, diff --git a/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/DisplayMtl.mm b/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/DisplayMtl.mm index ece4e06e3432..c114566ae4e5 100644 --- a/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/DisplayMtl.mm +++ b/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/DisplayMtl.mm @@ -940,7 +940,7 @@ bool IsMetalDisplayAvailable() mNativeExtensions.copyTextureCHROMIUM = true; mNativeExtensions.copyCompressedTextureCHROMIUM = false; -#if !defined(ANGLE_PLATFORM_WATCHOS) || !ANGLE_PLATFORM_WATCHOS +#if !ANGLE_PLATFORM_WATCH if (@available(iOS 14.0, macOS 10.11, macCatalyst 14.0, tvOS 16.0, *)) { mNativeExtensions.textureMirrorClampToEdgeEXT = true; diff --git a/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ShaderMtl.mm b/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ShaderMtl.mm index 2d14263528af..272c8b26d782 100644 --- a/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ShaderMtl.mm +++ b/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ShaderMtl.mm @@ -119,7 +119,7 @@ bool postTranslate(std::string *infoLog) override } options->clampPointSize = true; -#if defined(ANGLE_PLATFORM_IOS) && !defined(ANGLE_PLATFORM_MACCATALYST) +#if defined(AANGLE_PLATFORM_APPLE_EMBEDDED) && !defined(ANGLE_PLATFORM_MACCATALYST) options->clampFragDepth = true; #endif diff --git a/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_utils.mm b/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_utils.mm index 07f27d7a886d..2abae28808f7 100644 --- a/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_utils.mm +++ b/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_utils.mm @@ -929,7 +929,7 @@ MTLSamplerAddressMode GetSamplerAddressMode(GLenum wrap) { case GL_CLAMP_TO_EDGE: return MTLSamplerAddressModeClampToEdge; -#if !defined(ANGLE_PLATFORM_WATCHOS) || !ANGLE_PLATFORM_WATCHOS +#if !defined(ANGLE_PLATFORM_WATCH) || !ANGLE_PLATFORM_WATCH case GL_MIRROR_CLAMP_TO_EDGE_EXT: return MTLSamplerAddressModeMirrorClampToEdge; #endif