From 85154241d63c3b984f001384767898b0742f9d02 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Thu, 26 Sep 2013 13:51:37 -0700 Subject: [PATCH] i965: Use the multiplication result's type for the accumulator. Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 2 +- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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])); -- 2.30.2