Mesa (master): ir_to_mesa: Make ir_to_mesa_visitor:: emit_dp return the instruction

Ian Romanick idr at kemper.freedesktop.org
Tue Aug 16 16:47:54 PDT 2011


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

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Sat Jul 30 10:45:35 2011 -0700

ir_to_mesa: Make ir_to_mesa_visitor::emit_dp return the instruction

Reviewed-by: Eric Anholt <eric at anholt.net>

---

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

diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index fcd14c8..60d498b 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -297,11 +297,11 @@ public:
    /**
     * Emit the correct dot-product instruction for the type of arguments
     */
-   void emit_dp(ir_instruction *ir,
-	        dst_reg dst,
-	        src_reg src0,
-	        src_reg src1,
-	        unsigned elements);
+   ir_to_mesa_instruction * emit_dp(ir_instruction *ir,
+				    dst_reg dst,
+				    src_reg src0,
+				    src_reg src1,
+				    unsigned elements);
 
    void emit_scalar(ir_instruction *ir, enum prog_opcode op,
 		    dst_reg dst, src_reg src0);
@@ -408,7 +408,7 @@ ir_to_mesa_visitor::emit(ir_instruction *ir, enum prog_opcode op)
    return emit(ir, op, undef_dst, undef_src, undef_src, undef_src);
 }
 
-void
+ir_to_mesa_instruction *
 ir_to_mesa_visitor::emit_dp(ir_instruction *ir,
 			    dst_reg dst, src_reg src0, src_reg src1,
 			    unsigned elements)
@@ -417,7 +417,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);
+   return emit(ir, dot_opcodes[elements - 2], dst, src0, src1);
 }
 
 /**



More information about the mesa-commit mailing list