gsdx: increase buffer to have crash in case of overflow

Avoid a crash on Onimusha3 (PAL 60HZ)

In theory it will be better to find the root cause of overflow. I.e. somewhere in this
code below. Dirty rectangle is too big.

***********************************************************************
if(rowsize > 0 && offset % rowsize == 0)
{
    int y = GSLocalMemory::m_psm[psm].pgs.y * offset / rowsize;

    if(r.bottom > y)
    {
        GL_CACHE("TC: Dirty After Target(%s) %d (0x%x)", to_string(type),
                t->m_texture ? t->m_texture->GetID() : 0,
                t->m_TEX0.TBP0);
        // TODO: do not add this rect above too
        t->m_dirty.push_back(GSDirtyRect(GSVector4i(r.left, r.top - y, r.right, r.bottom - y), psm));
        t->m_TEX0.TBW = bw;
        continue;
    }
}
***********************************************************************

So as a temporary solution (that will likely stay for a couple of
years), buffers were increased.
This commit is contained in:
Gregory Hainaut 2015-12-28 21:13:29 +01:00
parent 3d3b275410
commit 08724daf98
2 changed files with 5 additions and 3 deletions

View File

@ -38,7 +38,9 @@ GSTextureCache::GSTextureCache(GSRenderer* r)
m_can_convert_depth = s_IS_OPENGL && theApp.GetConfig("texture_cache_depth", 1);
m_crc_hack_level = theApp.GetConfig("crc_hack_level", 3);
m_temp = (uint8*)_aligned_malloc(1024 * 1024 * sizeof(uint32), 32);
// In theory 4MB is enough but 8MB is safer for overflow
// Test: onimusha 3 PAL 60Hz
m_temp = (uint8*)_aligned_malloc(2 * 1024 * 1024 * sizeof(uint32), 32);
}
GSTextureCache::~GSTextureCache()

View File

@ -42,7 +42,7 @@ namespace PboPool {
uint32 m_size;
bool m_texture_storage;
GLsync m_fence[PBO_POOL_SIZE];
const uint32 m_pbo_size = 4*1024*1024;
const uint32 m_pbo_size = 8*1024*1024;
// Option for buffer storage
// XXX: actually does I really need coherent and barrier???