From: Eric Engestrom Date: Wed, 20 Dec 2017 15:53:08 +0000 (+0000) Subject: egl: let each platform decided how to handle LIBGL_ALWAYS_SOFTWARE X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2f421651aca9c0a308c8a632d1847bbd0598e294;p=mesa.git egl: let each platform decided how to handle LIBGL_ALWAYS_SOFTWARE 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 Reviewed-by: Emil Velikov Reported-by: Brendan King --- diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 7cc9f20ba25..d5a4f72e86a 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 7cf03b3467f..1b3092b7b3b 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 416fd4cc657..a2d18ef5089 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);