Clamp glClearDepthf and glDepthRangef

BUG=angleproject:2884

Change-Id: Ib1867fbd4c2ea3c3b29d2f987d384762f5851e8f
Reviewed-on: https://chromium-review.googlesource.com/c/1276585
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index fbcd3f0..3b6b22a 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -4555,7 +4555,7 @@
 
 void Context::clearDepthf(GLfloat depth)
 {
-    mGLState.setDepthClearValue(depth);
+    mGLState.setDepthClearValue(clamp01(depth));
 }
 
 void Context::clearStencil(GLint s)
@@ -4586,7 +4586,7 @@
 
 void Context::depthRangef(GLfloat zNear, GLfloat zFar)
 {
-    mGLState.setDepthRange(zNear, zFar);
+    mGLState.setDepthRange(clamp01(zNear), clamp01(zFar));
 }
 
 void Context::disable(GLenum cap)