glsl: add min() and max() functions to builder.cpp

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Maxence Le Doré 2014-01-03 00:09:50 +01:00 committed by Kenneth Graunke
parent cf70d2a7c0
commit 61c450fc81
2 changed files with 13 additions and 0 deletions

View File

@ -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);

View File

@ -184,6 +184,9 @@ ir_expression *i2b(operand a);
ir_expression *f2b(operand a);
ir_expression *b2f(operand a);
ir_expression *min(operand a, operand b);
ir_expression *max(operand a, operand b);
ir_expression *fma(operand a, operand b, operand c);
ir_expression *lrp(operand x, operand y, operand a);
ir_expression *csel(operand a, operand b, operand c);