Build: Fix a couple build issues.

This commit is contained in:
John Kessenich
2017-09-30 14:54:18 -06:00
parent 77ea30bdc9
commit 092b7d2e20
2 changed files with 4 additions and 5 deletions

View File

@@ -1826,7 +1826,7 @@ void HlslParseContext::transferTypeAttributes(const TAttributeMap& attributes, T
if (argNum >= attrAgg->getSequence().size()) if (argNum >= attrAgg->getSequence().size())
return false; return false;
const TConstUnion& intConst = attrAgg->getSequence()[argNum]->getAsConstantUnion()->getConstArray()[0]; const TConstUnion& intConst = attrAgg->getSequence()[argNum]->getAsConstantUnion()->getConstArray()[0];
if (intConst == nullptr) if (intConst.getType() != EbtInt)
return false; return false;
value = intConst.getIConst(); value = intConst.getIConst();
return true; 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(), ""); error(loc, "initializer requires a variable, not a member", identifier.c_str(), "");
return nullptr; return nullptr;
} }
return executeInitializer(loc, initializer, variable, flattenVar); return executeInitializer(loc, initializer, variable);
} }
// Pick up global defaults from the provide global defaults into dst. // 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 // Returning nullptr just means there is no code to execute to handle the
// initializer, which will, for example, be the case for constant initializers. // initializer, which will, for example, be the case for constant initializers.
// //
TIntermNode* HlslParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyped* initializer, TVariable* variable, TIntermNode* HlslParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyped* initializer, TVariable* variable)
bool flattened)
{ {
// //
// Identifier must be of type constant, a global, or a temporary, and // Identifier must be of type constant, a global, or a temporary, and

View File

@@ -234,7 +234,7 @@ protected:
TIntermSymbol* makeInternalVariableNode(const TSourceLoc&, const char* name, const TType&) const; TIntermSymbol* makeInternalVariableNode(const TSourceLoc&, const char* name, const TType&) const;
TVariable* declareNonArray(const TSourceLoc&, const TString& identifier, const TType&, bool track); TVariable* declareNonArray(const TSourceLoc&, const TString& identifier, const TType&, bool track);
void declareArray(const TSourceLoc&, const TString& identifier, const TType&, TSymbol*&, 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); TIntermTyped* convertInitializerList(const TSourceLoc&, const TType&, TIntermTyped* initializer, TIntermTyped* scalarInit);
bool isScalarConstructor(const TIntermNode*); bool isScalarConstructor(const TIntermNode*);
TOperator mapAtomicOp(const TSourceLoc& loc, TOperator op, bool isImage); TOperator mapAtomicOp(const TSourceLoc& loc, TOperator op, bool isImage);