summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers
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/drivers
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/drivers')
-rw-r--r--src/egl/drivers/dri2/platform_surfaceless.c3
-rw-r--r--src/egl/drivers/dri2/platform_wayland.c3
-rw-r--r--src/egl/drivers/dri2/platform_x11.c2
3 files changed, 3 insertions, 5 deletions
diff --git a/src/egl/drivers/dri2/platform_surfaceless.c b/src/egl/drivers/dri2/platform_surfaceless.c
index 2af4a40b1a6..977b0460166 100644
--- a/src/egl/drivers/dri2/platform_surfaceless.c
+++ b/src/egl/drivers/dri2/platform_surfaceless.c
@@ -36,7 +36,6 @@
#include "egl_dri2.h"
#include "egl_dri2_fallbacks.h"
#include "loader.h"
-#include "util/debug.h"
static __DRIimage*
surfaceless_alloc_image(struct dri2_egl_display *dri2_dpy,
@@ -325,7 +324,7 @@ dri2_initialize_surfaceless(_EGLDriver *drv, _EGLDisplay *disp)
dri2_dpy->fd = -1;
disp->DriverData = (void *) dri2_dpy;
- if (!env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false)) {
+ if (!disp->Options.UseFallback) {
driver_loaded = surfaceless_probe_device(disp, false);
if (!driver_loaded)
_eglLog(_EGL_WARNING,
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index 14db55ca747..b38eb1c3354 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -42,7 +42,6 @@
#include "egl_dri2.h"
#include "egl_dri2_fallbacks.h"
#include "loader.h"
-#include "util/debug.h"
#include "util/u_vector.h"
#include "eglglobals.h"
@@ -1972,7 +1971,7 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
{
EGLBoolean initialized = EGL_FALSE;
- if (!env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false))
+ if (!disp->Options.UseFallback)
initialized = dri2_initialize_wayland_drm(drv, disp);
if (!initialized)
diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c
index 9c20ea8f8a9..5bcdb2dac74 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -1460,7 +1460,7 @@ dri2_initialize_x11(_EGLDriver *drv, _EGLDisplay *disp)
{
EGLBoolean initialized = EGL_FALSE;
- if (!env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false)) {
+ if (!disp->Options.UseFallback) {
#ifdef HAVE_DRI3
if (!env_var_as_boolean("LIBGL_DRI3_DISABLE", false))
initialized = dri2_initialize_x11_dri3(drv, disp);