Add a dirty flag for arraybases.

Only loop through and call getPointers when something has actually
changed.
Worth about 2-4% speedup un SMG over the previous commit.
This commit is contained in:
Scott Mansell
2015-05-30 03:58:27 +12:00
parent f57517f1a0
commit 7df6982973
4 changed files with 16 additions and 0 deletions

View File

@ -23,11 +23,13 @@ void SWLoadCPReg(u32 sub_cmd, u32 value)
case 0x50:
g_main_cp_state.vtx_desc.Hex &= ~0x1FFFF; // keep the Upper bits
g_main_cp_state.vtx_desc.Hex |= value;
g_main_cp_state.bases_dirty = true;
break;
case 0x60:
g_main_cp_state.vtx_desc.Hex &= 0x1FFFF; // keep the lower 17Bits
g_main_cp_state.vtx_desc.Hex |= (u64)value << 17;
g_main_cp_state.bases_dirty = true;
break;
case 0x70:
@ -48,6 +50,7 @@ void SWLoadCPReg(u32 sub_cmd, u32 value)
// Pointers to vertex arrays in GC RAM
case 0xA0:
g_main_cp_state.array_bases[sub_cmd & 0xF] = value;
g_main_cp_state.bases_dirty = true;
break;
case 0xB0: