Commit e70208e4 by Nicolas Capens Committed by Nicolas Capens

Don't perform very early depth test when overridden by shader.

When the pixel shader writes the depth value, we can't use the interpolated implicit depth to perform a depth buffer test before the pixel shader executes. Change-Id: Icf80de50f4aa79f73b43e341c18478e7fd928b8d Reviewed-on: https://swiftshader-review.googlesource.com/15608Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent e396a499
......@@ -34,8 +34,8 @@ namespace sw
int shaderID;
bool depthOverride : 1;
bool shaderContainsKill : 1;
bool depthOverride : 1; // FIXME: Eliminate by querying shader.
bool shaderContainsKill : 1; // FIXME: Eliminate by querying shader.
DepthCompareMode depthCompareMode : BITS(DEPTH_LAST);
AlphaCompareMode alphaCompareMode : BITS(ALPHA_LAST);
......
......@@ -159,7 +159,7 @@ namespace sw
}
}
if(veryEarlyDepthTest && state.multiSample == 1)
if(veryEarlyDepthTest && state.multiSample == 1 && !state.depthOverride)
{
if(!state.stencilActive && state.depthTestActive && (state.depthCompareMode == DEPTH_LESSEQUAL || state.depthCompareMode == DEPTH_LESS)) // FIXME: Both modes ok?
{
......
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