| commit 740eb587b8d13392132f7f33dc62695cf42bbd1d |
| Author: Po-Hsien Wang <pwang@chromium.org> |
| Date: Tue Oct 31 21:02:59 2017 -0700 |
| |
| arc-mesa: Disable support for GLES > 3.0 |
| |
| Disable support for GLES version > 3.0 |
| |
| Change-Id: I3e846be10a1b81b2b4bc89b82d1cbeff1c4fbbb0 |
| |
| diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c |
| index 1a8e9bda1a..09a150df4a 100644 |
| --- a/src/egl/main/eglcontext.c |
| +++ b/src/egl/main/eglcontext.c |
| @@ -468,6 +468,9 @@ _eglParseContextAttribList(_EGLContext *ctx, _EGLDisplay *dpy, |
| break; |
| |
| case 3: |
| + // HACK: Disallow creating contexts newer than 3.0. |
| + if (ctx->ClientMinorVersion > 0) |
| + err = EGL_BAD_MATCH; |
| /* Don't put additional version checks here. We don't know that |
| * there won't be versions > 3.0. |
| */ |
| diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c |
| index 34f8bbbcb1..c6841d5300 100644 |
| --- a/src/mesa/main/version.c |
| +++ b/src/mesa/main/version.c |
| @@ -593,6 +593,9 @@ _mesa_compute_version(struct gl_context *ctx) |
| return; |
| |
| ctx->Version = _mesa_get_version(&ctx->Extensions, &ctx->Const, ctx->API); |
| + // HACK: Downgrade GLES2 version to 3.0 |
| + if (ctx->API == API_OPENGLES2 && ctx->Version > 30) |
| + ctx->Version = 30; |
| ctx->Extensions.Version = ctx->Version; |
| |
| /* Make sure that the GLSL version lines up with the GL version. In some |