mirror of
https://github.com/X11Libre/xserver.git
synced 2026-11-03 03:24:39 +00:00
glamor/egl: Avoid crashing on broken configurations
0a9415cf apparently can tickle bugs in the GL stack where glGetString
returns NULL, presumably because the eglMakeCurrent() didn't manage to
actually install a dispatch table and you're hitting a stub function.
That's clearly not our bug, but if it happens we should at least not
crash. Notice this case and fail gently.
Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
32677ce03d
commit
af151895f3
2 changed files with 12 additions and 1 deletions
|
|
@ -995,6 +995,11 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd)
|
|||
}
|
||||
|
||||
renderer = glGetString(GL_RENDERER);
|
||||
if (!renderer) {
|
||||
xf86DrvMsg(scrn->scrnIndex, X_ERROR,
|
||||
"glGetString() returned NULL, your GL is broken\n");
|
||||
goto error;
|
||||
}
|
||||
if (strstr((const char *)renderer, "llvmpipe")) {
|
||||
xf86DrvMsg(scrn->scrnIndex, X_INFO,
|
||||
"Refusing to try glamor on llvmpipe\n");
|
||||
|
|
|
|||
Loading…
Reference in a new issue