i965/vec4: split VEC4_OPCODE_FROM_DOUBLE into one opcode per destination's type
[mesa.git] / src / compiler / glsl / ir_validate.cpp
index 4f13754e74eb9a40bb3dca875296bd0796ff8167..76a4ed17e775d7e7325aaaf8e74d21a876649d84 100644 (file)
@@ -253,7 +253,8 @@ ir_validate::visit_leave(ir_expression *ir)
    case ir_unop_sign:
       assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT ||
              ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT ||
-             ir->operands[0]->type->base_type == GLSL_TYPE_DOUBLE);
+             ir->operands[0]->type->base_type == GLSL_TYPE_DOUBLE ||
+             ir->operands[0]->type->base_type == GLSL_TYPE_INT64);
       assert(ir->type == ir->operands[0]->type);
       break;
 
@@ -581,6 +582,22 @@ ir_validate::visit_leave(ir_expression *ir)
       assert(ir->type->base_type == GLSL_TYPE_INT);
       break;
 
+   case ir_unop_ballot:
+      assert(ir->type == glsl_type::uint64_t_type);
+      assert(ir->operands[0]->type == glsl_type::bool_type);
+      break;
+
+   case ir_binop_read_invocation:
+      assert(ir->operands[1]->type == glsl_type::uint_type);
+      /* fall-through */
+   case ir_unop_read_first_invocation:
+      assert(ir->type == ir->operands[0]->type);
+      assert(ir->type->is_scalar() || ir->type->is_vector());
+      assert(ir->type->base_type == GLSL_TYPE_FLOAT ||
+             ir->type->base_type == GLSL_TYPE_INT ||
+             ir->type->base_type == GLSL_TYPE_UINT);
+      break;
+
    case ir_unop_vote_any:
    case ir_unop_vote_all:
    case ir_unop_vote_eq: