diff options
author | George Sapountzis <[email protected]> | 2008-07-07 18:34:17 +0300 |
---|---|---|
committer | George Sapountzis <[email protected]> | 2008-07-07 18:34:17 +0300 |
commit | a36bf890e8be3473f6a98f5ba4369e3acc0463ad (patch) | |
tree | afb5b7b54a15031eb4f5fb76b7d40acbe1eb0460 /src/glx | |
parent | e6e4f25aa5433fc77a3c1b0dba2300cc4cee5d33 (diff) |
glx: add LIBGL_ALWAYS_SOFTWARE
this disables accelerated DRI and fallbacks to client-side software rendering.
compile-tested only.
Diffstat (limited to 'src/glx')
-rw-r--r-- | src/glx/x11/glxext.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/glx/x11/glxext.c b/src/glx/x11/glxext.c index 777828569f4..d13d636699e 100644 --- a/src/glx/x11/glxext.c +++ b/src/glx/x11/glxext.c @@ -631,6 +631,9 @@ _X_HIDDEN __GLXdisplayPrivate *__glXInitialize(Display* dpy) __GLXdisplayPrivate *dpyPriv; XEDataObject dataObj; int major, minor; +#ifdef GLX_DIRECT_RENDERING + Bool glx_direct, glx_accel; +#endif #if defined(USE_XTHREADS) { @@ -698,16 +701,20 @@ _X_HIDDEN __GLXdisplayPrivate *__glXInitialize(Display* dpy) dpyPriv->serverGLXversion = 0x0; #ifdef GLX_DIRECT_RENDERING + glx_direct = (getenv("LIBGL_ALWAYS_INDIRECT") == NULL); + glx_accel = (getenv("LIBGL_ALWAYS_SOFTWARE") == NULL); + /* ** Initialize the direct rendering per display data and functions. ** Note: This _must_ be done before calling any other DRI routines ** (e.g., those called in AllocAndFetchScreenConfigs). */ - if (getenv("LIBGL_ALWAYS_INDIRECT") == NULL) { + if (glx_direct && glx_accel) { dpyPriv->dri2Display = dri2CreateDisplay(dpy); dpyPriv->driDisplay = driCreateDisplay(dpy); - dpyPriv->driswDisplay = driswCreateDisplay(dpy); } + if (glx_direct) + dpyPriv->driswDisplay = driswCreateDisplay(dpy); #endif if (!AllocAndFetchScreenConfigs(dpy, dpyPriv)) { |