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.h | |
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.h')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.h b/src/video_core/renderer_opengl/gl_rasterizer.h index 8a891ffc7..45c988816 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.h +++ b/src/video_core/renderer_opengl/gl_rasterizer.h @@ -94,6 +94,23 @@ private: float max_anisotropic = 1.0f; }; + struct FramebufferConfigState { + bool using_color_fb{}; + bool using_depth_fb{}; + bool preserve_contents{}; + std::optional<std::size_t> single_color_target; + + bool operator==(const FramebufferConfigState& rhs) const { + return std::tie(using_color_fb, using_depth_fb, preserve_contents, + single_color_target) == std::tie(rhs.using_color_fb, rhs.using_depth_fb, + rhs.preserve_contents, + rhs.single_color_target); + } + bool operator!=(const FramebufferConfigState& rhs) const { + return !operator==(rhs); + } + }; + /** * Configures the color and depth framebuffer states. * @param use_color_fb If true, configure color framebuffers. @@ -197,6 +214,7 @@ private: vertex_array_cache; std::map<FramebufferCacheKey, OGLFramebuffer> framebuffer_cache; + FramebufferConfigState current_framebuffer_config_state; std::array<SamplerInfo, Tegra::Engines::Maxwell3D::Regs::NumTextureSamplers> texture_samplers; |