diff options
| author | 2020-02-17 22:29:04 -0400 | |
|---|---|---|
| committer | 2020-04-22 11:36:12 -0400 | |
| commit | 165ae823f522aa981129927f42e76763a9fa6006 (patch) | |
| tree | 5b20ac78e3946e50aa37f76a1446a42654bf3511 /src/video_core/gpu_thread.cpp | |
| parent | FenceManager: Implement should wait. (diff) | |
| download | yuzu-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.cpp | 7 |
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 | ||
| 82 | void ThreadManager::FlushRegion(VAddr addr, u64 size) { | 83 | void 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 | ||
| 86 | void ThreadManager::InvalidateRegion(VAddr addr, u64 size) { | 91 | void ThreadManager::InvalidateRegion(VAddr addr, u64 size) { |