This checks if core profile and shader subroutine extension
is enabled.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(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.