st/mesa: Add KHR_no_error toggle to driconf
authorGrigori Goronzy <greg@chown.ath.cx>
Thu, 29 Jun 2017 05:39:55 +0000 (07:39 +0200)
committerGrigori Goronzy <greg@chown.ath.cx>
Fri, 14 Jul 2017 19:23:44 +0000 (21:23 +0200)
Allows applications to be whitelisted.

v2: Remove misguided DRI common part.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/state_trackers/dri/dri_context.c
src/gallium/state_trackers/dri/dri_screen.c
src/mesa/drivers/dri/common/xmlpool/t_options.h

index 275c0d4586625ede2f5152cffe36477099ff96fa..8c3797e42858456ab1c3b5092e4b04104bfeb406 100644 (file)
@@ -124,6 +124,9 @@ dri_create_context(gl_api api, const struct gl_config * visual,
    ctx->cPriv = cPriv;
    ctx->sPriv = sPriv;
 
+   if (driQueryOptionb(&screen->optionCache, "mesa_no_error"))
+      attribs.flags |= ST_CONTEXT_FLAG_NO_ERROR;
+
    attribs.options = screen->options;
    dri_fill_st_visual(&attribs.visual, screen, visual);
    ctx->st = stapi->create_context(stapi, &screen->base, &attribs, &ctx_err,
index a0d9b34d667b34470d814b1fd662780c7feb078a..1dd7bd3ec12d02d3c59c19a364505b2c157d572c 100644 (file)
@@ -56,6 +56,7 @@ const __DRIconfigOptionsExtension gallium_config_options = {
    DRI_CONF_BEGIN
       DRI_CONF_SECTION_PERFORMANCE
          DRI_CONF_MESA_GLTHREAD("false")
+         DRI_CONF_MESA_NO_ERROR("false")
          DRI_CONF_DISABLE_EXT_BUFFER_AGE("false")
          DRI_CONF_DISABLE_OML_SYNC_CONTROL("false")
       DRI_CONF_SECTION_END
index 9aa1798b9d9c658933705e7bdcf233830c39b11e..e308839aa78e0ff6fc72eae48b587360e8f6649a 100644 (file)
@@ -332,6 +332,11 @@ DRI_CONF_OPT_BEGIN_B(mesa_glthread, def) \
         DRI_CONF_DESC(en,gettext("Enable offloading GL driver work to a separate thread")) \
 DRI_CONF_OPT_END
 
+#define DRI_CONF_MESA_NO_ERROR(def) \
+DRI_CONF_OPT_BEGIN_B(mesa_no_error, def) \
+        DRI_CONF_DESC(en,gettext("Disable GL driver error checking")) \
+DRI_CONF_OPT_END
+
 #define DRI_CONF_DISABLE_EXT_BUFFER_AGE(def) \
 DRI_CONF_OPT_BEGIN_B(glx_disable_ext_buffer_age, def) \
    DRI_CONF_DESC(en, gettext("Disable the GLX_EXT_buffer_age extension")) \