summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_rasterizer.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-07-21 20:36:32 +0200
committerbunnei <bunneidev@gmail.com>2018-07-22 03:51:06 +0200
commit4301f0b53935cfedd80ab6d8fd3873f6e7706ba2 (patch)
tree1fd69b29887775eac666b00aafbce0f553558cc6 /src/video_core/renderer_opengl/gl_rasterizer.cpp
parentgl_rasterizer_cache: Use zeta_width and zeta_height registers for depth buffer. (diff)
downloadyuzu-4301f0b53935cfedd80ab6d8fd3873f6e7706ba2.tar
yuzu-4301f0b53935cfedd80ab6d8fd3873f6e7706ba2.tar.gz
yuzu-4301f0b53935cfedd80ab6d8fd3873f6e7706ba2.tar.bz2
yuzu-4301f0b53935cfedd80ab6d8fd3873f6e7706ba2.tar.lz
yuzu-4301f0b53935cfedd80ab6d8fd3873f6e7706ba2.tar.xz
yuzu-4301f0b53935cfedd80ab6d8fd3873f6e7706ba2.tar.zst
yuzu-4301f0b53935cfedd80ab6d8fd3873f6e7706ba2.zip
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.cpp')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp24
1 files changed, 14 insertions, 10 deletions
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);
+ }
}
}