summaryrefslogtreecommitdiffstats
path: root/gfx/angle/src/compiler/translator/RegenerateStructNames.cpp
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/RegenerateStructNames.cpp
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/RegenerateStructNames.cpp')
-rwxr-xr-xgfx/angle/src/compiler/translator/RegenerateStructNames.cpp30
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