projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f1e97dc
)
mesa: added _mesa_is_fragment_shader_active() helper
author
Brian Paul
<brianp@vmware.com>
Sat, 23 Oct 2010 15:33:36 +0000
(09:33 -0600)
committer
Brian Paul
<brianp@vmware.com>
Sat, 23 Oct 2010 16:19:30 +0000
(10:19 -0600)
src/mesa/main/shaderobj.h
patch
|
blob
|
history
diff --git
a/src/mesa/main/shaderobj.h
b/src/mesa/main/shaderobj.h
index 346a5b75175da10f34fc3bb73ee5568e356634ce..5c6a056bcc908a84587af9c3401cda7434f461be 100644
(file)
--- 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