summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_builder.cpp
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2015-02-05 11:54:39 +0200
committerIlia Mirkin <[email protected]>2015-02-19 00:28:34 -0500
commit41e9adfd83a35d3c147768b80b6b4c0b10c3a379 (patch)
tree851db9c801b2d31db12373ad1bd30378cc3932fc /src/glsl/ir_builder.cpp
parenteeae6251be7bddf3040f14a2782ee8d5d17f7914 (diff)
glsl/ir: Add builder support for functions with double floats
Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/glsl/ir_builder.cpp')
-rw-r--r--src/glsl/ir_builder.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/glsl/ir_builder.cpp b/src/glsl/ir_builder.cpp
index 2872c516b14..e44b05c991c 100644
--- a/src/glsl/ir_builder.cpp
+++ b/src/glsl/ir_builder.cpp
@@ -256,6 +256,11 @@ ir_expression *round_even(operand a)
return expr(ir_unop_round_even, a);
}
+ir_expression *fract(operand a)
+{
+ return expr(ir_unop_fract, a);
+}
+
/* dot for vectors, mul for scalars */
ir_expression *dot(operand a, operand b)
{
@@ -520,6 +525,24 @@ interpolate_at_sample(operand a, operand b)
}
ir_expression *
+f2d(operand a)
+{
+ return expr(ir_unop_f2d, a);
+}
+
+ir_expression *
+i2d(operand a)
+{
+ return expr(ir_unop_i2d, a);
+}
+
+ir_expression *
+u2d(operand a)
+{
+ return expr(ir_unop_u2d, a);
+}
+
+ir_expression *
fma(operand a, operand b, operand c)
{
return expr(ir_triop_fma, a, b, c);