mirror of https://github.com/PCSX2/pcsx2.git
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
This commit is contained in:
parent
374374fdf1
commit
a16fe6f016
|
@ -1319,8 +1319,11 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con
|
||||||
|
|
||||||
GSVector4 sRect(0, 0, w, h);
|
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);
|
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
|
// 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.
|
// 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.
|
// copy. Likely a speed boost and memory usage reduction.
|
||||||
bool linear = (TEX0.PSM == PSM_PSMCT32 || TEX0.PSM == PSM_PSMCT24);
|
bool linear = (TEX0.PSM == PSM_PSMCT32 || TEX0.PSM == PSM_PSMCT24);
|
||||||
|
|
||||||
if(!src->m_texture)
|
|
||||||
{
|
|
||||||
src->m_texture = dTex;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((sRect == dRect).alltrue() && !shader)
|
if ((sRect == dRect).alltrue() && !shader)
|
||||||
{
|
{
|
||||||
if (half_right) {
|
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);
|
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 )
|
if( src->m_texture )
|
||||||
src->m_texture->SetScale(scale);
|
src->m_texture->SetScale(scale);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue