blob: a025343241e7ab0752d3e7c0af6efecb53d8b791 [file] [log] [blame]
commit a6eb0ef950d399d5e2c75386a00aaa7d7faea45f
Author: Po-Hsien Wang <pwang@chromium.org>
Date: Tue Oct 31 21:10:01 2017 -0700
arc-mesa: Disable support for GLES > 3.2
Disable support for GLES version > 3.2
Change-Id: Ifd4515d69638b15b48aafad410eb42c7df7d37de
diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c
index 1a8e9bda1a..874e424eda 100644
--- a/src/egl/main/eglcontext.c
+++ b/src/egl/main/eglcontext.c
@@ -468,6 +468,10 @@ _eglParseContextAttribList(_EGLContext *ctx, _EGLDisplay *dpy,
break;
case 3:
+ // HACK: Disallow creating contexts newer than 3.2
+ if (ctx->ClientMinorVersion > 2)
+ 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..f0330f1409 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.2
+ if (ctx->API == API_OPENGLES2 && ctx->Version > 32)
+ ctx->Version = 32;
ctx->Extensions.Version = ctx->Version;
/* Make sure that the GLSL version lines up with the GL version. In some