Module: Mesa Branch: master Commit: 14e431b270331ee8c6d638729b4b8e8703f8e52e URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=14e431b270331ee8c6d638729b4b8e8703f8e52e
Author: Eric Engestrom <[email protected]> Date: Fri Sep 8 11:55:14 2017 +0100 egl+glx: turn LIBGL_DRI3_DISABLE into a boolean Instead of setting based on set/unset, allow users to use boolean values. In the docs, use `DISABLE=true` instead of `DISABLE=1` as it's clearer IMO. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]> --- docs/envvars.html | 2 +- src/egl/drivers/dri2/platform_x11.c | 2 +- src/glx/glxext.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/envvars.html b/docs/envvars.html index aeb5ff2847..89563e3636 100644 --- a/docs/envvars.html +++ b/docs/envvars.html @@ -34,7 +34,7 @@ sometimes be useful for debugging end-user issues. <li>LIBGL_NO_DRAWARRAYS - if set do not use DrawArrays GLX protocol (for debugging) <li>LIBGL_SHOW_FPS - print framerate to stdout based on the number of glXSwapBuffers calls per second. -<li>LIBGL_DRI3_DISABLE - disable DRI3 if set (the value does not matter) +<li>LIBGL_DRI3_DISABLE - disable DRI3 if set to `true`. </ul> diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c index 5d5eea3773..d80eee2969 100644 --- a/src/egl/drivers/dri2/platform_x11.c +++ b/src/egl/drivers/dri2/platform_x11.c @@ -1461,7 +1461,7 @@ dri2_initialize_x11(_EGLDriver *drv, _EGLDisplay *disp) if (!env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false)) { #ifdef HAVE_DRI3 - if (!getenv("LIBGL_DRI3_DISABLE")) + if (!env_var_as_boolean("LIBGL_DRI3_DISABLE", false)) initialized = dri2_initialize_x11_dri3(drv, disp); #endif diff --git a/src/glx/glxext.c b/src/glx/glxext.c index 4021939712..5f23d3717a 100644 --- a/src/glx/glxext.c +++ b/src/glx/glxext.c @@ -920,7 +920,7 @@ __glXInitialize(Display * dpy) #if defined(GLX_USE_DRM) if (glx_direct && glx_accel) { #if defined(HAVE_DRI3) - if (!getenv("LIBGL_DRI3_DISABLE")) + if (!env_var_as_boolean("LIBGL_DRI3_DISABLE", false)) dpyPriv->dri3Display = dri3_create_display(dpy); #endif /* HAVE_DRI3 */ dpyPriv->dri2Display = dri2CreateDisplay(dpy); _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
