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
This commit is contained in:
parent
d191b256a6
commit
f5b4f6ccc4
3 changed files with 20 additions and 14 deletions
|
@ -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] &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue