mesa/es3: Add _mesa_is_gles3 predicate
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 14 Aug 2012 20:24:00 +0000 (13:24 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 14 Aug 2012 21:39:29 +0000 (14:39 -0700)
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/context.h

index 6b7dafa..e238752 100644 (file)
@@ -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