diff options
author | Eric Engestrom <[email protected]> | 2017-12-20 15:53:08 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-12-27 22:31:38 +0000 |
commit | 2f421651aca9c0a308c8a632d1847bbd0598e294 (patch) | |
tree | 1ffba5467e987c05e8474a1783aa455e757b750e /src/egl | |
parent | e491bffc5c8da9fa0f7c08f78a7701ed5705d163 (diff) |
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 <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Reported-by: Brendan King <[email protected]>
Diffstat (limited to 'src/egl')
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.c | 4 | ||||
-rw-r--r-- | src/egl/drivers/dri2/platform_android.c | 4 | ||||
-rw-r--r-- | 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 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); |