Skip to content

Commit

Permalink
Merge pull request #2033 from ShchchowAMD/binding_contradictory
Browse files Browse the repository at this point in the history
Add Error check flag in io mapper
  • Loading branch information
johnkslang authored Jan 16, 2020
2 parents 4fc7a33 + 8a914f4 commit 9e9099c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions glslang/MachineIndependent/iomapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,7 @@ void TDefaultGlslIoResolver::reserverStorageSlot(TVarEntryInfo& ent, TInfoSink&
if (iter->second != location) {
TString errorMsg = "Invalid location: " + name;
infoSink.info.message(EPrefixInternalError, errorMsg.c_str());
hasError = true;
}
}
}
Expand All @@ -856,6 +857,7 @@ void TDefaultGlslIoResolver::reserverStorageSlot(TVarEntryInfo& ent, TInfoSink&
if (iter->second != location) {
TString errorMsg = "Invalid location: " + name;
infoSink.info.message(EPrefixInternalError, errorMsg.c_str());
hasError = true;
}
}
}
Expand Down Expand Up @@ -884,6 +886,7 @@ void TDefaultGlslIoResolver::reserverResourceSlot(TVarEntryInfo& ent, TInfoSink&
if (iter->second != binding) {
TString errorMsg = "Invalid binding: " + name;
infoSink.info.message(EPrefixInternalError, errorMsg.c_str());
hasError = true;
}
}
}
Expand Down
1 change: 1 addition & 0 deletions glslang/MachineIndependent/iomapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ struct TDefaultIoResolverBase : public glslang::TIoMapResolver {
uint32_t computeTypeLocationSize(const TType& type, EShLanguage stage);

TSlotSetMap slots;
bool hasError = false;

protected:
TDefaultIoResolverBase(TDefaultIoResolverBase&);
Expand Down

0 comments on commit 9e9099c

Please sign in to comment.