gsdx ogl: only always uncommit texture in debug build

It is good for memory but bad for the speed. There is likely a better trade-off
but it should be enough for now
This commit is contained in:
Gregory Hainaut 2019-04-10 12:00:32 +02:00 committed by lightningterror
parent 70c3c1a48f
commit 568b96b885
1 changed files with 5 additions and 0 deletions

View File

@ -163,7 +163,12 @@ void GSDevice::Recycle(GSTexture* t)
{
if(t)
{
#ifdef _DEBUG
// Uncommit saves memory but it means a futur allocation when we want to reuse the texture.
// Which is slow and defeat the purpose of the m_pool cache.
// However, it can help to spot part of texture that we forgot to commit
t->Uncommit();
#endif
t->last_frame_used = m_frame;
m_pool.push_front(t);