From caf049ed15f1c22d55aacfab79019538b2587e11 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Tue, 26 Jan 2021 18:44:07 -0300 Subject: Avoid some redundant GL calls (#1958) --- Ryujinx.Graphics.Gpu/Engine/Methods.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Ryujinx.Graphics.Gpu/Engine/Methods.cs') diff --git a/Ryujinx.Graphics.Gpu/Engine/Methods.cs b/Ryujinx.Graphics.Gpu/Engine/Methods.cs index d6bd5110..a41fd541 100644 --- a/Ryujinx.Graphics.Gpu/Engine/Methods.cs +++ b/Ryujinx.Graphics.Gpu/Engine/Methods.cs @@ -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); } } } -- cgit v1.2.3