HLSL: Non-functional: Move partial flattened access into symbol node.
Lays the groundwork for fixing issue #954. Partial flattenings were previously tracked through a stack of active subsets in the parse context, but full functionality needs AST nodes to represent this across time, removing the need for parsecontext tracking.
This commit is contained in:
@@ -204,10 +204,6 @@ public:
|
||||
// Potentially rename shader entry point function
|
||||
void renameShaderFunction(const TString*& name) const;
|
||||
|
||||
// Reset data for incrementally built referencing of flattened composite structures
|
||||
void initFlattening() { flattenLevel.push_back(0); flattenOffset.push_back(0); }
|
||||
void finalizeFlattening() { flattenLevel.pop_back(); flattenOffset.pop_back(); }
|
||||
|
||||
// Share struct buffer deep types
|
||||
void shareStructBufferType(TType&);
|
||||
|
||||
@@ -242,7 +238,7 @@ protected:
|
||||
|
||||
// Array and struct flattening
|
||||
TIntermTyped* flattenAccess(TIntermTyped* base, int member);
|
||||
TIntermTyped* flattenAccess(int uniqueId, int member, const TType&);
|
||||
TIntermTyped* flattenAccess(int uniqueId, int member, const TType&, int subset = -1);
|
||||
bool shouldFlatten(const TType&) const;
|
||||
bool wasFlattened(const TIntermTyped* node) const;
|
||||
bool wasFlattened(int id) const { return flattenMap.find(id) != flattenMap.end(); }
|
||||
@@ -368,7 +364,6 @@ protected:
|
||||
|
||||
TMap<int, TFlattenData> flattenMap;
|
||||
TVector<int> flattenLevel; // nested postfix operator level for flattening
|
||||
TVector<int> flattenOffset; // cumulative offset for flattening
|
||||
|
||||
// IO-type map. Maps a pure symbol-table form of a structure-member list into
|
||||
// each of the (up to) three kinds of IO, as each as different allowed decorations,
|
||||
|
||||
Reference in New Issue
Block a user