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:
parent
b3345c422d
commit
f2ee3dd46a
98 changed files with 3007 additions and 1715 deletions
|
|
@ -460,27 +460,29 @@ public:
|
|||
// per process globalpoolallocator, then it causes increased memory usage per compile
|
||||
// it is essential to use "symbol = sym" to assign to symbol
|
||||
TIntermSymbol(int i, const TString& n, const TType& t) :
|
||||
TIntermTyped(t), id(i) { name = n;}
|
||||
TIntermTyped(t), id(i) { name = n;}
|
||||
virtual int getId() const { return id; }
|
||||
virtual const TString& getName() const { return name; }
|
||||
virtual void traverse(TIntermTraverser*);
|
||||
virtual TIntermSymbol* getAsSymbolNode() { return this; }
|
||||
void setConstArray(const TConstUnionArray& c) { unionArray = c; }
|
||||
const TConstUnionArray& getConstArray() const { return unionArray; }
|
||||
protected:
|
||||
int id;
|
||||
TString name;
|
||||
TConstUnionArray unionArray;
|
||||
};
|
||||
|
||||
class TIntermConstantUnion : public TIntermTyped {
|
||||
public:
|
||||
TIntermConstantUnion(TConstUnion *unionPointer, const TType& t) : TIntermTyped(t), unionArrayPointer(unionPointer) { }
|
||||
TConstUnion* getUnionArrayPointer() const { return unionArrayPointer; }
|
||||
void setUnionArrayPointer(TConstUnion *c) { unionArrayPointer = c; }
|
||||
TIntermConstantUnion(const TConstUnionArray& ua, const TType& t) : TIntermTyped(t), unionArray(ua) { }
|
||||
const TConstUnionArray& getConstArray() const { return unionArray; }
|
||||
virtual TIntermConstantUnion* getAsConstantUnion() { return this; }
|
||||
virtual void traverse(TIntermTraverser* );
|
||||
virtual TIntermTyped* fold(TOperator, TIntermTyped*);
|
||||
virtual TIntermTyped* fold(TOperator, const TType&);
|
||||
protected:
|
||||
TConstUnion *unionArrayPointer;
|
||||
const TConstUnionArray unionArray;
|
||||
};
|
||||
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue