Skip to content

Commit

Permalink
Reland: ANGLE needs separate files for conditionally compiled sources…
Browse files Browse the repository at this point in the history
… for Cocoa

https://bugs.webkit.org/show_bug.cgi?id=255506
rdar://problem/108124823

Reviewed by Dean Jackson.

Add WebKit specific files that include conditional compiled code files
with the conditions. The per file conditions will be removed from the
individual files in upstream.

Make the build system define ANGLE_ENABLE_EAGL and the new, to be used
define ANGLE_ENABLE_CGL.

The defines are defined as follows:
  - All ANGLE_ENABLE_METAL
  - macOS ANGLE_ENABLE_CGL
  - macOS x86_64 MacCatalyst ANGLE_ENABLE_CGL
  - macOS ARM MacCatalyst ANGLE_ENABLE_CGL ANGLE_ENABLE_EAGL
    ANGLE_CPU_ARM64
  - iOS family ANGLE_ENABLE_EAGL

Reland:
  Add removed define ANGLE_CPU_ARM64 to the xcconfig when compiling on
  ARM MacCatalyst.

* Source/ThirdParty/ANGLE/ANGLE.xcodeproj/project.pbxproj:
* Source/ThirdParty/ANGLE/Configurations/ANGLE-dynamic.xcconfig:
* Source/ThirdParty/ANGLE/WebKit/SourcesCGL-mm.mm: Added.
* Source/ThirdParty/ANGLE/WebKit/SourcesCGL.cpp: Added.
* Source/ThirdParty/ANGLE/WebKit/SourcesEAGL.cpp: Added.
* Source/ThirdParty/ANGLE/WebKit/SourcesEAGL1-mm.mm: Added.
* Source/ThirdParty/ANGLE/WebKit/SourcesEAGL2-mm.mm: Added.
* Source/ThirdParty/ANGLE/WebKit/SourcesGL.cpp: Added.
* Source/ThirdParty/ANGLE/WebKit/SourcesPlatform-mm.mm: Added.
* Source/ThirdParty/ANGLE/WebKit/SourcesPlatform.cpp: Added.
* Source/ThirdParty/ANGLE/src/common/platform.h:
* Source/ThirdParty/ANGLE/src/libANGLE/Display.cpp:
* Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/apple/DisplayApple_api.cpp:

Canonical link: https://commits.webkit.org/263138@main
  • Loading branch information
kkinnunen-apple committed Apr 19, 2023
1 parent aa1ea27 commit 2cf413f
Show file tree
Hide file tree
Showing 13 changed files with 311 additions and 77 deletions.
102 changes: 40 additions & 62 deletions Source/ThirdParty/ANGLE/ANGLE.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

14 changes: 11 additions & 3 deletions Source/ThirdParty/ANGLE/Configurations/ANGLE-dynamic.xcconfig
Expand Up @@ -29,9 +29,17 @@ PUBLIC_HEADERS_FOLDER_PATH[sdk=macosx*] = $(PUBLIC_HEADERS_FOLDER_PATH_$(WK_PLAT
PUBLIC_HEADERS_FOLDER_PATH_macosx = $(ANGLE_HEADERS_FOLDER_PATH);
PUBLIC_HEADERS_FOLDER_PATH_maccatalyst = $(WK_ALTERNATE_FRAMEWORKS_DIR)/$(ANGLE_HEADERS_FOLDER_PATH);

GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) LIBGLESV2_IMPLEMENTATION LIBANGLE_IMPLEMENTATION ANGLE_CAPTURE_ENABLED=0 ANGLE_ENABLE_OPENGL ANGLE_ENABLE_GLSL ANGLE_ENABLE_ESSL GL_SILENCE_DEPRECATION GLES_SILENCE_DEPRECATION ANGLE_ENABLE_METAL ANGLE_METAL_XCODE_BUILDS_SHADERS ANGLE_ENABLE_APPLE_WORKAROUNDS ANGLE_ENABLE_METAL_OWNERSHIP_IDENTITY;

GCC_PREPROCESSOR_DEFINITIONS[sdk=macosx*] = $(DEBUG_DEFINES) LIBGLESV2_IMPLEMENTATION LIBANGLE_IMPLEMENTATION ANGLE_CAPTURE_ENABLED=0 ANGLE_ENABLE_OPENGL ANGLE_ENABLE_GLSL ANGLE_ENABLE_ESSL GL_SILENCE_DEPRECATION GLES_SILENCE_DEPRECATION ANGLE_ENABLE_METAL ANGLE_METAL_XCODE_BUILDS_SHADERS ANGLE_ENABLE_APPLE_WORKAROUNDS ANGLE_ENABLE_METAL_OWNERSHIP_IDENTITY ANGLE_ENABLE_GL_DESKTOP_BACKEND
GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) LIBGLESV2_IMPLEMENTATION LIBANGLE_IMPLEMENTATION ANGLE_CAPTURE_ENABLED=0 ANGLE_ENABLE_METAL ANGLE_METAL_XCODE_BUILDS_SHADERS ANGLE_ENABLE_METAL_OWNERSHIP_IDENTITY $(GCC_PREPROCESSOR_DEFINITIONS_$(WK_PLATFORM_NAME));
GCC_PREPROCESSOR_DEFINITIONS_macosx = ANGLE_ENABLE_GLSL ANGLE_ENABLE_ESSL ANGLE_ENABLE_OPENGL ANGLE_ENABLE_GL_DESKTOP_BACKEND ANGLE_ENABLE_APPLE_WORKAROUNDS ANGLE_ENABLE_CGL GL_SILENCE_DEPRECATION
GCC_PREPROCESSOR_DEFINITIONS_maccatalyst = $(GCC_PREPROCESSOR_DEFINITIONS_macosx)
GCC_PREPROCESSOR_DEFINITIONS_maccatalyst[arch=arm*] = $(GCC_PREPROCESSOR_DEFINITIONS_macosx) ANGLE_ENABLE_EAGL GLES_SILENCE_DEPRECATION ANGLE_CPU_ARM64
// FIXME: Rest of the iOS family does not need EAGL, these will be removed when upstream is able to compile without it.
GCC_PREPROCESSOR_DEFINITIONS_iphoneos = ANGLE_ENABLE_GLSL ANGLE_ENABLE_ESSL ANGLE_ENABLE_OPENGL ANGLE_ENABLE_APPLE_WORKAROUNDS ANGLE_ENABLE_EAGL GLES_SILENCE_DEPRECATION
GCC_PREPROCESSOR_DEFINITIONS_iphonesimulator = $(GCC_PREPROCESSOR_DEFINITIONS_iphoneos);
GCC_PREPROCESSOR_DEFINITIONS_watchos = $(GCC_PREPROCESSOR_DEFINITIONS_iphoneos);
GCC_PREPROCESSOR_DEFINITIONS_watchsimulator = $(GCC_PREPROCESSOR_DEFINITIONS_iphoneos);
GCC_PREPROCESSOR_DEFINITIONS_appletvos = $(GCC_PREPROCESSOR_DEFINITIONS_iphoneos);
GCC_PREPROCESSOR_DEFINITIONS_appletvsimulator = $(GCC_PREPROCESSOR_DEFINITIONS_iphoneos);

