From f679f25e084b7196f1eabd6a0e9ea60bca679a75 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Fri, 12 May 2023 21:59:46 -0300 Subject: [PATCH] Set OpenGL PixelPackBuffer to 0 when done (#4921) --- src/Ryujinx.Graphics.OpenGL/Image/TextureView.cs | 2 ++ src/Ryujinx.Graphics.OpenGL/Window.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Ryujinx.Graphics.OpenGL/Image/TextureView.cs b/src/Ryujinx.Graphics.OpenGL/Image/TextureView.cs index f24a58fc..90a2936d 100644 --- a/src/Ryujinx.Graphics.OpenGL/Image/TextureView.cs +++ b/src/Ryujinx.Graphics.OpenGL/Image/TextureView.cs @@ -306,6 +306,8 @@ namespace Ryujinx.Graphics.OpenGL.Image int offset = WriteToPbo2D(range.Offset, layer, level); Debug.Assert(offset == 0); + + GL.BindBuffer(BufferTarget.PixelPackBuffer, 0); } public void WriteToPbo(int offset, bool forceBgra) diff --git a/src/Ryujinx.Graphics.OpenGL/Window.cs b/src/Ryujinx.Graphics.OpenGL/Window.cs index b37ec375..cc9836e0 100644 --- a/src/Ryujinx.Graphics.OpenGL/Window.cs +++ b/src/Ryujinx.Graphics.OpenGL/Window.cs @@ -93,7 +93,7 @@ namespace Ryujinx.Graphics.OpenGL oldView.Dispose(); } } - + GL.BindFramebuffer(FramebufferTarget.DrawFramebuffer, drawFramebuffer); GL.BindFramebuffer(FramebufferTarget.ReadFramebuffer, readFramebuffer);