X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fglsl%2Fir_validate.cpp;h=af0b5768ac08a465a5f55d3bf4060935bb5cc5b7;hb=2acc7193743199701f8f6d1877a59ece0ec4fa5b;hp=7efb4347799525f3ad212a0dea361c9d22d877e2;hpb=f75c2d53146ea14f8dfedcc5b7a4704278ba0792;p=mesa.git diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp index 7efb4347799..af0b5768ac0 100644 --- a/src/glsl/ir_validate.cpp +++ b/src/glsl/ir_validate.cpp @@ -256,6 +256,10 @@ ir_validate::visit_leave(ir_expression *ir) assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT); assert(ir->type->base_type == GLSL_TYPE_INT); break; + case ir_unop_f2u: + assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT); + assert(ir->type->base_type == GLSL_TYPE_UINT); + break; case ir_unop_i2f: assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT); assert(ir->type->base_type == GLSL_TYPE_FLOAT); @@ -288,6 +292,22 @@ ir_validate::visit_leave(ir_expression *ir) assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT); assert(ir->type->base_type == GLSL_TYPE_INT); break; + case ir_unop_bitcast_i2f: + assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT); + assert(ir->type->base_type == GLSL_TYPE_FLOAT); + break; + case ir_unop_bitcast_f2i: + assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT); + assert(ir->type->base_type == GLSL_TYPE_INT); + break; + case ir_unop_bitcast_u2f: + assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT); + assert(ir->type->base_type == GLSL_TYPE_FLOAT); + break; + case ir_unop_bitcast_f2u: + assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT); + assert(ir->type->base_type == GLSL_TYPE_UINT); + break; case ir_unop_any: assert(ir->operands[0]->type->base_type == GLSL_TYPE_BOOL); @@ -403,6 +423,13 @@ ir_validate::visit_leave(ir_expression *ir) assert(ir->operands[0]->type == ir->operands[1]->type); break; + case ir_binop_ubo_load: + assert(ir->operands[0]->as_constant()); + assert(ir->operands[0]->type == glsl_type::uint_type); + + assert(ir->operands[1]->type == glsl_type::uint_type); + break; + case ir_quadop_vector: /* The vector operator collects some number of scalars and generates a * vector from them.