i965/vec4: Fix implementation of i2b.
authorMatt Turner <mattst88@gmail.com>
Fri, 27 Feb 2015 06:49:47 +0000 (22:49 -0800)
committerMatt Turner <mattst88@gmail.com>
Sat, 28 Feb 2015 04:24:12 +0000 (20:24 -0800)
I broke this in commit 2881b123d. I must have misread i2b as b2i.

Cc: 10.5 <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88246
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp

index f6f589d71b4da3f72b5d4df68e660ef38d6fb68e..0e30772f41945be95e48f7dff5870b907616686a 100644 (file)
@@ -1655,7 +1655,7 @@ vec4_visitor::visit(ir_expression *ir)
       emit(CMP(result_dst, op[0], src_reg(0.0f), BRW_CONDITIONAL_NZ));
       break;
    case ir_unop_i2b:
-      emit(AND(result_dst, op[0], src_reg(1)));
+      emit(CMP(result_dst, op[0], src_reg(0), BRW_CONDITIONAL_NZ));
       break;
 
    case ir_unop_trunc: