i965: Use RNDZ for ir_unop_trunc in the new FS.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 14 Oct 2010 18:39:09 +0000 (11:39 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 14 Oct 2010 19:40:16 +0000 (12:40 -0700)
The existing code used RNDD, which rounds down, rather than toward zero.

src/mesa/drivers/dri/i965/brw_fs.cpp

index fc6f99208383589a76beaf3ba8dbce36042d189e..d46091c9e6e8793f70e76a9e9718719ff072b25a 100644 (file)
@@ -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;