diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c index df278b1a1..9b930d603 100644 --- a/glamor/glamor_egl.c +++ b/glamor/glamor_egl.c @@ -898,6 +898,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) @@ -992,6 +993,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) @@ -1005,7 +1014,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;