[Mesa-dev] [PATCH 01/16] ir_to_mesa: Move Mesa IR debug to stderr as well.

Eric Anholt eric at anholt.net
Wed May 28 11:37:32 PDT 2014


Half the debug was in stderr, and this bit was in stdout.
---
 src/mesa/program/ir_to_mesa.cpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 59cf123..978b6cf 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -2366,22 +2366,22 @@ print_program(struct prog_instruction *mesa_instructions,
       struct prog_instruction *mesa_inst = mesa_instructions + i;
       ir_instruction *ir = mesa_instruction_annotation[i];
 
-      fprintf(stdout, "%3d: ", i);
+      fprintf(stderr, "%3d: ", i);
 
       if (last_ir != ir && ir) {
 	 int j;
 
 	 for (j = 0; j < indent; j++) {
-	    fprintf(stdout, " ");
+	    fprintf(stderr, " ");
 	 }
-	 ir->print();
-	 printf("\n");
+	 ir->fprint(stderr);
+	 fprintf(stderr, "\n");
 	 last_ir = ir;
 
-	 fprintf(stdout, "     "); /* line number spacing. */
+	 fprintf(stderr, "     "); /* line number spacing. */
       }
 
-      indent = _mesa_fprint_instruction_opt(stdout, mesa_inst, indent,
+      indent = _mesa_fprint_instruction_opt(stderr, mesa_inst, indent,
 					    PROG_PRINT_DEBUG, NULL);
    }
 }
-- 
2.0.0.rc2



More information about the mesa-dev mailing list