X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fvalidate.cpp;h=e9a8bb3b1978279c4dc3a5ec2512326f8ec752bd;hb=4d292eadc135b07e8e0996deb539b1984d7d38d3;hp=6a4b8eb0dc0e34ced99b82fcc08d41c22c569bf0;hpb=efbce87192ce73ba577684369f759693dccec67c;p=libs%2Fgl.git diff --git a/source/glsl/validate.cpp b/source/glsl/validate.cpp index 6a4b8eb0..e9a8bb3b 100644 --- a/source/glsl/validate.cpp +++ b/source/glsl/validate.cpp @@ -356,7 +356,8 @@ void IdentifierValidator::record_definition(const string &name, Statement &state void IdentifierValidator::visit(TypeDeclaration &type) { - check_definition(type.name, type); + if(type.source!=INTERNAL_SOURCE) + check_definition(type.name, type); } void IdentifierValidator::visit(StructDeclaration &strct) @@ -834,6 +835,11 @@ void GlobalInterfaceValidator::check_uniform(const Uniform &uni) error(*uni.node, format("Mismatched location %d for uniform '%s'", uni.location, uni.name)); add_info(*i->second->node, format("Previously declared here with location %d", i->second->location)); } + if(i->second->desc_set!=uni.desc_set) + { + error(*uni.node, format("Mismatched descriptor set %d for uniform '%s'", uni.desc_set, uni.name)); + add_info(*i->second->node, format("Previously declared here with descriptor set %d", i->second->desc_set)); + } if(uni.bind_point>=0 && i->second->bind_point>=0 && i->second->bind_point!=uni.bind_point) { error(*uni.node, format("Mismatched binding %d for uniform '%s'", uni.bind_point, uni.name));