Mesa (master): mesa: for GLSL_DUMP_ON_ERROR, also dump the info log

Brian Paul brianp at kemper.freedesktop.org
Wed Nov 6 16:30:57 UTC 2013


Module: Mesa
Branch: master
Commit: 36f1c6e3db6b8010ce4f06ed33e69f628b67e293
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=36f1c6e3db6b8010ce4f06ed33e69f628b67e293

Author: Brian Paul <brianp at vmware.com>
Date:   Tue Nov  5 16:58:15 2013 -0700

mesa: for GLSL_DUMP_ON_ERROR, also dump the info log

Since it's helpful to know why the shader did not compile.
Also, call fflush() for Windows.

Reviewed-by: José Fonseca <jfonseca at vmware.com>

---

 src/mesa/main/shaderapi.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 7da860d..1d9aac3 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -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) {




More information about the mesa-commit mailing list