Output fixes

This commit is contained in:
Isaac Marovitz 2023-10-09 11:55:34 -04:00 committed by Isaac Marovitz
parent 3f6a669950
commit 8d166875f1
2 changed files with 3 additions and 3 deletions

View file

@ -143,8 +143,8 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
foreach (var ioDefinition in inputs.OrderBy(x => x.Location))
{
string type = GetVarTypeName(context, context.Definitions.GetUserDefinedType(ioDefinition.Location, isOutput: false));
string name = $"{DefaultNames.IAttributePrefix}{ioDefinition.Location}";
string type = GetVarTypeName(context, context.Definitions.GetUserDefinedType(ioDefinition.Location, isOutput: true));
string name = $"{DefaultNames.OAttributePrefix}{ioDefinition.Location}";
string suffix = ioDefinition.IoVariable == IoVariable.Position ? " [[position]]" : "";
context.AppendLine($"{type} {name}{suffix};");

View file

@ -25,7 +25,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
IoVariable.InstanceId => ("instance_id", AggregateType.S32),
IoVariable.PointCoord => ("point_coord", AggregateType.Vector2),
IoVariable.PointSize => ("point_size", AggregateType.FP32),
IoVariable.Position => ("position", AggregateType.Vector4 | AggregateType.FP32),
IoVariable.Position => ("out.position", AggregateType.Vector4 | AggregateType.FP32),
IoVariable.PrimitiveId => ("primitive_id", AggregateType.S32),
IoVariable.UserDefined => GetUserDefinedVariableName(definitions, location, component, isOutput, isPerPatch),
IoVariable.VertexId => ("vertex_id", AggregateType.S32),