blob: 8b5d14f15c455fa48992da86100561a338ccee42 [file] [log] [blame]
commit dfd09dd9a10caa035a906fda0b3b3872171544bf
Author: Po-Hsien Wang <pwang@chromium.org>
Date: Tue Oct 31 21:06:51 2017 -0700
arc-mesa: Disable suuport for GLES > 3.1
Disable support for GLES version > 3.1
Change-Id: If911f071e193e52e88d288805d0dd94a8e0e1e2f
diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c
index 1a8e9bda1a..88dee6c3e7 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.1.
+ if (ctx->ClientMinorVersion > 1)
+ 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..9409cb8a22 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.1.
+ if (ctx->API == API_OPENGLES2 && ctx->Version > 31)
+ ctx->Version = 31;
ctx->Extensions.Version = ctx->Version;
/* Make sure that the GLSL version lines up with the GL version. In some