diff options
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 |