mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
VideoCommon: use a new async event system for efb access
This commit is contained in:
@ -15,6 +15,7 @@
|
||||
#include "Core/NetPlayProto.h"
|
||||
#include "Core/HW/Memmap.h"
|
||||
|
||||
#include "VideoCommon/AsyncRequests.h"
|
||||
#include "VideoCommon/CommandProcessor.h"
|
||||
#include "VideoCommon/CPMemory.h"
|
||||
#include "VideoCommon/DataReader.h"
|
||||
@ -282,11 +283,14 @@ void RunGpuLoop()
|
||||
// This allows a system that we are maxing out in dual core mode to do other things
|
||||
bool yield_cpu = cpu_info.num_cores <= 2;
|
||||
|
||||
AsyncRequests::GetInstance()->SetEnable(true);
|
||||
|
||||
while (GpuRunningState)
|
||||
{
|
||||
g_video_backend->PeekMessages();
|
||||
|
||||
VideoFifo_CheckAsyncRequest();
|
||||
AsyncRequests::GetInstance()->PullEvents();
|
||||
if (g_use_deterministic_gpu_thread)
|
||||
{
|
||||
// All the fifo/CP stuff is on the CPU. We just need to run the opcode decoder.
|
||||
@ -349,6 +353,7 @@ void RunGpuLoop()
|
||||
// If we don't, s_swapRequested or s_efbAccessRequested won't be set to false
|
||||
// leading the CPU thread to wait in Video_BeginField or Video_AccessEFB thus slowing things down.
|
||||
VideoFifo_CheckAsyncRequest();
|
||||
AsyncRequests::GetInstance()->PullEvents();
|
||||
CommandProcessor::isPossibleWaitingSetDrawDone = false;
|
||||
}
|
||||
|
||||
@ -377,6 +382,7 @@ void RunGpuLoop()
|
||||
}
|
||||
// wake up SyncGPU if we were interrupted
|
||||
s_video_buffer_cond.notify_all();
|
||||
AsyncRequests::GetInstance()->SetEnable(false);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user