HLSL: Support the constructor idiom "(struct type)0".

This highly leverages the previous commit to handle partial initializers.
This commit is contained in:
John Kessenich
2016-11-27 22:51:36 -07:00
parent 98ad485321
commit f97f2ce603
5 changed files with 314 additions and 182 deletions

View File

@@ -172,6 +172,7 @@ protected:
void declareArray(const TSourceLoc&, TString& identifier, const TType&, TSymbol*&, bool track);
TIntermNode* executeInitializer(const TSourceLoc&, TIntermTyped* initializer, TVariable* variable);
TIntermTyped* convertInitializerList(const TSourceLoc&, const TType&, TIntermTyped* initializer);
bool HlslParseContext::isZeroConstructor(const TIntermNode*);
TOperator mapAtomicOp(const TSourceLoc& loc, TOperator op, bool isImage);
// Return true if this node requires L-value conversion (e.g, to an imageStore).