aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.OpenGL/Window.cs
diff options
context:
space:
mode:
authorriperiperi <rhy3756547@hotmail.com>2020-05-24 14:44:12 +0100
committerGitHub <noreply@github.com>2020-05-24 15:44:12 +0200
commitd941f4c07099bd365f6b0e8efb1cd727ae422009 (patch)
tree83497457216b85749f7366ab9c1a1046d8d1e5cc /Ryujinx.Graphics.OpenGL/Window.cs
parent6416bc193843702fc9d77be24e7b5b86c2b5e68c (diff)
Remember bound framebuffer to avoid glGetInteger use. (#1273)
glGetInteger seems to sync with GPU which is less than ideal, and slowing down texture copies.
Diffstat (limited to 'Ryujinx.Graphics.OpenGL/Window.cs')
-rw-r--r--Ryujinx.Graphics.OpenGL/Window.cs3
1 files changed, 1 insertions, 2 deletions
diff --git a/Ryujinx.Graphics.OpenGL/Window.cs b/Ryujinx.Graphics.OpenGL/Window.cs
index 6e7ddbac..6da9e715 100644
--- a/Ryujinx.Graphics.OpenGL/Window.cs
+++ b/Ryujinx.Graphics.OpenGL/Window.cs
@@ -44,8 +44,7 @@ namespace Ryujinx.Graphics.OpenGL
{
bool[] oldFramebufferColorWritemask = new bool[4];
- int oldReadFramebufferHandle = GL.GetInteger(GetPName.ReadFramebufferBinding);
- int oldDrawFramebufferHandle = GL.GetInteger(GetPName.DrawFramebufferBinding);
+ (int oldDrawFramebufferHandle, int oldReadFramebufferHandle) = ((Pipeline)_renderer.Pipeline).GetBoundFramebuffers();
GL.GetBoolean(GetIndexedPName.ColorWritemask, drawFramebuffer, oldFramebufferColorWritemask);