From 6447ef282a76115c45273894e1323e450ba59418 Mon Sep 17 00:00:00 2001 From: "Jake.Stine" Date: Wed, 14 Oct 2009 16:42:59 +0000 Subject: [PATCH] GSdx: Recycle the m_merge texture instead of deleting it; and made a note about a debug assertion that happens in XS2 (probably nothing useful, but no harm in making a note for future references) git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2006 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/GSdx/GSDevice.cpp | 2 +- plugins/GSdx/GSRendererSW.cpp | 1 + plugins/GSdx/GSTextureCache.cpp | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/GSdx/GSDevice.cpp b/plugins/GSdx/GSDevice.cpp index 723a365314..7114b43ec0 100644 --- a/plugins/GSdx/GSDevice.cpp +++ b/plugins/GSdx/GSDevice.cpp @@ -188,7 +188,7 @@ void GSDevice::Merge(GSTexture* st[2], GSVector4* sr, GSVector4* dr, const GSVec { if(!m_merge || !(m_merge->GetSize() == fs)) { - delete m_merge; + Recycle(m_merge); m_merge = CreateRenderTarget(fs.x, fs.y, false); } diff --git a/plugins/GSdx/GSRendererSW.cpp b/plugins/GSdx/GSRendererSW.cpp index 601ae1cc9a..d27d3daa95 100644 --- a/plugins/GSdx/GSRendererSW.cpp +++ b/plugins/GSdx/GSRendererSW.cpp @@ -113,6 +113,7 @@ GSTexture* GSRendererSW::GetOutput(int i) s_n++; } + ReleaseTextureBufferLock(); } return m_texture[i]; diff --git a/plugins/GSdx/GSTextureCache.cpp b/plugins/GSdx/GSTextureCache.cpp index e70af27609..c4c9d78f11 100644 --- a/plugins/GSdx/GSTextureCache.cpp +++ b/plugins/GSdx/GSTextureCache.cpp @@ -647,6 +647,8 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con switch(TEX0.PSM) { default: + // Note: this assertion triggers in Xenosaga2 after the first intro scenes, when + // gameplay first begins (in the city). ASSERT(0); case PSM_PSMCT32: src->m_fmt = FMT_32;