[Mesa-dev] [PATCH 2/2] glx: provide a way to disable DRI3 using an environment variable
Martin Peres
martin.peres at linux.intel.com
Wed May 6 05:43:43 PDT 2015
This provides an easy way to test differences in rendering performance
or conformance between DRI2 and DRI3.
Signed-off-by: Martin Peres <martin.peres at linux.intel.com>
---
docs/envvars.html | 1 +
src/glx/dri3_glx.c | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/docs/envvars.html b/docs/envvars.html
index 31d14a4..73d8919 100644
--- a/docs/envvars.html
+++ b/docs/envvars.html
@@ -115,6 +115,7 @@ See the <a href="xlibdriver.html">Xlib software driver page</a> for details.
<li>MESA_GLX_FORCE_ALPHA - if set, forces RGB windows to have an alpha channel.
<li>MESA_GLX_DEPTH_BITS - specifies default number of bits for depth buffer.
<li>MESA_GLX_ALPHA_BITS - specifies default number of bits for alpha channel.
+<li>MESA_GLX_DRI3_DISABLE - disables DRI3 support.
</ul>
diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c
index ff77a91..5246737 100644
--- a/src/glx/dri3_glx.c
+++ b/src/glx/dri3_glx.c
@@ -2092,6 +2092,11 @@ dri3_create_display(Display * dpy)
xcb_generic_error_t *error;
const xcb_query_extension_reply_t *extension;
+ if (getenv("MESA_GLX_DRI3_DISABLE")) {
+ ErrorMessageF("DRI3 disabled by the environment\n");
+ return NULL;
+ }
+
xcb_prefetch_extension_data(c, &xcb_dri3_id);
xcb_prefetch_extension_data(c, &xcb_present_id);
--
2.3.7
More information about the mesa-dev
mailing list