Revert "Cover vector dynamic indexing case in SplitSequenceOperator"
This CL was causing inverted rendering in a WebGL application.
This reverts commit 7da9850643f55335a13a4663d226c73d0ac4d3b1.
Vectors or matrices that are dynamically indexed as a part of an
l-value generate new statements in the RemoveDynamicIndexing AST
transformation step. SplitSequenceOperator needs to detect this case
and split the sequence operator before statements are generated from
its operands to ensure the correct order of execution.
BUG=angleproject:1341
TEST=angle_end2end_tests
Change-Id: I854f8cce2d46107afa62f48edf3d32c6d5c97eda
Reviewed-on: https://chromium-review.googlesource.com/371643
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/IntermNodePatternMatcher.h b/src/compiler/translator/IntermNodePatternMatcher.h
index be6fc61..b088633 100644
--- a/src/compiler/translator/IntermNodePatternMatcher.h
+++ b/src/compiler/translator/IntermNodePatternMatcher.h
@@ -19,35 +19,22 @@
class IntermNodePatternMatcher
{
public:
- static bool IsDynamicIndexingOfVectorOrMatrix(TIntermBinary *node);
-
enum PatternType
{
- // Matches expressions that are unfolded to if statements by UnfoldShortCircuitToIf
kUnfoldedShortCircuitExpression = 0x0001,
// Matches expressions that return arrays with the exception of simple statements where a
// constructor or function call result is assigned.
- kExpressionReturningArray = 0x0002,
-
- // Matches dynamic indexing of vectors or matrices in l-values.
- kDynamicIndexingOfVectorOrMatrixInLValue = 0x0004
+ kExpressionReturningArray = 0x0002
};
IntermNodePatternMatcher(const unsigned int mask);
bool match(TIntermBinary *node, TIntermNode *parentNode);
-
- // Use this version for checking binary node matches in case you're using flag
- // kDynamicIndexingOfVectorOrMatrixInLValue.
- bool match(TIntermBinary *node, TIntermNode *parentNode, bool isLValueRequiredHere);
-
bool match(TIntermAggregate *node, TIntermNode *parentNode);
bool match(TIntermSelection *node);
private:
const unsigned int mMask;
-
- bool matchInternal(TIntermBinary *node, TIntermNode *parentNode);
};
#endif