From: Eric Anholt Date: Wed, 12 Jan 2011 17:37:07 +0000 (-0800) Subject: i965/fs: When producing ir_unop_abs of an operand, strip negate. X-Git-Tag: mesa-7.11-rc1~2814 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ab56e3be9aae54602372427755305c354821e105;p=platform%2Fupstream%2Fmesa.git i965/fs: When producing ir_unop_abs of an operand, strip negate. We were returning the negative absolute value, instead of the absolute value. Fixes glsl-fs-abs-neg. --- diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 35bce0f..f4f9385 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -859,6 +859,7 @@ fs_visitor::visit(ir_expression *ir) break; case ir_unop_abs: op[0].abs = true; + op[0].negate = false; this->result = op[0]; break; case ir_unop_sign: