summaryrefslogtreecommitdiffstats
path: root/src/video_core/gpu_thread.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-02-18 03:29:04 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-04-22 17:36:12 +0200
commit165ae823f522aa981129927f42e76763a9fa6006 (patch)
tree5b20ac78e3946e50aa37f76a1446a42654bf3511 /src/video_core/gpu_thread.cpp
parentFenceManager: Implement should wait. (diff)
downloadyuzu-165ae823f522aa981129927f42e76763a9fa6006.tar
yuzu-165ae823f522aa981129927f42e76763a9fa6006.tar.gz
yuzu-165ae823f522aa981129927f42e76763a9fa6006.tar.bz2
yuzu-165ae823f522aa981129927f42e76763a9fa6006.tar.lz
yuzu-165ae823f522aa981129927f42e76763a9fa6006.tar.xz
yuzu-165ae823f522aa981129927f42e76763a9fa6006.tar.zst
yuzu-165ae823f522aa981129927f42e76763a9fa6006.zip
Diffstat (limited to '')
-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 @@
#include "common/microprofile.h"
#include "core/core.h"
#include "core/frontend/emu_window.h"
+#include "core/settings.h"
#include "video_core/dma_pusher.h"
#include "video_core/gpu.h"
#include "video_core/gpu_thread.h"
@@ -80,7 +81,11 @@ void ThreadManager::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) {
}
void ThreadManager::FlushRegion(VAddr addr, u64 size) {
- PushCommand(FlushRegionCommand(addr, size));
+ if (system.Renderer().Rasterizer().MustFlushRegion(addr, size)) {
+ u64 fence = PushCommand(FlushRegionCommand(addr, size));
+ while (fence < state.signaled_fence.load(std::memory_order_relaxed)) {
+ }
+ }
}
void ThreadManager::InvalidateRegion(VAddr addr, u64 size) {