summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2019-02-09 00:06:35 -0500
committerGravatar bunnei2019-03-06 21:48:57 -0500
commit3f1b4fb23ad7e689941b5a01afa15780bc50b77b (patch)
treefcc1c5b650ab8b8d7ff8a78811413ed4306e5094 /src
parentgpu: Refactor a/synchronous implementations into their own classes. (diff)
downloadyuzu-3f1b4fb23ad7e689941b5a01afa15780bc50b77b.tar.gz
yuzu-3f1b4fb23ad7e689941b5a01afa15780bc50b77b.tar.xz
yuzu-3f1b4fb23ad7e689941b5a01afa15780bc50b77b.zip
gpu: Always flush.
Diffstat (limited to 'src')
-rw-r--r--src/video_core/gpu_thread.cpp13
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp6
2 files changed, 6 insertions, 13 deletions
diff --git a/src/video_core/gpu_thread.cpp b/src/video_core/gpu_thread.cpp
index 22c4cca4d..7640da6c0 100644
--- a/src/video_core/gpu_thread.cpp
+++ b/src/video_core/gpu_thread.cpp
@@ -110,9 +110,8 @@ void ThreadManager::SwapBuffers(
110} 110}
111 111
112void ThreadManager::FlushRegion(VAddr addr, u64 size) { 112void ThreadManager::FlushRegion(VAddr addr, u64 size) {
113 if (Settings::values.use_accurate_gpu_emulation) { 113 // Block the CPU when using accurate emulation
114 PushCommand(FlushRegionCommand(addr, size), true, false); 114 PushCommand(FlushRegionCommand(addr, size), Settings::values.use_accurate_gpu_emulation, false);
115 }
116} 115}
117 116
118void ThreadManager::InvalidateRegion(VAddr addr, u64 size) { 117void ThreadManager::InvalidateRegion(VAddr addr, u64 size) {
@@ -120,11 +119,9 @@ void ThreadManager::InvalidateRegion(VAddr addr, u64 size) {
120} 119}
121 120
122void ThreadManager::FlushAndInvalidateRegion(VAddr addr, u64 size) { 121void ThreadManager::FlushAndInvalidateRegion(VAddr addr, u64 size) {
123 if (Settings::values.use_accurate_gpu_emulation) { 122 // Block the CPU when using accurate emulation
124 PushCommand(FlushAndInvalidateRegionCommand(addr, size), true, false); 123 PushCommand(FlushAndInvalidateRegionCommand(addr, size),
125 } else { 124 Settings::values.use_accurate_gpu_emulation, false);
126 InvalidateRegion(addr, size);
127 }
128} 125}
129 126
130void ThreadManager::PushCommand(CommandData&& command_data, bool wait_for_idle, bool allow_on_cpu) { 127void ThreadManager::PushCommand(CommandData&& command_data, bool wait_for_idle, bool allow_on_cpu) {
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 321d9dd3d..168288088 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -749,11 +749,7 @@ void RasterizerOpenGL::FlushAll() {}
749 749
750void RasterizerOpenGL::FlushRegion(VAddr addr, u64 size) { 750void RasterizerOpenGL::FlushRegion(VAddr addr, u64 size) {
751 MICROPROFILE_SCOPE(OpenGL_CacheManagement); 751 MICROPROFILE_SCOPE(OpenGL_CacheManagement);
752 752 res_cache.FlushRegion(addr, size);
753 if (Settings::values.use_accurate_gpu_emulation) {
754 // Only flush if use_accurate_gpu_emulation is enabled, as it incurs a performance hit
755 res_cache.FlushRegion(addr, size);
756 }
757} 753}
758 754
759void RasterizerOpenGL::InvalidateRegion(VAddr addr, u64 size) { 755void RasterizerOpenGL::InvalidateRegion(VAddr addr, u64 size) {