From: Eric Engestrom Date: Mon, 17 Aug 2020 18:32:12 +0000 (+0200) Subject: egl/wayland: simplify dri2_initialize_wayland() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bd385c424bdda6ffe38ea9100c77e43337dd34b8;p=mesa.git egl/wayland: simplify dri2_initialize_wayland() 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_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index a443ee0e3f9..cd43fb26d5e 100644 --- a/src/egl/drivers/dri2/platform_wayland.c +++ b/src/egl/drivers/dri2/platform_wayland.c @@ -2098,16 +2098,10 @@ dri2_initialize_wayland_swrast(_EGLDisplay *disp) EGLBoolean dri2_initialize_wayland(_EGLDisplay *disp) { - EGLBoolean initialized = EGL_FALSE; - - if (!disp->Options.ForceSoftware) - initialized = dri2_initialize_wayland_drm(disp); - - if (!initialized) - initialized = dri2_initialize_wayland_swrast(disp); - - return initialized; - + if (disp->Options.ForceSoftware) + return dri2_initialize_wayland_swrast(disp); + else + return dri2_initialize_wayland_drm(disp); } void