OSDN Git Service

i965: Fix flipped value of the not-embedded-in-if on gen6.
authorEric Anholt <eric@anholt.net>
Wed, 8 Dec 2010 01:07:05 +0000 (17:07 -0800)
committerEric Anholt <eric@anholt.net>
Wed, 8 Dec 2010 01:46:47 +0000 (17:46 -0800)
Fixes:
glean/glsl1-! (not) operator (1, fail)
glean/glsl1-! (not) operator (1, pass)

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

index 8840b6d..6bb195b 100644 (file)
@@ -1625,7 +1625,7 @@ fs_visitor::emit_if_gen6(ir_if *ir)
 
       switch (expr->operation) {
       case ir_unop_logic_not:
-        inst = emit(fs_inst(BRW_OPCODE_IF, temp, op[0], fs_reg(1)));
+        inst = emit(fs_inst(BRW_OPCODE_IF, temp, op[0], fs_reg(0)));
         inst->conditional_mod = BRW_CONDITIONAL_Z;
         return;