diff options
author | bunnei <bunneidev@gmail.com> | 2019-01-20 20:06:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-20 20:06:26 +0100 |
commit | 197d0d9d2408e608909b32dfa057791215d42c77 (patch) | |
tree | 5b37be4dc4e4e1bac75529e2b238b1b6d0ecde47 /src/video_core/renderer_opengl/gl_rasterizer.cpp | |
parent | Merge pull request #2002 from ReinUsesLisp/dsa-vao-buffer (diff) | |
parent | gl_rasterizer: Skip framebuffer configuration if rendertargets have not been changed (diff) | |
download | yuzu-197d0d9d2408e608909b32dfa057791215d42c77.tar yuzu-197d0d9d2408e608909b32dfa057791215d42c77.tar.gz yuzu-197d0d9d2408e608909b32dfa057791215d42c77.tar.bz2 yuzu-197d0d9d2408e608909b32dfa057791215d42c77.tar.lz yuzu-197d0d9d2408e608909b32dfa057791215d42c77.tar.xz yuzu-197d0d9d2408e608909b32dfa057791215d42c77.tar.zst yuzu-197d0d9d2408e608909b32dfa057791215d42c77.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 0c2a3265b..2bf086902 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -490,7 +490,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) { |