From 4137fc0023b9fc49765b1b0b5c4a7c1dfc6a9536 Mon Sep 17 00:00:00 2001 From: James Dunne Date: Wed, 13 Mar 2013 18:23:16 -0500 Subject: [PATCH] Removed calls to YieldCPU from RunGpuLoop. --- Source/Core/VideoCommon/Src/Fifo.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Source/Core/VideoCommon/Src/Fifo.cpp b/Source/Core/VideoCommon/Src/Fifo.cpp index 7c2eb6fb9e..b434dc3ca4 100644 --- a/Source/Core/VideoCommon/Src/Fifo.cpp +++ b/Source/Core/VideoCommon/Src/Fifo.cpp @@ -153,10 +153,10 @@ void RunGpuLoop() while (GpuRunningState) { - g_video_backend->PeekMessages(); + g_video_backend->PeekMessages(); VideoFifo_CheckAsyncRequest(); - + CommandProcessor::SetCpStatus(); Common::AtomicStore(CommandProcessor::VITicks, CommandProcessor::m_cpClockOrigin); @@ -203,10 +203,16 @@ void RunGpuLoop() } fifo.isGpuReadingData = false; - if (EmuRunningState) + { + // NOTE(jsd): Calling SwitchToThread() on Windows 7 x64 is a hot spot, according to profiler. + // See https://docs.google.com/spreadsheet/ccc?key=0Ah4nh0yGtjrgdFpDeF9pS3V6RUotRVE3S3J4TGM1NlE#gid=0 + // for benchmark details. +#if 0 Common::YieldCPU(); +#endif + } else { // While the emu is paused, we still handle async requests then sleep.