mirror of https://github.com/PCSX2/pcsx2.git
Merge pull request #1321 from PCSX2/gsdx-preloadcrash
GSDX: Avoid crash when TBW == 0 - Preload data frame
This commit is contained in:
commit
5e5069423b
|
@ -435,7 +435,7 @@ GSTextureCache::Target* GSTextureCache::LookupTarget(const GIFRegTEX0& TEX0, int
|
||||||
// From a performance point of view, it might cost a little on big upscaling
|
// From a performance point of view, it might cost a little on big upscaling
|
||||||
// but normally few RT are miss so it must remain reasonable.
|
// but normally few RT are miss so it must remain reasonable.
|
||||||
if (s_IS_OPENGL) {
|
if (s_IS_OPENGL) {
|
||||||
if (m_preload_frame) {
|
if (m_preload_frame && TEX0.TBW > 0) {
|
||||||
GL_INS("Preloading the RT DATA");
|
GL_INS("Preloading the RT DATA");
|
||||||
// RT doesn't have height but if we use a too big value, we will read outside of the GS memory.
|
// RT doesn't have height but if we use a too big value, we will read outside of the GS memory.
|
||||||
int page0 = TEX0.TBP0 >> 5;
|
int page0 = TEX0.TBP0 >> 5;
|
||||||
|
|
Loading…
Reference in New Issue