GS/HW: Remove m_used from SourceMap

Not used anymore, since we don't age the TC when there's no draws.
This commit is contained in:
Stenzek 2023-03-26 17:57:42 +10:00 committed by refractionpcsx2
parent 7a93f1fc23
commit 1c600c7068
2 changed files with 2 additions and 15 deletions

View File

@ -1062,9 +1062,6 @@ GSTextureCache::Source* GSTextureCache::LookupSource(const GIFRegTEX0& TEX0, con
}
src->Update(r);
m_src.m_used = true;
return src;
}
@ -2707,8 +2704,8 @@ void GSTextureCache::InvalidateSourcesFromTarget(const Target* t)
void GSTextureCache::IncAge()
{
const int max_age = m_src.m_used ? 3 : 6;
const int max_preload_age = m_src.m_used ? 30 : 60;
static constexpr int max_age = 3;
static constexpr int max_preload_age = 30;
// You can't use m_map[page] because Source* are duplicated on several pages.
for (auto i = m_src.m_surfaces.begin(); i != m_src.m_surfaces.end();)
@ -2740,8 +2737,6 @@ void GSTextureCache::IncAge()
}
}
m_src.m_used = false;
// Clearing of Rendertargets causes flickering in many scene transitions.
// Sigh, this seems to be used to invalidate surfaces. So set a huge maxage to avoid flicker,
// but still invalidate surfaces. (Disgaea 2 fmv when booting the game through the BIOS)

View File

@ -316,14 +316,6 @@ public:
public:
std::unordered_set<Source*> m_surfaces;
std::array<FastList<Source*>, MAX_PAGES> m_map;
u32 m_pages[16]; // bitmap of all pages
bool m_used;
SourceMap()
: m_used(false)
{
memset(m_pages, 0, sizeof(m_pages));
}
void Add(Source* s, const GIFRegTEX0& TEX0, const GSOffset& off);
void RemoveAll();