GLSL could detect contradictory uniform binding, but missing error reporting, even if we could now observe error inside infosink.
Add error check when first time validate uniform binding. When doing traversal, it should be zero error.
This error check flag will be used during linking time. To quickly report errors like contradictory uniform bindings.
Add error check flags for TDefaultGlslIoResolver when catching EPrefixInternalError
if (iter->second != location) {
TString errorMsg = "Invalid location: " + name;
infoSink.info.message(EPrefixInternalError, errorMsg.c_str());
+ hasError = true;
}
}
}
if (iter->second != location) {
TString errorMsg = "Invalid location: " + name;
infoSink.info.message(EPrefixInternalError, errorMsg.c_str());
+ hasError = true;
}
}
}
if (iter->second != binding) {
TString errorMsg = "Invalid binding: " + name;
infoSink.info.message(EPrefixInternalError, errorMsg.c_str());
+ hasError = true;
}
}
}
uint32_t computeTypeLocationSize(const TType& type, EShLanguage stage);
TSlotSetMap slots;
+ bool hasError = false;
protected:
TDefaultIoResolverBase(TDefaultIoResolverBase&);