Fix compute generation failure in NieR

This commit is contained in:
Isaac Marovitz 2024-07-26 17:12:31 +01:00
parent 27e9671da4
commit e8e18f2578
No known key found for this signature in database
GPG Key ID: 97250B2B09A132E1
1 changed files with 3 additions and 1 deletions

View File

@ -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++)
{