aboutsummaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2
diff options
context:
space:
mode:
authorGurchetan Singh <[email protected]>2019-03-01 18:58:16 -0800
committerGurchetan Singh <[email protected]>2019-03-04 17:33:17 +0000
commit610758d3e5402709b9b92cfa88f72b092b13f236 (patch)
treea3e3ae720997081a8331b82f9deb045686af6513 /src/egl/drivers/dri2
parent904a0552aabf0624f1d7507b89d8a9a7bdd3bad5 (diff)
egl/sl: also allow virtgpu to fallback to kms_swrast
virtio-gpu fallbacks to software rendering when 3D features are unavailable since 6c5ab, and kms_swrast is more feature complete than swrast. v2: Add comment (Emil) Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2')
-rw-r--r--src/egl/drivers/dri2/platform_surfaceless.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/egl/drivers/dri2/platform_surfaceless.c b/src/egl/drivers/dri2/platform_surfaceless.c
index 4fe364ab22e..fefb2b449d0 100644
--- a/src/egl/drivers/dri2/platform_surfaceless.c
+++ b/src/egl/drivers/dri2/platform_surfaceless.c
@@ -301,8 +301,13 @@ surfaceless_probe_device(_EGLDisplay *disp, bool swrast)
char *driver_name = loader_get_driver_for_fd(dri2_dpy->fd);
if (swrast) {
- /* Use kms swrast only with vgem */
- if (strcmp(driver_name, "vgem") == 0)
+ /* Use kms swrast only with vgem / virtio_gpu.
+ * virtio-gpu fallbacks to software rendering when 3D features
+ * are unavailable since 6c5ab, and kms_swrast is more
+ * feature complete than swrast.
+ */
+ if (strcmp(driver_name, "vgem") == 0 ||
+ strcmp(driver_name, "virtio_gpu") == 0)
dri2_dpy->driver_name = strdup("kms_swrast");
free(driver_name);
} else {