[Mesa-dev] [PATCH] egl: return correct error code for a case req ver < 3 with forward-compatible
asimiklit.work at gmail.com
asimiklit.work at gmail.com
Thu Oct 11 11:12:11 UTC 2018
From: Andrii Simiklit <andrii.simiklit at globallogic.com>
The EGL_KHR_create_context spec says:
"If an OpenGL context is requested and the values for attributes
EGL_CONTEXT_MAJOR_VERSION_KHR and EGL_CONTEXT_MINOR_VERSION_KHR,
when considered together with the value for attribute
EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR, specify an OpenGL
version and feature set that are not defined, than an
EGL_BAD_MATCH error is generated."
This case will be correctly handled
a bit below after a 'for' loop when we
remove this handling.
Fixes: 11cabc45b712 "egl: rework handling EGL_CONTEXT_FLAGS"
Bugzilla: https://bugzilla.freedesktop.org/show_bug.cgi?id=92552
Signed-off-by: Andrii Simiklit <andrii.simiklit at globallogic.com>
---
src/egl/main/eglcontext.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c
index ecc546e113..44a4469a97 100644
--- a/src/egl/main/eglcontext.c
+++ b/src/egl/main/eglcontext.c
@@ -179,7 +179,7 @@ _eglParseContextAttribList(_EGLContext *ctx, _EGLDisplay *dpy,
* will generate an error."
*/
if ((val & EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR) &&
- (api != EGL_OPENGL_API || ctx->ClientMajorVersion < 3)) {
+ api != EGL_OPENGL_API) {
err = EGL_BAD_ATTRIBUTE;
break;
}
--
2.17.1
More information about the mesa-dev
mailing list