diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-07-11 23:29:50 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-07-11 23:31:02 +0200 |
commit | 70dd5e7c66b1fe3f82e5b4db2406050baba15f05 (patch) | |
tree | 3f012200ef3c934f33db1a4ef2b790fae3141860 /gfx/angle/src/compiler/translator/RegenerateStructNames.cpp | |
parent | 3b7ffb477eec078c7036c92c6a51bb5de6de4f28 (diff) | |
parent | 8481fa25d246f1968d0a254ee3c6cdd82c60781a (diff) | |
download | UXP-70dd5e7c66b1fe3f82e5b4db2406050baba15f05.tar UXP-70dd5e7c66b1fe3f82e5b4db2406050baba15f05.tar.gz UXP-70dd5e7c66b1fe3f82e5b4db2406050baba15f05.tar.lz UXP-70dd5e7c66b1fe3f82e5b4db2406050baba15f05.tar.xz UXP-70dd5e7c66b1fe3f82e5b4db2406050baba15f05.zip |
Merge branch 'ANGLE-rollback'
This resolves #624
Note: Cherry-picked some fixes on top of the ANGLE version that we want to keep.
Diffstat (limited to 'gfx/angle/src/compiler/translator/RegenerateStructNames.cpp')
-rwxr-xr-x | gfx/angle/src/compiler/translator/RegenerateStructNames.cpp | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/gfx/angle/src/compiler/translator/RegenerateStructNames.cpp b/gfx/angle/src/compiler/translator/RegenerateStructNames.cpp index a01d79abe..5e0db2ad2 100755 --- a/gfx/angle/src/compiler/translator/RegenerateStructNames.cpp +++ b/gfx/angle/src/compiler/translator/RegenerateStructNames.cpp @@ -7,9 +7,6 @@ #include "common/debug.h" #include "compiler/translator/RegenerateStructNames.h" -namespace sh -{ - void RegenerateStructNames::visitSymbol(TIntermSymbol *symbol) { ASSERT(symbol); @@ -61,16 +58,25 @@ void RegenerateStructNames::visitSymbol(TIntermSymbol *symbol) userType->setName(tmp); } -bool RegenerateStructNames::visitBlock(Visit, TIntermBlock *block) +bool RegenerateStructNames::visitAggregate(Visit, TIntermAggregate *aggregate) { - ++mScopeDepth; - TIntermSequence &sequence = *(block->getSequence()); - for (TIntermNode *node : sequence) + ASSERT(aggregate); + switch (aggregate->getOp()) { - node->traverse(this); + case EOpSequence: + ++mScopeDepth; + { + TIntermSequence &sequence = *(aggregate->getSequence()); + for (size_t ii = 0; ii < sequence.size(); ++ii) + { + TIntermNode *node = sequence[ii]; + ASSERT(node != NULL); + node->traverse(this); + } + } + --mScopeDepth; + return false; + default: + return true; } - --mScopeDepth; - return false; } - -} // namespace sh |