From e0e1a6b217c8ff7d7bf5bb4db2177965c5c774d1 Mon Sep 17 00:00:00 2001 From: raven02 Date: Wed, 30 Apr 2014 20:00:42 +0800 Subject: [PATCH] Only set depth update flag when depth write is enabled --- GPU/GLES/StateMapping.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GPU/GLES/StateMapping.cpp b/GPU/GLES/StateMapping.cpp index ea0a8b4cd2..70bdf98cf0 100644 --- a/GPU/GLES/StateMapping.cpp +++ b/GPU/GLES/StateMapping.cpp @@ -401,7 +401,9 @@ void TransformDrawEngine::ApplyDrawState(int prim) { glstate.depthTest.enable(); glstate.depthFunc.set(ztests[gstate.getDepthTestFunction()]); glstate.depthWrite.set(gstate.isDepthWriteEnabled() || alwaysDepthWrite ? GL_TRUE : GL_FALSE); - framebufferManager_->SetDepthUpdated(); + if (gstate.isDepthWriteEnabled() || alwaysDepthWrite) { + framebufferManager_->SetDepthUpdated(); + } } else { glstate.depthTest.disable(); }