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);
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;
}

View file

@ -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");
}