Remove arraySize in TInterfaceBlock
This patch intends to remove the field 'arraySize' in TInterfaceBlock.
The field 'arraySize' in TInterfaceBlock is redundant because:
1. If the interface block has instance name, it is recorded as one
symbol as a whole, and its array size is recorded in the TType
of the symbol.
2. If the interface block doesn't have instance name, its members are
recorded separately, and it cannot be declared as an interface block
array.
This patch can make the implementation of Geometry Shader easier
when we set array size to the built-in interface block 'gl_in' and other
user-defined unsized input interface blocks during the compilation of a
Geometry Shader.
BUG=angleproject:1941
TEST=angle_end2end_test
Change-Id: I9a51aab9b8f9ea7e88af157505c092426cee7e6e
Reviewed-on: https://chromium-review.googlesource.com/615759
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/compiler/translator/ParseContext.cpp b/src/compiler/translator/ParseContext.cpp
index a4796e3..f1cb9ed 100644
--- a/src/compiler/translator/ParseContext.cpp
+++ b/src/compiler/translator/ParseContext.cpp
@@ -3517,7 +3517,7 @@
}
TInterfaceBlock *interfaceBlock =
- new TInterfaceBlock(&blockName, fieldList, instanceName, arraySize, blockLayoutQualifier);
+ new TInterfaceBlock(&blockName, fieldList, instanceName, blockLayoutQualifier);
TType interfaceBlockType(interfaceBlock, typeQualifier.qualifier, blockLayoutQualifier,
arraySize);