[Mesa-dev] [PATCH 3/5] (gles3) dri: Define enum __DRI_API_GLES3
Chad Versace
chad.versace at linux.intel.com
Wed Nov 21 17:43:37 PST 2012
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 at linux.intel.com>
---
include/GL/internal/dri_interface.h | 3 ++-
src/mesa/drivers/dri/common/dri_util.c | 1 +
src/mesa/drivers/dri/common/drisw_util.c | 1 +
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index 1e0f1d0..5cc3225 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -801,8 +801,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
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index 983bbea..50a06cb 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -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:
diff --git a/src/mesa/drivers/dri/common/drisw_util.c b/src/mesa/drivers/dri/common/drisw_util.c
index d692748..8e43168 100644
--- a/src/mesa/drivers/dri/common/drisw_util.c
+++ b/src/mesa/drivers/dri/common/drisw_util.c
@@ -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:
--
1.7.11.7
More information about the mesa-dev
mailing list