Mesa (master): i965: Use the multiplication result' s type for the accumulator.
Matt Turner
mattst88 at kemper.freedesktop.org
Mon Oct 7 17:46:21 UTC 2013
Module: Mesa
Branch: master
Commit: 85154241d63c3b984f001384767898b0742f9d02
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=85154241d63c3b984f001384767898b0742f9d02
Author: Matt Turner <mattst88 at gmail.com>
Date: Thu Sep 26 13:51:37 2013 -0700
i965: Use the multiplication result's type for the accumulator.
Reviewed-by: Eric Anholt <eric at anholt.net>
---
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 f35e112..1ecd898 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 856312f..be160b9 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]));
More information about the mesa-commit
mailing list