From 66d91cbc6cdd0310c567eb9f979458bd80ea0269 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Mon, 9 Dec 2019 01:00:56 -0300 Subject: Use dispatch params shared memory size when available --- Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Ryujinx.Graphics.Shader/CodeGen') diff --git a/Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs b/Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs index 1c3cf245..b96aa1ae 100644 --- a/Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs +++ b/Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs @@ -75,7 +75,16 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl if (context.Config.Stage == ShaderStage.Compute) { - string size = NumberFormatter.FormatInt(context.Config.Capabilities.MaximumComputeSharedMemorySize / 4); + string size; + + if ((context.Config.Flags & TranslationFlags.Unspecialized) != 0) + { + size = DefineNames.SharedMemorySize; + } + else + { + size = NumberFormatter.FormatInt(context.Config.Capabilities.MaximumComputeSharedMemorySize / 4); + } context.AppendLine($"shared uint {DefaultNames.SharedMemoryName}[{size}];"); context.AppendLine(); -- cgit v1.2.3