From 0d9672f3aefde019de4023a872bb655960ef3e71 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Sun, 8 Dec 2019 23:55:22 -0300 Subject: Use maximum shared memory size supported by hardware --- Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs | 4 +++- 1 file changed, 3 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 5a84ff49..1c3cf245 100644 --- a/Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs +++ b/Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs @@ -75,7 +75,9 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl if (context.Config.Stage == ShaderStage.Compute) { - context.AppendLine($"shared uint {DefaultNames.SharedMemoryName}[0x100];"); + string size = NumberFormatter.FormatInt(context.Config.Capabilities.MaximumComputeSharedMemorySize / 4); + + context.AppendLine($"shared uint {DefaultNames.SharedMemoryName}[{size}];"); context.AppendLine(); } -- cgit v1.2.3