From a4aac9ec99828b3e1dec91e56153377de6c0611e Mon Sep 17 00:00:00 2001 From: hrydgard Date: Sun, 15 Feb 2009 11:39:24 +0000 Subject: [PATCH] Undo 2136 - not really an optimization since this loop rarely runs more than once. It also may be a cause of spurious bad GetPointer calls. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2251 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/HW/GPFifo.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/Source/Core/Core/Src/HW/GPFifo.cpp b/Source/Core/Core/Src/HW/GPFifo.cpp index e0fd743da5..61483a4dbc 100644 --- a/Source/Core/Core/Src/HW/GPFifo.cpp +++ b/Source/Core/Core/Src/HW/GPFifo.cpp @@ -67,38 +67,27 @@ void ResetGatherPipe() void STACKALIGN CheckGatherPipe() { // HyperIris: Memory::GetPointer is an expensive call, call it less, run faster - u8* pGatherPipe = Memory::GetPointer(CPeripheralInterface::Fifo_CPUWritePointer); - + // ector: Well not really - this loop will only rarely go more than one lap. while (m_gatherPipeCount >= GATHER_PIPE_SIZE) { // copy the GatherPipe - memcpy(pGatherPipe, m_gatherPipe, GATHER_PIPE_SIZE); - - // [F|RES]: i thought GP is forced to mem1 ... strange + memcpy(Memory::GetPointer(CPeripheralInterface::Fifo_CPUWritePointer), m_gatherPipe, GATHER_PIPE_SIZE); // move back the spill bytes m_gatherPipeCount -= GATHER_PIPE_SIZE; // HyperIris: dunno why, but I use memcpy - //for (u32 i=0; i < m_gatherPipeCount; i++) - // m_gatherPipe[i] = m_gatherPipe[i + GATHER_PIPE_SIZE]; memcpy(m_gatherPipe, m_gatherPipe + GATHER_PIPE_SIZE, m_gatherPipeCount); // increase the CPUWritePointer CPeripheralInterface::Fifo_CPUWritePointer += GATHER_PIPE_SIZE; - // adjust - pGatherPipe += GATHER_PIPE_SIZE; if (CPeripheralInterface::Fifo_CPUWritePointer > CPeripheralInterface::Fifo_CPUEnd) _assert_msg_(DYNA_REC, 0, "Fifo_CPUWritePointer out of bounds: %08x (end = %08x)", CPeripheralInterface::Fifo_CPUWritePointer, CPeripheralInterface::Fifo_CPUEnd); if (CPeripheralInterface::Fifo_CPUWritePointer >= CPeripheralInterface::Fifo_CPUEnd) - { CPeripheralInterface::Fifo_CPUWritePointer = CPeripheralInterface::Fifo_CPUBase; - // adjust, take care - pGatherPipe = Memory::GetPointer(CPeripheralInterface::Fifo_CPUWritePointer); - } CommandProcessor::GatherPipeBursted(); } }