diff options
| author | degasus <wickmarkus@web.de> | 2015-03-29 12:20:24 +0200 |
|---|---|---|
| committer | degasus <wickmarkus@web.de> | 2015-04-06 12:35:35 +0200 |
| commit | 9bdaa00e2dc18c06dcb9882d7f0caf372ed5990d (patch) | |
| tree | ab9312988b69097efc1bc3d33f970cd0f8cf0e3c /Source/Core/VideoCommon/Fifo.cpp | |
| parent | 279c657cda7772a39f318b5df68fb279bb0400b4 (diff) | |
Fifo: use the outer loop on sync GPU
Diffstat (limited to 'Source/Core/VideoCommon/Fifo.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/Fifo.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/Fifo.cpp b/Source/Core/VideoCommon/Fifo.cpp index 4ca7a3de58..5f75deb672 100644 --- a/Source/Core/VideoCommon/Fifo.cpp +++ b/Source/Core/VideoCommon/Fifo.cpp @@ -306,10 +306,15 @@ void RunGpuLoop() { CommandProcessor::SetCPStatusFromGPU(); - Common::AtomicStore(CommandProcessor::VITicks, CommandProcessor::m_cpClockOrigin); + if (!fifo.isGpuReadingData) + { + Common::AtomicStore(CommandProcessor::VITicks, CommandProcessor::m_cpClockOrigin); + } + + bool run_loop = true; // check if we are able to run this buffer - while (GpuRunningState && EmuRunningState && !CommandProcessor::interruptWaiting && fifo.bFF_GPReadEnable && fifo.CPReadWriteDistance && !AtBreakpoint()) + while (GpuRunningState && EmuRunningState && run_loop && !CommandProcessor::interruptWaiting && fifo.bFF_GPReadEnable && fifo.CPReadWriteDistance && !AtBreakpoint()) { fifo.isGpuReadingData = true; CommandProcessor::isPossibleWaitingSetDrawDone = fifo.bFF_GPLinkEnable ? true : false; @@ -340,6 +345,10 @@ void RunGpuLoop() if ((write_ptr - s_video_buffer_read_ptr) == 0) Common::AtomicStore(fifo.SafeCPReadPointer, fifo.CPReadPointer); } + else + { + run_loop = false; + } CommandProcessor::SetCPStatusFromGPU(); @@ -350,7 +359,8 @@ void RunGpuLoop() CommandProcessor::isPossibleWaitingSetDrawDone = false; } - fifo.isGpuReadingData = false; + // don't release the GPU running state on sync GPU waits + fifo.isGpuReadingData = !run_loop; } if (EmuRunningState) |
