Merge pull request #2033 from ShchchowAMD/binding_contradictory

Add Error check flag in io mapper
This commit is contained in:
John Kessenich 2020-01-16 00:23:03 -07:00 committed by GitHub
commit 9e9099cdf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -831,6 +831,7 @@ void TDefaultGlslIoResolver::reserverStorageSlot(TVarEntryInfo& ent, TInfoSink&
if (iter->second != location) { if (iter->second != location) {
TString errorMsg = "Invalid location: " + name; TString errorMsg = "Invalid location: " + name;
infoSink.info.message(EPrefixInternalError, errorMsg.c_str()); infoSink.info.message(EPrefixInternalError, errorMsg.c_str());
hasError = true;
} }
} }
} }
@ -856,6 +857,7 @@ void TDefaultGlslIoResolver::reserverStorageSlot(TVarEntryInfo& ent, TInfoSink&
if (iter->second != location) { if (iter->second != location) {
TString errorMsg = "Invalid location: " + name; TString errorMsg = "Invalid location: " + name;
infoSink.info.message(EPrefixInternalError, errorMsg.c_str()); infoSink.info.message(EPrefixInternalError, errorMsg.c_str());
hasError = true;
} }
} }
} }
@ -884,6 +886,7 @@ void TDefaultGlslIoResolver::reserverResourceSlot(TVarEntryInfo& ent, TInfoSink&
if (iter->second != binding) { if (iter->second != binding) {
TString errorMsg = "Invalid binding: " + name; TString errorMsg = "Invalid binding: " + name;
infoSink.info.message(EPrefixInternalError, errorMsg.c_str()); infoSink.info.message(EPrefixInternalError, errorMsg.c_str());
hasError = true;
} }
} }
} }

View File

@ -129,6 +129,7 @@ public:
uint32_t computeTypeLocationSize(const TType& type, EShLanguage stage); uint32_t computeTypeLocationSize(const TType& type, EShLanguage stage);
TSlotSetMap slots; TSlotSetMap slots;
bool hasError = false;
protected: protected:
TDefaultIoResolverBase(TDefaultIoResolverBase&); TDefaultIoResolverBase(TDefaultIoResolverBase&);