diff options
author | Nicolai Hähnle <[email protected]> | 2017-03-30 11:18:30 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2017-04-05 15:25:51 +0200 |
commit | d37b7b5232e419135776f9a6169adb4aad3900fb (patch) | |
tree | c7bb5487102ab2b727b2de527c8f5ce0a87d0847 /src/compiler/glsl/ir_validate.cpp | |
parent | b8440ec9fa1ddaf33b590fcf9120122e3acbf497 (diff) |
glsl: add ARB_shader_ballot operations
Reviewed-by: Marek Olšák <[email protected]>
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: |