Mesa (master): mesa/es3: Add _mesa_is_gles3 predicate

Ian Romanick idr at kemper.freedesktop.org
Tue Aug 14 21:41:20 UTC 2012


Module: Mesa
Branch: master
Commit: 2a1ca4ff73129825a7578b0a5ed1f0ac9476a4c3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2a1ca4ff73129825a7578b0a5ed1f0ac9476a4c3

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Tue Aug 14 13:24:00 2012 -0700

mesa/es3: Add _mesa_is_gles3 predicate

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/main/context.h |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h
index 6b7dafa..e238752 100644
--- a/src/mesa/main/context.h
+++ b/src/mesa/main/context.h
@@ -310,6 +310,16 @@ _mesa_is_gles(const struct gl_context *ctx)
 }
 
 
+/**
+ * Checks if the context is for GLES 3.x
+ */
+static inline GLboolean
+_mesa_is_gles3(const struct gl_context *ctx)
+{
+   return ctx->API == API_OPENGLES2 && ctx->Version >= 30;
+}
+
+
 #ifdef __cplusplus
 }
 #endif




More information about the mesa-commit mailing list