From 657263b3f3b3a537825e16257d5e0851e980c056 Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Thu, 19 Sep 2024 19:59:40 +0200 Subject: [PATCH] Updates --- src/Ryujinx.Graphics.Metal/Texture.cs | 8 ++++---- src/Ryujinx.Graphics.Metal/TextureBuffer.cs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Ryujinx.Graphics.Metal/Texture.cs b/src/Ryujinx.Graphics.Metal/Texture.cs index 551c98717..4566d65d8 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 8d23bad98..483cef28b 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(); }