Fix issues related to modulus operator
Make sure that "scalar %= vector" is not approved by the compiler, and
that % and %= are only exposed on GLES3.
BUG=angle:854
Change-Id: I3ac7eb607bd86a6caa905d2bef5d397688ad3fd3
Reviewed-on: https://chromium-review.googlesource.com/241410
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Gregoire Payen de La Garanderie <Gregory.Payen@imgtec.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/Intermediate.cpp b/src/compiler/translator/Intermediate.cpp
index 243a9ca..914b450 100644
--- a/src/compiler/translator/Intermediate.cpp
+++ b/src/compiler/translator/Intermediate.cpp
@@ -81,6 +81,7 @@
}
break;
case EOpMod:
+ // Note that this is only for the % operator, not for mod()
if (left->getBasicType() == EbtStruct || left->getBasicType() == EbtBool || left->getBasicType() == EbtFloat)
{
return NULL;