summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-10-14 22:09:01 +0200
committerbunnei <bunneidev@gmail.com>2018-10-16 17:31:02 +0200
commit949d7832fafa33f7f553e2ca1139c1a16150984f (patch)
treef66c2a523267d54363fac4a43176b2ff765fe19a /src/video_core
parentgl_rasterizer_cache: Separate guest and host surface size managment. (diff)
downloadyuzu-949d7832fafa33f7f553e2ca1139c1a16150984f.tar
yuzu-949d7832fafa33f7f553e2ca1139c1a16150984f.tar.gz
yuzu-949d7832fafa33f7f553e2ca1139c1a16150984f.tar.bz2
yuzu-949d7832fafa33f7f553e2ca1139c1a16150984f.tar.lz
yuzu-949d7832fafa33f7f553e2ca1139c1a16150984f.tar.xz
yuzu-949d7832fafa33f7f553e2ca1139c1a16150984f.tar.zst
yuzu-949d7832fafa33f7f553e2ca1139c1a16150984f.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/rasterizer_cache.h8
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp7
2 files changed, 13 insertions, 2 deletions
diff --git a/src/video_core/rasterizer_cache.h b/src/video_core/rasterizer_cache.h
index 4a34491a9..76743a85b 100644
--- a/src/video_core/rasterizer_cache.h
+++ b/src/video_core/rasterizer_cache.h
@@ -11,6 +11,7 @@
#include "common/common_types.h"
#include "core/core.h"
+#include "core/settings.h"
#include "video_core/rasterizer_interface.h"
#include "video_core/renderer_base.h"
@@ -87,7 +88,12 @@ protected:
void Unregister(const T& object) {
auto& rasterizer = Core::System::GetInstance().Renderer().Rasterizer();
rasterizer.UpdatePagesCachedCount(object->GetAddr(), object->GetSizeInBytes(), -1);
- object->Flush();
+
+ if (Settings::values.use_accurate_framebuffers) {
+ // Only flush if use_accurate_framebuffers is enabled, as it incurs a performance hit
+ object->Flush();
+ }
+
object_cache.subtract({GetInterval(object), ObjectSet{object}});
}
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 18db07217..0485dfb7a 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -637,7 +637,12 @@ void RasterizerOpenGL::FlushAll() {}
void RasterizerOpenGL::FlushRegion(VAddr addr, u64 size) {
MICROPROFILE_SCOPE(OpenGL_CacheManagement);
- res_cache.FlushRegion(addr, size);
+
+ if (Settings::values.use_accurate_framebuffers) {
+ // Only flush if use_accurate_framebuffers is enabled, as it incurs a performance hit
+ res_cache.FlushRegion(addr, size);
+ }
+
shader_cache.FlushRegion(addr, size);
buffer_cache.FlushRegion(addr, size);
}