aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Texture/LayoutConverter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.Graphics.Texture/LayoutConverter.cs')
-rw-r--r--src/Ryujinx.Graphics.Texture/LayoutConverter.cs13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/Ryujinx.Graphics.Texture/LayoutConverter.cs b/src/Ryujinx.Graphics.Texture/LayoutConverter.cs
index d6732674..5426af20 100644
--- a/src/Ryujinx.Graphics.Texture/LayoutConverter.cs
+++ b/src/Ryujinx.Graphics.Texture/LayoutConverter.cs
@@ -1,7 +1,6 @@
using Ryujinx.Common;
using Ryujinx.Common.Memory;
using System;
-using System.Buffers;
using System.Runtime.Intrinsics;
using static Ryujinx.Graphics.Texture.BlockLinearConstants;
@@ -95,7 +94,7 @@ namespace Ryujinx.Graphics.Texture
};
}
- public static IMemoryOwner<byte> ConvertBlockLinearToLinear(
+ public static MemoryOwner<byte> ConvertBlockLinearToLinear(
int width,
int height,
int depth,
@@ -121,8 +120,8 @@ namespace Ryujinx.Graphics.Texture
blockHeight,
bytesPerPixel);
- IMemoryOwner<byte> outputOwner = ByteMemoryPool.Rent(outSize);
- Span<byte> output = outputOwner.Memory.Span;
+ MemoryOwner<byte> outputOwner = MemoryOwner<byte>.Rent(outSize);
+ Span<byte> output = outputOwner.Span;
int outOffs = 0;
@@ -249,7 +248,7 @@ namespace Ryujinx.Graphics.Texture
return outputOwner;
}
- public static IMemoryOwner<byte> ConvertLinearStridedToLinear(
+ public static MemoryOwner<byte> ConvertLinearStridedToLinear(
int width,
int height,
int blockWidth,
@@ -265,8 +264,8 @@ namespace Ryujinx.Graphics.Texture
int outStride = BitUtils.AlignUp(w * bytesPerPixel, HostStrideAlignment);
lineSize = Math.Min(lineSize, outStride);
- IMemoryOwner<byte> output = ByteMemoryPool.Rent(h * outStride);
- Span<byte> outSpan = output.Memory.Span;
+ MemoryOwner<byte> output = MemoryOwner<byte>.Rent(h * outStride);
+ Span<byte> outSpan = output.Span;
int outOffs = 0;
int inOffs = 0;