From b0ba5d5da15bde71c117b6644f610be6d33b9f50 Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Wed, 29 May 2024 18:31:10 +0100 Subject: [PATCH] Implement IoVariable.FrontFacing --- src/Ryujinx.Graphics.Shader/CodeGen/Msl/Declarations.cs | 1 + src/Ryujinx.Graphics.Shader/CodeGen/Msl/Instructions/IoMap.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Ryujinx.Graphics.Shader/CodeGen/Msl/Declarations.cs b/src/Ryujinx.Graphics.Shader/CodeGen/Msl/Declarations.cs index 0e98995f8..aa641476e 100644 --- a/src/Ryujinx.Graphics.Shader/CodeGen/Msl/Declarations.cs +++ b/src/Ryujinx.Graphics.Shader/CodeGen/Msl/Declarations.cs @@ -180,6 +180,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl { // TODO: check if it's needed context.AppendLine("float4 position [[position]];"); + context.AppendLine("bool front_facing [[front_facing]];"); } foreach (var ioDefinition in inputs.OrderBy(x => x.Location)) diff --git a/src/Ryujinx.Graphics.Shader/CodeGen/Msl/Instructions/IoMap.cs b/src/Ryujinx.Graphics.Shader/CodeGen/Msl/Instructions/IoMap.cs index b306e8283..6c11b70dc 100644 --- a/src/Ryujinx.Graphics.Shader/CodeGen/Msl/Instructions/IoMap.cs +++ b/src/Ryujinx.Graphics.Shader/CodeGen/Msl/Instructions/IoMap.cs @@ -23,7 +23,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions IoVariable.ClipDistance => ("clip_distance", AggregateType.Array | AggregateType.FP32), IoVariable.FragmentOutputColor => ($"out.color{location}", AggregateType.Vector4 | AggregateType.FP32), IoVariable.FragmentOutputDepth => ("out.depth", AggregateType.FP32), - IoVariable.FrontFacing => ("front_facing", AggregateType.Bool), + IoVariable.FrontFacing => ("in.front_facing", AggregateType.Bool), IoVariable.GlobalId => ("thread_position_in_grid", AggregateType.Vector3 | AggregateType.U32), IoVariable.InstanceId => ("instance_id", AggregateType.S32), IoVariable.InvocationId => ("INVOCATION_ID", AggregateType.S32),