Mesa (master): ir_to_mesa: Use emit overloads to avoid passing undef registers.

Kenneth Graunke kwg at kemper.freedesktop.org
Tue Apr 5 15:32:35 PDT 2011


Module: Mesa
Branch: master
Commit: 5d9718f0dbe1bb9b25324c43ed0fa631735c6a51
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5d9718f0dbe1bb9b25324c43ed0fa631735c6a51

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Tue Apr  5 12:22:42 2011 -0700

ir_to_mesa: Use emit overloads to avoid passing undef registers.

Makes the code just a little bit cleaner.

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

---

 src/mesa/program/ir_to_mesa.cpp |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 52e250e..23f2731 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()



More information about the mesa-commit mailing list