diff options
author | Eric Anholt <[email protected]> | 2013-06-12 16:21:28 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-06-21 10:04:29 -0700 |
commit | 426ca34b7a2c3b9edfc0189daece8de3aff80627 (patch) | |
tree | 8a401b75205b058c6d5b4c3ea17ecd7fdd5007ce /src/mesa/program/ir_to_mesa.cpp | |
parent | 2b049aa53e12accf2c5be88d1d9b66dbcab47bfb (diff) |
glsl: Remove ir_print_visitor.h includes and usage
We have ir->print() to do the old declaration of a visitor and having the
IR accept the visitor (yuck!). And now you can call _mesa_print_ir()
safely anywhere that you know what an ir_instruction is.
A couple of missing printf("\n")s are added in error paths -- when an
expression is handed to the visitor, it doesn't print '\n' (since it might
be a step in printing a whole expression tree).
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/mesa/program/ir_to_mesa.cpp')
-rw-r--r-- | src/mesa/program/ir_to_mesa.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index a5b6699c2b6..191e2911912 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -33,7 +33,6 @@ #include "main/compiler.h" #include "ir.h" #include "ir_visitor.h" -#include "ir_print_visitor.h" #include "ir_expression_flattening.h" #include "ir_uniform.h" #include "glsl_types.h" @@ -1057,9 +1056,9 @@ ir_to_mesa_visitor::emit_swz(ir_expression *ir) this->result.file = PROGRAM_UNDEFINED; deref->accept(this); if (this->result.file == PROGRAM_UNDEFINED) { - ir_print_visitor v; printf("Failed to get tree for expression operand:\n"); - deref->accept(&v); + deref->print(); + printf("\n"); exit(1); } @@ -1129,9 +1128,9 @@ ir_to_mesa_visitor::visit(ir_expression *ir) this->result.file = PROGRAM_UNDEFINED; ir->operands[operand]->accept(this); if (this->result.file == PROGRAM_UNDEFINED) { - ir_print_visitor v; printf("Failed to get tree for expression operand:\n"); - ir->operands[operand]->accept(&v); + ir->operands[operand]->print(); + printf("\n"); exit(1); } op[operand] = this->result; |