summaryrefslogtreecommitdiffstats
path: root/src/egl/main
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2017-10-18 17:04:27 +0100
committerEric Engestrom <[email protected]>2017-10-18 17:25:41 +0100
commit47273d7312cb5b5b6b0b9faa814d574bbbce1c01 (patch)
treea50df3e40fdabd499feb76056ad1cb91676ba897 /src/egl/main
parent6414d6bd8d2897f4ba643357fe3037f3acd60879 (diff)
egl: set UseFallback if LIBGL_ALWAYS_SOFTWARE is set
Suggested-by: Emil Velikov <[email protected]> Signed-off-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/egl/main')
-rw-r--r--src/egl/main/egldriver.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/egl/main/egldriver.c b/src/egl/main/egldriver.c
index 33f8f57aeb1..1ff37850e05 100644
--- a/src/egl/main/egldriver.c
+++ b/src/egl/main/egldriver.c
@@ -44,6 +44,8 @@
#include "egldriver.h"
#include "egllog.h"
+#include "util/debug.h"
+
static mtx_t _eglModuleMutex = _MTX_INITIALIZER_NP;
static _EGLDriver *_eglDriver;
@@ -86,7 +88,8 @@ _eglMatchDriver(_EGLDisplay *dpy)
assert(!dpy->Initialized);
/* set options */
- dpy->Options.UseFallback = EGL_FALSE;
+ dpy->Options.UseFallback =
+ env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false);
best_drv = _eglMatchAndInitialize(dpy);
if (!best_drv) {