diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-11-06 15:07:11 -0700 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-11-06 15:07:11 -0700 |
commit | a7d9fde24cb8ecc59b0a6fc610135d851806295b (patch) | |
tree | cd8c0be11b4d53df11dcc7d42c1598565c10b840 /src/mesa/state_tracker/st_program.c | |
parent | d177c9ddda2c452cf7d6696d89cf4458ef986f98 (diff) | |
parent | 2f1a29654a94a4194fa452e8049c4db67629e545 (diff) |
Merge commit 'origin/gallium-0.1' into gallium-0.2
Diffstat (limited to 'src/mesa/state_tracker/st_program.c')
-rw-r--r-- | src/mesa/state_tracker/st_program.c | 16 |
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); + } + } +} |