summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2015-02-28 08:26:37 -0800
committerIan Romanick <ian.d.romanick@intel.com>2015-03-17 15:00:28 -0700
commit4a53445b0d199489b2d1ae7d8654791e42b16804 (patch)
tree91c4251d4f9e2b9dc6324e7afa695272e69a3e02 /src/mesa/drivers/dri
parentce3f46397d77141156f81dd7fcf06fb936e2b0ef (diff)
downloadexternal_mesa3d-4a53445b0d199489b2d1ae7d8654791e42b16804.zip
external_mesa3d-4a53445b0d199489b2d1ae7d8654791e42b16804.tar.gz
external_mesa3d-4a53445b0d199489b2d1ae7d8654791e42b16804.tar.bz2
i965/fs: Change try_opt_frontfacing_ternary to eliminate asserts
If we check for the case that is actually necessary, the asserts become superfluous. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_visitor.cpp7
1 files 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 5d4b166..91dd212 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -2735,11 +2735,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;