summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir.h
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2015-02-05 11:50:43 +0200
committerIlia Mirkin <[email protected]>2015-02-19 00:28:34 -0500
commit5a69bdb599ee4eb422cba6a47517c376e9dc5faf (patch)
tree6f2291f609a674c15bda4e09c22cfa39d55222a2 /src/glsl/ir.h
parent53bf7c8fd2e11a6c64d6ff3a98b56d64d2242505 (diff)
glsl/ir: Add builtin function support for doubles
v2: add d2b, more ir_constant stuff (Ilia) Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/glsl/ir.h')
-rw-r--r--src/glsl/ir.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index a0f48b2af66..8c3845f301e 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -1269,6 +1269,13 @@ enum ir_expression_operation {
ir_unop_u2f, /**< Unsigned-to-float conversion. */
ir_unop_i2u, /**< Integer-to-unsigned conversion. */
ir_unop_u2i, /**< Unsigned-to-integer conversion. */
+ ir_unop_d2f, /**< Double-to-float conversion. */
+ ir_unop_f2d, /**< Float-to-double conversion. */
+ ir_unop_d2i, /**< Double-to-integer conversion. */
+ ir_unop_i2d, /**< Integer-to-double conversion. */
+ ir_unop_d2u, /**< Double-to-unsigned conversion. */
+ ir_unop_u2d, /**< Unsigned-to-double conversion. */
+ ir_unop_d2b, /**< Double-to-boolean conversion. */
ir_unop_bitcast_i2f, /**< Bit-identical int-to-float "conversion" */
ir_unop_bitcast_f2i, /**< Bit-identical float-to-int "conversion" */
ir_unop_bitcast_u2f, /**< Bit-identical uint-to-float "conversion" */
@@ -1345,6 +1352,18 @@ enum ir_expression_operation {
/*@}*/
ir_unop_saturate,
+
+ /**
+ * \name Double packing, part of ARB_gpu_shader_fp64.
+ */
+ /*@{*/
+ ir_unop_pack_double_2x32,
+ ir_unop_unpack_double_2x32,
+ /*@}*/
+
+ ir_unop_frexp_sig,
+ ir_unop_frexp_exp,
+
ir_unop_noise,
/**
@@ -2153,6 +2172,7 @@ union ir_constant_data {
int i[16];
float f[16];
bool b[16];
+ double d[16];
};
@@ -2163,6 +2183,7 @@ public:
ir_constant(unsigned int u, unsigned vector_elements=1);
ir_constant(int i, unsigned vector_elements=1);
ir_constant(float f, unsigned vector_elements=1);
+ ir_constant(double d, unsigned vector_elements=1);
/**
* Construct an ir_constant from a list of ir_constant values
@@ -2209,6 +2230,7 @@ public:
/*@{*/
bool get_bool_component(unsigned i) const;
float get_float_component(unsigned i) const;
+ double get_double_component(unsigned i) const;
int get_int_component(unsigned i) const;
unsigned get_uint_component(unsigned i) const;
/*@}*/