1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-12-18 18:32:02 +00:00
This commit is contained in:
Isaac Marovitz 2024-09-19 19:59:40 +02:00 committed by Isaac Marovitz
parent 7d86cb8d7f
commit 0ca4c03af4
2 changed files with 8 additions and 8 deletions

View file

@ -1,9 +1,9 @@
using Ryujinx.Common.Logging;
using Ryujinx.Common.Memory;
using Ryujinx.Graphics.GAL;
using SharpMetal.Foundation;
using SharpMetal.Metal;
using System;
using System.Buffers;
using System.Runtime.Versioning;
namespace Ryujinx.Graphics.Metal
@ -509,7 +509,7 @@ namespace Ryujinx.Graphics.Metal
return PinnedSpan<byte>.UnsafeFromSpan(GetData(resources.GetPool(), resources.GetFlushBuffer(), layer, level));
}
public void SetData(IMemoryOwner<byte> data)
public void SetData(MemoryOwner<byte> data)
{
var blitCommandEncoder = Pipeline.GetOrCreateBlitEncoder();
@ -586,14 +586,14 @@ namespace Ryujinx.Graphics.Metal
CopyFromOrToBuffer(cbs, buffer, image, bufferDataLength, false, layer, level, layers, levels, singleSlice);
}
public void SetData(IMemoryOwner<byte> data, int layer, int level)
public void SetData(MemoryOwner<byte> data, int layer, int level)
{
SetData(data.Memory.Span, layer, level, 1, 1, singleSlice: true);
data.Dispose();
}
public void SetData(IMemoryOwner<byte> data, int layer, int level, Rectangle<int> region)
public void SetData(MemoryOwner<byte> data, int layer, int level, Rectangle<int> region)
{
var blitCommandEncoder = Pipeline.GetOrCreateBlitEncoder();

View file

@ -1,7 +1,7 @@
using Ryujinx.Common.Memory;
using Ryujinx.Graphics.GAL;
using SharpMetal.Metal;
using System;
using System.Buffers;
using System.Runtime.Versioning;
namespace Ryujinx.Graphics.Metal
@ -88,18 +88,18 @@ namespace Ryujinx.Graphics.Metal
throw new NotImplementedException();
}
public void SetData(IMemoryOwner<byte> data)
public void SetData(MemoryOwner<byte> data)
{
Renderer.SetBufferData(_bufferHandle, _offset, data.Memory.Span);
data.Dispose();
}
public void SetData(IMemoryOwner<byte> data, int layer, int level)
public void SetData(MemoryOwner<byte> data, int layer, int level)
{
throw new NotSupportedException();
}
public void SetData(IMemoryOwner<byte> data, int layer, int level, Rectangle<int> region)
public void SetData(MemoryOwner<byte> data, int layer, int level, Rectangle<int> region)
{
throw new NotSupportedException();
}