From: Ian Romanick <ian.d.roman...@intel.com> If we check for the case that is actually necessary, the asserts become superfluous.
Signed-off-by: Ian Romanick <ian.d.roman...@intel.com> Cc: Matt Turner <matts...@gmail.com> --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index 3d79796..917d3da 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp @@ -2845,11 +2845,8 @@ fs_visitor::try_opt_frontfacing_ternary(ir_if *ir) if (!then_rhs || !else_rhs) return false; - if ((then_rhs->is_one() || then_rhs->is_negative_one()) && - (else_rhs->is_one() || else_rhs->is_negative_one())) { - assert(then_rhs->is_one() == else_rhs->is_negative_one()); - assert(else_rhs->is_one() == then_rhs->is_negative_one()); - + if ((then_rhs->is_one() && else_rhs->is_negative_one()) || + (else_rhs->is_one() && then_rhs->is_negative_one())) { then_assign->lhs->accept(this); fs_reg dst = this->result; dst.type = BRW_REGISTER_TYPE_D; -- 2.1.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev