nir/print: Factor variable name lookup into a helper
[mesa.git] / src / glsl / ir_builder.cpp
index 2872c516b149cf0d935cfd032b2cc930aad00ace..c9cf1240dfebca5baefb02ac72b90f4e2b065ae1 100644 (file)
@@ -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)
 {
@@ -333,6 +338,12 @@ sign(operand a)
    return expr(ir_unop_sign, a);
 }
 
+ir_expression *
+subr_to_int(operand a)
+{
+   return expr(ir_unop_subroutine_to_int, a);
+}
+
 ir_expression*
 equal(operand a, operand b)
 {
@@ -519,6 +530,24 @@ interpolate_at_sample(operand a, operand b)
    return expr(ir_binop_interpolate_at_sample, a, 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)
 {
@@ -537,6 +566,12 @@ csel(operand a, operand b, operand c)
    return expr(ir_triop_csel, a, b, c);
 }
 
+ir_expression *
+bitfield_extract(operand a, operand b, operand c)
+{
+   return expr(ir_triop_bitfield_extract, a, b, c);
+}
+
 ir_expression *
 bitfield_insert(operand a, operand b, operand c, operand d)
 {