From 053236575958bb2a29ad88b77021e0ea3f08a957 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Tue, 6 Apr 2021 19:03:04 +0300 Subject: [PATCH] egl: support no error attribute set to false with ES 1.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We advertise the extension so it should support case where context has attribute EGL_CONTEXT_OPENGL_NO_ERROR_KHR set to EGL_FALSE indepdendent of ES version used. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4586 Signed-off-by: Tapani Pälli Reviewed-by: Adam Jackson Cc: mesa-stable Part-of: --- src/egl/main/eglcontext.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c index 65dc886abbb..15de7c99496 100644 --- a/src/egl/main/eglcontext.c +++ b/src/egl/main/eglcontext.c @@ -334,8 +334,8 @@ _eglParseContextAttribList(_EGLContext *ctx, _EGLDisplay *disp, /* The KHR_no_error spec only applies against OpenGL 2.0+ and * OpenGL ES 2.0+ */ - if ((api != EGL_OPENGL_API && api != EGL_OPENGL_ES_API) || - ctx->ClientMajorVersion < 2) { + if (((api != EGL_OPENGL_API && api != EGL_OPENGL_ES_API) || + ctx->ClientMajorVersion < 2) && val == EGL_TRUE) { err = EGL_BAD_ATTRIBUTE; break; }