glamor: Only check for llvmpipe renderer

The virgl driver exposes the name of the host renderer which might be llvmpipe.
In this case we still need glamor to be initialized.

Only check if the renderer starts with llvmpipe (which is what llvmpipe exposes).

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit fdebbc60d8)
This commit is contained in:
Corentin Noël 2022-08-01 16:03:38 +02:00 committed by Olivier Fourdan
parent bc288f59a4
commit 4303ddfbf9
2 changed files with 2 additions and 2 deletions

View file

@ -1053,7 +1053,7 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd)
"glGetString() returned NULL, your GL is broken\n");
goto error;
}
if (strstr((const char *)renderer, "llvmpipe")) {
if (!strncmp("llvmpipe", (const char *)renderer, strlen("llvmpipe"))) {
if (scrn->confScreen->num_gpu_devices)
xf86DrvMsg(scrn->scrnIndex, X_INFO,
"Allowing glamor on llvmpipe for PRIME\n");

View file

@ -1030,7 +1030,7 @@ 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, "llvmpipe")) {
if (!strncmp("llvmpipe", (const char *)renderer, strlen("llvmpipe"))) {
ErrorF("Refusing to try glamor on llvmpipe\n");
goto error;
}