Put each array declarator into a separate declaration in HLSL output
Since HLSL doesn't support arrays as l-values, HLSL output needs to split
declarators that initialize arrays to variable declaration and assignment
implemented via a function call. To prepare for this, it is necessary that each
declarator has its own declaration.
BUG=angleproject:941
TEST=angle_end2end_tests, WebGL conformance tests
Change-Id: I43dee487578561c01dbde90c2f55a93dda2f057a
Reviewed-on: https://chromium-review.googlesource.com/266001
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler.gypi b/src/compiler.gypi
index f4bd18b..4bffb3c 100644
--- a/src/compiler.gypi
+++ b/src/compiler.gypi
@@ -153,6 +153,8 @@
'compiler/translator/RemoveSwitchFallThrough.h',
'compiler/translator/RewriteElseBlocks.cpp',
'compiler/translator/RewriteElseBlocks.h',
+ 'compiler/translator/SeparateDeclarations.cpp',
+ 'compiler/translator/SeparateDeclarations.h',
'compiler/translator/SimplifyArrayAssignment.cpp',
'compiler/translator/SimplifyArrayAssignment.h',
'compiler/translator/StructureHLSL.cpp',