projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de796b0
)
glsl: Optimize triop_csel with all-true or all-false.
author
Eric Anholt
<eric@anholt.net>
Fri, 1 Nov 2013 19:29:12 +0000
(12:29 -0700)
committer
Eric Anholt
<eric@anholt.net>
Fri, 7 Feb 2014 20:46:48 +0000
(12:46 -0800)
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/glsl/opt_algebraic.cpp
patch
|
blob
|
history
diff --git
a/src/glsl/opt_algebraic.cpp
b/src/glsl/opt_algebraic.cpp
index 7863fe8f9cf472a38fe245b62d689e795542610c..1b4d319366ccf68d1681ce782b2fe02ba3281d4b 100644
(file)
--- a/
src/glsl/opt_algebraic.cpp
+++ b/
src/glsl/opt_algebraic.cpp
@@
-571,6
+571,13
@@
ir_algebraic_visitor::handle_expression(ir_expression *ir)
}
break;
+ case ir_triop_csel:
+ if (is_vec_one(op_const[0]))
+ return ir->operands[1];
+ if (is_vec_zero(op_const[0]))
+ return ir->operands[2];
+ break;
+
default:
break;
}