Commit df72ea36 by Lubosz Sarnecki Committed by Commit Bot

EGLWindow: Append noError context attribs only if enabled.

Push EGL_CONTEXT_OPENGL_NO_ERROR_KHR only to the context attribute list if it's enabled in the mConfigParams. Prior to this patch the attribute was pushed with a EGL_FALSE value if noError was disabled but available. This resolves issues on EGL implementations which expose the extension but fail if it's in the attrib list if certain conditions are met. This is the case for mesa 21.0 when EGL_CONTEXT_MAJOR_VERSION_KHR is set to 1 / GLES1. Mesa upstream issue: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4586 Bug: angleproject:5809 Change-Id: I91dfafe2a89f0488556942813087e54499895088 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2797331Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com> Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
parent 2489a0c1
...@@ -526,7 +526,9 @@ EGLContext EGLWindow::createContext(EGLContext share) const ...@@ -526,7 +526,9 @@ EGLContext EGLWindow::createContext(EGLContext share) const
contextAttributes.push_back(mConfigParams.debug ? EGL_TRUE : EGL_FALSE); contextAttributes.push_back(mConfigParams.debug ? EGL_TRUE : EGL_FALSE);
} }
if (hasKHRCreateContextNoError) // TODO (http://anglebug.com/5809)
// Mesa does not allow EGL_CONTEXT_OPENGL_NO_ERROR_KHR for GLES1.
if (hasKHRCreateContextNoError && mConfigParams.noError)
{ {
contextAttributes.push_back(EGL_CONTEXT_OPENGL_NO_ERROR_KHR); contextAttributes.push_back(EGL_CONTEXT_OPENGL_NO_ERROR_KHR);
contextAttributes.push_back(mConfigParams.noError ? EGL_TRUE : EGL_FALSE); contextAttributes.push_back(mConfigParams.noError ? EGL_TRUE : EGL_FALSE);
......
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