From ba07a8c603b334e9a3a75e1317a002224422ea06 Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Wed, 29 May 2024 16:31:49 +0100 Subject: [PATCH] More cleanup --- src/Ryujinx.Graphics.Metal/EncoderStateManager.cs | 2 +- .../CodeGen/Msl/Instructions/InstGenMemory.cs | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Ryujinx.Graphics.Metal/EncoderStateManager.cs b/src/Ryujinx.Graphics.Metal/EncoderStateManager.cs index feaed6f44..eef8fd341 100644 --- a/src/Ryujinx.Graphics.Metal/EncoderStateManager.cs +++ b/src/Ryujinx.Graphics.Metal/EncoderStateManager.cs @@ -188,7 +188,7 @@ namespace Ryujinx.Graphics.Metal return renderCommandEncoder; } - public MTLComputeCommandEncoder CreateComputeCommandEncoder() + public readonly MTLComputeCommandEncoder CreateComputeCommandEncoder() { var descriptor = new MTLComputePassDescriptor(); var computeCommandEncoder = _pipeline.CommandBuffer.ComputeCommandEncoder(descriptor); diff --git a/src/Ryujinx.Graphics.Shader/CodeGen/Msl/Instructions/InstGenMemory.cs b/src/Ryujinx.Graphics.Shader/CodeGen/Msl/Instructions/InstGenMemory.cs index 88814f5c0..5a8152db7 100644 --- a/src/Ryujinx.Graphics.Shader/CodeGen/Msl/Instructions/InstGenMemory.cs +++ b/src/Ryujinx.Graphics.Shader/CodeGen/Msl/Instructions/InstGenMemory.cs @@ -283,17 +283,17 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions if (isArray) { - texCall += ", " + Src(AggregateType.S32); + Append(Src(AggregateType.S32)); } if (isShadow) { - texCall += ", " + Src(AggregateType.S32); + Append(Src(AggregateType.S32)); } if (hasLodLevel) { - texCall += $", level({Src(coordType)})"; + Append("level({Src(coordType)})"); } // TODO: Support offsets @@ -343,7 +343,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions string samplerName = GetSamplerName(context.Properties, texOp); string textureName = $"tex_{samplerName}"; string texCall = textureName + "."; - texCall += $"get_num_samples()"; + texCall += "get_num_samples()"; return texCall; } @@ -358,7 +358,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions if (texOp.Index == 3) { - texCall += $"get_num_mip_levels()"; + texCall += "get_num_mip_levels()"; } else { @@ -389,7 +389,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions texCall += $"{lodExpr}"; } - texCall += $")"; + texCall += ")"; } return texCall;