HLSL: Fix #1432: Globally initialize local static variables.

This commit is contained in:
John Kessenich 2018-07-11 01:09:14 -06:00
parent 64315a8aed
commit cf6bd066b9
7 changed files with 257 additions and 12 deletions

View file

@ -52,7 +52,7 @@ namespace glslang {
public:
HlslGrammar(HlslScanContext& scanner, HlslParseContext& parseContext)
: HlslTokenStream(scanner), parseContext(parseContext), intermediate(parseContext.intermediate),
typeIdentifiers(false) { }
typeIdentifiers(false), unitNode(nullptr) { }
virtual ~HlslGrammar() { }
bool parse();
@ -133,6 +133,7 @@ namespace glslang {
HlslParseContext& parseContext; // state of parsing and helper functions for building the intermediate
TIntermediate& intermediate; // the final product, the intermediate representation, includes the AST
bool typeIdentifiers; // shader uses some types as identifiers
TIntermNode* unitNode;
};
} // end namespace glslang