Infrastructure: Protect against missing built-in symbol table generators.

This commit is contained in:
John Kessenich 2017-01-11 14:24:56 -07:00
parent ce80197c22
commit 65d538c832
2 changed files with 11 additions and 4 deletions

View File

@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run).
#define GLSLANG_REVISION "Overload400-PrecQual.1750"
#define GLSLANG_DATE "06-Jan-2017"
#define GLSLANG_REVISION "Overload400-PrecQual.1759"
#define GLSLANG_DATE "11-Jan-2017"

View File

@ -296,6 +296,9 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TS
{
std::unique_ptr<TBuiltInParseables> builtInParseables(CreateBuiltInParseables(infoSink, source));
if (builtInParseables == nullptr)
return false;
builtInParseables->initialize(version, profile, spvVersion);
// do the common tables
@ -342,6 +345,9 @@ bool AddContextSpecificSymbols(const TBuiltInResource* resources, TInfoSink& inf
{
std::unique_ptr<TBuiltInParseables> builtInParseables(CreateBuiltInParseables(infoSink, source));
if (builtInParseables == nullptr)
return false;
builtInParseables->initialize(*resources, version, profile, spvVersion, language);
InitializeSymbolTable(builtInParseables->getCommonString(), version, profile, spvVersion, language, source, infoSink, symbolTable);
builtInParseables->identifyBuiltIns(version, profile, spvVersion, language, symbolTable, *resources);
@ -736,8 +742,9 @@ bool ProcessDeferred(
// Add built-in symbols that are potentially context dependent;
// they get popped again further down.
AddContextSpecificSymbols(resources, compiler->infoSink, symbolTable, version, profile, spvVersion,
compiler->getLanguage(), source);
if (! AddContextSpecificSymbols(resources, compiler->infoSink, symbolTable, version, profile, spvVersion,
compiler->getLanguage(), source))
return false;
//
// Now we can process the full shader under proper symbols and rules.