[mutter/gnome-3-34] cogl: Fix GLES2 fallback
- From: Robert Mader <rmader src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-3-34] cogl: Fix GLES2 fallback
- Date: Mon, 27 Jan 2020 16:10:42 +0000 (UTC)
commit ca5ed7369dd9b3171bcf3d34aa36f6dc4a730584
Author: Adam Jackson <ajax redhat com>
Date: Tue Oct 29 11:53:27 2019 -0400
cogl: Fix GLES2 fallback
Say you're using intel gen3, you poor soul. Your big-GL maxes out at 1.5
unless you use dirty tricks, but you do have GLES2. We try to fall back
to GLES in this case, but we only ever say eglBindAPI(EGL_OPENGL_API).
So when we go to do CreateContext, even though we think we've requested
GLES 2.0, the driver will compare that "2.0" against the maximum big-GL
version, and things will fail.
Fix this by binding EGL_OPENGL_ES_API before trying a GLES context.
https://gitlab.gnome.org/GNOME/mutter/issues/635
(cherry picket from commit f4f7e31303d78b2a8a0881b61311b8d750301b8f)
cogl/cogl/winsys/cogl-winsys-egl.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/cogl/cogl/winsys/cogl-winsys-egl.c b/cogl/cogl/winsys/cogl-winsys-egl.c
index e48b65498..96a399e24 100644
--- a/cogl/cogl/winsys/cogl-winsys-egl.c
+++ b/cogl/cogl/winsys/cogl-winsys-egl.c
@@ -329,6 +329,8 @@ try_create_context (CoglDisplay *display,
if (renderer->driver == COGL_DRIVER_GL ||
renderer->driver == COGL_DRIVER_GL3)
eglBindAPI (EGL_OPENGL_API);
+ else if (renderer->driver == COGL_DRIVER_GLES2)
+ eglBindAPI (EGL_OPENGL_ES_API);
egl_attributes_from_framebuffer_config (display,
&display->onscreen_template->config,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]