From: Matt Turner Date: Thu, 26 Sep 2013 20:51:37 +0000 (-0700) Subject: i965: Use the multiplication result's type for the accumulator. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=85154241d63c3b984f001384767898b0742f9d02;p=mesa.git i965: Use the multiplication result's type for the accumulator. Reviewed-by: Eric Anholt --- diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index f35e1127646..1ecd8987516 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp @@ -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])); diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp index 856312f4dd9..be160b9df74 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp @@ -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]));