summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_visitor.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index 91dd212d0f9..6d56115a443 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -2735,6 +2735,9 @@ fs_visitor::try_opt_frontfacing_ternary(ir_if *ir)
if (!then_rhs || !else_rhs)
return false;
+ if (then_rhs->type->base_type != GLSL_TYPE_FLOAT)
+ return false;
+
if ((then_rhs->is_one() && else_rhs->is_negative_one()) ||
(else_rhs->is_one() && then_rhs->is_negative_one())) {
then_assign->lhs->accept(this);