mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
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:
@ -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]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user