Avoid some redundant GL calls (#1958)
This commit is contained in:
parent
d6bd0470fb
commit
caf049ed15
6 changed files with 115 additions and 51 deletions
|
@ -436,8 +436,6 @@ namespace Ryujinx.Graphics.Gpu.Engine
|
|||
|
||||
bool enable = scissor.Enable && (scissor.X1 != 0 || scissor.Y1 != 0 || scissor.X2 != 0xffff || scissor.Y2 != 0xffff);
|
||||
|
||||
_context.Renderer.Pipeline.SetScissorEnable(index, enable);
|
||||
|
||||
if (enable)
|
||||
{
|
||||
int x = scissor.X1;
|
||||
|
@ -454,7 +452,11 @@ namespace Ryujinx.Graphics.Gpu.Engine
|
|||
height = (int)Math.Ceiling(height * scale);
|
||||
}
|
||||
|
||||
_context.Renderer.Pipeline.SetScissor(index, x, y, width, height);
|
||||
_context.Renderer.Pipeline.SetScissor(index, true, x, y, width, height);
|
||||
}
|
||||
else
|
||||
{
|
||||
_context.Renderer.Pipeline.SetScissor(index, false, 0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue