summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan A. Melnikov <iv@altlinux.org>2022-12-21 18:29:21 +0400
committerOlivier Fourdan <fourdan@gmail.com>2023-01-19 20:06:04 +0000
commit711d491729d83b17114fd08d784bc0ddfd17ff6a (patch)
tree773964d085ee14af85d9216d1b8914087fad4baa
parent5c18e25e12e38313aa45aa806f2533165abf167d (diff)
glamor: Don't initialize on softpipe
There are systems where softpipe is the default renderer, e.g. when llvmpipe is not is not available. Using glamor on such systems is never a good idea. This mirrors what commit 0a9415cf793babed1f28c61f8047d51de04f1528 did for llvmpipe. Closes: #1417 Signed-off-by: Ivan A. Melnikov <iv@altlinux.org>
-rw-r--r--glamor/glamor_egl.c5
-rw-r--r--hw/xwayland/xwayland-glamor-gbm.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c
index e2a2a1050..c35b10d83 100644
--- a/glamor/glamor_egl.c
+++ b/glamor/glamor_egl.c
@@ -1080,6 +1080,11 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd)
"glGetString() returned NULL, your GL is broken\n");
goto error;
}
+ if (strstr((const char *)renderer, "softpipe")) {
+ xf86DrvMsg(scrn->scrnIndex, X_INFO,
+ "Refusing to try glamor on softpipe\n");
+ goto error;
+ }
if (!strncmp("llvmpipe", (const char *)renderer, strlen("llvmpipe"))) {
if (scrn->confScreen->num_gpu_devices)
xf86DrvMsg(scrn->scrnIndex, X_INFO,
diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c
index 5e2c618ab..93c15cac9 100644
--- a/hw/xwayland/xwayland-glamor-gbm.c
+++ b/hw/xwayland/xwayland-glamor-gbm.c
@@ -1030,6 +1030,10 @@ xwl_glamor_gbm_init_egl(struct xwl_screen *xwl_screen)
ErrorF("glGetString() returned NULL, your GL is broken\n");
goto error;
}
+ if (strstr((const char *)renderer, "softpipe")) {
+ ErrorF("Refusing to try glamor on softpipe\n");
+ goto error;
+ }
if (!strncmp("llvmpipe", (const char *)renderer, strlen("llvmpipe"))) {
ErrorF("Refusing to try glamor on llvmpipe\n");
goto error;