Mesa (master): mesa/es3.1: Add _mesa_is_gles31 helper
Ian Romanick
idr at kemper.freedesktop.org
Mon May 4 21:26:43 UTC 2015
Module: Mesa
Branch: master
Commit: 7efc11e071a6f80611539a1c135cc2bd65a47f8c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7efc11e071a6f80611539a1c135cc2bd65a47f8c
Author: Ian Romanick <ian.d.romanick at intel.com>
Date: Tue Apr 28 11:58:56 2015 -0700
mesa/es3.1: Add _mesa_is_gles31 helper
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
---
src/mesa/main/context.h | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h
index d11027d..6f3c941 100644
--- a/src/mesa/main/context.h
+++ b/src/mesa/main/context.h
@@ -303,7 +303,7 @@ _mesa_is_gles(const struct gl_context *ctx)
/**
- * Checks if the context is for GLES 3.x
+ * Checks if the context is for GLES 3.0 or later
*/
static inline bool
_mesa_is_gles3(const struct gl_context *ctx)
@@ -313,6 +313,16 @@ _mesa_is_gles3(const struct gl_context *ctx)
/**
+ * Checks if the context is for GLES 3.1 or later
+ */
+static inline bool
+_mesa_is_gles31(const struct gl_context *ctx)
+{
+ return ctx->API == API_OPENGLES2 && ctx->Version >= 31;
+}
+
+
+/**
* Checks if the context supports geometry shaders.
*/
static inline bool
More information about the mesa-commit
mailing list