Fix point_coord
This commit is contained in:
parent
d17472f2ec
commit
f84b75f080
1 changed files with 3 additions and 0 deletions
|
@ -203,6 +203,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
||||||
IoVariable.GlobalId => "uint3",
|
IoVariable.GlobalId => "uint3",
|
||||||
IoVariable.VertexId => "uint",
|
IoVariable.VertexId => "uint",
|
||||||
IoVariable.VertexIndex => "uint",
|
IoVariable.VertexIndex => "uint",
|
||||||
|
IoVariable.PointCoord => "float2",
|
||||||
_ => GetVarTypeName(context, context.Definitions.GetUserDefinedType(ioDefinition.Location, isOutput: false))
|
_ => GetVarTypeName(context, context.Definitions.GetUserDefinedType(ioDefinition.Location, isOutput: false))
|
||||||
};
|
};
|
||||||
string name = ioDefinition.IoVariable switch
|
string name = ioDefinition.IoVariable switch
|
||||||
|
@ -211,6 +212,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
||||||
IoVariable.GlobalId => "global_id",
|
IoVariable.GlobalId => "global_id",
|
||||||
IoVariable.VertexId => "vertex_id",
|
IoVariable.VertexId => "vertex_id",
|
||||||
IoVariable.VertexIndex => "vertex_index",
|
IoVariable.VertexIndex => "vertex_index",
|
||||||
|
IoVariable.PointCoord => "point_coord",
|
||||||
_ => $"{DefaultNames.IAttributePrefix}{ioDefinition.Location}"
|
_ => $"{DefaultNames.IAttributePrefix}{ioDefinition.Location}"
|
||||||
};
|
};
|
||||||
string suffix = ioDefinition.IoVariable switch
|
string suffix = ioDefinition.IoVariable switch
|
||||||
|
@ -220,6 +222,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
||||||
IoVariable.VertexId => "[[vertex_id]]",
|
IoVariable.VertexId => "[[vertex_id]]",
|
||||||
// TODO: Avoid potential redeclaration
|
// TODO: Avoid potential redeclaration
|
||||||
IoVariable.VertexIndex => "[[vertex_id]]",
|
IoVariable.VertexIndex => "[[vertex_id]]",
|
||||||
|
IoVariable.PointCoord => "[[point_coord]]",
|
||||||
IoVariable.UserDefined => context.Definitions.Stage == ShaderStage.Fragment ? $"[[user(loc{ioDefinition.Location})]]" : $"[[attribute({ioDefinition.Location})]]",
|
IoVariable.UserDefined => context.Definitions.Stage == ShaderStage.Fragment ? $"[[user(loc{ioDefinition.Location})]]" : $"[[attribute({ioDefinition.Location})]]",
|
||||||
_ => ""
|
_ => ""
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue