Skip to content
Permalink
Browse files

gsdx TC: remove dead code

src->m_texture is always NULL, set in Source constructor

Potentially it was a leftover of msaa or the commented code to handle mutable FBW
  • Loading branch information...
gregory38 authored and lightningterror committed Mar 6, 2019
1 parent 374374f commit a16fe6f016198030ad74241821060584309e0c63
Showing with 4 additions and 13 deletions.
  1. +4 −13 plugins/GSdx/Renderers/HW/GSTextureCache.cpp
@@ -1319,8 +1319,11 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con

GSVector4 sRect(0, 0, w, h);

GSTexture* sTex = src->m_texture ? src->m_texture : dst->m_texture;
// Don't be fooled by the name. 'dst' is the old target (hence the input)
// 'src' is the new texture cache entry (hence the output)
GSTexture* sTex = dst->m_texture;
GSTexture* dTex = m_renderer->m_dev->CreateRenderTarget(w, h);
src->m_texture = dTex;

// GH: by default (m_paltex == 0) GSdx converts texture to the 32 bit format
// However it is different here. We want to reuse a Render Target as a texture.
@@ -1354,11 +1357,6 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con
// copy. Likely a speed boost and memory usage reduction.
bool linear = (TEX0.PSM == PSM_PSMCT32 || TEX0.PSM == PSM_PSMCT24);

if(!src->m_texture)
{
src->m_texture = dTex;
}

if ((sRect == dRect).alltrue() && !shader)
{
if (half_right) {
@@ -1384,13 +1382,6 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con
m_renderer->m_dev->StretchRect(sTex, sRect, dTex, dRect, shader, linear);
}

if(dTex != src->m_texture)
{
m_renderer->m_dev->Recycle(src->m_texture);

src->m_texture = dTex;
}

if( src->m_texture )
src->m_texture->SetScale(scale);
else

0 comments on commit a16fe6f

Please sign in to comment.
You can’t perform that action at this time.