diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2021-01-26 18:44:07 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-27 08:44:07 +1100 |
| commit | caf049ed15f1c22d55aacfab79019538b2587e11 (patch) | |
| tree | 33bf4b410a901fd8de49b79b73161976453e4837 /Ryujinx.Graphics.Gpu/Engine/Methods.cs | |
| parent | d6bd0470fb0507cc9c6069e577ae2814e614265b (diff) | |
Avoid some redundant GL calls (#1958)
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Engine/Methods.cs')
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Engine/Methods.cs | 8 |
1 files changed, 5 insertions, 3 deletions
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); } } } |
