mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 19:58:53 +00:00
Fifo: rewrite sync on idle skipping hack
Now it's done without a busy loop
This commit is contained in:
parent
9bdaa00e2d
commit
b020ae1c5d
10 changed files with 30 additions and 39 deletions
|
@ -40,7 +40,6 @@ static u16 m_bboxright;
|
|||
static u16 m_bboxbottom;
|
||||
static u16 m_tokenReg;
|
||||
|
||||
volatile bool isPossibleWaitingSetDrawDone = false;
|
||||
volatile bool interruptSet= false;
|
||||
volatile bool interruptWaiting= false;
|
||||
volatile bool interruptTokenWaiting = false;
|
||||
|
@ -70,7 +69,6 @@ void DoState(PointerWrap &p)
|
|||
p.Do(m_tokenReg);
|
||||
p.Do(fifo);
|
||||
|
||||
p.Do(isPossibleWaitingSetDrawDone);
|
||||
p.Do(interruptSet);
|
||||
p.Do(interruptWaiting);
|
||||
p.Do(interruptTokenWaiting);
|
||||
|
@ -123,8 +121,6 @@ void Init()
|
|||
interruptFinishWaiting = false;
|
||||
interruptTokenWaiting = false;
|
||||
|
||||
isPossibleWaitingSetDrawDone = false;
|
||||
|
||||
et_UpdateInterrupts = CoreTiming::RegisterEvent("CPInterrupt", UpdateInterrupts_Wrapper);
|
||||
}
|
||||
|
||||
|
@ -319,7 +315,7 @@ void GatherPipeBursted()
|
|||
(ProcessorInterface::Fifo_CPUBase == fifo.CPBase) &&
|
||||
fifo.CPReadWriteDistance > 0)
|
||||
{
|
||||
ProcessFifoAllDistance();
|
||||
FlushGpu();
|
||||
}
|
||||
}
|
||||
RunGpu();
|
||||
|
@ -468,15 +464,6 @@ void SetCPStatusFromCPU()
|
|||
}
|
||||
}
|
||||
|
||||
void ProcessFifoAllDistance()
|
||||
{
|
||||
if (IsOnThread())
|
||||
{
|
||||
while (!interruptWaiting && fifo.bFF_GPReadEnable && fifo.CPReadWriteDistance && !AtBreakpoint())
|
||||
Common::YieldCPU();
|
||||
}
|
||||
}
|
||||
|
||||
void ProcessFifoEvents()
|
||||
{
|
||||
if (IsOnThread() && (interruptWaiting || interruptFinishWaiting || interruptTokenWaiting))
|
||||
|
@ -518,7 +505,7 @@ void SetCpControlRegister()
|
|||
if (fifo.bFF_GPReadEnable && !m_CPCtrlReg.GPReadEnable)
|
||||
{
|
||||
fifo.bFF_GPReadEnable = m_CPCtrlReg.GPReadEnable;
|
||||
while (fifo.isGpuReadingData) Common::YieldCPU();
|
||||
FlushGpu();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue