i965: Support the mesa_no_error driconf option.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 22 Jul 2017 07:51:03 +0000 (00:51 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 22 Jul 2017 18:42:42 +0000 (11:42 -0700)
This allows us to override contexts to use no_error functionality
even if the applications themselves do not.

Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/intel_screen.c

index b412ecff9018426c8f4f45ea13f5774005b1e58b..d0b22d4342bd842f126b130a09d4878070e8fe7e 100644 (file)
@@ -745,6 +745,9 @@ brw_process_driconf_options(struct brw_context *brw)
           brw->has_separate_stencil = false;
    }
 
+   if (driQueryOptionb(options, "mesa_no_error"))
+      ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR;
+
    if (driQueryOptionb(options, "always_flush_batch")) {
       fprintf(stderr, "flushing batchbuffer before/after each draw call\n");
       brw->always_flush_batch = true;
index 994513189b9ace5eb0baa605ffe48f59ac1e8627..5adb8ef1f638b84b51703f5a4a7e1e3447f51de8 100644 (file)
@@ -65,6 +65,7 @@ DRI_CONF_BEGIN
            DRI_CONF_ENUM(1, "Enable reuse of all sizes of buffer objects")
         DRI_CONF_DESC_END
       DRI_CONF_OPT_END
+      DRI_CONF_MESA_NO_ERROR("false")
    DRI_CONF_SECTION_END
 
    DRI_CONF_SECTION_QUALITY