Whitespace formatting

This commit is contained in:
Isaac Marovitz 2024-05-25 12:12:58 -04:00 committed by Isaac Marovitz
parent 2833642858
commit 0e095c778a
2 changed files with 8 additions and 4 deletions

View file

@ -66,7 +66,8 @@ namespace Ryujinx.Graphics.Metal
SetBuffers(renderCommandEncoder, _currentState.StorageBuffers, true); SetBuffers(renderCommandEncoder, _currentState.StorageBuffers, true);
SetCullMode(renderCommandEncoder); SetCullMode(renderCommandEncoder);
SetFrontFace(renderCommandEncoder); SetFrontFace(renderCommandEncoder);
} else }
else
{ {
Logger.Error?.Print(LogClass.Gpu, "No state to restore"); Logger.Error?.Print(LogClass.Gpu, "No state to restore");
} }
@ -302,7 +303,8 @@ namespace Ryujinx.Graphics.Metal
if (depthStencil is Texture depthTexture) if (depthStencil is Texture depthTexture)
{ {
_currentState.DepthStencil = depthTexture; _currentState.DepthStencil = depthTexture;
} else if (depthStencil == null) }
else if (depthStencil == null)
{ {
_currentState.DepthStencil = null; _currentState.DepthStencil = null;
} }

View file

@ -202,14 +202,16 @@ namespace Ryujinx.Graphics.Metal
var scope = MTLBarrierScope.Buffers | MTLBarrierScope.Textures | MTLBarrierScope.RenderTargets; var scope = MTLBarrierScope.Buffers | MTLBarrierScope.Textures | MTLBarrierScope.RenderTargets;
MTLRenderStages stages = MTLRenderStages.RenderStageVertex | MTLRenderStages.RenderStageFragment; MTLRenderStages stages = MTLRenderStages.RenderStageVertex | MTLRenderStages.RenderStageFragment;
renderCommandEncoder.MemoryBarrier(scope, stages, stages); renderCommandEncoder.MemoryBarrier(scope, stages, stages);
} else if (_currentEncoderType == EncoderType.Compute) }
else if (_currentEncoderType == EncoderType.Compute)
{ {
var computeCommandEncoder = GetOrCreateComputeEncoder(); var computeCommandEncoder = GetOrCreateComputeEncoder();
// TODO: Should there be a barrier on render targets? // TODO: Should there be a barrier on render targets?
var scope = MTLBarrierScope.Buffers | MTLBarrierScope.Textures; var scope = MTLBarrierScope.Buffers | MTLBarrierScope.Textures;
computeCommandEncoder.MemoryBarrier(scope); computeCommandEncoder.MemoryBarrier(scope);
} else }
else
{ {
Logger.Warning?.Print(LogClass.Gpu, "Barrier called outside of a render or compute pass"); Logger.Warning?.Print(LogClass.Gpu, "Barrier called outside of a render or compute pass");
} }