From 59ddb26628fc2ab94f1c274a254c76b3e368f8b6 Mon Sep 17 00:00:00 2001 From: jhorv <38920027+jhorv@users.noreply.github.com> Date: Sat, 3 Aug 2024 14:50:53 -0400 Subject: replace ByteMemoryPool usage in Ryujinx.Graphics (#7129) * chore: replace `ByteMemoryPool` usage with `MemoryOwner` * refactor: `PixelConverter.ConvertR4G4ToR4G4B4A4()` - rename old `outputSpan` to `outputSpanUInt16`, reuse same output `Span` as newly-freed name `outputSpan` * eliminate temporary buffer allocations * chore, perf: use MemoryOwner instead of IMemoryOwner --- src/Ryujinx.Graphics.Gpu/Image/Texture.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Ryujinx.Graphics.Gpu/Image/Texture.cs') diff --git a/src/Ryujinx.Graphics.Gpu/Image/Texture.cs b/src/Ryujinx.Graphics.Gpu/Image/Texture.cs index dde28dbd..3b6c407c 100644 --- a/src/Ryujinx.Graphics.Gpu/Image/Texture.cs +++ b/src/Ryujinx.Graphics.Gpu/Image/Texture.cs @@ -1,4 +1,5 @@ using Ryujinx.Common.Logging; +using Ryujinx.Common.Memory; using Ryujinx.Graphics.GAL; using Ryujinx.Graphics.Gpu.Memory; using Ryujinx.Graphics.Texture; @@ -805,7 +806,7 @@ namespace Ryujinx.Graphics.Gpu.Image sliceDepth, levels, layers, - out IMemoryOwner decoded)) + out MemoryOwner decoded)) { string texInfo = $"{Info.Target} {Info.FormatInfo.Format} {Info.Width}x{Info.Height}x{Info.DepthOrLayers} levels {Info.Levels}"; -- cgit v1.2.3