i965: Use the multiplication result's type for the accumulator.
authorMatt Turner <mattst88@gmail.com>
Thu, 26 Sep 2013 20:51:37 +0000 (13:51 -0700)
committerMatt Turner <mattst88@gmail.com>
Mon, 7 Oct 2013 17:43:19 +0000 (10:43 -0700)
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp

index f35e112764672b3eef6a6a1ddd76530ae4efbe53..1ecd89875162efe40d4e15c003810498d088bc5d 100644 (file)
@@ -433,7 +433,7 @@ fs_visitor::visit(ir_expression *ir)
         if (brw->gen >= 7 && dispatch_width == 16)
            fail("16-wide explicit accumulator operands unsupported\n");
 
-        struct brw_reg acc = retype(brw_acc_reg(), BRW_REGISTER_TYPE_D);
+        struct brw_reg acc = retype(brw_acc_reg(), this->result.type);
 
         emit(MUL(acc, op[0], op[1]));
         emit(MACH(reg_null_d, op[0], op[1]));
index 856312f4dd939326abc42f8bf21d1afc5e05e0c2..be160b9df747c72673d50c64443dac002d22252d 100644 (file)
@@ -1358,7 +1358,7 @@ vec4_visitor::visit(ir_expression *ir)
             else
                emit(MUL(result_dst, op[0], op[1]));
          } else {
-            struct brw_reg acc = retype(brw_acc_reg(), BRW_REGISTER_TYPE_D);
+            struct brw_reg acc = retype(brw_acc_reg(), result_dst.type);
 
             emit(MUL(acc, op[0], op[1]));
             emit(MACH(dst_null_d(), op[0], op[1]));