Move promote methods to TIntermediate class
A need arose to use capabilities from TIntermediate during node promotion. These methods have been moved from virtual methods on the TIntermUnary and TIntermBinary nodes to methods on TIntermediate, so it is easy for them construct new nodes and so on. This is done as a separate commit to verify that no test results are changed as a result.
This commit is contained in:
parent
e5921f1309
commit
6cb1637f37
3 changed files with 74 additions and 51 deletions
|
|
@ -847,7 +847,7 @@ public:
|
|||
virtual TIntermOperator* getAsOperator() { return this; }
|
||||
virtual const TIntermOperator* getAsOperator() const { return this; }
|
||||
TOperator getOp() const { return op; }
|
||||
virtual bool promote(TIntermediate&) { return true; }
|
||||
void setOp(TOperator newOp) { op = newOp; }
|
||||
bool modifiesState() const;
|
||||
bool isConstructor() const;
|
||||
bool isTexture() const { return op > EOpTextureGuardBegin && op < EOpTextureGuardEnd; }
|
||||
|
|
@ -1026,7 +1026,6 @@ public:
|
|||
virtual TIntermTyped* getRight() const { return right; }
|
||||
virtual TIntermBinary* getAsBinaryNode() { return this; }
|
||||
virtual const TIntermBinary* getAsBinaryNode() const { return this; }
|
||||
virtual bool promote(TIntermediate&);
|
||||
virtual void updatePrecision();
|
||||
protected:
|
||||
TIntermTyped* left;
|
||||
|
|
@ -1046,7 +1045,6 @@ public:
|
|||
virtual const TIntermTyped* getOperand() const { return operand; }
|
||||
virtual TIntermUnary* getAsUnaryNode() { return this; }
|
||||
virtual const TIntermUnary* getAsUnaryNode() const { return this; }
|
||||
virtual bool promote(TIntermediate&);
|
||||
virtual void updatePrecision();
|
||||
protected:
|
||||
TIntermTyped* operand;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue