Bug 1366175 - Add skip validation attribute when creating ANGLE GL context
MozReview-Commit-ID: LpLGQhjJFW2
--- a/gfx/gl/GLConsts.h
+++ b/gfx/gl/GLConsts.h
@@ -5286,16 +5286,17 @@
#define LOCAL_EGL_NO_SYNC_NV ((EGLSyncNV)0)
#define LOCAL_EGL_NO_TEXTURE 0x305C
#define LOCAL_EGL_OPENGL_API 0x30A2
#define LOCAL_EGL_OPENGL_BIT 0x0008
#define LOCAL_EGL_OPENGL_ES2_BIT 0x0004
#define LOCAL_EGL_OPENGL_ES3_BIT_KHR 0x00000040
#define LOCAL_EGL_OPENGL_ES_API 0x30A0
#define LOCAL_EGL_OPENGL_ES_BIT 0x0001
+#define LOCAL_EGL_OPENGL_NO_ERROR_KHR 0x31B3
#define LOCAL_EGL_OPENMAX_IL_BIT_KHR 0x0020
#define LOCAL_EGL_OPENVG_API 0x30A1
#define LOCAL_EGL_OPENVG_BIT 0x0002
#define LOCAL_EGL_OPENVG_IMAGE 0x3096
#define LOCAL_EGL_OPTIMAL_FORMAT_BIT_KHR 0x0100
#define LOCAL_EGL_PBUFFER_BIT 0x0001
#define LOCAL_EGL_PBUFFER_IMAGE_BIT_TAO 0x0008
#define LOCAL_EGL_PBUFFER_PALETTE_IMAGE_BIT_TAO 0x0010
--- a/gfx/gl/GLContextProviderEGL.cpp
+++ b/gfx/gl/GLContextProviderEGL.cpp
@@ -504,16 +504,21 @@ GLContextEGL::CreateGLContext(CreateCont
rbab_attribs.push_back(LOCAL_EGL_CONTEXT_FLAGS_KHR);
rbab_attribs.push_back(LOCAL_EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR);
}
}
const auto fnCreate = [&](const std::vector<EGLint>& attribs) {
auto terminated_attribs = attribs;
+ if (sEGLLibrary.IsANGLE()) {
+ terminated_attribs.push_back(LOCAL_EGL_OPENGL_NO_ERROR_KHR);
+ terminated_attribs.push_back(LOCAL_GL_TRUE);
+ }
+
for (const auto& cur : kTerminationAttribs) {
terminated_attribs.push_back(cur);
}
return sEGLLibrary.fCreateContext(EGL_DISPLAY(), config, EGL_NO_CONTEXT,
terminated_attribs.data());
};