aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/CodeGen
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2019-12-09 01:00:56 -0300
committerThog <thog@protonmail.com>2020-01-09 02:13:00 +0100
commit66d91cbc6cdd0310c567eb9f979458bd80ea0269 (patch)
tree3ca6e149718a30c363801c360ca58fc9a4b53613 /Ryujinx.Graphics.Shader/CodeGen
parent0d9672f3aefde019de4023a872bb655960ef3e71 (diff)
Use dispatch params shared memory size when available
Diffstat (limited to 'Ryujinx.Graphics.Shader/CodeGen')
-rw-r--r--Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs11
1 files changed, 10 insertions, 1 deletions
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();