summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-02-09 06:06:35 +0100
committerbunnei <bunneidev@gmail.com>2019-03-07 03:48:57 +0100
commit3f1b4fb23ad7e689941b5a01afa15780bc50b77b (patch)
treefcc1c5b650ab8b8d7ff8a78811413ed4306e5094
parentgpu: Refactor a/synchronous implementations into their own classes. (diff)
downloadyuzu-3f1b4fb23ad7e689941b5a01afa15780bc50b77b.tar
yuzu-3f1b4fb23ad7e689941b5a01afa15780bc50b77b.tar.gz
yuzu-3f1b4fb23ad7e689941b5a01afa15780bc50b77b.tar.bz2
yuzu-3f1b4fb23ad7e689941b5a01afa15780bc50b77b.tar.lz
yuzu-3f1b4fb23ad7e689941b5a01afa15780bc50b77b.tar.xz
yuzu-3f1b4fb23ad7e689941b5a01afa15780bc50b77b.tar.zst
yuzu-3f1b4fb23ad7e689941b5a01afa15780bc50b77b.zip
-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(
}
void ThreadManager::FlushRegion(VAddr addr, u64 size) {
- if (Settings::values.use_accurate_gpu_emulation) {
- PushCommand(FlushRegionCommand(addr, size), true, false);
- }
+ // Block the CPU when using accurate emulation
+ PushCommand(FlushRegionCommand(addr, size), Settings::values.use_accurate_gpu_emulation, false);
}
void ThreadManager::InvalidateRegion(VAddr addr, u64 size) {
@@ -120,11 +119,9 @@ void ThreadManager::InvalidateRegion(VAddr addr, u64 size) {
}
void ThreadManager::FlushAndInvalidateRegion(VAddr addr, u64 size) {
- if (Settings::values.use_accurate_gpu_emulation) {
- PushCommand(FlushAndInvalidateRegionCommand(addr, size), true, false);
- } else {
- InvalidateRegion(addr, size);
- }
+ // Block the CPU when using accurate emulation
+ PushCommand(FlushAndInvalidateRegionCommand(addr, size),
+ Settings::values.use_accurate_gpu_emulation, false);
}
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() {}
void RasterizerOpenGL::FlushRegion(VAddr addr, u64 size) {
MICROPROFILE_SCOPE(OpenGL_CacheManagement);
-
- if (Settings::values.use_accurate_gpu_emulation) {
- // Only flush if use_accurate_gpu_emulation is enabled, as it incurs a performance hit
- res_cache.FlushRegion(addr, size);
- }
+ res_cache.FlushRegion(addr, size);
}
void RasterizerOpenGL::InvalidateRegion(VAddr addr, u64 size) {