From 997e8d11f701696d5e16e80e9ca4d73416804b6c Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Fri, 26 Jul 2024 17:12:31 +0100 Subject: [PATCH] Fix compute generation failure in NieR --- .../CodeGen/Msl/Instructions/InstGen.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Ryujinx.Graphics.Shader/CodeGen/Msl/Instructions/InstGen.cs b/src/Ryujinx.Graphics.Shader/CodeGen/Msl/Instructions/InstGen.cs index daeb62221..ac294d960 100644 --- a/src/Ryujinx.Graphics.Shader/CodeGen/Msl/Instructions/InstGen.cs +++ b/src/Ryujinx.Graphics.Shader/CodeGen/Msl/Instructions/InstGen.cs @@ -49,7 +49,9 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions ? AggregateType.S32 : AggregateType.U32; - builder.Append($"(device {Declarations.GetVarTypeName(dstType, true)}*)&{GenerateLoadOrStore(context, operation, isStore: false)}"); + var shared = operation.StorageKind == StorageKind.SharedMemory; + + builder.Append($"({(shared ? "threadgroup" : "device")} {Declarations.GetVarTypeName(dstType, true)}*)&{GenerateLoadOrStore(context, operation, isStore: false)}"); for (int argIndex = operation.SourcesCount - arity + 2; argIndex < operation.SourcesCount; argIndex++) {