Ignore bogus invalidate cache calls, fixes slowdown in some games

This commit is contained in:
Henrik Rydgard 2013-01-04 00:32:18 +01:00
parent cfc4717a51
commit 8f26e128bf

View File

@ -241,24 +241,30 @@ void sceKernelGetGPI()
// textures, and in the future display lists, in some cases though.
int sceKernelDcacheInvalidateRange(u32 addr, int size)
{
gpu->InvalidateCache(addr, size);
if (size > 0 && addr != 0) {
gpu->InvalidateCache(addr, size);
}
return 0;
}
int sceKernelDcacheWritebackAll()
{
// Some games seem to use this a lot, it doesn't make sense
// Some games seem to use this a lot, it doesn't make sense
// to zap the whole texture cache.
// gpu->InvalidateCache(0, -1);
return 0;
}
int sceKernelDcacheWritebackRange(u32 addr, int size)
{
gpu->InvalidateCache(addr, size);
if (size > 0 && addr != 0) {
gpu->InvalidateCache(addr, size);
}
return 0;
}
int sceKernelDcacheWritebackInvalidateRange(u32 addr, int size)
{
gpu->InvalidateCache(addr, size);
if (size > 0 && addr != 0) {
gpu->InvalidateCache(addr, size);
}
return 0;
}
int sceKernelDcacheWritebackInvalidateAll()