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@vmware.com>
This commit is contained in:
Brian Paul 2013-11-05 16:58:15 -07:00
parent 5580ff818e
commit 36f1c6e3db

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