mirror of https://github.com/PCSX2/pcsx2.git
gsdx tc: extend the fast invalidation hack to limit the size of target read
It actually removes the previous hack that read the full target. Unfortunately snowblind engine game uses big target so the read is very big too (1280x448) which is killer for the perf. Whereas the game requires only 24x12 texels Give a 2x speed boost on Champion of Norrath !!!
This commit is contained in:
parent
be34b963e9
commit
c43b1ac201
|
@ -23,6 +23,7 @@
|
|||
#include "GSTextureCache.h"
|
||||
|
||||
bool s_IS_OPENGL = false;
|
||||
bool GSTextureCache::m_disable_partial_invalidation = false;
|
||||
|
||||
GSTextureCache::GSTextureCache(GSRenderer* r)
|
||||
: m_renderer(r)
|
||||
|
@ -743,10 +744,14 @@ void GSTextureCache::InvalidateLocalMem(GSOffset* off, const GSVector4i& r)
|
|||
|
||||
// note: r.rintersect breaks Wizardry and Chaos Legion
|
||||
// Read(t, t->m_valid) works in all tested games but is very slow in GUST titles ><
|
||||
if (r.x == 0 && r.y == 0) // Full screen read?
|
||||
Read(t, t->m_valid);
|
||||
else // Block level read?
|
||||
if (GSTextureCache::m_disable_partial_invalidation) {
|
||||
Read(t, r.rintersect(t->m_valid));
|
||||
} else {
|
||||
if (r.x == 0 && r.y == 0) // Full screen read?
|
||||
Read(t, t->m_valid);
|
||||
else // Block level read?
|
||||
Read(t, r.rintersect(t->m_valid));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -116,7 +116,7 @@ protected:
|
|||
uint8* m_temp;
|
||||
bool m_can_convert_depth;
|
||||
int m_crc_hack_level;
|
||||
bool m_disable_partial_invalidation;
|
||||
static bool m_disable_partial_invalidation;
|
||||
|
||||
virtual Source* CreateSource(const GIFRegTEX0& TEX0, const GIFRegTEXA& TEXA, Target* t = NULL, bool half_right = false);
|
||||
virtual Target* CreateTarget(const GIFRegTEX0& TEX0, int w, int h, int type);
|
||||
|
|
Loading…
Reference in New Issue