VideoBackendBase: Do save state logic on the GPU thread

This commit is contained in:
Stenzek
2019-06-29 18:35:12 +10:00
parent a25a4e0708
commit b26bb0605b
7 changed files with 40 additions and 30 deletions

View File

@ -299,14 +299,15 @@ void RunGpuLoop()
[] {
const SConfig& param = SConfig::GetInstance();
// Run events from the CPU thread.
AsyncRequests::GetInstance()->PullEvents();
// Do nothing while paused
if (!s_emu_running_state.IsSet())
return;
if (s_use_deterministic_gpu_thread)
{
AsyncRequests::GetInstance()->PullEvents();
// All the fifo/CP stuff is on the CPU. We just need to run the opcode decoder.
u8* seen_ptr = s_video_buffer_seen_ptr;
u8* write_ptr = s_video_buffer_write_ptr;
@ -321,9 +322,6 @@ void RunGpuLoop()
else
{
CommandProcessor::SCPFifoStruct& fifo = CommandProcessor::fifo;
AsyncRequests::GetInstance()->PullEvents();
CommandProcessor::SetCPStatusFromGPU();
// check if we are able to run this buffer