HLSL: require tessellation factors to be fixed size arrays

SPIR-V requires that tessellation factor arrays be size 4 (outer) or 2 (inner).
HLSL allows other sizes such as 3, or even scalars.  This commit converts
between them by forcing the IO types to be the SPIR-V size, and allowing
copies between the internal and IO types to handle these cases.
This commit is contained in:
steve-lunarg 2017-03-17 18:51:05 -06:00
parent 9cee73e028
commit 194f0f39ec
6 changed files with 216 additions and 162 deletions

View file

@ -248,6 +248,8 @@ protected:
void addInterstageIoToLinkage();
void addPatchConstantInvocation();
void fixBuiltInArrayType(TType&);
void flatten(const TSourceLoc& loc, const TVariable& variable);
int flatten(const TSourceLoc& loc, const TVariable& variable, const TType&, TFlattenData&, TString name);
int flattenStruct(const TSourceLoc& loc, const TVariable& variable, const TType&, TFlattenData&, TString name);