aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics/Gal/OpenGL/OGLPipeline.cs
diff options
context:
space:
mode:
authorBaronKiko <BaronKiko@users.noreply.github.com>2019-02-01 01:37:07 +0000
committergdkchan <gab.dark.100@gmail.com>2019-01-31 22:37:07 -0300
commitf5b4f6ccc4815cfac1fa3c103d8941a26d152d8a (patch)
treed36fec808ddc5bab09466f79b1b172a9946d61d4 /Ryujinx.Graphics/Gal/OpenGL/OGLPipeline.cs
parentd191b256a6a1ce457e8bc33826fe4142e5d3de3f (diff)
Scissor test fix (#563)
* Handle negative viewport coordinates * Disable scissor before framebuffer blit * Comment to explain scissor disable will be reenabled if needed * Comma and spelling mistake
Diffstat (limited to 'Ryujinx.Graphics/Gal/OpenGL/OGLPipeline.cs')
-rw-r--r--Ryujinx.Graphics/Gal/OpenGL/OGLPipeline.cs23
1 files changed, 10 insertions, 13 deletions
diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLPipeline.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLPipeline.cs
index e9143c19..deccd890 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 disabled 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] &&