From 362746887e79b9476337f2e3bd3d54116d64563e Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Wed, 29 May 2024 16:24:49 +0100 Subject: [PATCH] Cleanup + Format --- src/Ryujinx.Graphics.Metal/EncoderState.cs | 7 ------- src/Ryujinx.Graphics.Metal/HelperShader.cs | 2 -- src/Ryujinx.Graphics.Metal/Pipeline.cs | 4 ++-- src/Ryujinx.Graphics.Metal/Texture.cs | 1 - src/Ryujinx.Graphics.Metal/TextureBase.cs | 4 ---- src/Ryujinx.Graphics.Metal/TextureBuffer.cs | 2 -- .../CodeGen/Msl/Instructions/InstGenMemory.cs | 3 ++- 7 files changed, 4 insertions(+), 19 deletions(-) diff --git a/src/Ryujinx.Graphics.Metal/EncoderState.cs b/src/Ryujinx.Graphics.Metal/EncoderState.cs index bc744ba24..a75ea3dc9 100644 --- a/src/Ryujinx.Graphics.Metal/EncoderState.cs +++ b/src/Ryujinx.Graphics.Metal/EncoderState.cs @@ -20,13 +20,6 @@ namespace Ryujinx.Graphics.Metal ComputePipeline = true; DepthStencil = true; } - - public void Clear() - { - RenderPipeline = false; - ComputePipeline = false; - DepthStencil = false; - } } [SupportedOSPlatform("macos")] diff --git a/src/Ryujinx.Graphics.Metal/HelperShader.cs b/src/Ryujinx.Graphics.Metal/HelperShader.cs index 2ed9fe5aa..5adc336f0 100644 --- a/src/Ryujinx.Graphics.Metal/HelperShader.cs +++ b/src/Ryujinx.Graphics.Metal/HelperShader.cs @@ -5,8 +5,6 @@ using Ryujinx.Graphics.Shader.Translation; using SharpMetal.Metal; using System; using System.Collections.Generic; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; using System.Runtime.Versioning; namespace Ryujinx.Graphics.Metal diff --git a/src/Ryujinx.Graphics.Metal/Pipeline.cs b/src/Ryujinx.Graphics.Metal/Pipeline.cs index 34e9d5832..4d36893d4 100644 --- a/src/Ryujinx.Graphics.Metal/Pipeline.cs +++ b/src/Ryujinx.Graphics.Metal/Pipeline.cs @@ -281,8 +281,8 @@ namespace Ryujinx.Graphics.Metal var computeCommandEncoder = GetOrCreateComputeEncoder(); computeCommandEncoder.DispatchThreadgroups( - new MTLSize{width = (ulong)groupsX, height = (ulong)groupsY, depth = (ulong)groupsZ}, - new MTLSize{width = (ulong)groupSizeX, height = (ulong)groupSizeY, depth = (ulong)groupSizeZ}); + new MTLSize { width = (ulong)groupsX, height = (ulong)groupsY, depth = (ulong)groupsZ }, + new MTLSize { width = (ulong)groupSizeX, height = (ulong)groupSizeY, depth = (ulong)groupSizeZ }); } public void Draw(int vertexCount, int instanceCount, int firstVertex, int firstInstance) diff --git a/src/Ryujinx.Graphics.Metal/Texture.cs b/src/Ryujinx.Graphics.Metal/Texture.cs index 54e037ed7..6692d6133 100644 --- a/src/Ryujinx.Graphics.Metal/Texture.cs +++ b/src/Ryujinx.Graphics.Metal/Texture.cs @@ -1,4 +1,3 @@ -using Ryujinx.Common.Logging; using Ryujinx.Graphics.GAL; using SharpMetal.Foundation; using SharpMetal.Metal; diff --git a/src/Ryujinx.Graphics.Metal/TextureBase.cs b/src/Ryujinx.Graphics.Metal/TextureBase.cs index 7a634553a..8bd5c9513 100644 --- a/src/Ryujinx.Graphics.Metal/TextureBase.cs +++ b/src/Ryujinx.Graphics.Metal/TextureBase.cs @@ -1,10 +1,6 @@ -using Ryujinx.Common.Logging; using Ryujinx.Graphics.GAL; -using SharpMetal.Foundation; using SharpMetal.Metal; using System; -using System.Buffers; -using System.Runtime.CompilerServices; using System.Runtime.Versioning; namespace Ryujinx.Graphics.Metal diff --git a/src/Ryujinx.Graphics.Metal/TextureBuffer.cs b/src/Ryujinx.Graphics.Metal/TextureBuffer.cs index 4827e95bf..38468a76c 100644 --- a/src/Ryujinx.Graphics.Metal/TextureBuffer.cs +++ b/src/Ryujinx.Graphics.Metal/TextureBuffer.cs @@ -1,6 +1,4 @@ -using Ryujinx.Common.Logging; using Ryujinx.Graphics.GAL; -using SharpMetal.Foundation; using SharpMetal.Metal; using System; using System.Buffers; diff --git a/src/Ryujinx.Graphics.Shader/CodeGen/Msl/Instructions/InstGenMemory.cs b/src/Ryujinx.Graphics.Shader/CodeGen/Msl/Instructions/InstGenMemory.cs index 7f43717e0..88814f5c0 100644 --- a/src/Ryujinx.Graphics.Shader/CodeGen/Msl/Instructions/InstGenMemory.cs +++ b/src/Ryujinx.Graphics.Shader/CodeGen/Msl/Instructions/InstGenMemory.cs @@ -246,7 +246,8 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions { texCall += ", "; } - else { + else + { appended = true; } texCall += str;