add: vertex and instance id arguments

This commit is contained in:
Samuliak 2024-05-16 15:55:03 +02:00 committed by Isaac Marovitz
parent d1a60c7053
commit 299ca72b7a
No known key found for this signature in database
GPG Key ID: 97250B2B09A132E1
1 changed files with 7 additions and 0 deletions

View File

@ -113,6 +113,13 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
}
}
// TODO: add these only if they are used
if (stage == ShaderStage.Vertex)
{
args = args.Append("uint vertex_id [[vertex_id]]").ToArray();
args = args.Append("uint instance_id [[instance_id]]").ToArray();
}
foreach (var constantBuffer in context.Properties.ConstantBuffers.Values)
{
var varType = constantBuffer.Type.Fields[0].Type & ~AggregateType.Array;