glsl: fix the type of ir_constant_data::u16
[mesa.git] / src / compiler / glsl / ir_builder.cpp
index d68647f4234da45ad12a6e37785dd7ca34b13f1a..416d8c71ed1cad3aed19054469d2fe42c1792ffe 100644 (file)
@@ -314,6 +314,12 @@ exp(operand a)
    return expr(ir_unop_exp, a);
 }
 
+ir_expression *
+rcp(operand a)
+{
+   return expr(ir_unop_rcp, a);
+}
+
 ir_expression *
 rsq(operand a)
 {
@@ -365,13 +371,13 @@ less(operand a, operand b)
 ir_expression*
 greater(operand a, operand b)
 {
-   return expr(ir_binop_greater, a, b);
+   return expr(ir_binop_less, b, a);
 }
 
 ir_expression*
 lequal(operand a, operand b)
 {
-   return expr(ir_binop_lequal, a, b);
+   return expr(ir_binop_gequal, b, a);
 }
 
 ir_expression*
@@ -416,6 +422,12 @@ bit_or(operand a, operand b)
    return expr(ir_binop_bit_or, a, b);
 }
 
+ir_expression*
+bit_xor(operand a, operand b)
+{
+   return expr(ir_binop_bit_xor, a, b);
+}
+
 ir_expression*
 lshift(operand a, operand b)
 {
@@ -512,6 +524,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)
 {