GLES1: Built-in matrix operations

glRotate
glTranslate
glScale
glFrustum
glPerspective
glOrtho

BUG=angleproject:2306

Change-Id: Ia9321d52f5824ef7c15b56d94e23ff3b1fbc3151
Reviewed-on: https://chromium-review.googlesource.com/1002915
Commit-Queue: Lingfeng Yang <lfy@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/validationES1.cpp b/src/libANGLE/validationES1.cpp
index 160c31f..dfa817b 100644
--- a/src/libANGLE/validationES1.cpp
+++ b/src/libANGLE/validationES1.cpp
@@ -173,7 +173,11 @@
                       GLfloat n,
                       GLfloat f)
 {
-    UNIMPLEMENTED();
+    ANGLE_VALIDATE_IS_GLES1(context);
+    if (l == r || b == t || n == f || n <= 0.0f || f <= 0.0f)
+    {
+        ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidProjectionMatrix);
+    }
     return true;
 }
 
@@ -185,7 +189,11 @@
                       GLfixed n,
                       GLfixed f)
 {
-    UNIMPLEMENTED();
+    ANGLE_VALIDATE_IS_GLES1(context);
+    if (l == r || b == t || n == f || n <= 0 || f <= 0)
+    {
+        ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidProjectionMatrix);
+    }
     return true;
 }
 
@@ -444,7 +452,11 @@
                     GLfloat n,
                     GLfloat f)
 {
-    UNIMPLEMENTED();
+    ANGLE_VALIDATE_IS_GLES1(context);
+    if (l == r || b == t || n == f || n <= 0.0f || f <= 0.0f)
+    {
+        ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidProjectionMatrix);
+    }
     return true;
 }
 
@@ -456,7 +468,11 @@
                     GLfixed n,
                     GLfixed f)
 {
-    UNIMPLEMENTED();
+    ANGLE_VALIDATE_IS_GLES1(context);
+    if (l == r || b == t || n == f || n <= 0 || f <= 0)
+    {
+        ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidProjectionMatrix);
+    }
     return true;
 }
 
@@ -528,13 +544,13 @@
 
 bool ValidateRotatef(Context *context, GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
 {
-    UNIMPLEMENTED();
+    ANGLE_VALIDATE_IS_GLES1(context);
     return true;
 }
 
 bool ValidateRotatex(Context *context, GLfixed angle, GLfixed x, GLfixed y, GLfixed z)
 {
-    UNIMPLEMENTED();
+    ANGLE_VALIDATE_IS_GLES1(context);
     return true;
 }
 
@@ -546,13 +562,13 @@
 
 bool ValidateScalef(Context *context, GLfloat x, GLfloat y, GLfloat z)
 {
-    UNIMPLEMENTED();
+    ANGLE_VALIDATE_IS_GLES1(context);
     return true;
 }
 
 bool ValidateScalex(Context *context, GLfixed x, GLfixed y, GLfixed z)
 {
-    UNIMPLEMENTED();
+    ANGLE_VALIDATE_IS_GLES1(context);
     return true;
 }
 
@@ -625,13 +641,13 @@
 
 bool ValidateTranslatef(Context *context, GLfloat x, GLfloat y, GLfloat z)
 {
-    UNIMPLEMENTED();
+    ANGLE_VALIDATE_IS_GLES1(context);
     return true;
 }
 
 bool ValidateTranslatex(Context *context, GLfixed x, GLfixed y, GLfixed z)
 {
-    UNIMPLEMENTED();
+    ANGLE_VALIDATE_IS_GLES1(context);
     return true;
 }