mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-12-28 11:33:06 +00:00
CopyBuffer to Buffer
This commit is contained in:
parent
7a2ab77b4d
commit
33a986317b
1 changed files with 20 additions and 1 deletions
|
@ -133,7 +133,26 @@ namespace Ryujinx.Graphics.Metal
|
||||||
|
|
||||||
public void CopyBuffer(BufferHandle source, BufferHandle destination, int srcOffset, int dstOffset, int size)
|
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)
|
public void DispatchCompute(int groupsX, int groupsY, int groupsZ)
|
||||||
|
|
Loading…
Reference in a new issue