Output fixes
This commit is contained in:
parent
8aea158ca2
commit
ebefb424bf
2 changed files with 3 additions and 3 deletions
|
@ -143,8 +143,8 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
||||||
|
|
||||||
foreach (var ioDefinition in inputs.OrderBy(x => x.Location))
|
foreach (var ioDefinition in inputs.OrderBy(x => x.Location))
|
||||||
{
|
{
|
||||||
string type = GetVarTypeName(context, context.Definitions.GetUserDefinedType(ioDefinition.Location, isOutput: false));
|
string type = GetVarTypeName(context, context.Definitions.GetUserDefinedType(ioDefinition.Location, isOutput: true));
|
||||||
string name = $"{DefaultNames.IAttributePrefix}{ioDefinition.Location}";
|
string name = $"{DefaultNames.OAttributePrefix}{ioDefinition.Location}";
|
||||||
string suffix = ioDefinition.IoVariable == IoVariable.Position ? " [[position]]" : "";
|
string suffix = ioDefinition.IoVariable == IoVariable.Position ? " [[position]]" : "";
|
||||||
|
|
||||||
context.AppendLine($"{type} {name}{suffix};");
|
context.AppendLine($"{type} {name}{suffix};");
|
||||||
|
|
|
@ -25,7 +25,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
|
||||||
IoVariable.InstanceId => ("instance_id", AggregateType.S32),
|
IoVariable.InstanceId => ("instance_id", AggregateType.S32),
|
||||||
IoVariable.PointCoord => ("point_coord", AggregateType.Vector2),
|
IoVariable.PointCoord => ("point_coord", AggregateType.Vector2),
|
||||||
IoVariable.PointSize => ("point_size", AggregateType.FP32),
|
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.PrimitiveId => ("primitive_id", AggregateType.S32),
|
||||||
IoVariable.UserDefined => GetUserDefinedVariableName(definitions, location, component, isOutput, isPerPatch),
|
IoVariable.UserDefined => GetUserDefinedVariableName(definitions, location, component, isOutput, isPerPatch),
|
||||||
IoVariable.VertexId => ("vertex_id", AggregateType.S32),
|
IoVariable.VertexId => ("vertex_id", AggregateType.S32),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue