diff options
Diffstat (limited to 'mesalib/src/mesa/main/context.h')
-rw-r--r-- | mesalib/src/mesa/main/context.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/context.h b/mesalib/src/mesa/main/context.h index 8872be1f4..792ab4cd5 100644 --- a/mesalib/src/mesa/main/context.h +++ b/mesalib/src/mesa/main/context.h @@ -312,6 +312,17 @@ _mesa_is_gles3(const struct gl_context *ctx) } +/** + * Checks if the context supports geometry shaders. + */ +static inline GLboolean +_mesa_has_geometry_shaders(const struct gl_context *ctx) +{ + return _mesa_is_desktop_gl(ctx) && + (ctx->Version >= 32 || ctx->Extensions.ARB_geometry_shader4); +} + + #ifdef __cplusplus } #endif |