From: Matt Turner Date: Fri, 24 Aug 2012 23:26:54 +0000 (-0700) Subject: egl: fix invalid flag detection for EGL_KHR_create_context X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=971750e1cd76dabe22bf2ca83f07266837e3a2a6;p=mesa.git 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 --- 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;