Merge pull request #3224 from raven02/patch-5

softgpu : Fix depth issue in FF Type-0
This commit is contained in:
Henrik Rydgård 2013-08-24 16:10:33 -07:00
commit 99c1ab38d7

View File

@ -744,7 +744,8 @@ void DrawTriangle(const VertexData& v0, const VertexData& v1, const VertexData&
} }
// TODO: Is it safe to ignore gstate.isDepthTestEnabled() when clear mode is enabled? // TODO: Is it safe to ignore gstate.isDepthTestEnabled() when clear mode is enabled?
if ((gstate.isDepthTestEnabled() && !gstate.isModeThrough()) || gstate.isModeClear()) { // TODO: Verify that through mode does not disable depth testing
if (gstate.isDepthTestEnabled() || gstate.isModeClear()) {
// TODO: Verify that stencil op indeed needs to be applied here even if stencil testing is disabled // TODO: Verify that stencil op indeed needs to be applied here even if stencil testing is disabled
if (!DepthTestPassed(p.x, p.y, z)) { if (!DepthTestPassed(p.x, p.y, z)) {
ApplyStencilOp(gstate.getStencilOpZFail(), p.x, p.y); ApplyStencilOp(gstate.getStencilOpZFail(), p.x, p.y);