mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 15:55:31 +01:00
Fifo: only touch the SIMD state once in the single core loop
This commit is contained in:
parent
d2c62b1744
commit
b1ffd32f5f
@ -425,6 +425,7 @@ void RunGpu()
|
|||||||
// execute GPU
|
// execute GPU
|
||||||
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread || g_use_deterministic_gpu_thread)
|
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread || g_use_deterministic_gpu_thread)
|
||||||
{
|
{
|
||||||
|
bool reset_simd_state = false;
|
||||||
while (fifo.bFF_GPReadEnable && fifo.CPReadWriteDistance && !AtBreakpoint() )
|
while (fifo.bFF_GPReadEnable && fifo.CPReadWriteDistance && !AtBreakpoint() )
|
||||||
{
|
{
|
||||||
if (g_use_deterministic_gpu_thread)
|
if (g_use_deterministic_gpu_thread)
|
||||||
@ -433,11 +434,14 @@ void RunGpu()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FPURoundMode::SaveSIMDState();
|
if (!reset_simd_state)
|
||||||
FPURoundMode::LoadDefaultSIMDState();
|
{
|
||||||
|
FPURoundMode::SaveSIMDState();
|
||||||
|
FPURoundMode::LoadDefaultSIMDState();
|
||||||
|
reset_simd_state = true;
|
||||||
|
}
|
||||||
ReadDataFromFifo(fifo.CPReadPointer);
|
ReadDataFromFifo(fifo.CPReadPointer);
|
||||||
s_video_buffer_read_ptr = OpcodeDecoder_Run(DataReader(s_video_buffer_read_ptr, s_video_buffer_write_ptr), nullptr, false);
|
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");
|
//DEBUG_LOG(COMMANDPROCESSOR, "Fifo wraps to base");
|
||||||
@ -450,6 +454,11 @@ void RunGpu()
|
|||||||
fifo.CPReadWriteDistance -= 32;
|
fifo.CPReadWriteDistance -= 32;
|
||||||
}
|
}
|
||||||
CommandProcessor::SetCPStatusFromGPU();
|
CommandProcessor::SetCPStatusFromGPU();
|
||||||
|
|
||||||
|
if (reset_simd_state)
|
||||||
|
{
|
||||||
|
FPURoundMode::LoadSIMDState();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// wake up GPU thread
|
// wake up GPU thread
|
||||||
|
Loading…
x
Reference in New Issue
Block a user