summaryrefslogtreecommitdiffstats
path: root/gfx/angle/src/compiler/translator/Intermediate.h
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-07-11 18:11:13 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-07-11 18:11:13 +0200
commit4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0 (patch)
treef000dd831240707a03b8c806db292c2a15cde3ce /gfx/angle/src/compiler/translator/Intermediate.h
parent3b7ffb477eec078c7036c92c6a51bb5de6de4f28 (diff)
downloadUXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar
UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar.gz
UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar.lz
UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar.xz
UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.zip
Roll back to ANGLE/2845
Diffstat (limited to 'gfx/angle/src/compiler/translator/Intermediate.h')
-rwxr-xr-xgfx/angle/src/compiler/translator/Intermediate.h52
1 files changed, 22 insertions, 30 deletions
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_