From: Ian Romanick Date: Tue, 28 Apr 2015 18:58:56 +0000 (-0700) Subject: mesa/es3.1: Add _mesa_is_gles31 helper X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7efc11e071a6f80611539a1c135cc2bd65a47f8c;p=mesa.git mesa/es3.1: Add _mesa_is_gles31 helper Signed-off-by: Ian Romanick Reviewed-by: Tapani Pälli --- diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h index d11027d6ae9..6f3c941016f 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) @@ -312,6 +312,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. */