summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_program.c
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2008-11-10 15:53:51 +1100
committerBen Skeggs <skeggsb@gmail.com>2008-11-10 15:53:51 +1100
commit32e6be6362e44609d36c2fb20a4c858f57c908fb (patch)
tree4ed99e93ef5f4a8bb51653917c911e04e42f5235 /src/mesa/state_tracker/st_program.c
parent92674bc8889e10e580c630cf85c106fa6eb34d7b (diff)
parent399da3a337932c6074a69ac73e711138271308eb (diff)
Merge remote branch 'origin/gallium-0.2' into gallium-0.2
Diffstat (limited to 'src/mesa/state_tracker/st_program.c')
-rw-r--r--src/mesa/state_tracker/st_program.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index 55b52c3745..af0df22dc5 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -512,3 +512,19 @@ st_translate_fragment_program(struct st_context *st,
tgsi_dump( fs.tokens, 0/*TGSI_DUMP_VERBOSE*/ );
}
+
+/**
+ * Debug- print current shader text
+ */
+void
+st_print_shaders(GLcontext *ctx)
+{
+ struct gl_shader_program *shProg = ctx->Shader.CurrentProgram;
+ if (shProg) {
+ GLuint i;
+ for (i = 0; i < shProg->NumShaders; i++) {
+ printf("GLSL shader %u of %u:\n", i, shProg->NumShaders);
+ printf("%s\n", shProg->Shaders[i]->Source);
+ }
+ }
+}