summaryrefslogtreecommitdiff
path: root/ir_to_mesa.cpp
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-05-19 16:10:37 -0700
committerEric Anholt <eric@anholt.net>2010-06-24 15:05:21 -0700
commitc23c6c773a5c79b458e52ff42bd9f431c87d4036 (patch)
tree9fbe86cea05247880091a3f457aca7dfe79adcce /ir_to_mesa.cpp
parent346daeca07d3c19c051799f96fa9f442262bd49f (diff)
ir_to_mesa: Implement min and max expressions.
fixes glsl-orangebook-ch06-bump.frag.
Diffstat (limited to 'ir_to_mesa.cpp')
-rw-r--r--ir_to_mesa.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/ir_to_mesa.cpp b/ir_to_mesa.cpp
index 4238d9a8c8..59ee3b29f0 100644
--- a/ir_to_mesa.cpp
+++ b/ir_to_mesa.cpp
@@ -529,6 +529,12 @@ ir_to_mesa_visitor::visit(ir_expression *ir)
case ir_unop_floor:
this->result = this->create_tree(MB_TERM_floor_vec4, ir, op[0], NULL);
break;
+ case ir_binop_min:
+ this->result = this->create_tree(MB_TERM_min_vec4_vec4, ir, op[0], op[1]);
+ break;
+ case ir_binop_max:
+ this->result = this->create_tree(MB_TERM_max_vec4_vec4, ir, op[0], op[1]);
+ break;
default:
break;
}