Cache vertex array pointers, a la magumagu's idea. Misc other stuff. Should give very minor speed boost.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2185 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2009-02-09 20:35:30 +00:00
parent 5edef94753
commit d209d4a577
12 changed files with 132 additions and 176 deletions

View File

@ -17,6 +17,7 @@
#include <map>
#include "VideoCommon.h"
#include "Statistics.h"
#include "VertexShaderManager.h"
@ -145,7 +146,8 @@ void LoadCPReg(u32 sub_cmd, u32 value)
// Pointers to vertex arrays in GC RAM
case 0xA0:
arraybases[sub_cmd & 0xF] = value & 0xFFFFFFFF; // huh, why the mask?
arraybases[sub_cmd & 0xF] = value;
cached_arraybases[sub_cmd & 0xF] = Memory_GetPtr(value);
break;
case 0xB0:
@ -153,3 +155,11 @@ void LoadCPReg(u32 sub_cmd, u32 value)
break;
}
}
void RecomputeCachedArraybases()
{
for (int i = 0; i < 16; i++)
{
cached_arraybases[i] = Memory_GetPtr(arraybases[i]);
}
}