mirror of https://github.com/PCSX2/pcsx2.git
microVU: Reset rec when buffers cannot grow any larger. (should fix Killzone crashes)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3405 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
cf0953d9c0
commit
a4afe629e5
|
@ -161,7 +161,20 @@ _f void mVUclose(mV) {
|
|||
|
||||
void mVUresizeCache(mV, u32 size) {
|
||||
|
||||
if (size > (u32)mVUcacheMaxSize) { if (mVU->cacheSize==mVUcacheMaxSize) return; size = mVUcacheMaxSize; }
|
||||
if (size >= (u32)mVUcacheMaxSize) {
|
||||
if (mVU->cacheSize==mVUcacheMaxSize) {
|
||||
|
||||
// Crap! We can't grow the rec any larger, so just reset it and start over.
|
||||
// (if we don't reset, the rec will eventually crash)
|
||||
|
||||
Console.WriteLn(Color_Magenta, "microVU%d: Cannot grow cache, size limit reached! [%dmb]. Resetting rec.", mVU->index, mVU->cacheSize/_1mb);
|
||||
memset(mVU->cache, 0xcc, mVU->cacheSize);
|
||||
mVUreset(mVU);
|
||||
return;
|
||||
}
|
||||
size = mVUcacheMaxSize;
|
||||
}
|
||||
|
||||
if (mVU->cache) Console.WriteLn(Color_Green, "microVU%d: Attempting to resize Cache [%dmb]", mVU->index, size/_1mb);
|
||||
|
||||
u8* cache = SysMmapEx(NULL, size, 0, (mVU->index ? "Micro VU1 RecCache" : "Micro VU0 RecCache"));
|
||||
|
|
Loading…
Reference in New Issue