summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--glamor/glamor_egl.c11
-rw-r--r--hw/xwayland/xwayland-glamor-gbm.c5
2 files changed, 15 insertions, 1 deletions
diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c
index 0edfa111c..31b1faffa 100644
--- a/glamor/glamor_egl.c
+++ b/glamor/glamor_egl.c
@@ -892,6 +892,7 @@ Bool
glamor_egl_init(ScrnInfoPtr scrn, int fd)
{
struct glamor_egl_screen_private *glamor_egl;
+ const GLubyte *renderer;
glamor_egl = calloc(sizeof(*glamor_egl), 1);
if (glamor_egl == NULL)
@@ -986,6 +987,14 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd)
"Failed to make EGL context current\n");
goto error;
}
+
+ renderer = glGetString(GL_RENDERER);
+ if (strstr((const char *)renderer, "llvmpipe")) {
+ xf86DrvMsg(scrn->scrnIndex, X_INFO,
+ "Refusing to try glamor on llvmpipe\n");
+ goto error;
+ }
+
/*
* Force the next glamor_make_current call to set the right context
* (in case of multiple GPUs using glamor)
@@ -999,7 +1008,7 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd)
}
xf86DrvMsg(scrn->scrnIndex, X_INFO, "glamor X acceleration enabled on %s\n",
- glGetString(GL_RENDERER));
+ renderer);
#ifdef GBM_BO_WITH_MODIFIERS
if (epoxy_has_egl_extension(glamor_egl->display,
diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c
index 06fcf5239..25a354bf7 100644
--- a/hw/xwayland/xwayland-glamor-gbm.c
+++ b/hw/xwayland/xwayland-glamor-gbm.c
@@ -843,6 +843,11 @@ xwl_glamor_gbm_init_egl(struct xwl_screen *xwl_screen)
goto error;
}
+ if (strstr((const char *)glGetString(GL_RENDERER), "llvmpipe")) {
+ ErrorF("Refusing to try glamor on llvmpipe\n");
+ goto error;
+ }
+
if (!epoxy_has_gl_extension("GL_OES_EGL_image")) {
ErrorF("GL_OES_EGL_image not available\n");
goto error;