From 61c450fc81900131621e57fdd78a40e82239daf3 Mon Sep 17 00:00:00 2001 From: Maxence Le Doré Date: Fri, 3 Jan 2014 00:09:50 +0100 Subject: glsl: add min() and max() functions to builder.cpp Reviewed-by: Kenneth Graunke --- src/glsl/ir_builder.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/glsl/ir_builder.cpp') diff --git a/src/glsl/ir_builder.cpp b/src/glsl/ir_builder.cpp index 6c49734bef8..31ed1916cc9 100644 --- a/src/glsl/ir_builder.cpp +++ b/src/glsl/ir_builder.cpp @@ -211,6 +211,16 @@ ir_expression *sub(operand a, operand b) return expr(ir_binop_sub, a, b); } +ir_expression *min(operand a, operand b) +{ + return expr(ir_binop_min, a, b); +} + +ir_expression *max(operand a, operand b) +{ + return expr(ir_binop_max, a, b); +} + ir_expression *mul(operand a, operand b) { return expr(ir_binop_mul, a, b); -- cgit v1.2.3