Fix vertex “built-ins”
This commit is contained in:
parent
2fbb50997e
commit
a6ff9be85f
2 changed files with 5 additions and 3 deletions
|
@ -17,15 +17,15 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
|
||||||
{
|
{
|
||||||
var returnValue = ioVariable switch
|
var returnValue = ioVariable switch
|
||||||
{
|
{
|
||||||
IoVariable.BaseInstance => ("base_instance", AggregateType.S32),
|
IoVariable.BaseInstance => ("base_instance", AggregateType.U32),
|
||||||
IoVariable.BaseVertex => ("base_vertex", AggregateType.S32),
|
IoVariable.BaseVertex => ("base_vertex", AggregateType.U32),
|
||||||
IoVariable.CtaId => ("threadgroup_position_in_grid", AggregateType.Vector3 | AggregateType.U32),
|
IoVariable.CtaId => ("threadgroup_position_in_grid", AggregateType.Vector3 | AggregateType.U32),
|
||||||
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 => ("out.depth", AggregateType.FP32),
|
IoVariable.FragmentOutputDepth => ("out.depth", AggregateType.FP32),
|
||||||
IoVariable.FrontFacing => ("in.front_facing", AggregateType.Bool),
|
IoVariable.FrontFacing => ("in.front_facing", AggregateType.Bool),
|
||||||
IoVariable.GlobalId => ("thread_position_in_grid", AggregateType.Vector3 | AggregateType.U32),
|
IoVariable.GlobalId => ("thread_position_in_grid", AggregateType.Vector3 | AggregateType.U32),
|
||||||
IoVariable.InstanceId => ("instance_id", AggregateType.S32),
|
IoVariable.InstanceId => ("instance_id", AggregateType.U32),
|
||||||
IoVariable.InvocationId => ("INVOCATION_ID", AggregateType.S32),
|
IoVariable.InvocationId => ("INVOCATION_ID", AggregateType.S32),
|
||||||
IoVariable.PointCoord => ("point_coord", AggregateType.Vector2 | AggregateType.FP32),
|
IoVariable.PointCoord => ("point_coord", AggregateType.Vector2 | AggregateType.FP32),
|
||||||
IoVariable.PointSize => ("out.point_size", AggregateType.FP32),
|
IoVariable.PointSize => ("out.point_size", AggregateType.FP32),
|
||||||
|
|
|
@ -137,6 +137,8 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
||||||
{
|
{
|
||||||
args = args.Append("uint vertex_id [[vertex_id]]").ToArray();
|
args = args.Append("uint vertex_id [[vertex_id]]").ToArray();
|
||||||
args = args.Append("uint instance_id [[instance_id]]").ToArray();
|
args = args.Append("uint instance_id [[instance_id]]").ToArray();
|
||||||
|
args = args.Append("uint base_instance [[base_instance]]").ToArray();
|
||||||
|
args = args.Append("uint base_vertex [[base_vertex]]").ToArray();
|
||||||
}
|
}
|
||||||
else if (stage == ShaderStage.Compute)
|
else if (stage == ShaderStage.Compute)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue