Implement missing variants of abs/sign

This change adds ANGLE support for abs/sign variants introduced
in ESSL3.

BUG=angle:923
TEST=dEQP tests
Tests passing 100% because of this change:
dEQP-GLES3.functional.shaders.builtin_functions.common.abs
dEQP-GLES3.functional.shaders.builtin_functions.common.sign

Change-Id: If22032be2c1ed08451275262e311ef5ac613d45e
Reviewed-on: https://chromium-review.googlesource.com/251060
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/Initialize.cpp b/src/compiler/translator/Initialize.cpp
index 8300be6..e88f7c4 100644
--- a/src/compiler/translator/Initialize.cpp
+++ b/src/compiler/translator/Initialize.cpp
@@ -151,11 +151,21 @@
     symbolTable.insertBuiltIn(COMMON_BUILTINS, float3, "abs", float3);
     symbolTable.insertBuiltIn(COMMON_BUILTINS, float4, "abs", float4);
 
+    symbolTable.insertBuiltIn(ESSL3_BUILTINS, int1, "abs", int1);
+    symbolTable.insertBuiltIn(ESSL3_BUILTINS, int2, "abs", int2);
+    symbolTable.insertBuiltIn(ESSL3_BUILTINS, int3, "abs", int3);
+    symbolTable.insertBuiltIn(ESSL3_BUILTINS, int4, "abs", int4);
+
     symbolTable.insertBuiltIn(COMMON_BUILTINS, float1, "sign", float1);
     symbolTable.insertBuiltIn(COMMON_BUILTINS, float2, "sign", float2);
     symbolTable.insertBuiltIn(COMMON_BUILTINS, float3, "sign", float3);
     symbolTable.insertBuiltIn(COMMON_BUILTINS, float4, "sign", float4);
 
+    symbolTable.insertBuiltIn(ESSL3_BUILTINS, int1, "sign", int1);
+    symbolTable.insertBuiltIn(ESSL3_BUILTINS, int2, "sign", int2);
+    symbolTable.insertBuiltIn(ESSL3_BUILTINS, int3, "sign", int3);
+    symbolTable.insertBuiltIn(ESSL3_BUILTINS, int4, "sign", int4);
+
     symbolTable.insertBuiltIn(COMMON_BUILTINS, float1, "floor", float1);
     symbolTable.insertBuiltIn(COMMON_BUILTINS, float2, "floor", float2);
     symbolTable.insertBuiltIn(COMMON_BUILTINS, float3, "floor", float3);
@@ -893,6 +903,8 @@
     symbolTable.relateToOperator(COMMON_BUILTINS, "step",         EOpStep);
     symbolTable.relateToOperator(COMMON_BUILTINS, "smoothstep",   EOpSmoothStep);
 
+    symbolTable.relateToOperator(ESSL3_BUILTINS, "abs",           EOpAbs);
+    symbolTable.relateToOperator(ESSL3_BUILTINS, "sign",          EOpSign);
     symbolTable.relateToOperator(ESSL3_BUILTINS, "min",           EOpMin);
     symbolTable.relateToOperator(ESSL3_BUILTINS, "max",           EOpMax);
     symbolTable.relateToOperator(ESSL3_BUILTINS, "clamp",         EOpClamp);