From 12af3900e549369e419d9a2ed98d1b0880549f2a Mon Sep 17 00:00:00 2001 From: Andy Adshead Date: Fri, 1 Feb 2019 00:53:38 +0000 Subject: [PATCH] Disable scissor before framebuffer blit --- Ryujinx.Graphics/Gal/OpenGL/OGLPipeline.cs | 23 ++++++++----------- .../Gal/OpenGL/OGLRenderTarget.cs | 1 + 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLPipeline.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLPipeline.cs index e9143c19d5..55f6da8316 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OGLPipeline.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OGLPipeline.cs @@ -278,25 +278,22 @@ namespace Ryujinx.Graphics.Gal.OpenGL { forceUpdate = false; - if (New.ScissorTestEnabled[Index] != Old.ScissorTestEnabled[Index]) + if (New.ScissorTestEnabled[Index]) { - if (New.ScissorTestEnabled[Index]) + // If there is only 1 scissor test geometry shaders are disables so the scissor test applies to all viewports + if (New.ScissorTestCount == 1) { - // If there is only 1 scissor test geometry shaders are disables so the scissor test applies to all viewports - if (New.ScissorTestCount == 1) - { - GL.Enable(EnableCap.ScissorTest); - } - else - { - GL.Enable(IndexedEnableCap.ScissorTest, Index); - } - forceUpdate = true; + GL.Enable(EnableCap.ScissorTest); } else { - GL.Disable(IndexedEnableCap.ScissorTest, Index); + GL.Enable(IndexedEnableCap.ScissorTest, Index); } + forceUpdate = true; + } + else + { + GL.Disable(IndexedEnableCap.ScissorTest, Index); } if (New.ScissorTestEnabled[Index] && diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLRenderTarget.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLRenderTarget.cs index ce5364e154..e7800d128b 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OGLRenderTarget.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OGLRenderTarget.cs @@ -366,6 +366,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL GL.Clear(ClearBufferMask.ColorBufferBit); GL.Disable(EnableCap.FramebufferSrgb); + GL.Disable(EnableCap.ScissorTest); GL.BlitFramebuffer( SrcX0,