Support frustum clipping against z = -1.

This allows performing the depth range adjustment only once as part of the
viewport transform and not have it be affected by transform feedback.

Change-Id: I89fba3b131c234bea064b1b65f50b62261f4c307
Reviewed-on: https://swiftshader-review.googlesource.com/5421
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/OpenGL/libGLES_CM/Context.cpp b/src/OpenGL/libGLES_CM/Context.cpp
index b659bd9..8650d84 100644
--- a/src/OpenGL/libGLES_CM/Context.cpp
+++ b/src/OpenGL/libGLES_CM/Context.cpp
@@ -1959,12 +1959,7 @@
 	device->setAmbientMaterialSource(sw::MATERIAL_MATERIAL);
 	device->setEmissiveMaterialSource(sw::MATERIAL_MATERIAL);
 
-	const sw::Matrix Z(1, 0, 0, 0,
-	                   0, 1, 0, 0,
-	                   0, 0, 0.5, 0.5,
-	                   0, 0, 0, 1);   // Map depth range from [-1, 1] to [0, 1]
-
-	device->setProjectionMatrix(Z * projectionStack.current());
+	device->setProjectionMatrix(projectionStack.current());
 	device->setModelMatrix(modelViewStack.current());
 	device->setTextureMatrix(0, textureStack0.current());
 	device->setTextureMatrix(1, textureStack1.current());