From: Dave Airlie <airl...@redhat.com>

We need builder support to implement some of the builtins.

Signed-off-by: Dave Airlie <airl...@redhat.com>
---
 src/compiler/glsl/ir_builder.cpp | 24 ++++++++++++++++++++++++
 src/compiler/glsl/ir_builder.h   |  6 ++++++
 2 files changed, 30 insertions(+)

diff --git a/src/compiler/glsl/ir_builder.cpp b/src/compiler/glsl/ir_builder.cpp
index d68647f..d78ff39 100644
--- a/src/compiler/glsl/ir_builder.cpp
+++ b/src/compiler/glsl/ir_builder.cpp
@@ -512,6 +512,30 @@ b2f(operand a)
    return expr(ir_unop_b2f, a);
 }
 
+ir_expression*
+bitcast_d2i64(operand a)
+{
+   return expr(ir_unop_bitcast_d2i64, a);
+}
+
+ir_expression*
+bitcast_d2u64(operand a)
+{
+   return expr(ir_unop_bitcast_d2u64, a);
+}
+
+ir_expression*
+bitcast_i642d(operand a)
+{
+   return expr(ir_unop_bitcast_i642d, a);
+}
+
+ir_expression*
+bitcast_u642d(operand a)
+{
+   return expr(ir_unop_bitcast_u642d, a);
+}
+
 ir_expression *
 interpolate_at_centroid(operand a)
 {
diff --git a/src/compiler/glsl/ir_builder.h b/src/compiler/glsl/ir_builder.h
index b483ebf..6691504 100644
--- a/src/compiler/glsl/ir_builder.h
+++ b/src/compiler/glsl/ir_builder.h
@@ -190,6 +190,12 @@ ir_expression *f2d(operand a);
 ir_expression *i2d(operand a);
 ir_expression *u2d(operand a);
 
+ir_expression *bitcast_d2i64(operand a);
+ir_expression *bitcast_d2u64(operand a);
+
+ir_expression *bitcast_i642d(operand a);
+ir_expression *bitcast_u642d(operand a);
+
 ir_expression *min2(operand a, operand b);
 ir_expression *max2(operand a, operand b);
 
-- 
2.5.5

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to