summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2017-10-02 11:34:52 +0100
committerEric Engestrom <[email protected]>2017-10-02 13:10:48 +0100
commitc3f51526ac483c68d5d6fd164aab0527670f670b (patch)
tree2a0a4860475d311f5e38350e21702f63f07ecf3d /src/egl/drivers
parent6d23f7c65d6a3e6117b7b383bc811f01dd5b5c40 (diff)
egl/wayland: simplify LIBGL_ALWAYS_SOFTWARE logic
Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/egl/drivers')
-rw-r--r--src/egl/drivers/dri2/platform_wayland.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index ae3347756bc..011dddfabf4 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -1940,17 +1940,13 @@ dri2_initialize_wayland_swrast(_EGLDriver *drv, _EGLDisplay *disp)
EGLBoolean
dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
{
- EGLBoolean initialized = EGL_TRUE;
+ EGLBoolean initialized = EGL_FALSE;
- bool hw_accel = !env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false);
+ if (!env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false))
+ initialized = dri2_initialize_wayland_drm(drv, disp);
- if (hw_accel) {
- if (!dri2_initialize_wayland_drm(drv, disp)) {
- initialized = dri2_initialize_wayland_swrast(drv, disp);
- }
- } else {
+ if (!initialized)
initialized = dri2_initialize_wayland_swrast(drv, disp);
- }
return initialized;