Apply to all viewports when geometry shaders are disabled.

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

View file

@ -297,11 +297,20 @@ namespace Ryujinx.Graphics.Gal.OpenGL
New.ScissorTestWidth[Index] != Old.ScissorTestWidth[Index] || New.ScissorTestWidth[Index] != Old.ScissorTestWidth[Index] ||
New.ScissorTestHeight[Index] != Old.ScissorTestHeight[Index] || New.ScissorTestHeight[Index] != Old.ScissorTestHeight[Index] ||
forceUpdate)) // Force update intentionally last to reduce if comparisons forceUpdate)) // Force update intentionally last to reduce if comparisons
{
// 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], GL.ScissorIndexed(Index, New.ScissorTestX[Index], New.ScissorTestY[Index],
New.ScissorTestWidth[Index], New.ScissorTestHeight[Index]); New.ScissorTestWidth[Index], New.ScissorTestHeight[Index]);
} }
} }
}
if (New.BlendIndependent) if (New.BlendIndependent)