Mesa (master): i965: Use RNDZ for ir_unop_trunc in the new FS.

Kenneth Graunke kwg at kemper.freedesktop.org
Thu Oct 14 19:40:19 UTC 2010


Module: Mesa
Branch: master
Commit: f541b685aaf404fa7c8142f51d91c2720d82f264
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f541b685aaf404fa7c8142f51d91c2720d82f264

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Thu Oct 14 11:39:09 2010 -0700

i965: Use RNDZ for ir_unop_trunc in the new FS.

The existing code used RNDD, which rounds down, rather than toward zero.

---

 src/mesa/drivers/dri/i965/brw_fs.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index fc6f992..d46091c 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -869,7 +869,7 @@ fs_visitor::visit(ir_expression *ir)
       break;
 
    case ir_unop_trunc:
-      emit(fs_inst(BRW_OPCODE_RNDD, this->result, op[0]));
+      emit(fs_inst(BRW_OPCODE_RNDZ, this->result, op[0]));
       break;
    case ir_unop_ceil:
       op[0].negate = !op[0].negate;




More information about the mesa-commit mailing list