[Mesa-dev] [PATCH mesa 1/3] egl: let each platform decided how to handle LIBGL_ALWAYS_SOFTWARE
Eric Engestrom
eric.engestrom at imgtec.com
Wed Dec 20 15:53:08 UTC 2017
My refactor in 47273d7312cb5b5b6b0b9 missed this early return; because
of it, setting UseFallback one layer above actually prevented the
software path from being used.
Remove this early return and let each platform's dri2_initialize_*()
decide what it can do with the LIBGL_ALWAYS_SOFTWARE restriction.
platform_{surfaceless,x11,wayland} were already handling it themselves.
Fixes: 47273d7312cb5b5b6b0b9 "egl: set UseFallback if LIBGL_ALWAYS_SOFTWARE is set"
Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>
---
src/egl/drivers/dri2/egl_dri2.c | 4 ----
src/egl/drivers/dri2/platform_android.c | 4 ++++
src/egl/drivers/dri2/platform_drm.c | 4 ++++
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 6260737bec107ea64ec3..da5101185b336756b220 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -910,10 +910,6 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp)
return EGL_TRUE;
}
- /* not until swrast_dri is supported */
- if (disp->Options.UseFallback)
- return EGL_FALSE;
-
switch (disp->Platform) {
case _EGL_PLATFORM_SURFACELESS:
ret = dri2_initialize_surfaceless(drv, disp);
diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
index 7cf03b3467f285e36117..1b3092b7b3bf43324c9e 100644
--- a/src/egl/drivers/dri2/platform_android.c
+++ b/src/egl/drivers/dri2/platform_android.c
@@ -1179,6 +1179,10 @@ dri2_initialize_android(_EGLDriver *drv, _EGLDisplay *dpy)
const char *err;
int ret;
+ /* Not supported yet */
+ if (disp->Options.UseFallback)
+ return EGL_FALSE;
+
loader_set_logger(_eglLog);
dri2_dpy = calloc(1, sizeof(*dri2_dpy));
diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c
index 416fd4cc657bb975e378..a2d18ef508938c7ec355 100644
--- a/src/egl/drivers/dri2/platform_drm.c
+++ b/src/egl/drivers/dri2/platform_drm.c
@@ -652,6 +652,10 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
struct gbm_device *gbm;
const char *err;
+ /* Not supported yet */
+ if (disp->Options.UseFallback)
+ return EGL_FALSE;
+
loader_set_logger(_eglLog);
dri2_dpy = calloc(1, sizeof *dri2_dpy);
--
Cheers,
Eric
More information about the mesa-dev
mailing list