dri: Define enum __DRI_API_GLES3
authorChad Versace <chad.versace@linux.intel.com>
Tue, 20 Nov 2012 21:27:14 +0000 (13:27 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 15 Jan 2013 21:45:53 +0000 (13:45 -0800)
This enum corresponds to EGL_OPENGL_ES3_BIT_KHR.
Neither the GLX nor EGL layer use the enum yet.

I don't like the GLES bits. I'd prefer that all GLES APIs be exposed
through a single API bit, as is done in GLX_EXT_create_context_es_profile.
But, we need this GLES3 enum in order to do the plumbing necessary to
correctly support EGL_OPENGL_ES3_BIT_KHR as required by the
EGL_KHR_create_context spec.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
include/GL/internal/dri_interface.h
src/mesa/drivers/dri/common/dri_util.c
src/mesa/drivers/dri/common/drisw_util.c

index 568581d5b0956e1b15b5868f3b007efaf1defbc5..c236cb732fd9c763062a801b3c63afcdde22b87c 100644 (file)
@@ -826,8 +826,9 @@ struct __DRIdri2LoaderExtensionRec {
 
 #define __DRI_API_OPENGL       0       /**< OpenGL compatibility profile */
 #define __DRI_API_GLES         1       /**< OpenGL ES 1.x */
-#define __DRI_API_GLES2                2       /**< OpenGL ES 2.0 or 3.0 */
+#define __DRI_API_GLES2                2       /**< OpenGL ES 2.x */
 #define __DRI_API_OPENGL_CORE  3       /**< OpenGL 3.2+ core profile */
+#define __DRI_API_GLES3                4       /**< OpenGL ES 3.x */
 
 #define __DRI_CTX_ATTRIB_MAJOR_VERSION         0
 #define __DRI_CTX_ATTRIB_MINOR_VERSION         1
index 9cebcea924c4135b5844a680954fedba88840eb0..9ed9df4b39b8130c3c2e9106953aa3049f8a702d 100644 (file)
@@ -189,6 +189,7 @@ dri2CreateContextAttribs(__DRIscreen *screen, int api,
        mesa_api = API_OPENGLES;
        break;
     case __DRI_API_GLES2:
+    case __DRI_API_GLES3:
        mesa_api = API_OPENGLES2;
        break;
     case __DRI_API_OPENGL_CORE:
index cd5a39a3728dda9a9389513395fdc6c17d8839a9..6af101c313aa80ee067cd89021d4b576def1a4c5 100644 (file)
@@ -123,6 +123,7 @@ driCreateContextAttribs(__DRIscreen *screen, int api,
             mesa_api = API_OPENGLES;
             break;
     case __DRI_API_GLES2:
+    case __DRI_API_GLES3:
             mesa_api = API_OPENGLES2;
             break;
     case __DRI_API_OPENGL_CORE: