Put in basic propagation algorithm for precision qualifiers. Some corner cases are document as TODO.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20360 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-01-28 23:52:49 +00:00
parent cc2f8022d4
commit e406f1c71c
5 changed files with 61 additions and 11 deletions

View file

@ -231,6 +231,7 @@ enum TOperator {
class TIntermTraverser;
class TIntermAggregate;
class TIntermUnary;
class TIntermBinary;
class TIntermConstantUnion;
class TIntermSelection;
@ -253,6 +254,7 @@ public:
virtual TIntermTyped* getAsTyped() { return 0; }
virtual TIntermConstantUnion* getAsConstantUnion() { return 0; }
virtual TIntermAggregate* getAsAggregate() { return 0; }
virtual TIntermUnary* getAsUnaryNode() { return 0; }
virtual TIntermBinary* getAsBinaryNode() { return 0; }
virtual TIntermSelection* getAsSelectionNode() { return 0; }
virtual TIntermMethod* getAsMethodNode() { return 0; }
@ -270,9 +272,6 @@ struct TIntermNodePair {
TIntermNode* node2;
};
class TIntermSymbol;
class TIntermBinary;
//
// Intermediate class for nodes that have a type.
//
@ -286,6 +285,7 @@ public:
virtual TBasicType getBasicType() const { return type.getBasicType(); }
virtual TQualifier& getQualifier() { return type.getQualifier(); }
virtual void propagatePrecision(TPrecisionQualifier);
virtual int getNominalSize() const { return type.getNominalSize(); }
virtual int getSize() const { return type.getInstanceSize(); }
virtual bool isMatrix() const { return type.isMatrix(); }
@ -428,6 +428,7 @@ public:
virtual void traverse(TIntermTraverser*);
virtual void setOperand(TIntermTyped* o) { operand = o; }
virtual TIntermTyped* getOperand() { return operand; }
virtual TIntermUnary* getAsUnaryNode() { return this; }
virtual bool promote(TInfoSink&);
protected:
TIntermTyped* operand;