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->is_double() ||
ir->operands[0]->type->base_type == GLSL_TYPE_INT64);
assert(ir->type == ir->operands[0]->type);
break;
case ir_unop_rsq:
case ir_unop_sqrt:
assert(ir->type->base_type == GLSL_TYPE_FLOAT ||
- ir->type->base_type == GLSL_TYPE_DOUBLE);
+ ir->type->is_double());
assert(ir->type == ir->operands[0]->type);
break;
case ir_unop_bitcast_u642d:
assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT64);
- assert(ir->type->base_type == GLSL_TYPE_DOUBLE);
+ assert(ir->type->is_double());
break;
case ir_unop_bitcast_i642d:
assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT64);
- assert(ir->type->base_type == GLSL_TYPE_DOUBLE);
+ assert(ir->type->is_double());
break;
case ir_unop_bitcast_d2u64:
- assert(ir->operands[0]->type->base_type == GLSL_TYPE_DOUBLE);
+ assert(ir->operands[0]->type->is_double());
assert(ir->type->base_type == GLSL_TYPE_UINT64);
break;
case ir_unop_bitcast_d2i64:
- assert(ir->operands[0]->type->base_type == GLSL_TYPE_DOUBLE);
+ assert(ir->operands[0]->type->is_double());
assert(ir->type->base_type == GLSL_TYPE_INT64);
break;
case ir_unop_i642i:
break;
case ir_unop_i642d:
assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT64);
- assert(ir->type->base_type == GLSL_TYPE_DOUBLE);
+ assert(ir->type->is_double());
break;
case ir_unop_u642d:
assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT64);
- assert(ir->type->base_type == GLSL_TYPE_DOUBLE);
+ assert(ir->type->is_double());
break;
case ir_unop_i2i64:
assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT);
assert(ir->type->base_type == GLSL_TYPE_INT64);
break;
case ir_unop_d2i64:
- assert(ir->operands[0]->type->base_type == GLSL_TYPE_DOUBLE);
+ assert(ir->operands[0]->type->is_double());
assert(ir->type->base_type == GLSL_TYPE_INT64);
break;
case ir_unop_i2u64:
assert(ir->type->base_type == GLSL_TYPE_UINT64);
break;
case ir_unop_d2u64:
- assert(ir->operands[0]->type->base_type == GLSL_TYPE_DOUBLE);
+ assert(ir->operands[0]->type->is_double());
assert(ir->type->base_type == GLSL_TYPE_UINT64);
break;
case ir_unop_u642i64:
case ir_unop_floor:
case ir_unop_fract:
assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT ||
- ir->operands[0]->type->base_type == GLSL_TYPE_DOUBLE);
+ ir->operands[0]->type->is_double());
assert(ir->operands[0]->type == ir->type);
break;
case ir_unop_sin:
break;
case ir_unop_d2f:
- assert(ir->operands[0]->type->base_type == GLSL_TYPE_DOUBLE);
+ assert(ir->operands[0]->type->is_double());
assert(ir->type->base_type == GLSL_TYPE_FLOAT);
break;
case ir_unop_f2d:
assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT);
- assert(ir->type->base_type == GLSL_TYPE_DOUBLE);
+ assert(ir->type->is_double());
break;
case ir_unop_d2i:
- assert(ir->operands[0]->type->base_type == GLSL_TYPE_DOUBLE);
+ assert(ir->operands[0]->type->is_double());
assert(ir->type->base_type == GLSL_TYPE_INT);
break;
case ir_unop_i2d:
assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT);
- assert(ir->type->base_type == GLSL_TYPE_DOUBLE);
+ assert(ir->type->is_double());
break;
case ir_unop_d2u:
- assert(ir->operands[0]->type->base_type == GLSL_TYPE_DOUBLE);
+ assert(ir->operands[0]->type->is_double());
assert(ir->type->base_type == GLSL_TYPE_UINT);
break;
case ir_unop_u2d:
assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT);
- assert(ir->type->base_type == GLSL_TYPE_DOUBLE);
+ assert(ir->type->is_double());
break;
case ir_unop_d2b:
- assert(ir->operands[0]->type->base_type == GLSL_TYPE_DOUBLE);
+ assert(ir->operands[0]->type->is_double());
assert(ir->type->is_boolean());
break;
case ir_unop_frexp_sig:
assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT ||
- ir->operands[0]->type->base_type == GLSL_TYPE_DOUBLE);
- assert(ir->type->base_type == GLSL_TYPE_DOUBLE);
+ ir->operands[0]->type->is_double());
+ assert(ir->type->is_double());
break;
case ir_unop_frexp_exp:
assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT ||
- ir->operands[0]->type->base_type == GLSL_TYPE_DOUBLE);
+ ir->operands[0]->type->is_double());
assert(ir->type->base_type == GLSL_TYPE_INT);
break;
case ir_unop_subroutine_to_int:
assert(ir->type == glsl_type::float_type ||
ir->type == glsl_type::double_type);
assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT ||
- ir->operands[0]->type->base_type == GLSL_TYPE_DOUBLE);
+ ir->operands[0]->type->is_double());
assert(ir->operands[0]->type->is_vector());
assert(ir->operands[0]->type == ir->operands[1]->type);
break;
case ir_triop_fma:
assert(ir->type->base_type == GLSL_TYPE_FLOAT ||
- ir->type->base_type == GLSL_TYPE_DOUBLE);
+ ir->type->is_double());
assert(ir->type == ir->operands[0]->type);
assert(ir->type == ir->operands[1]->type);
assert(ir->type == ir->operands[2]->type);
case ir_triop_lrp:
assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT ||
- ir->operands[0]->type->base_type == GLSL_TYPE_DOUBLE);
+ ir->operands[0]->type->is_double());
assert(ir->operands[0]->type == ir->operands[1]->type);
assert(ir->operands[2]->type == ir->operands[0]->type ||
ir->operands[2]->type == glsl_type::float_type ||