mirror of https://github.com/PCSX2/pcsx2.git
gsdx-tc: add UserHacks_DisablePartialInvalidation for snowblind engine game
Games uses very special texture with a lots of repeating. It is much faster to send the full texture rather than trying to partially invalidate it. On my gs dump: FPS: 29 => 68 !
This commit is contained in:
parent
eb69522641
commit
46a4d2dc47
|
@ -37,6 +37,7 @@ GSTextureCache::GSTextureCache(GSRenderer* r)
|
|||
m_preload_frame = userhacks && theApp.GetConfig("preload_frame_with_gs_data", 0);
|
||||
m_can_convert_depth = s_IS_OPENGL && theApp.GetConfig("texture_cache_depth", 1);
|
||||
m_crc_hack_level = theApp.GetConfig("crc_hack_level", 3);
|
||||
m_disable_partial_invalidation = userhacks && theApp.GetConfig("UserHacks_DisablePartialInvalidation", 0);
|
||||
|
||||
// In theory 4MB is enough but 9MB is safer for overflow (8MB
|
||||
// isn't enough in custom resolution)
|
||||
|
@ -577,24 +578,29 @@ void GSTextureCache::InvalidateVideoMem(GSOffset* off, const GSVector4i& rect, b
|
|||
|
||||
if(!s->m_target)
|
||||
{
|
||||
// Invalidate data of input texture
|
||||
if(s->m_repeating)
|
||||
{
|
||||
vector<GSVector2i>& l = s->m_p2t[page];
|
||||
|
||||
for(vector<GSVector2i>::iterator k = l.begin(); k != l.end(); k++)
|
||||
if (m_disable_partial_invalidation && s->m_repeating) {
|
||||
m_src.RemoveAt(s);
|
||||
} else {
|
||||
// Invalidate data of input texture
|
||||
if(s->m_repeating)
|
||||
{
|
||||
valid[k->x] &= k->y;
|
||||
// Note: very hot path on snowbling engine game
|
||||
vector<GSVector2i>& l = s->m_p2t[page];
|
||||
|
||||
for(vector<GSVector2i>::iterator k = l.begin(); k != l.end(); k++)
|
||||
{
|
||||
valid[k->x] &= k->y;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
valid[page] = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
valid[page] = 0;
|
||||
}
|
||||
|
||||
s->m_complete = false;
|
||||
s->m_complete = false;
|
||||
|
||||
found |= b;
|
||||
found |= b;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -116,6 +116,7 @@ protected:
|
|||
uint8* m_temp;
|
||||
bool m_can_convert_depth;
|
||||
int m_crc_hack_level;
|
||||
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