}
if(var.type_declaration && var.linked_declaration->type_declaration)
{
- const TypeDeclaration *type = var.type_declaration;
+ TypeDeclaration *type = var.type_declaration;
if(stage->type==Stage::GEOMETRY)
{
if(const BasicTypeDeclaration *basic = dynamic_cast<const BasicTypeDeclaration *>(type))
if(basic->kind==BasicTypeDeclaration::ARRAY && basic->base_type)
type = basic->base_type;
}
- if(!is_same_type(*type, *var.linked_declaration->type_declaration))
+ if(!TypeComparer().apply(*type, *var.linked_declaration->type_declaration))
{
error(var, format("Mismatched type '%s' for 'in %s'", type->name, var.name));
add_info(*var.linked_declaration, format("Linked to 'out %s' with type '%s'",
error(*uni.node, format("Mismatched binding %d for uniform '%s'", uni.bind_point, uni.name));
add_info(*i->second->node, format("Previously declared here with binding %d", i->second->bind_point));
}
- if(uni.type && i->second->type && !is_same_type(*uni.type, *i->second->type))
+ if(uni.type && i->second->type && !TypeComparer().apply(*uni.type, *i->second->type))
{
string type_name = (dynamic_cast<const StructDeclaration *>(uni.type) ?
"structure" : format("type '%s'", uni.type->name));