Use the projection matrix to scale z.

Bug 22123818

Change-Id: I2c72e221d9d9410c32875188a5edea6ce7310f20
Reviewed-on: https://swiftshader-review.googlesource.com/3625
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/Shader/VertexRoutine.cpp b/src/Shader/VertexRoutine.cpp
index c14b633..e6c6fb9 100644
--- a/src/Shader/VertexRoutine.cpp
+++ b/src/Shader/VertexRoutine.cpp
@@ -488,7 +488,7 @@
 			r.o[pos].y = r.o[pos].y + *Pointer<Float4>(r.data + OFFSET(DrawData,halfPixelY)) * r.o[pos].w;
 		}
 
-		if(symmetricNormalizedDepth)
+		if(symmetricNormalizedDepth && !state.fixedFunction)
 		{
 			r.o[pos].z = (r.o[pos].z + r.o[pos].w) * Float4(0.5f);
 		}