glx, egl: Add LIBGL_DRI2_DISABLE environment variable
For orthogonality with LIBGL_DRI3_DISABLE. Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7688>
This commit is contained in:
parent
27612984a4
commit
a59b1b18a9
|
@ -23,6 +23,8 @@ LibGL environment variables
|
|||
``LIBGL_SHOW_FPS``
|
||||
print framerate to stdout based on the number of ``glXSwapBuffers``
|
||||
calls per second.
|
||||
``LIBGL_DRI2_DISABLE``
|
||||
disable DRI2 if set to ``true``.
|
||||
``LIBGL_DRI3_DISABLE``
|
||||
disable DRI3 if set to ``true``.
|
||||
|
||||
|
|
|
@ -1541,7 +1541,11 @@ dri2_initialize_x11(_EGLDisplay *disp)
|
|||
return EGL_TRUE;
|
||||
#endif
|
||||
|
||||
return dri2_initialize_x11_dri2(disp);
|
||||
if (!env_var_as_boolean("LIBGL_DRI2_DISABLE", false))
|
||||
if (dri2_initialize_x11_dri2(disp))
|
||||
return EGL_TRUE;
|
||||
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -926,7 +926,8 @@ __glXInitialize(Display * dpy)
|
|||
if (!env_var_as_boolean("LIBGL_DRI3_DISABLE", false))
|
||||
dpyPriv->dri3Display = dri3_create_display(dpy);
|
||||
#endif /* HAVE_DRI3 */
|
||||
dpyPriv->dri2Display = dri2CreateDisplay(dpy);
|
||||
if (!env_var_as_boolean("LIBGL_DRI2_DISABLE", false))
|
||||
dpyPriv->dri2Display = dri2CreateDisplay(dpy);
|
||||
dpyPriv->driDisplay = driCreateDisplay(dpy);
|
||||
}
|
||||
#endif /* GLX_USE_DRM */
|
||||
|
|
Loading…
Reference in New Issue