gsdx: Skip texture cache read if any dimension is 0

Fixes a crash at the PSX logo if either the DX9 or DX11 hardware
renderer is used.
This commit is contained in:
Jonathan Li 2016-11-09 22:39:53 +00:00
parent cf739d2493
commit ae6f26f3ef
3 changed files with 3 additions and 3 deletions

View File

@ -50,7 +50,7 @@ void GSTextureCache11::Read(Target* t, const GSVector4i& r)
return;
}
if (!t->m_dirty.empty() || (r.width() == 0 && r.height() == 0))
if (!t->m_dirty.empty() || r.width() == 0 || r.height() == 0)
{
return;
}

View File

@ -50,7 +50,7 @@ void GSTextureCache9::Read(Target* t, const GSVector4i& r)
return;
}
if (!t->m_dirty.empty() || (r.width() == 0 && r.height() == 0))
if (!t->m_dirty.empty() || r.width() == 0 || r.height() == 0)
{
return;
}

View File

@ -30,7 +30,7 @@ GSTextureCacheOGL::GSTextureCacheOGL(GSRenderer* r)
void GSTextureCacheOGL::Read(Target* t, const GSVector4i& r)
{
if (!t->m_dirty.empty() || (r.width() == 0 && r.height() == 0))
if (!t->m_dirty.empty() || r.width() == 0 || r.height() == 0)
return;
const GIFRegTEX0& TEX0 = t->m_TEX0;