From cffb397fbf37cc0c6d983935bfe578cdf91d4ce9 Mon Sep 17 00:00:00 2001 From: raven02 Date: Thu, 25 Jul 2013 00:01:00 +0800 Subject: [PATCH] Fall the depth test to the simplest and correct one --- GPU/GLES/StateMapping.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/GPU/GLES/StateMapping.cpp b/GPU/GLES/StateMapping.cpp index 702fd0f613..6b7a53cc93 100644 --- a/GPU/GLES/StateMapping.cpp +++ b/GPU/GLES/StateMapping.cpp @@ -215,15 +215,9 @@ void TransformDrawEngine::ApplyDrawState(int prim) { // Depth Test bool depthMask = (gstate.clearmode >> 10) & 1; - if (gstate.isDepthTestEnabled()) { - glstate.depthTest.enable(); - glstate.depthFunc.set(GL_ALWAYS); - glstate.depthWrite.set(depthMask || !gstate.isDepthWriteEnabled() ? GL_TRUE : GL_FALSE); - } else { - glstate.depthTest.enable(); - glstate.depthFunc.set(GL_ALWAYS); - glstate.depthWrite.set(GL_TRUE); - } + glstate.depthTest.enable(); + glstate.depthFunc.set(GL_ALWAYS); + glstate.depthWrite.set(depthMask ? GL_TRUE : GL_FALSE); // Color Test bool colorMask = (gstate.clearmode >> 8) & 1;