From 4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Wed, 11 Jul 2018 18:11:13 +0200 Subject: Roll back to ANGLE/2845 --- gfx/angle/src/compiler/translator/Intermediate.h | 52 ++++++++++-------------- 1 file changed, 22 insertions(+), 30 deletions(-) (limited to 'gfx/angle/src/compiler/translator/Intermediate.h') diff --git a/gfx/angle/src/compiler/translator/Intermediate.h b/gfx/angle/src/compiler/translator/Intermediate.h index d712bf953..339daa3e8 100755 --- a/gfx/angle/src/compiler/translator/Intermediate.h +++ b/gfx/angle/src/compiler/translator/Intermediate.h @@ -9,9 +9,6 @@ #include "compiler/translator/IntermNode.h" -namespace sh -{ - struct TVectorFields { int offsets[4]; @@ -19,42 +16,38 @@ struct TVectorFields }; // -// Set of helper functions to help build the tree. +// Set of helper functions to help parse and build the tree. // +class TInfoSink; class TIntermediate { public: POOL_ALLOCATOR_NEW_DELETE(); - TIntermediate() {} + TIntermediate(TInfoSink &i) + : mInfoSink(i) { } TIntermSymbol *addSymbol( int id, const TString &, const TType &, const TSourceLoc &); - TIntermTyped *addIndex(TOperator op, - TIntermTyped *base, - TIntermTyped *index, - const TSourceLoc &line, - TDiagnostics *diagnostics); + TIntermTyped *addIndex( + TOperator op, TIntermTyped *base, TIntermTyped *index, const TSourceLoc &); TIntermTyped *addUnaryMath( TOperator op, TIntermTyped *child, const TSourceLoc &line, const TType *funcReturnType); TIntermAggregate *growAggregate( TIntermNode *left, TIntermNode *right, const TSourceLoc &); - static TIntermAggregate *MakeAggregate(TIntermNode *node, const TSourceLoc &line); - static TIntermBlock *EnsureBlock(TIntermNode *node); + TIntermAggregate *makeAggregate(TIntermNode *node, const TSourceLoc &); + TIntermAggregate *ensureSequence(TIntermNode *node); TIntermAggregate *setAggregateOperator(TIntermNode *, TOperator, const TSourceLoc &); - TIntermNode *addIfElse(TIntermTyped *cond, TIntermNodePair code, const TSourceLoc &line); - static TIntermTyped *AddTernarySelection(TIntermTyped *cond, - TIntermTyped *trueExpression, - TIntermTyped *falseExpression, - const TSourceLoc &line); - TIntermSwitch *addSwitch(TIntermTyped *init, - TIntermBlock *statementList, - const TSourceLoc &line); + TIntermNode *addSelection(TIntermTyped *cond, TIntermNodePair code, const TSourceLoc &); + TIntermTyped *addSelection(TIntermTyped *cond, TIntermTyped *trueBlock, TIntermTyped *falseBlock, + const TSourceLoc &line); + TIntermSwitch *addSwitch( + TIntermTyped *init, TIntermAggregate *statementList, const TSourceLoc &line); TIntermCase *addCase( TIntermTyped *condition, const TSourceLoc &line); - static TIntermTyped *AddComma(TIntermTyped *left, - TIntermTyped *right, - const TSourceLoc &line, - int shaderVersion); + TIntermTyped *addComma(TIntermTyped *left, + TIntermTyped *right, + const TSourceLoc &line, + int shaderVersion); TIntermConstantUnion *addConstantUnion(const TConstantUnion *constantUnion, const TType &type, const TSourceLoc &line); @@ -62,18 +55,17 @@ class TIntermediate TIntermNode *, const TSourceLoc &); TIntermBranch *addBranch(TOperator, const TSourceLoc &); TIntermBranch *addBranch(TOperator, TIntermTyped *, const TSourceLoc &); - static TIntermTyped *AddSwizzle(TIntermTyped *baseExpression, - const TVectorFields &fields, - const TSourceLoc &dotLocation); + TIntermTyped *addSwizzle(TVectorFields &, const TSourceLoc &); + TIntermAggregate *postProcess(TIntermNode *root); static void outputTree(TIntermNode *, TInfoSinkBase &); - TIntermTyped *foldAggregateBuiltIn(TIntermAggregate *aggregate, TDiagnostics *diagnostics); + TIntermTyped *foldAggregateBuiltIn(TIntermAggregate *aggregate); private: void operator=(TIntermediate &); // prevent assignments -}; -} // namespace sh + TInfoSink & mInfoSink; +}; #endif // COMPILER_TRANSLATOR_INTERMEDIATE_H_ -- cgit v1.2.3