Commit a541fbd5 by Chris Forbes

Remove very early depth test

Bug: b/128363727 Change-Id: Ia595876610b077c4be366174264de7a55f14dc4c Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/27029Tested-by: 's avatarChris Forbes <chrisforbes@google.com> Presubmit-Ready: Chris Forbes <chrisforbes@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent aa8f699a
...@@ -35,7 +35,6 @@ namespace sw ...@@ -35,7 +35,6 @@ namespace sw
bool forceWindowed = false; bool forceWindowed = false;
bool quadLayoutEnabled = false; bool quadLayoutEnabled = false;
bool veryEarlyDepthTest = true;
bool postBlendSRGB = false; bool postBlendSRGB = false;
bool exactColorRounding = false; bool exactColorRounding = false;
TransparencyAntialiasing transparencyAntialiasing = TRANSPARENCY_NONE; TransparencyAntialiasing transparencyAntialiasing = TRANSPARENCY_NONE;
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
namespace sw namespace sw
{ {
extern bool veryEarlyDepthTest;
extern bool fullPixelPositionRegister; extern bool fullPixelPositionRegister;
extern int clusterCount; extern int clusterCount;
...@@ -158,69 +157,6 @@ namespace sw ...@@ -158,69 +157,6 @@ namespace sw
} }
} }
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(x0 < x1)
{ {
if(interpolateW()) if(interpolateW())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment