Merge pull request #2782 from kevin-mccullough/FixIomapperSeperableShaderValidation

Fix issue with separable shader validation in iomapper
This commit is contained in:
Greg Fischer 2021-11-19 15:19:27 -07:00 committed by GitHub
commit 2c54c20813
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 1350 additions and 2 deletions

View file

@ -760,7 +760,10 @@ void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& lin
auto checkName = [this, unitSymbol, &infoSink](const TString& name) {
for (unsigned int i = 0; i < unitSymbol->getType().getStruct()->size(); ++i) {
if (name == (*unitSymbol->getType().getStruct())[i].type->getFieldName()) {
if (name == (*unitSymbol->getType().getStruct())[i].type->getFieldName()
&& !((*unitSymbol->getType().getStruct())[i].type->getQualifier().hasLocation()
|| unitSymbol->getType().getQualifier().hasLocation())
) {
error(infoSink, "Anonymous member name used for global variable or other anonymous member: ");
infoSink.info << (*unitSymbol->getType().getStruct())[i].type->getCompleteString() << "\n";
}