From 5d9718f0dbe1bb9b25324c43ed0fa631735c6a51 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 5 Apr 2011 12:22:42 -0700 Subject: [PATCH] ir_to_mesa: Use emit overloads to avoid passing undef registers. Makes the code just a little bit cleaner. Reviewed-by: Ian Romanick --- src/mesa/program/ir_to_mesa.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 52e250e458c..23f273130d1 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -434,7 +434,7 @@ ir_to_mesa_visitor::emit_dp(ir_instruction *ir, OPCODE_DP2, OPCODE_DP3, OPCODE_DP4 }; - emit(ir, dot_opcodes[elements - 2], dst, src0, src1, ir_to_mesa_undef); + emit(ir, dot_opcodes[elements - 2], dst, src0, src1); } /** @@ -1928,7 +1928,7 @@ ir_to_mesa_visitor::visit(ir_call *ir) assert(!sig_iter.has_next()); /* Emit call instruction */ - call_inst = emit(ir, OPCODE_CAL, ir_to_mesa_undef_dst, ir_to_mesa_undef); + call_inst = emit(ir, OPCODE_CAL); call_inst->function = entry; /* Process out parameters. */ @@ -2203,8 +2203,7 @@ ir_to_mesa_visitor::visit(ir_if *ir) visit_exec_list(&ir->else_instructions, this); } - if_inst = emit(ir->condition, OPCODE_ENDIF, - ir_to_mesa_undef_dst, ir_to_mesa_undef); + if_inst = emit(ir->condition, OPCODE_ENDIF); } ir_to_mesa_visitor::ir_to_mesa_visitor() -- 2.30.2