mirror of https://github.com/PCSX2/pcsx2.git
GSdx:
- Bring back IncAge() for textures to avoid excessive memory usage by some games. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2140 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
5d5eac8c59
commit
35ec28eb48
|
@ -466,9 +466,7 @@ protected:
|
||||||
{
|
{
|
||||||
__super::VSync(field);
|
__super::VSync(field);
|
||||||
|
|
||||||
// IncAge() gets rid of "old" textures, but it's not really needed.
|
m_tc->IncAge();
|
||||||
// Doing it causes flickering on many game scene transitions.
|
|
||||||
//m_tc->IncAge();
|
|
||||||
|
|
||||||
m_skip = 0;
|
m_skip = 0;
|
||||||
|
|
||||||
|
|
|
@ -451,7 +451,7 @@ void GSTextureCache::InvalidateLocalMem(const GSOffset* o, const GSVector4i& r)
|
||||||
// TODO: ds
|
// TODO: ds
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
//Currently unused
|
|
||||||
void GSTextureCache::IncAge()
|
void GSTextureCache::IncAge()
|
||||||
{
|
{
|
||||||
int maxage = m_src.m_used ? 3 : 30;
|
int maxage = m_src.m_used ? 3 : 30;
|
||||||
|
@ -470,24 +470,25 @@ void GSTextureCache::IncAge()
|
||||||
|
|
||||||
m_src.m_used = false;
|
m_src.m_used = false;
|
||||||
|
|
||||||
maxage = 4; // ffx intro scene changes leave the old image untouched for a couple of frames and only then start using it
|
// Clearing of Rendertargets causes flickering in many scene transitions, so let's not :p
|
||||||
|
//maxage = 4; // ffx intro scene changes leave the old image untouched for a couple of frames and only then start using it
|
||||||
|
|
||||||
for(int type = 0; type < 2; type++)
|
//for(int type = 0; type < 2; type++)
|
||||||
{
|
//{
|
||||||
for(list<Target*>::iterator i = m_dst[type].begin(); i != m_dst[type].end(); )
|
// for(list<Target*>::iterator i = m_dst[type].begin(); i != m_dst[type].end(); )
|
||||||
{
|
// {
|
||||||
list<Target*>::iterator j = i++;
|
// list<Target*>::iterator j = i++;
|
||||||
|
|
||||||
Target* t = *j;
|
// Target* t = *j;
|
||||||
|
|
||||||
if(++t->m_age > maxage)
|
// if(++t->m_age > maxage)
|
||||||
{
|
// {
|
||||||
m_dst[type].erase(j);
|
// m_dst[type].erase(j);
|
||||||
|
|
||||||
delete t;
|
// delete t;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, const GIFRegTEXA& TEXA, Target* dst)
|
GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, const GIFRegTEXA& TEXA, Target* dst)
|
||||||
|
|
Loading…
Reference in New Issue