egl: Allow OpenGL ES 3.0 as a version
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 19 Jul 2012 23:12:13 +0000 (16:12 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 14 Aug 2012 22:41:03 +0000 (15:41 -0700)
In the DRI2 back-end this will get the same API as GLES 2.0.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/egl/drivers/dri2/egl_dri2.c
src/egl/main/eglcontext.c

index c3068c3..423d18d 100644 (file)
@@ -674,6 +674,7 @@ dri2_create_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
          api = __DRI_API_GLES;
          break;
       case 2:
+      case 3:
          api = __DRI_API_GLES2;
          break;
       default:
index cb50de7..829050d 100644 (file)
@@ -54,6 +54,7 @@ _eglGetContextAPIBit(_EGLContext *ctx)
          bit = EGL_OPENGL_ES_BIT;
          break;
       case 2:
+      case 3:
          bit = EGL_OPENGL_ES2_BIT;
          break;
       default:
@@ -317,9 +318,14 @@ _eglParseContextAttribList(_EGLContext *ctx, _EGLDisplay *dpy,
          break;
 
       case 2:
+         if (ctx->ClientMinorVersion > 0)
+            err = EGL_BAD_MATCH;
+         break;
+
+      case 3:
       default:
          /* Don't put additional version checks here.  We don't know that
-          * there won't be versions > 2.0.
+          * there won't be versions > 3.0.
           */
          break;
       }