Remove very early depth test

Bug: b/128363727
Change-Id: Ia595876610b077c4be366174264de7a55f14dc4c
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/27029
Tested-by: Chris Forbes <chrisforbes@google.com>
Presubmit-Ready: Chris Forbes <chrisforbes@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Device/Context.cpp b/src/Device/Context.cpp
index 4f231bf..c6fd05f 100644
--- a/src/Device/Context.cpp
+++ b/src/Device/Context.cpp
@@ -35,7 +35,6 @@
 
 	bool forceWindowed = false;
 	bool quadLayoutEnabled = false;
-	bool veryEarlyDepthTest = true;
 	bool postBlendSRGB = false;
 	bool exactColorRounding = false;
 	TransparencyAntialiasing transparencyAntialiasing = TRANSPARENCY_NONE;
diff --git a/src/Device/QuadRasterizer.cpp b/src/Device/QuadRasterizer.cpp
index 637a287..ed752d2 100644
--- a/src/Device/QuadRasterizer.cpp
+++ b/src/Device/QuadRasterizer.cpp
@@ -22,7 +22,6 @@
 
 namespace sw
 {
-	extern bool veryEarlyDepthTest;
 	extern bool fullPixelPositionRegister;
 
 	extern int clusterCount;
@@ -158,69 +157,6 @@
 				}
 			}
 
-			if(veryEarlyDepthTest && state.multiSample == 1 && !spirvShader->getModes().DepthReplacing)
-			{
-				if(!state.stencilActive && state.depthTestActive && (state.depthCompareMode == VK_COMPARE_OP_LESS_OR_EQUAL || state.depthCompareMode == VK_COMPARE_OP_LESS))   // FIXME: Both modes ok?
-				{
-					Float4 xxxx = Float4(Float(x0)) + *Pointer<Float4>(primitive + OFFSET(Primitive,xQuad), 16);
-
-					Pointer<Byte> buffer;
-					Int pitch;
-
-					if(!state.quadLayoutDepthBuffer)
-					{
-						buffer = zBuffer + 4 * x0;
-						pitch = *Pointer<Int>(data + OFFSET(DrawData,depthPitchB));
-					}
-					else
-					{
-						buffer = zBuffer + 8 * x0;
-					}
-
-					For(Int x = x0, x < x1, x += 2)
-					{
-						Float4 z = interpolate(xxxx, Dz[0], z, primitive + OFFSET(Primitive,z), false, false, state.depthClamp);
-
-						Float4 zValue;
-
-						if(!state.quadLayoutDepthBuffer)
-						{
-							// FIXME: Properly optimizes?
-							zValue.xy = *Pointer<Float4>(buffer);
-							zValue.zw = *Pointer<Float4>(buffer + pitch - 8);
-						}
-						else
-						{
-							zValue = *Pointer<Float4>(buffer, 16);
-						}
-
-						Int4 zTest = CmpNLT(zValue, z);
-
-						Int zMask = SignMask(zTest);
-
-						If(zMask == 0)
-						{
-							x0 += 2;
-						}
-						Else
-						{
-							x = x1;
-						}
-
-						xxxx += Float4(2);
-
-						if(!state.quadLayoutDepthBuffer)
-						{
-							buffer += 8;
-						}
-						else
-						{
-							buffer += 16;
-						}
-					}
-				}
-			}
-
 			If(x0 < x1)
 			{
 				if(interpolateW())