Merge pull request #6539 from degasus/async

VideoCommon: Flush the GPU pipeline on async requests.
This commit is contained in:
Markus Wick 2018-06-21 10:16:54 +02:00 committed by GitHub
commit bf50348d9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -7,6 +7,7 @@
#include "VideoCommon/AsyncRequests.h" #include "VideoCommon/AsyncRequests.h"
#include "VideoCommon/Fifo.h" #include "VideoCommon/Fifo.h"
#include "VideoCommon/RenderBase.h" #include "VideoCommon/RenderBase.h"
#include "VideoCommon/VertexManagerBase.h"
#include "VideoCommon/VideoBackendBase.h" #include "VideoCommon/VideoBackendBase.h"
#include "VideoCommon/VideoCommon.h" #include "VideoCommon/VideoCommon.h"
@ -16,6 +17,10 @@ AsyncRequests::AsyncRequests() = default;
void AsyncRequests::PullEventsInternal() void AsyncRequests::PullEventsInternal()
{ {
// This is only called if the queue isn't empty.
// So just flush the pipeline to get accurate results.
g_vertex_manager->Flush();
std::unique_lock<std::mutex> lock(m_mutex); std::unique_lock<std::mutex> lock(m_mutex);
m_empty.Set(); m_empty.Set();