mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-02 11:02:28 +02:00
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
This commit is contained in:
parent
72cf7a5a42
commit
a4aac9ec99
@ -67,38 +67,27 @@ void ResetGatherPipe()
|
|||||||
void STACKALIGN CheckGatherPipe()
|
void STACKALIGN CheckGatherPipe()
|
||||||
{
|
{
|
||||||
// HyperIris: Memory::GetPointer is an expensive call, call it less, run faster
|
// 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)
|
while (m_gatherPipeCount >= GATHER_PIPE_SIZE)
|
||||||
{
|
{
|
||||||
// copy the GatherPipe
|
// copy the GatherPipe
|
||||||
memcpy(pGatherPipe, m_gatherPipe, GATHER_PIPE_SIZE);
|
memcpy(Memory::GetPointer(CPeripheralInterface::Fifo_CPUWritePointer), m_gatherPipe, GATHER_PIPE_SIZE);
|
||||||
|
|
||||||
// [F|RES]: i thought GP is forced to mem1 ... strange
|
|
||||||
|
|
||||||
// move back the spill bytes
|
// move back the spill bytes
|
||||||
m_gatherPipeCount -= GATHER_PIPE_SIZE;
|
m_gatherPipeCount -= GATHER_PIPE_SIZE;
|
||||||
|
|
||||||
// HyperIris: dunno why, but I use memcpy
|
// 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);
|
memcpy(m_gatherPipe, m_gatherPipe + GATHER_PIPE_SIZE, m_gatherPipeCount);
|
||||||
|
|
||||||
// increase the CPUWritePointer
|
// increase the CPUWritePointer
|
||||||
CPeripheralInterface::Fifo_CPUWritePointer += GATHER_PIPE_SIZE;
|
CPeripheralInterface::Fifo_CPUWritePointer += GATHER_PIPE_SIZE;
|
||||||
// adjust
|
|
||||||
pGatherPipe += GATHER_PIPE_SIZE;
|
|
||||||
|
|
||||||
if (CPeripheralInterface::Fifo_CPUWritePointer > CPeripheralInterface::Fifo_CPUEnd)
|
if (CPeripheralInterface::Fifo_CPUWritePointer > CPeripheralInterface::Fifo_CPUEnd)
|
||||||
_assert_msg_(DYNA_REC, 0, "Fifo_CPUWritePointer out of bounds: %08x (end = %08x)",
|
_assert_msg_(DYNA_REC, 0, "Fifo_CPUWritePointer out of bounds: %08x (end = %08x)",
|
||||||
CPeripheralInterface::Fifo_CPUWritePointer, CPeripheralInterface::Fifo_CPUEnd);
|
CPeripheralInterface::Fifo_CPUWritePointer, CPeripheralInterface::Fifo_CPUEnd);
|
||||||
|
|
||||||
if (CPeripheralInterface::Fifo_CPUWritePointer >= CPeripheralInterface::Fifo_CPUEnd)
|
if (CPeripheralInterface::Fifo_CPUWritePointer >= CPeripheralInterface::Fifo_CPUEnd)
|
||||||
{
|
|
||||||
CPeripheralInterface::Fifo_CPUWritePointer = CPeripheralInterface::Fifo_CPUBase;
|
CPeripheralInterface::Fifo_CPUWritePointer = CPeripheralInterface::Fifo_CPUBase;
|
||||||
// adjust, take care
|
|
||||||
pGatherPipe = Memory::GetPointer(CPeripheralInterface::Fifo_CPUWritePointer);
|
|
||||||
}
|
|
||||||
CommandProcessor::GatherPipeBursted();
|
CommandProcessor::GatherPipeBursted();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user