Clean up createSamplerSymbols
The arrayOfStructsSize parameter can always be determined from the
TType object, so there's no need to pass it to
TType::createSamplerSymbols. Furthermore, it's more natural to do
the processing for arrays of structs in TType::createSamplerSymbols,
rather than in the TStructure::createSamplerSymbols helper it is
using.
Also rename some parameter names, and move createSamplerSymbols
implementation to Types.cpp.
This refactoring change prepares for implementing arrays of arrays.
BUG=angleproject:2125
TEST=angle_end2end_tests
Change-Id: I3f8bec711c0434677ebcf3741abb4f910c36dba3
Reviewed-on: https://chromium-review.googlesource.com/614883
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/compiler/translator/OutputHLSL.cpp b/src/compiler/translator/OutputHLSL.cpp
index d9891a3..4397a06 100644
--- a/src/compiler/translator/OutputHLSL.cpp
+++ b/src/compiler/translator/OutputHLSL.cpp
@@ -1829,7 +1829,6 @@
TVector<TIntermSymbol *> samplerSymbols;
TString structName = samplerNamePrefixFromStruct(typedArg);
argType.createSamplerSymbols("angle_" + structName, "",
- argType.isArray() ? argType.getArraySize() : 0u,
&samplerSymbols, nullptr);
for (const TIntermSymbol *sampler : samplerSymbols)
{
@@ -2575,8 +2574,7 @@
{
ASSERT(qualifier != EvqOut && qualifier != EvqInOut);
TVector<TIntermSymbol *> samplerSymbols;
- type.createSamplerSymbols("angle" + nameStr, "", type.isArray() ? type.getArraySize() : 0u,
- &samplerSymbols, nullptr);
+ type.createSamplerSymbols("angle" + nameStr, "", &samplerSymbols, nullptr);
for (const TIntermSymbol *sampler : samplerSymbols)
{
const TType &samplerType = sampler->getType();