diff options
Diffstat (limited to 'src/mesa/main/context.h')
-rw-r--r-- | src/mesa/main/context.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h index 8872be1f4f5..792ab4cd55e 100644 --- a/src/mesa/main/context.h +++ b/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 |