From eeddfe63ea6f90689357176d35e424d5b216dc9a Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Fri, 4 Aug 2023 17:15:38 -0400 Subject: [PATCH] =?UTF-8?q?Isn=E2=80=99t=20that=20conveniant=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CodeGen/Msl/HelperFunctions/HelperFunctionNames.cs | 3 --- .../CodeGen/Msl/HelperFunctions/VoteAllEqual.metal | 1 - .../CodeGen/Msl/Instructions/InstGenHelper.cs | 4 ++-- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Ryujinx.Graphics.Shader/CodeGen/Msl/HelperFunctions/HelperFunctionNames.cs b/src/Ryujinx.Graphics.Shader/CodeGen/Msl/HelperFunctions/HelperFunctionNames.cs index 040765ca8b..ade18f1222 100644 --- a/src/Ryujinx.Graphics.Shader/CodeGen/Msl/HelperFunctions/HelperFunctionNames.cs +++ b/src/Ryujinx.Graphics.Shader/CodeGen/Msl/HelperFunctions/HelperFunctionNames.cs @@ -2,9 +2,6 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl { static class HelperFunctionNames { - public static string MultiplyHighS32 = "helperMultiplyHighS32"; - public static string MultiplyHighU32 = "helperMultiplyHighU32"; - public static string Shuffle = "helperShuffle"; public static string ShuffleDown = "helperShuffleDown"; public static string ShuffleUp = "helperShuffleUp"; diff --git a/src/Ryujinx.Graphics.Shader/CodeGen/Msl/HelperFunctions/VoteAllEqual.metal b/src/Ryujinx.Graphics.Shader/CodeGen/Msl/HelperFunctions/VoteAllEqual.metal index 3eb0f50768..efbcee24dc 100644 --- a/src/Ryujinx.Graphics.Shader/CodeGen/Msl/HelperFunctions/VoteAllEqual.metal +++ b/src/Ryujinx.Graphics.Shader/CodeGen/Msl/HelperFunctions/VoteAllEqual.metal @@ -1,4 +1,3 @@ -template<> inline bool voteAllEqual(bool value) { return simd_all(value) || !simd_any(value); diff --git a/src/Ryujinx.Graphics.Shader/CodeGen/Msl/Instructions/InstGenHelper.cs b/src/Ryujinx.Graphics.Shader/CodeGen/Msl/Instructions/InstGenHelper.cs index 79586b0063..f65000054c 100644 --- a/src/Ryujinx.Graphics.Shader/CodeGen/Msl/Instructions/InstGenHelper.cs +++ b/src/Ryujinx.Graphics.Shader/CodeGen/Msl/Instructions/InstGenHelper.cs @@ -98,8 +98,8 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions Add(Instruction.MinimumU32, InstType.CallBinary, "min"); Add(Instruction.Modulo, InstType.CallBinary, "%"); Add(Instruction.Multiply, InstType.OpBinaryCom, "*", 1); - Add(Instruction.MultiplyHighS32, InstType.CallBinary, HelperFunctionNames.MultiplyHighS32); - Add(Instruction.MultiplyHighU32, InstType.CallBinary, HelperFunctionNames.MultiplyHighU32); + Add(Instruction.MultiplyHighS32, InstType.CallBinary, "mulhi"); + Add(Instruction.MultiplyHighU32, InstType.CallBinary, "mulhi"); Add(Instruction.Negate, InstType.OpUnary, "-"); Add(Instruction.ReciprocalSquareRoot, InstType.CallUnary, "rsqrt"); Add(Instruction.Return, InstType.OpNullary, "return");