summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-09-27 16:11:18 -0700
committerEric Anholt <eric@anholt.net>2010-09-27 16:12:18 -0700
commit169ff0cc9d189f5a00a2a94313a6ce1503d1d5b9 (patch)
treef24e531017544f945fc42ee6c205c1046ad15156 /src/mesa/drivers/dri/i965
parenta5c6c8a31b240729baa12e2eca0ef53199efeed2 (diff)
i965: Handle all_equal/any_nequal in the new FS.
These are generated for scalar operands instead of plain equal/nequal. But for scalars, they're the same anyway. +30 piglits.
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index cf3e4e6ae8..9d022e07fb 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -725,11 +725,13 @@ fs_visitor::visit(ir_expression *ir)
emit(fs_inst(BRW_OPCODE_AND, this->result, this->result, fs_reg(0x1)));
break;
case ir_binop_equal:
+ case ir_binop_all_equal: /* same as nequal for scalars */
inst = emit(fs_inst(BRW_OPCODE_CMP, this->result, op[0], op[1]));
inst->conditional_mod = BRW_CONDITIONAL_Z;
emit(fs_inst(BRW_OPCODE_AND, this->result, this->result, fs_reg(0x1)));
break;
case ir_binop_nequal:
+ case ir_binop_any_nequal: /* same as nequal for scalars */
inst = emit(fs_inst(BRW_OPCODE_CMP, this->result, op[0], op[1]));
inst->conditional_mod = BRW_CONDITIONAL_NZ;
emit(fs_inst(BRW_OPCODE_AND, this->result, this->result, fs_reg(0x1)));
@@ -750,8 +752,6 @@ fs_visitor::visit(ir_expression *ir)
case ir_binop_dot:
case ir_binop_cross:
case ir_unop_any:
- case ir_binop_all_equal:
- case ir_binop_any_nequal:
assert(!"not reached: should be handled by brw_fs_channel_expressions");
break;