summaryrefslogtreecommitdiffstats
path: root/src/glsl/builtins
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-08-23 12:21:33 -0700
committerEric Anholt <[email protected]>2010-08-23 13:05:53 -0700
commit5e9ac94cc44ef4f97063d7b696411b2a4be16f36 (patch)
tree0efbbc6d6f05a37a380bc380d6f3139580e7b1b8 /src/glsl/builtins
parent47003a8f653db881fbafc96fca93aba38ea3ebc2 (diff)
mesa: Add new ir_unop_any() expression operation.
The previous any() implementation would generate arg0.x || arg0.y || arg0.z. Having an expression operation for this makes it easy for the backend to generate something easier (DPn + SNE for 915 FS, .any predication on 965 VS)
Diffstat (limited to 'src/glsl/builtins')
-rw-r--r--src/glsl/builtins/ir/any6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/glsl/builtins/ir/any b/src/glsl/builtins/ir/any
index f10e8a7b478..cc6038a3156 100644
--- a/src/glsl/builtins/ir/any
+++ b/src/glsl/builtins/ir/any
@@ -2,15 +2,15 @@
(signature bool
(parameters
(declare (in) bvec2 arg0))
- ((return (expression bool || (swiz x (var_ref arg0))(swiz y (var_ref arg0))))))
+ ((return (expression bool any (var_ref arg0)))))
(signature bool
(parameters
(declare (in) bvec3 arg0))
- ((return (expression bool || (expression bool || (swiz x (var_ref arg0))(swiz y (var_ref arg0))) (swiz z (var_ref arg0))))))
+ ((return (expression bool any (var_ref arg0)))))
(signature bool
(parameters
(declare (in) bvec4 arg0))
- ((return (expression bool || (expression bool || (expression bool || (swiz x (var_ref arg0))(swiz y (var_ref arg0))) (swiz z (var_ref arg0))) (swiz w (var_ref arg0))))))
+ ((return (expression bool any (var_ref arg0)))))
))