Add full support for uniforms with initializers, including intra-stage link validation of aggregate constant initializers.

This included 
 - encapsulating aggregate constants
 - removal of constant-aggregate comparison algorithms, instead using a flattened and direct std::vector comparison
 - adding structure type comparison for independently declared structures that still might match types



git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23274 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-09-28 04:02:08 +00:00
parent b3345c422d
commit f2ee3dd46a
98 changed files with 3007 additions and 1715 deletions

View file

@ -125,7 +125,7 @@ protected:
//
class TVariable : public TSymbol {
public:
TVariable(const TString *name, const TType& t, bool uT = false ) : TSymbol(name), userType(uT), unionArray(0) { type.shallowCopy(t); }
TVariable(const TString *name, const TType& t, bool uT = false ) : TSymbol(name), userType(uT) { type.shallowCopy(t); }
virtual TVariable* clone(TStructureMap& remapper);
virtual ~TVariable() { }
@ -137,21 +137,8 @@ public:
virtual void dump(TInfoSink &infoSink) const;
TConstUnion* getConstUnionPointer()
{
if (!unionArray)
unionArray = new TConstUnion[type.getObjectSize()];
return unionArray;
}
TConstUnion* getConstUnionPointer() const { return unionArray; }
void shareConstPointer( TConstUnion *constArray)
{
delete unionArray;
unionArray = constArray;
}
const TConstUnionArray& getConstArray() const { return unionArray; }
void setConstArray(const TConstUnionArray& constArray) { unionArray = constArray; }
protected:
explicit TVariable(const TVariable&);
@ -162,7 +149,7 @@ protected:
bool userType;
// we are assuming that Pool Allocator will free the memory allocated to unionArray
// when this object is destroyed
TConstUnion *unionArray;
TConstUnionArray unionArray;
};
//