Commit 19a1943b by Kenneth Russell Committed by Commit Bot

Allow GetSystemInfo to return false in CGL and EAGL backends.

This API is documented as returning false if information is incomplete, but this should not cause a failure to initialize ANGLE's Display. This change is a refinement of one made in WebKit's downstream copy of ANGLE, likely in support of forthcoming Macs with Apple Silicon, in https://bugs.webkit.org/show_bug.cgi?id=213479 . Bug: angleproject:4902 Change-Id: I40a664a5db67b2aa37f15617b1cbcc3119793ee0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2324462Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarJonah Ryan-Davis <jonahr@google.com> Commit-Queue: Kenneth Russell <kbr@chromium.org>
parent f3a38d97
...@@ -145,10 +145,9 @@ egl::Error DisplayCGL::initialize(egl::Display *display) ...@@ -145,10 +145,9 @@ egl::Error DisplayCGL::initialize(egl::Display *display)
mEGLDisplay = display; mEGLDisplay = display;
angle::SystemInfo info; angle::SystemInfo info;
if (!angle::GetSystemInfo(&info)) // It's legal for GetSystemInfo to return false and thereby
{ // contain incomplete information.
return egl::EglNotInitialized() << "Unable to query ANGLE's SystemInfo."; (void)angle::GetSystemInfo(&info);
}
// This code implements the effect of the // This code implements the effect of the
// disableGPUSwitchingSupport workaround in FeaturesGL. // disableGPUSwitchingSupport workaround in FeaturesGL.
......
...@@ -66,10 +66,9 @@ egl::Error DisplayEAGL::initialize(egl::Display *display) ...@@ -66,10 +66,9 @@ egl::Error DisplayEAGL::initialize(egl::Display *display)
mEGLDisplay = display; mEGLDisplay = display;
angle::SystemInfo info; angle::SystemInfo info;
if (!angle::GetSystemInfo(&info)) // It's legal for GetSystemInfo to return false and thereby
{ // contain incomplete information.
return egl::EglNotInitialized() << "Unable to query ANGLE's SystemInfo."; (void)angle::GetSystemInfo(&info);
}
mContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES3]; mContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES3];
if (mContext == nullptr) if (mContext == nullptr)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment