aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/program/prog_print.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mesa/program/prog_print.c b/src/mesa/program/prog_print.c
index 6ab199aa02b..b66d709d50f 100644
--- a/src/mesa/program/prog_print.c
+++ b/src/mesa/program/prog_print.c
@@ -1031,11 +1031,9 @@ _mesa_write_shader_to_file(const struct gl_shader *shader)
fprintf(f, "/* Compile status: %s */\n",
shader->CompileStatus ? "ok" : "fail");
- if (!shader->CompileStatus) {
- fprintf(f, "/* Log Info: */\n");
- fputs(shader->InfoLog, f);
- }
- else {
+ fprintf(f, "/* Log Info: */\n");
+ fputs(shader->InfoLog, f);
+ if (shader->CompileStatus && shader->Program) {
fprintf(f, "/* GPU code */\n");
fprintf(f, "/*\n");
_mesa_fprint_program_opt(f, shader->Program, PROG_PRINT_DEBUG, GL_TRUE);