diff --git a/.pick_status.json b/.pick_status.json index 65b4ff5fbef..ff36443a338 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1147,7 +1147,7 @@ "description": "egl/surfaceless: try kms_swrast before swrast", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "f7e0cdcf1a5b639b4df610be600fa5d8db100289" }, diff --git a/src/egl/drivers/dri2/platform_surfaceless.c b/src/egl/drivers/dri2/platform_surfaceless.c index 2cd909c75a2..a420eb09ff6 100644 --- a/src/egl/drivers/dri2/platform_surfaceless.c +++ b/src/egl/drivers/dri2/platform_surfaceless.c @@ -327,14 +327,18 @@ dri2_initialize_surfaceless(_EGLDisplay *disp) dri2_dpy->fd = -1; disp->DriverData = (void *) dri2_dpy; + /* When ForceSoftware is false, we try the HW driver. When ForceSoftware + * is true, we try kms_swrast and swrast in order. + */ driver_loaded = surfaceless_probe_device(disp, disp->Options.ForceSoftware); + if (!driver_loaded && disp->Options.ForceSoftware) { + _eglLog(_EGL_DEBUG, "Falling back to surfaceless swrast without DRM."); + driver_loaded = surfaceless_probe_device_sw(disp); + } if (!driver_loaded) { - _eglLog(_EGL_DEBUG, "Falling back to surfaceless swrast without DRM."); - if (!surfaceless_probe_device_sw(disp)) { - err = "DRI2: failed to load driver"; - goto cleanup; - } + err = "DRI2: failed to load driver"; + goto cleanup; } if (!dri2_create_screen(disp)) {