From: Eric Engestrom Date: Mon, 17 Aug 2020 18:31:45 +0000 (+0200) Subject: egl/surfaceless: simplify dri2_initialize_surfaceless() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f7e0cdcf1a5b639b4df610be600fa5d8db100289;p=mesa.git egl/surfaceless: simplify dri2_initialize_surfaceless() eglInitialize() already handles the "retry using the software path" logic, there's no need to repeat it here. Signed-off-by: Eric Engestrom Reviewed-by: Emil Velikov Part-of: --- diff --git a/src/egl/drivers/dri2/platform_surfaceless.c b/src/egl/drivers/dri2/platform_surfaceless.c index dd283673a83..8bd6009f8a0 100644 --- a/src/egl/drivers/dri2/platform_surfaceless.c +++ b/src/egl/drivers/dri2/platform_surfaceless.c @@ -326,15 +326,7 @@ dri2_initialize_surfaceless(_EGLDisplay *disp) dri2_dpy->fd = -1; disp->DriverData = (void *) dri2_dpy; - if (!disp->Options.ForceSoftware) { - driver_loaded = surfaceless_probe_device(disp, false); - if (!driver_loaded) - _eglLog(_EGL_WARNING, - "No hardware driver found, falling back to software rendering"); - } - - if (!driver_loaded) - driver_loaded = surfaceless_probe_device(disp, true); + driver_loaded = surfaceless_probe_device(disp, disp->Options.ForceSoftware); if (!driver_loaded) { _eglLog(_EGL_DEBUG, "Falling back to surfaceless swrast without DRM.");