diff options
| author | degasus <wickmarkus@web.de> | 2015-03-14 08:02:16 +0100 |
|---|---|---|
| committer | degasus <wickmarkus@web.de> | 2015-04-06 12:35:35 +0200 |
| commit | b1ffd32f5f09a86598bb47c4b392b28354ed0a87 (patch) | |
| tree | 64d4604cb7a9a9a27ee62178b5b9ca3768987685 /Source/Core/VideoCommon/Fifo.cpp | |
| parent | d2c62b17445b666b81a19cb3a6c46f9ee2d1388e (diff) | |
Fifo: only touch the SIMD state once in the single core loop
Diffstat (limited to 'Source/Core/VideoCommon/Fifo.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/Fifo.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/Fifo.cpp b/Source/Core/VideoCommon/Fifo.cpp index add7618d5d..c9ac3fdbbb 100644 --- a/Source/Core/VideoCommon/Fifo.cpp +++ b/Source/Core/VideoCommon/Fifo.cpp @@ -425,6 +425,7 @@ void RunGpu() // execute GPU if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread || g_use_deterministic_gpu_thread) { + bool reset_simd_state = false; while (fifo.bFF_GPReadEnable && fifo.CPReadWriteDistance && !AtBreakpoint() ) { if (g_use_deterministic_gpu_thread) @@ -433,11 +434,14 @@ void RunGpu() } else { - FPURoundMode::SaveSIMDState(); - FPURoundMode::LoadDefaultSIMDState(); + if (!reset_simd_state) + { + FPURoundMode::SaveSIMDState(); + FPURoundMode::LoadDefaultSIMDState(); + reset_simd_state = true; + } ReadDataFromFifo(fifo.CPReadPointer); s_video_buffer_read_ptr = OpcodeDecoder_Run(DataReader(s_video_buffer_read_ptr, s_video_buffer_write_ptr), nullptr, false); - FPURoundMode::LoadSIMDState(); } //DEBUG_LOG(COMMANDPROCESSOR, "Fifo wraps to base"); @@ -450,6 +454,11 @@ void RunGpu() fifo.CPReadWriteDistance -= 32; } CommandProcessor::SetCPStatusFromGPU(); + + if (reset_simd_state) + { + FPURoundMode::LoadSIMDState(); + } } // wake up GPU thread |
