diff options
| -rw-r--r-- | src/video_core/gpu_thread.cpp | 13 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 6 |
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 | ||
| 112 | void ThreadManager::FlushRegion(VAddr addr, u64 size) { | 112 | void 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 | ||
| 118 | void ThreadManager::InvalidateRegion(VAddr addr, u64 size) { | 117 | void ThreadManager::InvalidateRegion(VAddr addr, u64 size) { |
| @@ -120,11 +119,9 @@ void ThreadManager::InvalidateRegion(VAddr addr, u64 size) { | |||
| 120 | } | 119 | } |
| 121 | 120 | ||
| 122 | void ThreadManager::FlushAndInvalidateRegion(VAddr addr, u64 size) { | 121 | void 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 | ||
| 130 | void ThreadManager::PushCommand(CommandData&& command_data, bool wait_for_idle, bool allow_on_cpu) { | 127 | void 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 | ||
| 750 | void RasterizerOpenGL::FlushRegion(VAddr addr, u64 size) { | 750 | void 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 | ||
| 759 | void RasterizerOpenGL::InvalidateRegion(VAddr addr, u64 size) { | 755 | void RasterizerOpenGL::InvalidateRegion(VAddr addr, u64 size) { |