Mesa (master): i965: Fix negation in the new FS backend.

Eric Anholt anholt at kemper.freedesktop.org
Tue Sep 28 16:38:02 UTC 2010


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

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Sep 27 21:15:28 2010 -0700

i965: Fix negation in the new FS backend.

Fixes:
glsl1-Negation
glsl1-Negation2

---

 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 7f2bf84..d05aa29 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -638,7 +638,7 @@ fs_visitor::visit(ir_expression *ir)
       emit(fs_inst(BRW_OPCODE_ADD, this->result, op[0], fs_reg(-1)));
       break;
    case ir_unop_neg:
-      op[0].negate = ~op[0].negate;
+      op[0].negate = !op[0].negate;
       this->result = op[0];
       break;
    case ir_unop_abs:




More information about the mesa-commit mailing list