mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-08-07 02:42:34 -07:00
Vertex Input Attributes
This commit is contained in:
committed by
Isaac Marovitz
parent
f07327166c
commit
bbc2ac2e9b
@@ -3,7 +3,7 @@ using Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions;
|
||||
using Ryujinx.Graphics.Shader.StructuredIr;
|
||||
using Ryujinx.Graphics.Shader.Translation;
|
||||
using System;
|
||||
|
||||
using System.Linq;
|
||||
using static Ryujinx.Graphics.Shader.CodeGen.Msl.TypeConversion;
|
||||
|
||||
namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
||||
@@ -77,6 +77,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
||||
|
||||
string funcKeyword = "inline";
|
||||
string funcName = null;
|
||||
|
||||
if (isMainFunc)
|
||||
{
|
||||
if (stage == ShaderStage.Vertex)
|
||||
@@ -89,6 +90,11 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
||||
funcKeyword = "fragment";
|
||||
funcName = "fragmentMain";
|
||||
}
|
||||
|
||||
if (context.Config.UsedInputAttributes != 0)
|
||||
{
|
||||
args = args.Prepend("VertexIn in [[stage_in]]").ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
return $"{funcKeyword} {Declarations.GetVarTypeName(context, function.ReturnType)} {funcName ?? function.Name}({string.Join(", ", args)})";
|
||||
|
Reference in New Issue
Block a user