aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Shader/Translation/TranslatorContext.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2023-05-31 17:17:50 -0300
committerGitHub <noreply@github.com>2023-05-31 17:17:50 -0300
commitc27e453fd342688ea2a75a973566d711b00efcbb (patch)
tree8b11f933e01cb5309fe90baa929c1ad7029ecdbd /src/Ryujinx.Graphics.Shader/Translation/TranslatorContext.cs
parent0e037d021347e802b28bd74af3459b007b48083e (diff)
Share ResourceManager vertex vertex A and B shaders (#5181)
Diffstat (limited to 'src/Ryujinx.Graphics.Shader/Translation/TranslatorContext.cs')
-rw-r--r--src/Ryujinx.Graphics.Shader/Translation/TranslatorContext.cs3
1 files changed, 3 insertions, 0 deletions
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<int>());
+ // 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);