From 4301f0b53935cfedd80ab6d8fd3873f6e7706ba2 Mon Sep 17 00:00:00 2001 From: bunnei Date: Sat, 21 Jul 2018 14:36:32 -0400 Subject: gl_rasterizer_cache: Use GPUVAddr as cache key, not parameter set. --- src/video_core/renderer_opengl/gl_rasterizer.cpp | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'src/video_core/renderer_opengl/gl_rasterizer.cpp') diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index c4ce57f1c..56d9c575b 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -413,11 +413,13 @@ void RasterizerOpenGL::Clear() { glClear(clear_mask); // Mark framebuffer surfaces as dirty - if (dirty_color_surface != nullptr) { - res_cache.MarkSurfaceAsDirty(dirty_color_surface); - } - if (dirty_depth_surface != nullptr) { - res_cache.MarkSurfaceAsDirty(dirty_depth_surface); + if (Settings::values.use_accurate_framebuffers) { + if (dirty_color_surface != nullptr) { + res_cache.FlushSurface(dirty_color_surface); + } + if (dirty_depth_surface != nullptr) { + res_cache.FlushSurface(dirty_depth_surface); + } } } @@ -520,11 +522,13 @@ void RasterizerOpenGL::DrawArrays() { state.Apply(); // Mark framebuffer surfaces as dirty - if (dirty_color_surface != nullptr) { - res_cache.MarkSurfaceAsDirty(dirty_color_surface); - } - if (dirty_depth_surface != nullptr) { - res_cache.MarkSurfaceAsDirty(dirty_depth_surface); + if (Settings::values.use_accurate_framebuffers) { + if (dirty_color_surface != nullptr) { + res_cache.FlushSurface(dirty_color_surface); + } + if (dirty_depth_surface != nullptr) { + res_cache.FlushSurface(dirty_depth_surface); + } } } -- cgit v1.2.3