i965: Handle __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS flag
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 11 Sep 2012 07:31:13 +0000 (10:31 +0300)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 8 Nov 2013 01:40:25 +0000 (17:40 -0800)
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_context.c

index 3e6dade613d2d6c02067ef5d11190c3c47aaca12..44a6de7f15a66a2144f971f82ae548cf0df498e5 100644 (file)
@@ -580,7 +580,9 @@ brwCreateContext(gl_api api,
    struct dd_function_table functions;
    struct gl_config visual;
 
-   if (flags & ~(__DRI_CTX_FLAG_DEBUG | __DRI_CTX_FLAG_FORWARD_COMPATIBLE)) {
+   if (flags & ~(__DRI_CTX_FLAG_DEBUG
+                 | __DRI_CTX_FLAG_FORWARD_COMPATIBLE
+                 | __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS)) {
       *dri_ctx_error = __DRI_CTX_ERROR_UNKNOWN_FLAG;
       return false;
    }
@@ -755,6 +757,9 @@ brwCreateContext(gl_api api,
       brw->perf_debug = true;
    }
 
+   if ((flags & __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS) != 0)
+      ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB;
+
    brw_fs_alloc_reg_sets(brw);
    brw_vec4_alloc_reg_set(brw);