-#define RGBA_LOGICOP_ENABLED(CTX) \
- ((CTX)->Color.ColorLogicOpEnabled || \
- ((CTX)->Color.BlendEnabled && (CTX)->Color.BlendEquationRGB == GL_LOGIC_OP))
+static inline bool
+_mesa_has_geometry_shaders(const struct gl_context *ctx)
+{
+ return _mesa_has_OES_geometry_shader(ctx) ||
+ (_mesa_is_desktop_gl(ctx) && ctx->Version >= 32);
+}
+
+
+/**
+ * Checks if the context supports compute shaders.
+ */
+static inline bool
+_mesa_has_compute_shaders(const struct gl_context *ctx)
+{
+ return (ctx->API == API_OPENGL_CORE && ctx->Extensions.ARB_compute_shader) ||
+ (ctx->API == API_OPENGLES2 && ctx->Version >= 31);
+}
+
+/**
+ * Checks if the context supports shader subroutines.
+ */
+static inline bool
+_mesa_has_shader_subroutine(const struct gl_context *ctx)
+{
+ return ctx->API == API_OPENGL_CORE &&
+ (ctx->Version >= 40 || ctx->Extensions.ARB_shader_subroutine);
+}
+
+/**
+ * Checks if the context supports tessellation.
+ */
+static inline GLboolean
+_mesa_has_tessellation(const struct gl_context *ctx)
+{
+ return ctx->API == API_OPENGL_CORE &&
+ ctx->Extensions.ARB_tessellation_shader;
+}
+
+
+#ifdef __cplusplus
+}
+#endif