summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-10-23 09:33:36 -0600
committerBrian Paul <[email protected]>2010-10-23 10:19:30 -0600
commit013d5ffeec3af5665c81c6a7a8370d21699ca609 (patch)
tree96fbae1a211a7851fba557c907c7b03c42b73b0a
parentf1e97dc264c95e515b13db7406c15d46f423488d (diff)
mesa: added _mesa_is_fragment_shader_active() helper
-rw-r--r--src/mesa/main/shaderobj.h12
1 files changed, 12 insertions, 0 deletions
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