From bd385c424bdda6ffe38ea9100c77e43337dd34b8 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Mon, 17 Aug 2020 20:32:12 +0200 Subject: [PATCH] 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: --- src/egl/drivers/dri2/platform_wayland.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) 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 -- 2.30.2