diff options
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.h')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.h b/src/video_core/renderer_opengl/gl_rasterizer.h index b7c8cf843..c406142e4 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.h +++ b/src/video_core/renderer_opengl/gl_rasterizer.h @@ -7,6 +7,7 @@ #include <array> #include <cstddef> #include <memory> +#include <utility> #include <vector> #include <glad/glad.h> #include "common/common_types.h" @@ -28,6 +29,7 @@ public: ~RasterizerOpenGL() override; void DrawArrays() override; + void Clear() override; void NotifyMaxwellRegisterChanged(u32 method) override; void FlushAll() override; void FlushRegion(Tegra::GPUVAddr addr, u64 size) override; @@ -54,6 +56,11 @@ public: OGLShader shader; }; + /// Maximum supported size that a constbuffer can have in bytes. + static constexpr size_t MaxConstbufferSize = 0x10000; + static_assert(MaxConstbufferSize % sizeof(GLvec4) == 0, + "The maximum size of a constbuffer must be a multiple of the size of GLvec4"); + private: class SamplerInfo { public: @@ -76,6 +83,10 @@ private: u32 border_color_a; }; + /// Configures the color and depth framebuffer states and returns the dirty <Color, Depth> + /// surfaces if writing was enabled. + std::pair<Surface, Surface> ConfigureFramebuffers(bool using_color_fb, bool using_depth_fb); + /// Binds the framebuffer color and depth surface void BindFramebufferSurfaces(const Surface& color_surface, const Surface& depth_surface, bool has_stencil); @@ -104,7 +115,7 @@ private: u32 current_unit, const std::vector<GLShader::SamplerEntry>& entries); /// Syncs the viewport to match the guest state - void SyncViewport(const MathUtil::Rectangle<u32>& surfaces_rect, u16 res_scale); + void SyncViewport(const MathUtil::Rectangle<u32>& surfaces_rect); /// Syncs the clip enabled status to match the guest state void SyncClipEnabled(); @@ -121,6 +132,9 @@ private: /// Syncs the depth offset to match the guest state void SyncDepthOffset(); + /// Syncs the depth test state to match the guest state + void SyncDepthTestState(); + /// Syncs the blend state to match the guest state void SyncBlendState(); |