diff options
Diffstat (limited to 'src/compiler/glsl/ir_validate.cpp')
-rw-r--r-- | src/compiler/glsl/ir_validate.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/compiler/glsl/ir_validate.cpp b/src/compiler/glsl/ir_validate.cpp index 5a1202b0b0d..76a4ed17e77 100644 --- a/src/compiler/glsl/ir_validate.cpp +++ b/src/compiler/glsl/ir_validate.cpp @@ -582,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: |