mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-08-04 05:32:26 -07:00
Support sample offsets Include FragmentIn as additional arg Always declare frag output struct SubgroupLaneId
32 lines
1.0 KiB
C#
32 lines
1.0 KiB
C#
using Ryujinx.Graphics.Shader.StructuredIr;
|
|
|
|
using static Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions.InstGenHelper;
|
|
|
|
namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
|
|
{
|
|
static class InstGenCall
|
|
{
|
|
public static string Call(CodeGenContext context, AstOperation operation)
|
|
{
|
|
AstOperand funcId = (AstOperand)operation.GetSource(0);
|
|
|
|
var functon = context.GetFunction(funcId.Value);
|
|
|
|
int argCount = operation.SourcesCount - 1;
|
|
string[] args = new string[argCount + CodeGenContext.AdditionalArgCount];
|
|
|
|
// Additional arguments
|
|
args[0] = "in";
|
|
args[1] = "support_buffer";
|
|
|
|
int argIndex = CodeGenContext.AdditionalArgCount;
|
|
for (int i = 0; i < argCount; i++)
|
|
{
|
|
args[argIndex++] = GetSourceExpr(context, operation.GetSource(i + 1), functon.GetArgumentType(i));
|
|
}
|
|
|
|
return $"{functon.Name}({string.Join(", ", args)})";
|
|
}
|
|
}
|
|
}
|