From: Brian Paul Date: Sat, 23 Oct 2010 15:33:36 +0000 (-0600) Subject: mesa: added _mesa_is_fragment_shader_active() helper X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=013d5ffeec3af5665c81c6a7a8370d21699ca609;p=mesa.git mesa: added _mesa_is_fragment_shader_active() helper --- diff --git a/src/mesa/main/shaderobj.h b/src/mesa/main/shaderobj.h index 346a5b75175..5c6a056bcc9 100644 --- a/src/mesa/main/shaderobj.h +++ b/src/mesa/main/shaderobj.h @@ -130,6 +130,18 @@ _mesa_shader_index_to_type(GLuint i) } +/** + * Check if there's a fragment shader active. + */ +static INLINE GLboolean +_mesa_is_fragment_shader_active(const struct gl_context *ctx) +{ + return (ctx->Shader.CurrentProgram && + ctx->Shader.CurrentProgram->LinkStatus && + ctx->Shader.CurrentProgram->FragmentProgram); +} + + #ifdef __cplusplus } #endif