X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fvalidate.cpp;h=4a5ffe841801b064c04c7ea68d6d91eb53ea1c59;hb=3ffa465364a36477b81b1b644ae8d19ee3bac8c2;hp=cb866b4ba215562c10fff9255bd1867b51ff6f00;hpb=6377f8efc81ffe84b7ffe44380f1caa2059f437f;p=libs%2Fgl.git diff --git a/source/glsl/validate.cpp b/source/glsl/validate.cpp index cb866b4b..4a5ffe84 100644 --- a/source/glsl/validate.cpp +++ b/source/glsl/validate.cpp @@ -690,14 +690,14 @@ void StageInterfaceValidator::visit(VariableDeclaration &var) } 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(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'", @@ -750,7 +750,7 @@ void GlobalInterfaceValidator::check_uniform(const Uniform &uni) 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(uni.type) ? "structure" : format("type '%s'", uni.type->name));