diff --git a/src/Ryujinx.Graphics.Metal/EncoderStateManager.cs b/src/Ryujinx.Graphics.Metal/EncoderStateManager.cs index 4a3993cad..6f2725b16 100644 --- a/src/Ryujinx.Graphics.Metal/EncoderStateManager.cs +++ b/src/Ryujinx.Graphics.Metal/EncoderStateManager.cs @@ -66,7 +66,8 @@ namespace Ryujinx.Graphics.Metal SetBuffers(renderCommandEncoder, _currentState.StorageBuffers, true); SetCullMode(renderCommandEncoder); SetFrontFace(renderCommandEncoder); - } else + } + else { Logger.Error?.Print(LogClass.Gpu, "No state to restore"); } @@ -302,7 +303,8 @@ namespace Ryujinx.Graphics.Metal if (depthStencil is Texture depthTexture) { _currentState.DepthStencil = depthTexture; - } else if (depthStencil == null) + } + else if (depthStencil == null) { _currentState.DepthStencil = null; } diff --git a/src/Ryujinx.Graphics.Metal/Pipeline.cs b/src/Ryujinx.Graphics.Metal/Pipeline.cs index 807069f5f..b3be4124d 100644 --- a/src/Ryujinx.Graphics.Metal/Pipeline.cs +++ b/src/Ryujinx.Graphics.Metal/Pipeline.cs @@ -202,14 +202,16 @@ namespace Ryujinx.Graphics.Metal var scope = MTLBarrierScope.Buffers | MTLBarrierScope.Textures | MTLBarrierScope.RenderTargets; MTLRenderStages stages = MTLRenderStages.RenderStageVertex | MTLRenderStages.RenderStageFragment; renderCommandEncoder.MemoryBarrier(scope, stages, stages); - } else if (_currentEncoderType == EncoderType.Compute) + } + else if (_currentEncoderType == EncoderType.Compute) { var computeCommandEncoder = GetOrCreateComputeEncoder(); // TODO: Should there be a barrier on render targets? var scope = MTLBarrierScope.Buffers | MTLBarrierScope.Textures; computeCommandEncoder.MemoryBarrier(scope); - } else + } + else { Logger.Warning?.Print(LogClass.Gpu, "Barrier called outside of a render or compute pass"); }