diff options
| author | degasus <wickmarkus@web.de> | 2015-03-13 23:36:31 +0100 |
|---|---|---|
| committer | degasus <wickmarkus@web.de> | 2015-04-06 12:35:35 +0200 |
| commit | d2c62b17445b666b81a19cb3a6c46f9ee2d1388e (patch) | |
| tree | 1d9a13d2d91aeda665e6f5af511b4568f5d2ffb4 /Source/Core/VideoCommon/Fifo.cpp | |
| parent | b020ae1c5db4e2e198d1beea91c75219a251a167 (diff) | |
Fifo: only sleep once within every ms of emulated time
Diffstat (limited to 'Source/Core/VideoCommon/Fifo.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/Fifo.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/Fifo.cpp b/Source/Core/VideoCommon/Fifo.cpp index 0b65a56cd8..add7618d5d 100644 --- a/Source/Core/VideoCommon/Fifo.cpp +++ b/Source/Core/VideoCommon/Fifo.cpp @@ -369,9 +369,13 @@ void RunGpuLoop() { if (s_gpu_is_running.IsSet()) { - // reset the atomic flag. But as the CPU thread might have pushed some new data, we have to rerun the GPU loop - s_gpu_is_pending.Set(); - s_gpu_is_running.Clear(); + if (CommandProcessor::s_gpuMaySleep.IsSet()) + { + // Reset the atomic flag. But as the CPU thread might have pushed some new data, we have to rerun the GPU loop + s_gpu_is_pending.Set(); + s_gpu_is_running.Clear(); + CommandProcessor::s_gpuMaySleep.Clear(); + } } else { @@ -403,6 +407,7 @@ void FlushGpu() while (s_gpu_is_running.IsSet() || s_gpu_is_pending.IsSet()) { + CommandProcessor::s_gpuMaySleep.Set(); s_gpu_done_event.Wait(); } } |
