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:
steve-lunarg 2016-10-19 12:57:22 -06:00
parent e5921f1309
commit 6cb1637f37
3 changed files with 74 additions and 51 deletions

View file

@ -393,6 +393,9 @@ protected:
bool userOutputUsed() const;
static int getBaseAlignmentScalar(const TType&, int& size);
bool isSpecializationOperation(const TIntermOperator&) const;
bool promote(TIntermOperator*);
bool promoteUnary(TIntermUnary&);
bool promoteBinary(TIntermBinary&);
const EShLanguage language; // stage, known at construction time
EShSource source; // source language, known a bit later