[angle] update for gcc 10 compatibility (#11394)

* [angle] update for gcc 10 compatibility

* [angle] macos fix

* [angle] Fix UWP builds

Co-authored-by: Igor Kostenko <ikostenko@perforce.com>
This commit is contained in:
Igor Kostenko 2020-05-19 23:07:37 +01:00 committed by GitHub
parent 0116b86e38
commit 36fcce0bbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 53 deletions

View File

@ -1,28 +1,3 @@
diff --git a/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp b/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp
index 0c9698450..3e37ad0ab 100644
--- a/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp
+++ b/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp
@@ -2364,6 +2364,11 @@ void InitializeFeatures(const Renderer11DeviceCaps &deviceCaps,
bool isIvyBridge = false;
bool isAMD = IsAMD(adapterDesc.VendorId);
bool isFeatureLevel9_3 = (deviceCaps.featureLevel <= D3D_FEATURE_LEVEL_9_3);
+#if defined(ANGLE_ENABLE_WINDOWS_UWP)
+ bool isWin10 = true;
+#else
+ bool isWin10 = IsWindows10OrGreater();
+#endif
IntelDriverVersion capsVersion = IntelDriverVersion(0);
if (isIntel)
{
@@ -2448,7 +2453,7 @@ void InitializeFeatures(const Renderer11DeviceCaps &deviceCaps,
// Don't translate uniform block to StructuredBuffer on Windows 7 and earlier. This is targeted
// to work around a bug that fails to allocate ShaderResourceView for StructuredBuffer.
ANGLE_FEATURE_CONDITION(features, dontTranslateUniformBlockToStructuredBuffer,
- !IsWindows10OrGreater());
+ !isWin10);
// Call platform hooks for testing overrides.
auto *platform = ANGLEPlatformCurrent();
diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp
index 7d3f078d6..fac057dd6 100644
--- a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp
@ -53,25 +28,3 @@ index 7d3f078d6..fac057dd6 100644
}
}
diff --git a/src/libGLESv2/global_state.cpp b/src/libGLESv2/global_state.cpp
index 8c2c61f53..7725106a4 100644
--- a/src/libGLESv2/global_state.cpp
+++ b/src/libGLESv2/global_state.cpp
@@ -214,7 +214,7 @@ namespace
{
// The following WaitForDebugger code is based on SwiftShader. See:
// https://cs.chromium.org/chromium/src/third_party/swiftshader/src/Vulkan/main.cpp
-# if defined(ANGLE_ENABLE_ASSERTS)
+# if defined(ANGLE_ENABLE_ASSERTS) && !defined(ANGLE_ENABLE_WINDOWS_UWP)
INT_PTR CALLBACK DebuggerWaitDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
RECT rect;
@@ -259,7 +259,7 @@ void WaitForDebugger(HINSTANCE instance)
}
# else
void WaitForDebugger(HINSTANCE instance) {}
-# endif // defined(ANGLE_ENABLE_ASSERTS)
+# endif // defined(ANGLE_ENABLE_ASSERTS) && !defined(ANGLE_ENABLE_WINDOWS_UWP)
} // namespace
extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID)

View File

@ -51,7 +51,7 @@ include_directories("$<INSTALL_INTERFACE:include>" "$<BUILD_INTERFACE:${CMAKE_CU
if(WINDOWS_DESKTOP)
set(ANGLE_COMMON_PLATFORM_FILTER "_linux|_mac|_posix|_winuwp")
elseif(WINDOWS_STORE)
set(ANGLE_COMMON_PLATFORM_FILTER "_linux|_mac|_posix|_win[^u]")
set(ANGLE_COMMON_PLATFORM_FILTER "_linux|_mac|_posix|_win32")
elseif(LINUX)
set(ANGLE_COMMON_PLATFORM_FILTER "_win|_mac")
elseif(APPLE)
@ -132,7 +132,7 @@ if(WINDOWS_DESKTOP OR LINUX OR APPLE)
"src/libANGLE/renderer/gl/cgl/*.cpp"
"src/libANGLE/renderer/gl/cgl/*.inl"
"src/libANGLE/renderer/gl/cgl/*.h"
"gpu_info_util/SystemInfo_mac.mm"
"gpu_info_util/SystemInfo_macos.mm"
)
elseif(LINUX)
set(ANGLE_RENDERER_OPENGL_PLATFORM
@ -212,7 +212,7 @@ if(WIN32)
target_sources(angle_gpu_info_util PRIVATE "src/gpu_info_util/SystemInfo_win.cpp")
target_link_libraries(angle_gpu_info_util PRIVATE setupapi.lib dxgi.lib)
elseif(APPLE)
target_sources(angle_gpu_info_util PRIVATE "src/gpu_info_util/SystemInfo_mac.mm")
target_sources(angle_gpu_info_util PRIVATE "src/gpu_info_util/SystemInfo_macos.mm")
find_library(IOKit IOKit)
find_library(CoreFoundation CoreFoundation)
find_library(CoreGraphics CoreGraphics)

View File

@ -1,5 +1,5 @@
Source: angle
Version: 2019-12-31-2
Version: 2020-05-15
Homepage: https://github.com/google/angle
Description: A conformant OpenGL ES implementation for Windows, Mac and Linux.
The goal of ANGLE is to allow users of multiple operating systems to seamlessly run WebGL and other OpenGL ES content by translating OpenGL ES API calls to one of the hardware-supported APIs available for that platform. ANGLE currently provides translation from OpenGL ES 2.0 and 3.0 to desktop OpenGL, OpenGL ES, Direct3D 9, and Direct3D 11. Support for translation from OpenGL ES to Vulkan is underway, and future plans include compute shader support (ES 3.1) and MacOS support.

View File

@ -18,8 +18,8 @@ endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/angle
REF 1fdf6ca5141d8e349e875eab6e51d93d929a7f0e
SHA512 2553307f3d10b5c32166b9ed610b4b15310dccba00c644cd35026de86d87ea2e221c2e528f33b02f01c1ded2f08150e429de1fa300b73d655f8944f6f5047a82
REF d949154da428bb3e924e28a8eadfe2327631c8bb # chromium/4148
SHA512 3ef1c94fccfca592057652e0ad305e3025184675e2323a714428ec934048496fbd242b5e1298bb5e3b3058b53d54f6889e446cbd81af7bea2cc6d5e13c7356bd
# On update check headers against opengl-registry
PATCHES
001-fix-uwp.patch
@ -28,6 +28,7 @@ vcpkg_from_github(
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/commit.h DESTINATION ${SOURCE_PATH})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/commit.h DESTINATION ${SOURCE_PATH}/src/common)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}