Fix output struct definition
This commit is contained in:
parent
8d166875f1
commit
1ac79530a5
1 changed files with 2 additions and 1 deletions
|
@ -24,7 +24,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
||||||
|
|
||||||
DeclareInputAttributes(context, info.IoDefinitions.Where(x => IsUserDefined(x, StorageKind.Input)));
|
DeclareInputAttributes(context, info.IoDefinitions.Where(x => IsUserDefined(x, StorageKind.Input)));
|
||||||
context.AppendLine();
|
context.AppendLine();
|
||||||
DeclareOutputAttributes(context, info.IoDefinitions.Where(x => IsUserDefined(x, StorageKind.Output)));
|
DeclareOutputAttributes(context, info.IoDefinitions.Where(x => x.StorageKind == StorageKind.Output));
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool IsUserDefined(IoDefinition ioDefinition, StorageKind storageKind)
|
static bool IsUserDefined(IoDefinition ioDefinition, StorageKind storageKind)
|
||||||
|
@ -145,6 +145,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
||||||
{
|
{
|
||||||
string type = GetVarTypeName(context, context.Definitions.GetUserDefinedType(ioDefinition.Location, isOutput: true));
|
string type = GetVarTypeName(context, context.Definitions.GetUserDefinedType(ioDefinition.Location, isOutput: true));
|
||||||
string name = $"{DefaultNames.OAttributePrefix}{ioDefinition.Location}";
|
string name = $"{DefaultNames.OAttributePrefix}{ioDefinition.Location}";
|
||||||
|
name = ioDefinition.IoVariable == IoVariable.Position ? "position" : name;
|
||||||
string suffix = ioDefinition.IoVariable == IoVariable.Position ? " [[position]]" : "";
|
string suffix = ioDefinition.IoVariable == IoVariable.Position ? " [[position]]" : "";
|
||||||
|
|
||||||
context.AppendLine($"{type} {name}{suffix};");
|
context.AppendLine($"{type} {name}{suffix};");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue