Commit d5aedc19 by John Kessenich

HLSL: Correct which things flattening tracks for linkage, based on caller, not type.

Includes related trackLinkage() code removal and name improvements.
parent 7497e7c9
...@@ -81,6 +81,9 @@ gl_FragCoord origin is upper left ...@@ -81,6 +81,9 @@ gl_FragCoord origin is upper left
0:35 Function Call: @main( ( temp 4-component vector of float) 0:35 Function Call: @main( ( temp 4-component vector of float)
0:? Linker Objects 0:? Linker Objects
0:? 'tex' ( uniform texture2D) 0:? 'tex' ( uniform texture2D)
0:? 's2D' ( uniform sampler)
0:? 's2D' ( uniform sampler)
0:? 'tex' ( uniform texture2D)
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
...@@ -169,6 +172,9 @@ gl_FragCoord origin is upper left ...@@ -169,6 +172,9 @@ gl_FragCoord origin is upper left
0:35 Function Call: @main( ( temp 4-component vector of float) 0:35 Function Call: @main( ( temp 4-component vector of float)
0:? Linker Objects 0:? Linker Objects
0:? 'tex' ( uniform texture2D) 0:? 'tex' ( uniform texture2D)
0:? 's2D' ( uniform sampler)
0:? 's2D' ( uniform sampler)
0:? 'tex' ( uniform texture2D)
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
// Module Version 10000 // Module Version 10000
......
...@@ -155,8 +155,6 @@ Shader version: 500 ...@@ -155,8 +155,6 @@ Shader version: 500
0:? 'd' (layout( location=0) in 4-component vector of float) 0:? 'd' (layout( location=0) in 4-component vector of float)
0:? 'm[0]' (layout( location=1) in 4-component vector of float) 0:? 'm[0]' (layout( location=1) in 4-component vector of float)
0:? 'm[1]' (layout( location=2) in 4-component vector of float) 0:? 'm[1]' (layout( location=2) in 4-component vector of float)
0:? 'm[0]' (layout( location=1) in 4-component vector of float)
0:? 'm[1]' (layout( location=2) in 4-component vector of float)
0:? 'coord' (layout( location=3) in 4-component vector of float) 0:? 'coord' (layout( location=3) in 4-component vector of float)
0:? 'b' (layout( location=4) in 4-component vector of float) 0:? 'b' (layout( location=4) in 4-component vector of float)
0:? 'e' (layout( location=5) in 4-component vector of float) 0:? 'e' (layout( location=5) in 4-component vector of float)
...@@ -321,8 +319,6 @@ Shader version: 500 ...@@ -321,8 +319,6 @@ Shader version: 500
0:? 'd' (layout( location=0) in 4-component vector of float) 0:? 'd' (layout( location=0) in 4-component vector of float)
0:? 'm[0]' (layout( location=1) in 4-component vector of float) 0:? 'm[0]' (layout( location=1) in 4-component vector of float)
0:? 'm[1]' (layout( location=2) in 4-component vector of float) 0:? 'm[1]' (layout( location=2) in 4-component vector of float)
0:? 'm[0]' (layout( location=1) in 4-component vector of float)
0:? 'm[1]' (layout( location=2) in 4-component vector of float)
0:? 'coord' (layout( location=3) in 4-component vector of float) 0:? 'coord' (layout( location=3) in 4-component vector of float)
0:? 'b' (layout( location=4) in 4-component vector of float) 0:? 'b' (layout( location=4) in 4-component vector of float)
0:? 'e' (layout( location=5) in 4-component vector of float) 0:? 'e' (layout( location=5) in 4-component vector of float)
......
...@@ -133,7 +133,6 @@ public: ...@@ -133,7 +133,6 @@ public:
void mergeQualifiers(TQualifier& dst, const TQualifier& src); void mergeQualifiers(TQualifier& dst, const TQualifier& src);
int computeSamplerTypeIndex(TSampler&); int computeSamplerTypeIndex(TSampler&);
TSymbol* redeclareBuiltinVariable(const TSourceLoc&, const TString&, const TQualifier&, const TShaderQualifiers&); TSymbol* redeclareBuiltinVariable(const TSourceLoc&, const TString&, const TQualifier&, const TShaderQualifiers&);
void redeclareBuiltinBlock(const TSourceLoc&, TTypeList& typeList, const TString& blockName, const TString* instanceName, TArraySizes* arraySizes);
void paramFix(TType& type); void paramFix(TType& type);
void specializationCheck(const TSourceLoc&, const TType&, const char* op); void specializationCheck(const TSourceLoc&, const TType&, const char* op);
...@@ -256,19 +255,17 @@ protected: ...@@ -256,19 +255,17 @@ protected:
TType& split(TType& type, TString name, const TType* outerStructType = nullptr); TType& split(TType& type, TString name, const TType* outerStructType = nullptr);
void split(const TVariable&); void split(const TVariable&);
bool wasSplit(const TIntermTyped* node) const; bool wasSplit(const TIntermTyped* node) const;
bool wasSplit(int id) const { return splitIoVars.find(id) != splitIoVars.end(); } bool wasSplit(int id) const { return splitNonIoVars.find(id) != splitNonIoVars.end(); }
TVariable* getSplitIoVar(const TIntermTyped* node) const; TVariable* getSplitNonIoVar(int id) const;
TVariable* getSplitIoVar(const TVariable* var) const;
TVariable* getSplitIoVar(int id) const;
void addPatchConstantInvocation(); void addPatchConstantInvocation();
TIntermTyped* makeIntegerIndex(TIntermTyped*); TIntermTyped* makeIntegerIndex(TIntermTyped*);
void fixBuiltInIoType(TType&); void fixBuiltInIoType(TType&);
void flatten(const TVariable& variable); void flatten(const TVariable& variable, bool linkage);
int flatten(const TVariable& variable, const TType&, TFlattenData&, TString name); int flatten(const TVariable& variable, const TType&, TFlattenData&, TString name, bool linkage);
int flattenStruct(const TVariable& variable, const TType&, TFlattenData&, TString name); int flattenStruct(const TVariable& variable, const TType&, TFlattenData&, TString name, bool linkage);
int flattenArray(const TVariable& variable, const TType&, TFlattenData&, TString name); int flattenArray(const TVariable& variable, const TType&, TFlattenData&, TString name, bool linkage);
bool hasUniform(const TQualifier& qualifier) const; bool hasUniform(const TQualifier& qualifier) const;
void clearUniform(TQualifier& qualifier); void clearUniform(TQualifier& qualifier);
...@@ -382,7 +379,7 @@ protected: ...@@ -382,7 +379,7 @@ protected:
TMap<const TTypeList*, tIoKinds> ioTypeMap; TMap<const TTypeList*, tIoKinds> ioTypeMap;
// Structure splitting data: // Structure splitting data:
TMap<int, TVariable*> splitIoVars; // variables with the built-in interstage IO removed, indexed by unique ID. TMap<int, TVariable*> splitNonIoVars; // variables with the built-in interstage IO removed, indexed by unique ID.
// Structuredbuffer shared types. Typically there are only a few. // Structuredbuffer shared types. Typically there are only a few.
TVector<TType*> structBufferTypes; TVector<TType*> structBufferTypes;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment