mesa: added _mesa_is_fragment_shader_active() helper

This commit is contained in:
Brian Paul
2010-10-23 09:33:36 -06:00
parent f1e97dc264
commit 013d5ffeec
+12
View File
@@ -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