Cleanup + Format
This commit is contained in:
parent
8e8dcf0d7f
commit
0c1acb5107
4 changed files with 6 additions and 8 deletions
|
@ -167,4 +167,4 @@ class CommandBufferEncoder
|
||||||
CurrentEncoderType = EncoderType.Compute;
|
CurrentEncoderType = EncoderType.Compute;
|
||||||
return computeCommandEncoder;
|
return computeCommandEncoder;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -868,7 +868,6 @@ namespace Ryujinx.Graphics.Metal
|
||||||
{
|
{
|
||||||
ref PipelineState pipeline = ref _currentState.Pipeline;
|
ref PipelineState pipeline = ref _currentState.Pipeline;
|
||||||
uint indexMask = 0;
|
uint indexMask = 0;
|
||||||
int descriptorCount = 0;
|
|
||||||
|
|
||||||
for (int i = 0; i < attribDescriptors.Length; i++)
|
for (int i = 0; i < attribDescriptors.Length; i++)
|
||||||
{
|
{
|
||||||
|
@ -1352,7 +1351,7 @@ namespace Ryujinx.Graphics.Metal
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private uint SetIndexToBindingIndex(int setIndex)
|
private static uint SetIndexToBindingIndex(int setIndex)
|
||||||
{
|
{
|
||||||
return setIndex switch
|
return setIndex switch
|
||||||
{
|
{
|
||||||
|
@ -1363,7 +1362,6 @@ namespace Ryujinx.Graphics.Metal
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private readonly void SetCullMode(MTLRenderCommandEncoder renderCommandEncoder)
|
private readonly void SetCullMode(MTLRenderCommandEncoder renderCommandEncoder)
|
||||||
{
|
{
|
||||||
renderCommandEncoder.SetCullMode(_currentState.CullMode);
|
renderCommandEncoder.SetCullMode(_currentState.CullMode);
|
||||||
|
|
|
@ -218,7 +218,7 @@ namespace Ryujinx.Graphics.Metal
|
||||||
}
|
}
|
||||||
case EncoderType.Compute:
|
case EncoderType.Compute:
|
||||||
{
|
{
|
||||||
var scope = MTLBarrierScope.Buffers | MTLBarrierScope.Textures | MTLBarrierScope.RenderTargets;;
|
var scope = MTLBarrierScope.Buffers | MTLBarrierScope.Textures | MTLBarrierScope.RenderTargets;
|
||||||
Encoders.ComputeEncoder.MemoryBarrier(scope);
|
Encoders.ComputeEncoder.MemoryBarrier(scope);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ namespace Ryujinx.Graphics.Metal
|
||||||
descriptor.Swizzle = GetSwizzle(info, descriptor.PixelFormat);
|
descriptor.Swizzle = GetSwizzle(info, descriptor.PixelFormat);
|
||||||
|
|
||||||
_mtlTexture = _device.NewTexture(descriptor);
|
_mtlTexture = _device.NewTexture(descriptor);
|
||||||
|
|
||||||
MtlFormat = pixelFormat;
|
MtlFormat = pixelFormat;
|
||||||
descriptor.Dispose();
|
descriptor.Dispose();
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ namespace Ryujinx.Graphics.Metal
|
||||||
0,
|
0,
|
||||||
(ulong)firstLevel,
|
(ulong)firstLevel,
|
||||||
new MTLOrigin { x = 0, y = 0, z = (ulong)firstLayer },
|
new MTLOrigin { x = 0, y = 0, z = (ulong)firstLayer },
|
||||||
new MTLSize { width = (ulong)Math.Min(Info.Width, destinationTexture.Info.Width), height = (ulong)Math.Min(Info.Height, destinationTexture.Info.Height), depth = 1},
|
new MTLSize { width = (ulong)Math.Min(Info.Width, destinationTexture.Info.Width), height = (ulong)Math.Min(Info.Height, destinationTexture.Info.Height), depth = 1 },
|
||||||
destinationTexture._mtlTexture,
|
destinationTexture._mtlTexture,
|
||||||
0,
|
0,
|
||||||
(ulong)firstLevel,
|
(ulong)firstLevel,
|
||||||
|
@ -147,7 +147,7 @@ namespace Ryujinx.Graphics.Metal
|
||||||
0,
|
0,
|
||||||
(ulong)srcLevel,
|
(ulong)srcLevel,
|
||||||
new MTLOrigin { x = 0, y = 0, z = (ulong)srcLayer },
|
new MTLOrigin { x = 0, y = 0, z = (ulong)srcLayer },
|
||||||
new MTLSize { width = (ulong)Math.Min(Info.Width, destinationTexture.Info.Width), height = (ulong)Math.Min(Info.Height, destinationTexture.Info.Height), depth = 1},
|
new MTLSize { width = (ulong)Math.Min(Info.Width, destinationTexture.Info.Width), height = (ulong)Math.Min(Info.Height, destinationTexture.Info.Height), depth = 1 },
|
||||||
destinationTexture._mtlTexture,
|
destinationTexture._mtlTexture,
|
||||||
0,
|
0,
|
||||||
(ulong)dstLevel,
|
(ulong)dstLevel,
|
||||||
|
|
Loading…
Reference in a new issue