diff options
author | gdkchan <gab.dark.100@gmail.com> | 2020-03-29 00:02:58 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-29 14:02:58 +1100 |
commit | ab4867505ec0d3f5a9ec4f042ccd6f7890e3632e (patch) | |
tree | b3956fc821e0dcb8c8c3edc9dcae5eadf83ce29d /Ryujinx.Graphics.OpenGL/TextureCopy.cs | |
parent | 06bf25521ff3ab2ad82eb49cde2bb6f90324caa2 (diff) |
Implement GPU scissors (#1058)
* Implement GPU scissors
* Remove unused using
* Add missing changes for Clear
Diffstat (limited to 'Ryujinx.Graphics.OpenGL/TextureCopy.cs')
-rw-r--r-- | Ryujinx.Graphics.OpenGL/TextureCopy.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.OpenGL/TextureCopy.cs b/Ryujinx.Graphics.OpenGL/TextureCopy.cs index 27f1fd56..ac9459d4 100644 --- a/Ryujinx.Graphics.OpenGL/TextureCopy.cs +++ b/Ryujinx.Graphics.OpenGL/TextureCopy.cs @@ -6,9 +6,16 @@ namespace Ryujinx.Graphics.OpenGL { class TextureCopy : IDisposable { + private readonly Renderer _renderer; + private int _srcFramebuffer; private int _dstFramebuffer; + public TextureCopy(Renderer renderer) + { + _renderer = renderer; + } + public void Copy( TextureView src, TextureView dst, @@ -34,6 +41,8 @@ namespace Ryujinx.Graphics.OpenGL GL.ReadBuffer(ReadBufferMode.ColorAttachment0); GL.DrawBuffer(DrawBufferMode.ColorAttachment0); + GL.Disable(EnableCap.ScissorTest); + GL.BlitFramebuffer( srcRegion.X1, srcRegion.Y1, @@ -48,6 +57,8 @@ namespace Ryujinx.Graphics.OpenGL GL.BindFramebuffer(FramebufferTarget.ReadFramebuffer, oldReadFramebufferHandle); GL.BindFramebuffer(FramebufferTarget.DrawFramebuffer, oldDrawFramebufferHandle); + + ((Pipeline)_renderer.Pipeline).RestoreScissorEnable(); } private static void Attach(FramebufferTarget target, Format format, int handle) |