summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
diff options
context:
space:
mode:
authorayuanx <ayuanx@gmail.com>2010-01-14 10:52:14 +0000
committerayuanx <ayuanx@gmail.com>2010-01-14 10:52:14 +0000
commit571a47ef9abb4f6ec01d3f1202b74750f9964d0d (patch)
tree46c90bb862b128cebc588745afc253be8121287e /Source/Core/VideoCommon
parentb186f0821eb6120c395e8ebd4eba1b6835936dbc (diff)
This could alleviate the suffering of dual core synchronization a bit.
But I doubt you would notice it in most cases. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4830 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/VideoCommon')
-rw-r--r--Source/Core/VideoCommon/Src/CommandProcessor.cpp8
-rw-r--r--Source/Core/VideoCommon/Src/Fifo.cpp6
2 files changed, 6 insertions, 8 deletions
diff --git a/Source/Core/VideoCommon/Src/CommandProcessor.cpp b/Source/Core/VideoCommon/Src/CommandProcessor.cpp
index c02fd492c7..ea153180c3 100644
--- a/Source/Core/VideoCommon/Src/CommandProcessor.cpp
+++ b/Source/Core/VideoCommon/Src/CommandProcessor.cpp
@@ -105,7 +105,7 @@ int m_bboxbottom;
u16 m_tokenReg;
static u32 fake_GPWatchdogLastToken = 0;
-static Common::Event s_fifoIdleEvent;
+static Common::EventEx s_fifoIdleEvent;
static Common::CriticalSection sFifoCritical;
void FifoCriticalEnter()
@@ -381,7 +381,7 @@ void Write16(const u16 _Value, const u32 _Address)
// Touching that game is a no-go so I don't want to take the risk :p
while (fifo.bFF_GPReadEnable && ((!fifo.bFF_BPEnable && fifo.CPReadWriteDistance) || (fifo.bFF_BPEnable && !fifo.bFF_Breakpoint)))
{
- s_fifoIdleEvent.MsgWait();
+ s_fifoIdleEvent.Wait();
}
}
}
@@ -573,7 +573,7 @@ void WaitForFrameFinish()
{
while ((fake_GPWatchdogLastToken == fifo.Fake_GPWDToken) && fifo.bFF_GPReadEnable && ((!fifo.bFF_BPEnable && fifo.CPReadWriteDistance) || (fifo.bFF_BPEnable && !fifo.bFF_Breakpoint)));
{
- s_fifoIdleEvent.MsgWait();
+ s_fifoIdleEvent.Wait();
}
fake_GPWatchdogLastToken = fifo.Fake_GPWDToken;
@@ -618,7 +618,7 @@ void STACKALIGN GatherPipeBursted()
// Wait for GPU to catch up
while (fifo.CPReadWriteDistance > fifo.CPLoWatermark && fifo.bFF_GPReadEnable && (!fifo.bFF_BPEnable || (fifo.bFF_BPEnable && !fifo.bFF_Breakpoint)))
{
- s_fifoIdleEvent.MsgWait();
+ s_fifoIdleEvent.Wait();
}
}
// check if we are in sync
diff --git a/Source/Core/VideoCommon/Src/Fifo.cpp b/Source/Core/VideoCommon/Src/Fifo.cpp
index 172d6095fa..6ca7c3f259 100644
--- a/Source/Core/VideoCommon/Src/Fifo.cpp
+++ b/Source/Core/VideoCommon/Src/Fifo.cpp
@@ -36,7 +36,7 @@ namespace
static volatile bool fifoStateRun = false;
static volatile bool EmuRunning = false;
static u8 *videoBuffer;
-static Common::Event fifo_run_event;
+static Common::EventEx fifo_run_event;
// STATE_TO_SAVE
static int size = 0;
} // namespace
@@ -170,6 +170,7 @@ void Fifo_EnterLoop(const SVideoInitialize &video_initialize)
{
Common::AtomicStore(_fifo.bFF_Breakpoint, 1);
CommandProcessor::UpdateInterruptsFromVideoPlugin(true);
+ CommandProcessor::FifoCriticalLeave();
break;
}
distToSend = 32;
@@ -208,10 +209,7 @@ void Fifo_EnterLoop(const SVideoInitialize &video_initialize)
// leading the CPU thread to wait in Video_BeginField or Video_AccessEFB thus slowing things down.
VideoFifo_CheckEFBAccess();
VideoFifo_CheckSwapRequest();
-
- CommandProcessor::SetFifoIdleFromVideoPlugin();
}
-
CommandProcessor::SetFifoIdleFromVideoPlugin();
if (EmuRunning)
Common::YieldCPU();