[Mesa-dev] [PATCH 3/5] glsl_compiler: Always log the compiler diagnostics

Ian Romanick idr at freedesktop.org
Fri Sep 27 11:58:04 PDT 2013


From: Ian Romanick <ian.d.romanick at intel.com>

Not just when there's an error.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 src/glsl/main.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/glsl/main.cpp b/src/glsl/main.cpp
index 8f59ada..4632356 100644
--- a/src/glsl/main.cpp
+++ b/src/glsl/main.cpp
@@ -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;
       }
-- 
1.8.1.4



More information about the mesa-dev mailing list