From c27e453fd342688ea2a75a973566d711b00efcbb Mon Sep 17 00:00:00 2001 From: gdkchan Date: Wed, 31 May 2023 17:17:50 -0300 Subject: Share ResourceManager vertex vertex A and B shaders (#5181) --- src/Ryujinx.Graphics.Shader/Translation/TranslatorContext.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Ryujinx.Graphics.Shader/Translation/TranslatorContext.cs') diff --git a/src/Ryujinx.Graphics.Shader/Translation/TranslatorContext.cs b/src/Ryujinx.Graphics.Shader/Translation/TranslatorContext.cs index 4b4cc8d9..9647b13f 100644 --- a/src/Ryujinx.Graphics.Shader/Translation/TranslatorContext.cs +++ b/src/Ryujinx.Graphics.Shader/Translation/TranslatorContext.cs @@ -155,6 +155,9 @@ namespace Ryujinx.Graphics.Shader.Translation { other._config.MergeOutputUserAttributes(_config.UsedOutputAttributes, Enumerable.Empty()); + // We need to share the resource manager since both shaders accesses the same constant buffers. + other._config.ResourceManager = _config.ResourceManager; + FunctionCode[] otherCode = EmitShader(other._program, other._config, initializeOutputs: true, out int aStart); code = Combine(otherCode, code, aStart); -- cgit v1.2.3