From 51605fafc04e7c34d354bd2dd8aeffc5d912f6a9 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Thu, 26 Jul 2018 13:49:29 -0300 Subject: [PATCH] Avoid calling buffer binding when shader didn't change (#295) --- Ryujinx.Graphics/Gal/OpenGL/OGLShader.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLShader.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLShader.cs index 37213d8e..3f3f23b8 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OGLShader.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OGLShader.cs @@ -257,7 +257,10 @@ namespace Ryujinx.Graphics.Gal.OpenGL GL.UseProgram(Handle); - BindUniformBuffers(Handle); + if (CurrentProgramHandle != Handle) + { + BindUniformBuffers(Handle); + } CurrentProgramHandle = Handle; }