mesa: for GLSL_DUMP_ON_ERROR, also dump the info log
authorBrian Paul <brianp@vmware.com>
Tue, 5 Nov 2013 23:58:15 +0000 (16:58 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 6 Nov 2013 16:04:16 +0000 (09:04 -0700)
Since it's helpful to know why the shader did not compile.
Also, call fflush() for Windows.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/mesa/main/shaderapi.c

index 7da860ddf1a9136d6b504f4ca0283a0fafc6534d..1d9aac39df27ad50e39a637f4b7e3231a2b38ca6 100644 (file)
@@ -825,6 +825,8 @@ compile_shader(struct gl_context *ctx, GLuint shaderObj)
          fprintf(stderr, "GLSL source for %s shader %d:\n",
                  _mesa_glsl_shader_target_name(sh->Type), sh->Name);
          fprintf(stderr, "%s\n", sh->Source);
+         fprintf(stderr, "Info Log:\n%s\n", sh->InfoLog);
+         fflush(stderr);
       }
 
       if (ctx->Shader.Flags & GLSL_REPORT_ERRORS) {