Add constant folding support for matrix built-ins
This change adds constant folding support for following matrix
built-ins:
- matrixCompMult, outerProduct, transpose, determinant and
inverse.
BUG=angleproject:913
TEST=angle_unittests(new: MatrixUtilsTest, ConstantFoldingTest.*Matrix*),
dEQP Tests:
dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.matrix.*
(All 54 tests started passing with this change)
Change-Id: I7b9bf04b9a2cbff72c48216cab04df58c5f008d6
Reviewed-on: https://chromium-review.googlesource.com/276574
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/Intermediate.cpp b/src/compiler/translator/Intermediate.cpp
index cf0717f..f753005 100644
--- a/src/compiler/translator/Intermediate.cpp
+++ b/src/compiler/translator/Intermediate.cpp
@@ -454,6 +454,8 @@
case EOpMix:
case EOpStep:
case EOpSmoothStep:
+ case EOpMul:
+ case EOpOuterProduct:
case EOpLessThan:
case EOpLessThanEqual:
case EOpGreaterThan: