diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-12-26 05:01:41 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-02-28 20:55:23 +0100 |
commit | 04d11341911a0c9ed3558fc6084d305ae262399a (patch) | |
tree | 914f6193fce38f2fd52dce46442fb21254e5ea57 /src/video_core/renderer_opengl/gl_rasterizer.cpp | |
parent | gl_state: Remove VAO cache and tracking (diff) | |
download | yuzu-04d11341911a0c9ed3558fc6084d305ae262399a.tar yuzu-04d11341911a0c9ed3558fc6084d305ae262399a.tar.gz yuzu-04d11341911a0c9ed3558fc6084d305ae262399a.tar.bz2 yuzu-04d11341911a0c9ed3558fc6084d305ae262399a.tar.lz yuzu-04d11341911a0c9ed3558fc6084d305ae262399a.tar.xz yuzu-04d11341911a0c9ed3558fc6084d305ae262399a.tar.zst yuzu-04d11341911a0c9ed3558fc6084d305ae262399a.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 9658d379c..f5aa84a16 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -332,7 +332,6 @@ void RasterizerOpenGL::ConfigureFramebuffers() { View depth_surface = texture_cache.GetDepthBufferSurface(true); const auto& regs = gpu.regs; - state.framebuffer_srgb.enabled = regs.framebuffer_srgb != 0; UNIMPLEMENTED_IF(regs.rt_separate_frag_data == 0); // Bind the framebuffer surfaces @@ -455,6 +454,9 @@ void RasterizerOpenGL::Clear() { } } + // TODO: Signal state tracker about these changes + SyncFramebufferSRGB(); + if (!use_color && !use_depth && !use_stencil) { // No color surface nor depth/stencil surface are enabled return; @@ -511,6 +513,7 @@ void RasterizerOpenGL::Draw(bool is_indexed, bool is_instanced) { SyncPointState(); SyncPolygonOffset(); SyncAlphaTest(); + SyncFramebufferSRGB(); buffer_cache.Acquire(); @@ -1198,4 +1201,9 @@ void RasterizerOpenGL::SyncAlphaTest() { } } +void RasterizerOpenGL::SyncFramebufferSRGB() { + const auto& regs = system.GPU().Maxwell3D().regs; + oglEnable(GL_FRAMEBUFFER_SRGB, regs.framebuffer_srgb); +} + } // namespace OpenGL |