egl/surfaceless: simplify dri2_initialize_surfaceless()
[mesa.git] / src / egl / drivers / dri2 / platform_surfaceless.c
index dd283673a8374a506cfee80871916ffe8190fa7e..8bd6009f8a0c8a57eea819b7e7dcea9656203f41 100644 (file)
@@ -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.");