Web: Optional error management and error tightening.

Saves about 6.5K
This commit is contained in:
John Kessenich 2019-08-10 10:41:15 -06:00
parent fb4f2333da
commit d8834df992
10 changed files with 1144 additions and 1109 deletions

View file

@ -56,8 +56,10 @@ namespace glslang {
//
void TIntermediate::error(TInfoSink& infoSink, const char* message)
{
#ifndef GLSLANG_WEB
infoSink.info.prefix(EPrefixError);
infoSink.info << "Linking " << StageName(language) << " stage: " << message << "\n";
#endif
++numErrors;
}
@ -65,8 +67,10 @@ void TIntermediate::error(TInfoSink& infoSink, const char* message)
// Link-time warning.
void TIntermediate::warn(TInfoSink& infoSink, const char* message)
{
#ifndef GLSLANG_WEB
infoSink.info.prefix(EPrefixWarning);
infoSink.info << "Linking " << StageName(language) << " stage: " << message << "\n";
#endif
}
// TODO: 4.4 offset/align: "Two blocks linked together in the same program with the same block