WIP V2: Experimental: Metal backend #441

Merged
GreemDev merged 369 commits from new-metal into master 2024-12-24 06:55:16 +00:00
Showing only changes of commit 1d01fbf6b1 - Show all commits

View File

@ -133,7 +133,26 @@ namespace Ryujinx.Graphics.Metal
public void CopyBuffer(BufferHandle source, BufferHandle destination, int srcOffset, int dstOffset, int size)
{
throw new NotImplementedException();
MTLBlitCommandEncoder blitCommandEncoder;
if (CurrentEncoder is MTLBlitCommandEncoder encoder)
{
blitCommandEncoder = encoder;
}
else
{
blitCommandEncoder = BeginBlitPass();
}
MTLBuffer sourceBuffer = new(Unsafe.As<BufferHandle, IntPtr>(ref source));
MTLBuffer destinationBuffer = new(Unsafe.As<BufferHandle, IntPtr>(ref destination));
blitCommandEncoder.CopyFromBuffer(
sourceBuffer,
(ulong)srcOffset,
destinationBuffer,
(ulong)dstOffset,
(ulong)size);
}
public void DispatchCompute(int groupsX, int groupsY, int groupsZ)