diff --git a/src/Ryujinx.Graphics.Metal/Texture.cs b/src/Ryujinx.Graphics.Metal/Texture.cs index 551c98717e..4566d65d89 100644 --- a/src/Ryujinx.Graphics.Metal/Texture.cs +++ b/src/Ryujinx.Graphics.Metal/Texture.cs @@ -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.UnsafeFromSpan(GetData(resources.GetPool(), resources.GetFlushBuffer(), layer, level)); } - public void SetData(IMemoryOwner data) + public void SetData(MemoryOwner 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 data, int layer, int level) + public void SetData(MemoryOwner data, int layer, int level) { SetData(data.Memory.Span, layer, level, 1, 1, singleSlice: true); data.Dispose(); } - public void SetData(IMemoryOwner data, int layer, int level, Rectangle region) + public void SetData(MemoryOwner data, int layer, int level, Rectangle region) { var blitCommandEncoder = Pipeline.GetOrCreateBlitEncoder(); diff --git a/src/Ryujinx.Graphics.Metal/TextureBuffer.cs b/src/Ryujinx.Graphics.Metal/TextureBuffer.cs index 8d23bad98e..483cef28be 100644 --- a/src/Ryujinx.Graphics.Metal/TextureBuffer.cs +++ b/src/Ryujinx.Graphics.Metal/TextureBuffer.cs @@ -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 data) + public void SetData(MemoryOwner data) { Renderer.SetBufferData(_bufferHandle, _offset, data.Memory.Span); data.Dispose(); } - public void SetData(IMemoryOwner data, int layer, int level) + public void SetData(MemoryOwner data, int layer, int level) { throw new NotSupportedException(); } - public void SetData(IMemoryOwner data, int layer, int level, Rectangle region) + public void SetData(MemoryOwner data, int layer, int level, Rectangle region) { throw new NotSupportedException(); }