Separate expressions returning arrays for HLSL output
Complex array expressions need to be broken down in HLSL output so that they
are built out of simple combinations of operations and symbols.
In practice this means that array constructors, array assignments and functions
that return arrays inside complex expressions need to be replaced by symbols.
After this change, ANGLE passes all dEQP-GLES3.functional.shaders.arrays
tests.
The old SimplifyArrayAssignment stub is removed, the new name
SeparateExpressionsReturningArrays more closely reflects what the function
needs to do.
BUG=angleproject:971, angleproject:941
TEST=dEQP-GLES3.functional.shaders.arrays.*, WebGL 2 conformance tests
Change-Id: Iab8dde72b1126dc2f958ffb5b1b830fe3ce25912
Reviewed-on: https://chromium-review.googlesource.com/272122
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 ee13116..4880f0f 100644
--- a/src/compiler.gypi
+++ b/src/compiler.gypi
@@ -161,8 +161,8 @@
'compiler/translator/SeparateArrayInitialization.h',
'compiler/translator/SeparateDeclarations.cpp',
'compiler/translator/SeparateDeclarations.h',
- 'compiler/translator/SimplifyArrayAssignment.cpp',
- 'compiler/translator/SimplifyArrayAssignment.h',
+ 'compiler/translator/SeparateExpressionsReturningArrays.cpp',
+ 'compiler/translator/SeparateExpressionsReturningArrays.h',
'compiler/translator/StructureHLSL.cpp',
'compiler/translator/StructureHLSL.h',
'compiler/translator/TranslatorHLSL.cpp',