mesa: Include shader target in dumps of GLSL source.
authorEric Anholt <eric@anholt.net>
Tue, 17 May 2011 15:21:27 +0000 (08:21 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 27 May 2011 16:07:32 +0000 (09:07 -0700)
This makes automatic parsing of MESA_GLSL=dump output easier.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/program/ir_to_mesa.cpp

index 510aeab82da7d9d4a9535d4ad41f71dbed44ad32..00869979dd87e2a8945ef60cc430d234e0208ce3 100644 (file)
@@ -3172,7 +3172,8 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader)
                             &ctx->Extensions, ctx->API);
 
    if (ctx->Shader.Flags & GLSL_DUMP) {
-      printf("GLSL source for shader %d:\n", shader->Name);
+      printf("GLSL source for %s shader %d:\n",
+            _mesa_glsl_shader_target_name(state->target), shader->Name);
       printf("%s\n", shader->Source);
    }