diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-01-07 06:22:00 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-01-07 20:23:23 +0100 |
commit | 19cf9952252fc0f9c31037676b56b6d7716ffd2f (patch) | |
tree | fef129c05d10e9113450aa486518ffea1d4cc878 /src/video_core/renderer_opengl/gl_rasterizer.cpp | |
parent | gl_rasterizer_cache: Use dirty flags for the depth buffer (diff) | |
download | yuzu-19cf9952252fc0f9c31037676b56b6d7716ffd2f.tar yuzu-19cf9952252fc0f9c31037676b56b6d7716ffd2f.tar.gz yuzu-19cf9952252fc0f9c31037676b56b6d7716ffd2f.tar.bz2 yuzu-19cf9952252fc0f9c31037676b56b6d7716ffd2f.tar.lz yuzu-19cf9952252fc0f9c31037676b56b6d7716ffd2f.tar.xz yuzu-19cf9952252fc0f9c31037676b56b6d7716ffd2f.tar.zst yuzu-19cf9952252fc0f9c31037676b56b6d7716ffd2f.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 37f01d4f7..aa8dab0c2 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -488,7 +488,19 @@ void RasterizerOpenGL::ConfigureFramebuffers(OpenGLState& current_state, bool us bool using_depth_fb, bool preserve_contents, std::optional<std::size_t> single_color_target) { MICROPROFILE_SCOPE(OpenGL_Framebuffer); - const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs; + const auto& gpu = Core::System::GetInstance().GPU().Maxwell3D(); + const auto& regs = gpu.regs; + + const FramebufferConfigState fb_config_state{using_color_fb, using_depth_fb, preserve_contents, + single_color_target}; + if (fb_config_state == current_framebuffer_config_state && gpu.dirty_flags.color_buffer == 0 && + !gpu.dirty_flags.zeta_buffer) { + // Only skip if the previous ConfigureFramebuffers call was from the same kind (multiple or + // single color targets). This is done because the guest registers may not change but the + // host framebuffer may contain different attachments + return; + } + current_framebuffer_config_state = fb_config_state; Surface depth_surface; if (using_depth_fb) { |