From bc7a930409ee8a1ce3dbd16cce63ff0617a64a8f Mon Sep 17 00:00:00 2001 From: gabest11 Date: Sat, 24 Dec 2011 07:00:16 +0000 Subject: [PATCH] GSdx: This fixes the flickering in Bully, and probably games with the same problem. Could not check Valkyrie Profile Silmeria, yet. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5012 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/GSdx/GSRendererSW.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/plugins/GSdx/GSRendererSW.cpp b/plugins/GSdx/GSRendererSW.cpp index 76c6f97c3d..508bb76042 100644 --- a/plugins/GSdx/GSRendererSW.cpp +++ b/plugins/GSdx/GSRendererSW.cpp @@ -192,6 +192,21 @@ void GSRendererSW::Draw() data->syncpoint = true; } + if(m_context->FRAME.Block() == m_context->ZBUF.Block()) + { + // Writing the same address in a different format is incompatible with our screen splitting technique, + // it must not necessarily be done by the same batch, enough if there are two in the queue one after eachother, + // first it writes frame buffer at address X, then as z buffer also at address X, due to format differences the + // block layout in memory is not the same. + // + // Most of these situations are detected by the previous m_fzb != m_context->offset.fzb check, + // but when FRAME.Block() == ZBUF.Block() and f/z writes are switched on/off mutually then offset.fzb stays the same. + // + // Bully: FBP/ZBP = 0x2300 + + data->syncpoint = true; + } + GSVector4i r = data->bbox.rintersect(data->scissor); if(gd->sel.fwrite)