[Mesa-dev] [PATCH] mesa: for GLSL_DUMP_ON_ERROR, also dump the info log

Brian Paul brianp at vmware.com
Tue Nov 5 17:15:46 PST 2013


Since it's helpful to know why the shader did not compile.
Also, call fflush() for Windows.
---
 src/mesa/main/shaderapi.c |    2 ++
 1 file changed, 2 insertions(+)

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) {
-- 
1.7.10.4



More information about the mesa-dev mailing list