summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir.cpp
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-07-13 15:37:57 -0700
committerEric Anholt <[email protected]>2010-07-18 18:12:12 -0700
commit9be7f638130f46a9df2bfbcd4a03b36de9e4f3aa (patch)
tree5db2a2e0c0198c2960bfcb3051ffbeeda8757573 /src/glsl/ir.cpp
parent87a2ee8db6222006480bd0e0ac58b77795c5d951 (diff)
glsl2: Make cross() be an expression operation.
ARB_fp, ARB_vp, Mesa IR, and the 965 vertex shader all have instructions for cross. Shaves 12 Mesa instructions off of a 66-instruction shader I have.
Diffstat (limited to 'src/glsl/ir.cpp')
-rw-r--r--src/glsl/ir.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp
index 6d899132861..fcf5deced8d 100644
--- a/src/glsl/ir.cpp
+++ b/src/glsl/ir.cpp
@@ -104,6 +104,7 @@ ir_expression::get_num_operands(ir_expression_operation op)
2, /* ir_binop_logic_or */
2, /* ir_binop_dot */
+ 2, /* ir_binop_cross */
2, /* ir_binop_min */
2, /* ir_binop_max */
@@ -163,6 +164,7 @@ static const char *const operator_strs[] = {
"^^",
"||",
"dot",
+ "cross",
"min",
"max",
"pow",