Apply to all viewports when geometry shaders are disabled.

This commit is contained in:
Andy Adshead 2019-01-05 02:20:24 +00:00
parent a3f2e2c760
commit cfec381073

View file

@ -298,8 +298,17 @@ namespace Ryujinx.Graphics.Gal.OpenGL
New.ScissorTestHeight[Index] != Old.ScissorTestHeight[Index] ||
forceUpdate)) // Force update intentionally last to reduce if comparisons
{
GL.ScissorIndexed(Index, New.ScissorTestX[Index], New.ScissorTestY[Index],
New.ScissorTestWidth[Index], New.ScissorTestHeight[Index]);
// If there is only 1 scissor test geometry shaders are disables so the scissor test applies to all viewports
if (New.ScissorTestCount == 1)
{
GL.Scissor(New.ScissorTestX[Index], New.ScissorTestY[Index],
New.ScissorTestWidth[Index], New.ScissorTestHeight[Index]);
}
else
{
GL.ScissorIndexed(Index, New.ScissorTestX[Index], New.ScissorTestY[Index],
New.ScissorTestWidth[Index], New.ScissorTestHeight[Index]);
}
}
}