summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2011-08-10 14:13:23 -0700
committerEric Anholt <eric@anholt.net>2011-08-16 13:04:43 -0700
commit193a9a209d5121e2c20f1d20c61587b1e3d0603d (patch)
treee7033dd61f254dc7e40206d14900766df4a3cf9b /src/mesa/drivers
parent072d64121e13ad6bcb9b703090de1ee4a59f7096 (diff)
downloadexternal_mesa3d-193a9a209d5121e2c20f1d20c61587b1e3d0603d.zip
external_mesa3d-193a9a209d5121e2c20f1d20c61587b1e3d0603d.tar.gz
external_mesa3d-193a9a209d5121e2c20f1d20c61587b1e3d0603d.tar.bz2
i965/vs: Add support for if(any(bvec)) on gen6.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index 2a1f003..d188857 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -564,10 +564,6 @@ vec4_visitor::emit_if_gen6(ir_if *ir)
assert(expr->get_num_operands() <= 2);
for (unsigned int i = 0; i < expr->get_num_operands(); i++) {
- assert(expr->operands[i]->type->is_scalar() ||
- expr->operation == ir_binop_any_nequal ||
- expr->operation == ir_binop_all_equal);
-
expr->operands[i]->accept(this);
op[i] = this->result;
}
@@ -634,6 +630,14 @@ vec4_visitor::emit_if_gen6(ir_if *ir)
inst->predicate = BRW_PREDICATE_ALIGN16_ANY4H;
return;
+ case ir_unop_any:
+ inst = emit(BRW_OPCODE_CMP, dst_null_d(), op[0], src_reg(0));
+ inst->conditional_mod = BRW_CONDITIONAL_NZ;
+
+ inst = emit(BRW_OPCODE_IF);
+ inst->predicate = BRW_PREDICATE_ALIGN16_ANY4H;
+ return;
+
default:
assert(!"not reached");
inst = emit(BRW_OPCODE_IF, dst_null_d(), op[0], src_reg(0));