dri: Allow __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS in driCreateContextAttribs
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 20 Nov 2013 17:09:50 +0000 (09:09 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 26 Nov 2013 21:13:38 +0000 (13:13 -0800)
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reported-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "10.0" <mesa-stable@lists.freedesktop.org>
src/mesa/drivers/dri/common/dri_util.c

index 44e47f94f8245169a95e418879727c1b450d72de..0bce77ea9c72ccb6c2433980454169deec780966 100644 (file)
@@ -407,8 +407,10 @@ driCreateContextAttribs(__DRIscreen *screen, int api,
        mesa_api = API_OPENGL_CORE;
     }
 
-    if ((flags & ~(__DRI_CTX_FLAG_DEBUG | __DRI_CTX_FLAG_FORWARD_COMPATIBLE))
-        != 0) {
+    const uint32_t allowed_flags = (__DRI_CTX_FLAG_DEBUG
+                                    | __DRI_CTX_FLAG_FORWARD_COMPATIBLE
+                                    | __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS);
+    if (flags & ~allowed_flags) {
        *error = __DRI_CTX_ERROR_UNKNOWN_FLAG;
        return NULL;
     }