GLES1: Clip plane API and rendering
- Add unit tests for the API
- Update test expectations
+ Pass through point size from the vertex array to the shader,
required for new tests to pass.
BUG=angleproject:2306
Change-Id: Ib19436c1f4cb12873adea94f734c821363f9e27d
Reviewed-on: https://chromium-review.googlesource.com/1079993
Commit-Queue: Lingfeng Yang <lfy@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/validationES1.cpp b/src/libANGLE/validationES1.cpp
index a299065..0a58054 100644
--- a/src/libANGLE/validationES1.cpp
+++ b/src/libANGLE/validationES1.cpp
@@ -316,6 +316,19 @@
}
}
+bool ValidateClipPlaneCommon(Context *context, GLenum plane)
+{
+ ANGLE_VALIDATE_IS_GLES1(context);
+
+ if (plane < GL_CLIP_PLANE0 || plane >= GL_CLIP_PLANE0 + context->getCaps().maxClipPlanes)
+ {
+ ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidClipPlane);
+ return false;
+ }
+
+ return true;
+}
+
} // namespace gl
namespace gl
@@ -351,16 +364,14 @@
return ValidateMultitextureUnit(context, texture);
}
-bool ValidateClipPlanef(Context *context, GLenum p, const GLfloat *eqn)
+bool ValidateClipPlanef(Context *context, GLenum plane, const GLfloat *eqn)
{
- UNIMPLEMENTED();
- return true;
+ return ValidateClipPlaneCommon(context, plane);
}
bool ValidateClipPlanex(Context *context, GLenum plane, const GLfixed *equation)
{
- UNIMPLEMENTED();
- return true;
+ return ValidateClipPlaneCommon(context, plane);
}
bool ValidateColor4f(Context *context, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
@@ -477,14 +488,12 @@
bool ValidateGetClipPlanef(Context *context, GLenum plane, GLfloat *equation)
{
- UNIMPLEMENTED();
- return true;
+ return ValidateClipPlaneCommon(context, plane);
}
bool ValidateGetClipPlanex(Context *context, GLenum plane, GLfixed *equation)
{
- UNIMPLEMENTED();
- return true;
+ return ValidateClipPlaneCommon(context, plane);
}
bool ValidateGetFixedv(Context *context, GLenum pname, GLfixed *params)