From 092b7d2e2040ed28812f7d98e11af3b05d4bcbae Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Sat, 30 Sep 2017 14:54:18 -0600 Subject: [PATCH] Build: Fix a couple build issues. --- hlsl/hlslParseHelper.cpp | 7 +++---- hlsl/hlslParseHelper.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/hlsl/hlslParseHelper.cpp b/hlsl/hlslParseHelper.cpp index 74afb031..f414085d 100755 --- a/hlsl/hlslParseHelper.cpp +++ b/hlsl/hlslParseHelper.cpp @@ -1826,7 +1826,7 @@ void HlslParseContext::transferTypeAttributes(const TAttributeMap& attributes, T if (argNum >= attrAgg->getSequence().size()) return false; const TConstUnion& intConst = attrAgg->getSequence()[argNum]->getAsConstantUnion()->getConstArray()[0]; - if (intConst == nullptr) + if (intConst.getType() != EbtInt) return false; value = intConst.getIConst(); return true; @@ -7420,7 +7420,7 @@ TIntermNode* HlslParseContext::declareVariable(const TSourceLoc& loc, const TStr error(loc, "initializer requires a variable, not a member", identifier.c_str(), ""); return nullptr; } - return executeInitializer(loc, initializer, variable, flattenVar); + return executeInitializer(loc, initializer, variable); } // Pick up global defaults from the provide global defaults into dst. @@ -7488,8 +7488,7 @@ TVariable* HlslParseContext::declareNonArray(const TSourceLoc& loc, const TStrin // Returning nullptr just means there is no code to execute to handle the // initializer, which will, for example, be the case for constant initializers. // -TIntermNode* HlslParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyped* initializer, TVariable* variable, - bool flattened) +TIntermNode* HlslParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyped* initializer, TVariable* variable) { // // Identifier must be of type constant, a global, or a temporary, and diff --git a/hlsl/hlslParseHelper.h b/hlsl/hlslParseHelper.h index c1468ed0..ad02802a 100755 --- a/hlsl/hlslParseHelper.h +++ b/hlsl/hlslParseHelper.h @@ -234,7 +234,7 @@ protected: TIntermSymbol* makeInternalVariableNode(const TSourceLoc&, const char* name, const TType&) const; TVariable* declareNonArray(const TSourceLoc&, const TString& identifier, const TType&, bool track); void declareArray(const TSourceLoc&, const TString& identifier, const TType&, TSymbol*&, bool track); - TIntermNode* executeInitializer(const TSourceLoc&, TIntermTyped* initializer, TVariable* variable, bool flattened); + TIntermNode* executeInitializer(const TSourceLoc&, TIntermTyped* initializer, TVariable* variable); TIntermTyped* convertInitializerList(const TSourceLoc&, const TType&, TIntermTyped* initializer, TIntermTyped* scalarInit); bool isScalarConstructor(const TIntermNode*); TOperator mapAtomicOp(const TSourceLoc& loc, TOperator op, bool isImage);