mirror of https://github.com/PCSX2/pcsx2.git
GS/HW: Don't try to draw with invalid TEX0 configuration
Fixes the texture cache falling apart in 007: Everything or Nothing.
This commit is contained in:
parent
980e2f67fd
commit
e85790b84b
|
@ -330,6 +330,13 @@ GSTextureCache::Source* GSTextureCache::LookupSource(const GIFRegTEX0& TEX0, con
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Prevent everything going to rubbish if a game somehow sends a TW/TH above 10, and region isn't being used.
|
||||||
|
if ((TEX0.TW > 10 && !region.HasX()) || (TEX0.TH > 10 && !region.HasY()))
|
||||||
|
{
|
||||||
|
GL_CACHE("Invalid TEX0 size %ux%u without region, aborting draw.", TEX0.TW, TEX0.TH);
|
||||||
|
throw GSRecoverableError();
|
||||||
|
}
|
||||||
|
|
||||||
const GSVector2i compare_lod(lod ? *lod : GSVector2i(0, 0));
|
const GSVector2i compare_lod(lod ? *lod : GSVector2i(0, 0));
|
||||||
Source* src = nullptr;
|
Source* src = nullptr;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue