aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/CodeGen
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2019-12-08 23:55:22 -0300
committerThog <thog@protonmail.com>2020-01-09 02:13:00 +0100
commit0d9672f3aefde019de4023a872bb655960ef3e71 (patch)
treea2d1362c00ac0f0137dfb35e0128af5537ae0296 /Ryujinx.Graphics.Shader/CodeGen
parent375ee0ba9640c213bba727e85c15493700425557 (diff)
Use maximum shared memory size supported by hardware
Diffstat (limited to 'Ryujinx.Graphics.Shader/CodeGen')
-rw-r--r--Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs4
1 files changed, 3 insertions, 1 deletions
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();
}