summaryrefslogtreecommitdiff
path: root/src/video_core/gpu_thread.cpp
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2020-02-17 22:29:04 -0400
committerGravatar Fernando Sahmkow2020-04-22 11:36:12 -0400
commit165ae823f522aa981129927f42e76763a9fa6006 (patch)
tree5b20ac78e3946e50aa37f76a1446a42654bf3511 /src/video_core/gpu_thread.cpp
parentFenceManager: Implement should wait. (diff)
downloadyuzu-165ae823f522aa981129927f42e76763a9fa6006.tar.gz
yuzu-165ae823f522aa981129927f42e76763a9fa6006.tar.xz
yuzu-165ae823f522aa981129927f42e76763a9fa6006.zip
ThreadManager: Sync async reads on accurate gpu.
Diffstat (limited to 'src/video_core/gpu_thread.cpp')
-rw-r--r--src/video_core/gpu_thread.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/video_core/gpu_thread.cpp b/src/video_core/gpu_thread.cpp
index 251a9d911..672f8d2fa 100644
--- a/src/video_core/gpu_thread.cpp
+++ b/src/video_core/gpu_thread.cpp
@@ -6,6 +6,7 @@
6#include "common/microprofile.h" 6#include "common/microprofile.h"
7#include "core/core.h" 7#include "core/core.h"
8#include "core/frontend/emu_window.h" 8#include "core/frontend/emu_window.h"
9#include "core/settings.h"
9#include "video_core/dma_pusher.h" 10#include "video_core/dma_pusher.h"
10#include "video_core/gpu.h" 11#include "video_core/gpu.h"
11#include "video_core/gpu_thread.h" 12#include "video_core/gpu_thread.h"
@@ -80,7 +81,11 @@ void ThreadManager::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) {
80} 81}
81 82
82void ThreadManager::FlushRegion(VAddr addr, u64 size) { 83void ThreadManager::FlushRegion(VAddr addr, u64 size) {
83 PushCommand(FlushRegionCommand(addr, size)); 84 if (system.Renderer().Rasterizer().MustFlushRegion(addr, size)) {
85 u64 fence = PushCommand(FlushRegionCommand(addr, size));
86 while (fence < state.signaled_fence.load(std::memory_order_relaxed)) {
87 }
88 }
84} 89}
85 90
86void ThreadManager::InvalidateRegion(VAddr addr, u64 size) { 91void ThreadManager::InvalidateRegion(VAddr addr, u64 size) {