DEAD_CODE_STRIPPING = YES;
DEAD_CODE_STRIPPING[config=Debug] = NO;
Expand Down
31 changes: 31 additions & 0 deletions Source/ThirdParty/ANGLE/WebKit/SourcesCGL-mm.mm
@@ -0,0 +1,31 @@
/*
* Copyright (C) 2023 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include "common/platform.h"

#if ANGLE_ENABLE_CGL
#import "libANGLE/renderer/gl/cgl/DisplayCGL.mm"
#import "libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm"
#endif
35 changes: 35 additions & 0 deletions Source/ThirdParty/ANGLE/WebKit/SourcesCGL.cpp
@@ -0,0 +1,35 @@
/*
* Copyright (C) 2023 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include "common/platform.h"

#if ANGLE_ENABLE_CGL
#include "libANGLE/renderer/gl/cgl/DeviceCGL.cpp"
#include "libANGLE/renderer/gl/cgl/PbufferSurfaceCGL.cpp"
#include "libANGLE/renderer/gl/cgl/ContextCGL.cpp"
#include "libANGLE/renderer/gl/cgl/RendererCGL.cpp"
#include "libANGLE/renderer/gl/cgl/IOSurfaceSurfaceCGL.cpp"
#include "common/gl/cgl/FunctionsCGL.cpp"
#endif
33 changes: 33 additions & 0 deletions Source/ThirdParty/ANGLE/WebKit/SourcesEAGL.cpp
@@ -0,0 +1,33 @@
/*
* Copyright (C) 2023 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include "common/platform.h"

#if ANGLE_ENABLE_EAGL
#include "libANGLE/renderer/gl/eagl/ContextEAGL.cpp"
#include "libANGLE/renderer/gl/eagl/DeviceEAGL.cpp"
#include "libANGLE/renderer/gl/eagl/PbufferSurfaceEAGL.cpp"
#include "libANGLE/renderer/gl/eagl/RendererEAGL.cpp"
#endif
32 changes: 32 additions & 0 deletions Source/ThirdParty/ANGLE/WebKit/SourcesEAGL1-mm.mm
@@ -0,0 +1,32 @@
/*
* Copyright (C) 2023 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#import "common/platform.h"

#if ANGLE_ENABLE_EAGL
#import "libANGLE/renderer/gl/eagl/DisplayEAGL.mm"
#import "libANGLE/renderer/gl/eagl/IOSurfaceSurfaceEAGL.mm"
#import "libANGLE/renderer/gl/eagl/WindowSurfaceEAGL.mm"
#endif
30 changes: 30 additions & 0 deletions Source/ThirdParty/ANGLE/WebKit/SourcesEAGL2-mm.mm
@@ -0,0 +1,30 @@
/*
* Copyright (C) 2023 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#import "common/platform.h"

#if ANGLE_ENABLE_EAGL
#import "libANGLE/renderer/gl/eagl/FunctionsEAGL.mm"
#endif
37 changes: 37 additions & 0 deletions Source/ThirdParty/ANGLE/WebKit/SourcesGL.cpp
@@ -0,0 +1,37 @@
/*
* Copyright (C) 2023 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include "common/platform.h"

#if ANGLE_ENABLE_GLSL && ANGLE_ENABLE_APPLE_WORKAROUNDS
#include "compiler/translator/tree_ops/apple/AddAndTrueToLoopCondition.cpp"
#include "compiler/translator/tree_ops/apple/RewriteDoWhile.cpp"
#include "compiler/translator/tree_ops/apple/RewriteRowMajorMatrices.cpp"
#include "compiler/translator/tree_ops/apple/RewriteUnaryMinusOperatorFloat.cpp"
#include "compiler/translator/tree_ops/apple/UnfoldShortCircuitAST.cpp"
#endif
#if ANGLE_ENABLE_GLSL
#include "compiler/translator/tree_ops/gl/RegenerateStructNames.cpp"
#endif
30 changes: 30 additions & 0 deletions Source/ThirdParty/ANGLE/WebKit/SourcesPlatform-mm.mm
@@ -0,0 +1,30 @@
/*
* Copyright (C) 2023 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include "common/platform.h"

#if ANGLE_PLATFORM_MACOS || ANGLE_PLATFORM_MACCATALYST
#include "gpu_info_util/SystemInfo_macos.mm"
#endif
30 changes: 30 additions & 0 deletions Source/ThirdParty/ANGLE/WebKit/SourcesPlatform.cpp
@@ -0,0 +1,30 @@
/*
* Copyright (C) 2023 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include "common/platform.h"

#if !(ANGLE_PLATFORM_MACOS || ANGLE_PLATFORM_MACCATALYST)
#include "gpu_info_util/SystemInfo_ios.cpp"
#endif
11 changes: 0 additions & 11 deletions Source/ThirdParty/ANGLE/src/common/platform.h
Expand Up @@ -145,17 +145,6 @@
# 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_WATCH) \
|| defined(ANGLE_PLATFORM_APPLETV)) && !defined(ANGLE_PLATFORM_MACCATALYST)) || \
(defined(ANGLE_PLATFORM_MACCATALYST) && defined(ANGLE_CPU_ARM64))
# define ANGLE_ENABLE_EAGL
# endif
# // Identify Metal API >= what shipped on macOS Catalina.
# if (defined(ANGLE_PLATFORM_MACOS) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101500) || \
(defined(ANGLE_PLATFORM_IOS) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000)
Expand Down
2 changes: 1 addition & 1 deletion Source/ThirdParty/ANGLE/src/libANGLE/Display.cpp
Expand Up @@ -342,7 +342,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib displayType,
impl = new rx::DisplayWGL(state);
break;

# elif defined(ANGLE_PLATFORM_MACOS) || defined(ANGLE_PLATFORM_APPLE_EMBEDDED)
# elif ANGLE_ENABLE_CGL || ANGLE_ENABLE_EAGL
impl = rx::CreateDisplayCGLOrEAGL(state);
break;

Expand Down
Expand Up @@ -10,6 +10,7 @@
#ifndef LIBANGLE_RENDERER_GL_APPLE_DISPLAYAPPLE_API_H_
#define LIBANGLE_RENDERER_GL_APPLE_DISPLAYAPPLE_API_H_

#include "common/platform.h"
#include "gpu_info_util/SystemInfo.h"
#include "libANGLE/renderer/DisplayImpl.h"

Expand Down

0 comments on commit 2cf413f

Please sign in to comment.