glsl_to_tgsi: make glsl_to_tgsi_visitor::emit_dp return the instruction
authorBryan Cain <bryancain3@gmail.com>
Thu, 18 Aug 2011 01:34:19 +0000 (20:34 -0500)
committerBryan Cain <bryancain3@gmail.com>
Sat, 20 Aug 2011 19:00:40 +0000 (14:00 -0500)
src/mesa/state_tracker/st_glsl_to_tgsi.cpp

index 5f4aef16b661f73c97206f5afac12af53e027713..62127afadde2b5e28a571399ce7dcde32d1b721e 100644 (file)
@@ -373,11 +373,11 @@ public:
    /**
     * Emit the correct dot-product instruction for the type of arguments
     */
-   void emit_dp(ir_instruction *ir,
-                st_dst_reg dst,
-                st_src_reg src0,
-                st_src_reg src1,
-                unsigned elements);
+   glsl_to_tgsi_instruction *emit_dp(ir_instruction *ir,
+                                     st_dst_reg dst,
+                                     st_src_reg src0,
+                                     st_src_reg src1,
+                                     unsigned elements);
 
    void emit_scalar(ir_instruction *ir, unsigned op,
                    st_dst_reg dst, st_src_reg src0);
@@ -642,7 +642,7 @@ glsl_to_tgsi_visitor::get_opcode(ir_instruction *ir, unsigned op,
    return op;
 }
 
-void
+glsl_to_tgsi_instruction *
 glsl_to_tgsi_visitor::emit_dp(ir_instruction *ir,
                            st_dst_reg dst, st_src_reg src0, st_src_reg src1,
                            unsigned elements)
@@ -651,7 +651,7 @@ glsl_to_tgsi_visitor::emit_dp(ir_instruction *ir,
       TGSI_OPCODE_DP2, TGSI_OPCODE_DP3, TGSI_OPCODE_DP4
    };
 
-   emit(ir, dot_opcodes[elements - 2], dst, src0, src1);
+   return emit(ir, dot_opcodes[elements - 2], dst, src0, src1);
 }
 
 /**