From 971750e1cd76dabe22bf2ca83f07266837e3a2a6 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Fri, 24 Aug 2012 16:26:54 -0700 Subject: [PATCH] egl: fix invalid flag detection for EGL_KHR_create_context We want to check whether there are bits set outside of the valid flags. Fixes piglit test egl-create-context-invalid-flag-gl Reviewed-by: Ian Romanick --- 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 829050d1475..71eca6f8961 100644 --- a/src/egl/main/eglcontext.c +++ b/src/egl/main/eglcontext.c @@ -341,7 +341,7 @@ _eglParseContextAttribList(_EGLContext *ctx, _EGLDisplay *dpy, break; } - if ((ctx->Flags & (EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR + if ((ctx->Flags & ~(EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR | EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR | EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR)) != 0) { err = EGL_BAD_ATTRIBUTE; -- 2.30.2