Use maximum shared memory size supported by hardware

This commit is contained in:
gdkchan 2019-12-08 23:55:22 -03:00 committed by Thog
parent dd6be05b96
commit 46a6580c8b
6 changed files with 28 additions and 15 deletions

View file

@ -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();
}