mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-12-27 11:03:04 +00:00
FragmentOutputDepth Fixes
This commit is contained in:
parent
3e1f624308
commit
087bf71a13
2 changed files with 4 additions and 1 deletions
|
@ -219,6 +219,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
||||||
{
|
{
|
||||||
IoVariable.Position => "float4",
|
IoVariable.Position => "float4",
|
||||||
IoVariable.PointSize => "float",
|
IoVariable.PointSize => "float",
|
||||||
|
IoVariable.FragmentOutputDepth => "float",
|
||||||
_ => GetVarTypeName(context, context.Definitions.GetUserDefinedType(ioDefinition.Location, isOutput: true))
|
_ => GetVarTypeName(context, context.Definitions.GetUserDefinedType(ioDefinition.Location, isOutput: true))
|
||||||
};
|
};
|
||||||
string name = ioDefinition.IoVariable switch
|
string name = ioDefinition.IoVariable switch
|
||||||
|
@ -226,6 +227,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
||||||
IoVariable.Position => "position",
|
IoVariable.Position => "position",
|
||||||
IoVariable.PointSize => "point_size",
|
IoVariable.PointSize => "point_size",
|
||||||
IoVariable.FragmentOutputColor => $"color{ioDefinition.Location}",
|
IoVariable.FragmentOutputColor => $"color{ioDefinition.Location}",
|
||||||
|
IoVariable.FragmentOutputDepth => "depth",
|
||||||
_ => $"{DefaultNames.OAttributePrefix}{ioDefinition.Location}"
|
_ => $"{DefaultNames.OAttributePrefix}{ioDefinition.Location}"
|
||||||
};
|
};
|
||||||
string suffix = ioDefinition.IoVariable switch
|
string suffix = ioDefinition.IoVariable switch
|
||||||
|
@ -234,6 +236,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
||||||
IoVariable.PointSize => "[[point_size]]",
|
IoVariable.PointSize => "[[point_size]]",
|
||||||
IoVariable.UserDefined => $"[[user(loc{ioDefinition.Location})]]",
|
IoVariable.UserDefined => $"[[user(loc{ioDefinition.Location})]]",
|
||||||
IoVariable.FragmentOutputColor => $"[[color({ioDefinition.Location})]]",
|
IoVariable.FragmentOutputColor => $"[[color({ioDefinition.Location})]]",
|
||||||
|
IoVariable.FragmentOutputDepth => "[[depth(any)]]",
|
||||||
_ => ""
|
_ => ""
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
|
||||||
IoVariable.BaseVertex => ("base_vertex", AggregateType.S32),
|
IoVariable.BaseVertex => ("base_vertex", AggregateType.S32),
|
||||||
IoVariable.ClipDistance => ("clip_distance", AggregateType.Array | AggregateType.FP32),
|
IoVariable.ClipDistance => ("clip_distance", AggregateType.Array | AggregateType.FP32),
|
||||||
IoVariable.FragmentOutputColor => ($"out.color{location}", AggregateType.Vector4 | AggregateType.FP32),
|
IoVariable.FragmentOutputColor => ($"out.color{location}", AggregateType.Vector4 | AggregateType.FP32),
|
||||||
IoVariable.FragmentOutputDepth => ("depth", AggregateType.FP32),
|
IoVariable.FragmentOutputDepth => ("out.depth", AggregateType.FP32),
|
||||||
IoVariable.FrontFacing => ("front_facing", AggregateType.Bool),
|
IoVariable.FrontFacing => ("front_facing", AggregateType.Bool),
|
||||||
IoVariable.InstanceId => ("instance_id", AggregateType.S32),
|
IoVariable.InstanceId => ("instance_id", AggregateType.S32),
|
||||||
IoVariable.PointCoord => ("point_coord", AggregateType.Vector2),
|
IoVariable.PointCoord => ("point_coord", AggregateType.Vector2),
|
||||||
|
|
Loading…
Reference in a new issue