GLES1: glMultiTexCoord4(f|x)

BUG=angleproject:2306

+ common validation for multitexturing units
+ clang-format

Change-Id: I6eb456c273490e85fc7008e7e11d15e22dd20276
Reviewed-on: https://chromium-review.googlesource.com/987298
Commit-Queue: Lingfeng Yang <lfy@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/validationES1.cpp b/src/libANGLE/validationES1.cpp
index 739ad5c..f5457b4 100644
--- a/src/libANGLE/validationES1.cpp
+++ b/src/libANGLE/validationES1.cpp
@@ -11,6 +11,7 @@
 #include "common/debug.h"
 #include "libANGLE/Context.h"
 #include "libANGLE/ErrorStrings.h"
+#include "libANGLE/validationES.h"
 
 #define ANGLE_VALIDATE_IS_GLES1(context)                              \
     if (context->getClientMajorVersion() > 1)                         \
@@ -73,14 +74,7 @@
 bool ValidateClientActiveTexture(Context *context, GLenum texture)
 {
     ANGLE_VALIDATE_IS_GLES1(context);
-    if (texture < GL_TEXTURE0 ||
-        texture > GL_TEXTURE0 + context->getCaps().maxMultitextureUnits - 1)
-    {
-        ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidMultitextureUnit);
-        return false;
-    }
-
-    return true;
+    return ValidateMultitextureUnit(context, texture);
 }
 
 bool ValidateClipPlanef(Context *context, GLenum p, const GLfloat *eqn)
@@ -400,19 +394,19 @@
                              GLfloat r,
                              GLfloat q)
 {
-    UNIMPLEMENTED();
-    return true;
+    ANGLE_VALIDATE_IS_GLES1(context);
+    return ValidateMultitextureUnit(context, target);
 }
 
 bool ValidateMultiTexCoord4x(Context *context,
-                             GLenum texture,
+                             GLenum target,
                              GLfixed s,
                              GLfixed t,
                              GLfixed r,
                              GLfixed q)
 {
-    UNIMPLEMENTED();
-    return true;
+    ANGLE_VALIDATE_IS_GLES1(context);
+    return ValidateMultitextureUnit(context, target);
 }
 
 bool ValidateNormal3f(Context *context, GLfloat nx, GLfloat ny, GLfloat nz)