optimize function call: point out by magumagu, GetVideo() is a kind of bottleneck, so move it out of loop;

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2173 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hyperiris 2009-02-09 14:24:39 +00:00
parent 1fbebb4ce1
commit 013e9bed93
1 changed files with 3 additions and 1 deletions

View File

@ -646,6 +646,8 @@ void CatchUpGPU()
{
// HyperIris: Memory::GetPointer is an expensive call, call it less, run faster
u8 *ptr = Memory::GetPointer(fifo.CPReadPointer);
// HyperIris: point out by magumagu, GetVideo() is a bottleneck, so move it out of loop;
Common::PluginVideo * pVideo = CPluginManager::GetInstance().GetVideo();
while (fifo.CPReadWriteDistance > 0)
{
@ -669,7 +671,7 @@ void CatchUpGPU()
// We are going to do FP math on the main thread so have to save the current state
SaveSSEState();
LoadDefaultSSEState();
CPluginManager::GetInstance().GetVideo()->Video_SendFifoData(ptr,32);
pVideo->Video_SendFifoData(ptr,32);
LoadSSEState();
// adjust
ptr += 32;