diff options
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.h')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.h b/src/video_core/renderer_opengl/gl_rasterizer.h index a53edee6d..21c51f874 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.h +++ b/src/video_core/renderer_opengl/gl_rasterizer.h @@ -99,6 +99,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. @@ -203,6 +220,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; @@ -215,8 +233,10 @@ private: std::size_t CalculateIndexBufferSize() const; - void SetupVertexFormat(); - void SetupVertexBuffer(); + /// Updates and returns a vertex array object representing current vertex format + GLuint SetupVertexFormat(); + + void SetupVertexBuffer(GLuint vao); DrawParameters SetupDraw(); |