glsl: add ARB_shader_ballot operations
[mesa.git] / src / compiler / glsl / ir.cpp
index f80bd811ac015bbb930cfb9e82505453092c1b87..2bbc7a1cf720f06bcdef5323ae03c3d393b19f09 100644 (file)
@@ -381,6 +381,14 @@ ir_expression::ir_expression(int op, ir_rvalue *op0)
       this->type = glsl_type::int_type;
       break;
 
+   case ir_unop_ballot:
+      this->type = glsl_type::uint64_t_type;
+      break;
+
+   case ir_unop_read_first_invocation:
+      this->type = op0->type;
+      break;
+
    case ir_unop_vote_any:
    case ir_unop_vote_all:
    case ir_unop_vote_eq:
@@ -496,6 +504,10 @@ ir_expression::ir_expression(int op, ir_rvalue *op0, ir_rvalue *op1)
       this->type = op0->type->get_scalar_type();
       break;
 
+   case ir_binop_read_invocation:
+      this->type = op0->type;
+      break;
+
    default:
       assert(!"not reached: missing automatic type setup for ir_expression");
       this->type = glsl_type::float_type;