glsl_compiler: Always log the compiler diagnostics
authorIan Romanick <ian.d.romanick@intel.com>
Mon, 9 Sep 2013 19:14:17 +0000 (14:14 -0500)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 7 Oct 2013 16:59:23 +0000 (09:59 -0700)
Not just when there's an error.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/main.cpp

index 58e940a34b085801e9abea51e207936571bf49c0..aa188b1f158de50e8cd8dd9fb1d5c163a475ce12 100644 (file)
@@ -371,8 +371,10 @@ main(int argc, char **argv)
 
       compile_shader(ctx, shader);
 
-      if (!shader->CompileStatus) {
+      if (strlen(shader->InfoLog) > 0)
         printf("Info log for %s:\n%s\n", argv[optind], shader->InfoLog);
+
+      if (!shader->CompileStatus) {
         status = EXIT_FAILURE;
         break;
       }