Add ANGLE support for ESSL3 variant of mix()
This change adds support for ESSL3 variant of built-in function mix()
that takes last argument as a boolean vector. lerp() - HLSL equivalent
of mix() doesn't look to be supporting a variant that takes last
argument as a boolean vector so emulated it for HLSL.
BUG=angleproject:1006
TESTS=dEQP tests
Fixes "no matching overloaded function found " errors in below tests:
dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.common.mix_*_b*
(Note: These tests still fail because of constant expression issues)
Change-Id: I79b353933cb450516b8678b1fdaeabe60417e9a7
Reviewed-on: https://chromium-review.googlesource.com/271751
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler/translator/Initialize.cpp b/src/compiler/translator/Initialize.cpp
index 9e11405..0219e4e 100644
--- a/src/compiler/translator/Initialize.cpp
+++ b/src/compiler/translator/Initialize.cpp
@@ -96,6 +96,7 @@
symbolTable.insertBuiltIn(ESSL3_BUILTINS, EOpClamp, genUType, "clamp", genUType, genUType, genUType);
symbolTable.insertBuiltIn(COMMON_BUILTINS, EOpMix, genType, "mix", genType, genType, float1);
symbolTable.insertBuiltIn(COMMON_BUILTINS, EOpMix, genType, "mix", genType, genType, genType);
+ symbolTable.insertBuiltIn(ESSL3_BUILTINS, EOpMix, genType, "mix", genType, genType, genBType);
symbolTable.insertBuiltIn(COMMON_BUILTINS, EOpStep, genType, "step", genType, genType);
symbolTable.insertBuiltIn(COMMON_BUILTINS, EOpStep, genType, "step", float1, genType);
symbolTable.insertBuiltIn(COMMON_BUILTINS, EOpSmoothStep, genType, "smoothstep", genType, genType, genType);