diff options
Diffstat (limited to 'src/glsl/ir_validate.cpp')
-rw-r--r-- | src/glsl/ir_validate.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp index 699c192cd2c..4a8df6953ee 100644 --- a/src/glsl/ir_validate.cpp +++ b/src/glsl/ir_validate.cpp @@ -361,6 +361,19 @@ ir_validate::visit_leave(ir_expression *ir) assert(ir->operands[0]->type == glsl_type::uint_type); break; + case ir_unop_bitfield_reverse: + assert(ir->operands[0]->type == ir->type); + assert(ir->type->is_integer()); + break; + + case ir_unop_bit_count: + case ir_unop_find_msb: + case ir_unop_find_lsb: + assert(ir->operands[0]->type->vector_elements == ir->type->vector_elements); + assert(ir->operands[0]->type->is_integer()); + assert(ir->type->base_type == GLSL_TYPE_INT); + break; + case ir_unop_noise: /* XXX what can we assert here? */ break; @@ -474,6 +487,19 @@ ir_validate::visit_leave(ir_expression *ir) assert(ir->operands[2]->type == ir->operands[0]->type || ir->operands[2]->type == glsl_type::float_type); break; + case ir_triop_bitfield_extract: + assert(ir->operands[0]->type == ir->type); + assert(ir->operands[1]->type == glsl_type::int_type); + assert(ir->operands[2]->type == glsl_type::int_type); + break; + + case ir_quadop_bitfield_insert: + assert(ir->operands[0]->type == ir->type); + assert(ir->operands[1]->type == ir->type); + assert(ir->operands[2]->type == glsl_type::int_type); + assert(ir->operands[3]->type == glsl_type::int_type); + break; + case ir_quadop_vector: /* The vector operator collects some number of scalars and generates a * vector from them. |