GL_ARB_enhanced_layouts, part 1: Track whether constants are literals, to enable version-specific checking of layout(... = literal) vs. layout(... = expression).
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24675 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
5053a39578
commit
b76d6d6496
12 changed files with 67 additions and 23 deletions
|
|
@ -494,15 +494,18 @@ protected:
|
|||
|
||||
class TIntermConstantUnion : public TIntermTyped {
|
||||
public:
|
||||
TIntermConstantUnion(const TConstUnionArray& ua, const TType& t) : TIntermTyped(t), unionArray(ua) { }
|
||||
TIntermConstantUnion(const TConstUnionArray& ua, const TType& t) : TIntermTyped(t), unionArray(ua), literal(false) { }
|
||||
const TConstUnionArray& getConstArray() const { return unionArray; }
|
||||
virtual TIntermConstantUnion* getAsConstantUnion() { return this; }
|
||||
virtual const TIntermConstantUnion* getAsConstantUnion() const { return this; }
|
||||
virtual void traverse(TIntermTraverser*);
|
||||
virtual TIntermTyped* fold(TOperator, const TIntermTyped*) const;
|
||||
virtual TIntermTyped* fold(TOperator, const TType&) const;
|
||||
void setLiteral() { literal = true; }
|
||||
bool isLiteral() const { return literal; }
|
||||
protected:
|
||||
const TConstUnionArray unionArray;
|
||||
bool literal; // true if node represents a literal in the source code
|
||||
};
|
||||
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue