HLSL: Support {...} initializer lists that are too short.

This commit is contained in:
John Kessenich 2016-11-27 17:39:07 -07:00
parent 1c98904014
commit 98ad485321
9 changed files with 397 additions and 9 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.1664"
#define GLSLANG_REVISION "Overload400-PrecQual.1665"
#define GLSLANG_DATE "27-Nov-2016"

View file

@ -858,6 +858,7 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat
case EOpLogicalAnd:
case EOpLogicalOr:
case EOpLogicalXor:
case EOpConstructStruct:
return true;
default:
break;
@ -1184,6 +1185,17 @@ TIntermAggregate* TIntermediate::makeAggregate(TIntermNode* node, const TSourceL
return aggNode;
}
//
// Make an aggregate with an empty sequence.
//
TIntermAggregate* TIntermediate::makeAggregate(const TSourceLoc& loc)
{
TIntermAggregate* aggNode = new TIntermAggregate;
aggNode->setLoc(loc);
return aggNode;
}
//
// For "if" test nodes. There are three children; a condition,
// a true path, and a false path. The two paths are in the

View file

@ -221,6 +221,7 @@ public:
TIntermAggregate* growAggregate(TIntermNode* left, TIntermNode* right, const TSourceLoc&);
TIntermAggregate* makeAggregate(TIntermNode* node);
TIntermAggregate* makeAggregate(TIntermNode* node, const TSourceLoc&);
TIntermAggregate* makeAggregate(const TSourceLoc&);
TIntermTyped* setAggregateOperator(TIntermNode*, TOperator, const TType& type, TSourceLoc);
bool areAllChildConst(TIntermAggregate* aggrNode);
TIntermNode* addSelection(TIntermTyped* cond, TIntermNodePair code, const TSourceLoc&);