mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 04:08:55 +00:00
VideoCommon: use a new async event system for efb access
This commit is contained in:
parent
860c889454
commit
bc248f8941
10 changed files with 201 additions and 58 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue