Non-functional HLSL: Factor out built-ins from splitting and related simplifications.

This commit is contained in:
John Kessenich
2017-08-07 23:40:05 -06:00
parent eaed06823a
commit ecd08bc36c
4 changed files with 40 additions and 49 deletions

View File

@@ -252,8 +252,9 @@ protected:
bool isFinalFlattening(const TType& type) const { return !(type.isStruct() || type.isArray()); }
// Structure splitting (splits interstage built-in types into its own struct)
TType& split(TType& type, TString name, const TType* outerStructType = nullptr);
void split(const TVariable&);
void splitBuiltIn(const TString& baseName, const TType& memberType, const TArraySizes*, const TQualifier&);
const TType& split(const TType& type, const TString& name, const TQualifier&);
bool wasSplit(const TIntermTyped* node) const;
bool wasSplit(int id) const { return splitNonIoVars.find(id) != splitNonIoVars.end(); }
TVariable* getSplitNonIoVar(int id) const;
@@ -393,10 +394,6 @@ protected:
tInterstageIoData(TBuiltInVariable bi, TStorageQualifier q) :
builtIn(bi), storage(q) { }
tInterstageIoData(const TType& memberType, const TType& storageType) :
builtIn(memberType.getQualifier().builtIn),
storage(storageType.getQualifier().storage) { }
TBuiltInVariable builtIn;
TStorageQualifier storage;