summaryrefslogtreecommitdiffstats
path: root/gfx/angle/src/compiler/translator/VariableInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/angle/src/compiler/translator/VariableInfo.cpp')
-rwxr-xr-xgfx/angle/src/compiler/translator/VariableInfo.cpp71
1 files changed, 41 insertions, 30 deletions
diff --git a/gfx/angle/src/compiler/translator/VariableInfo.cpp b/gfx/angle/src/compiler/translator/VariableInfo.cpp
index 07fe12e5d..7e1e5cd82 100755
--- a/gfx/angle/src/compiler/translator/VariableInfo.cpp
+++ b/gfx/angle/src/compiler/translator/VariableInfo.cpp
@@ -559,43 +559,54 @@ void CollectVariables::visitInfoList(const TIntermSequence &sequence,
}
}
-bool CollectVariables::visitDeclaration(Visit, TIntermDeclaration *node)
+bool CollectVariables::visitAggregate(Visit, TIntermAggregate *node)
{
- const TIntermSequence &sequence = *(node->getSequence());
- ASSERT(!sequence.empty());
+ bool visitChildren = true;
- const TIntermTyped &typedNode = *(sequence.front()->getAsTyped());
- TQualifier qualifier = typedNode.getQualifier();
-
- if (typedNode.getBasicType() == EbtInterfaceBlock)
+ switch (node->getOp())
{
- visitInfoList(sequence, mInterfaceBlocks);
- return false;
- }
- else if (qualifier == EvqAttribute || qualifier == EvqVertexIn || qualifier == EvqFragmentOut ||
- qualifier == EvqUniform || IsVarying(qualifier))
- {
- switch (qualifier)
+ case EOpDeclaration:
{
- case EvqAttribute:
- case EvqVertexIn:
- visitInfoList(sequence, mAttribs);
- break;
- case EvqFragmentOut:
- visitInfoList(sequence, mOutputVariables);
- break;
- case EvqUniform:
- visitInfoList(sequence, mUniforms);
- break;
- default:
- visitInfoList(sequence, mVaryings);
- break;
- }
+ const TIntermSequence &sequence = *(node->getSequence());
+ ASSERT(!sequence.empty());
- return false;
+ const TIntermTyped &typedNode = *(sequence.front()->getAsTyped());
+ TQualifier qualifier = typedNode.getQualifier();
+
+ if (typedNode.getBasicType() == EbtInterfaceBlock)
+ {
+ visitInfoList(sequence, mInterfaceBlocks);
+ visitChildren = false;
+ }
+ else if (qualifier == EvqAttribute || qualifier == EvqVertexIn ||
+ qualifier == EvqFragmentOut || qualifier == EvqUniform ||
+ IsVarying(qualifier))
+ {
+ switch (qualifier)
+ {
+ case EvqAttribute:
+ case EvqVertexIn:
+ visitInfoList(sequence, mAttribs);
+ break;
+ case EvqFragmentOut:
+ visitInfoList(sequence, mOutputVariables);
+ break;
+ case EvqUniform:
+ visitInfoList(sequence, mUniforms);
+ break;
+ default:
+ visitInfoList(sequence, mVaryings);
+ break;
+ }
+
+ visitChildren = false;
+ }
+ break;
+ }
+ default: break;
}
- return true;
+ return visitChildren;
}
bool CollectVariables::visitBinary(Visit, TIntermBinary *binaryNode)