From a87f7f202973d2ab0db088f97b3538ae724bbe69 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Sun, 26 Dec 2021 13:05:26 -0300 Subject: Fix DMA copy fast path line size when xCount < stride (#2942) --- Ryujinx.Graphics.Texture/LayoutConverter.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Ryujinx.Graphics.Texture') diff --git a/Ryujinx.Graphics.Texture/LayoutConverter.cs b/Ryujinx.Graphics.Texture/LayoutConverter.cs index 970d08cb..1039ea26 100644 --- a/Ryujinx.Graphics.Texture/LayoutConverter.cs +++ b/Ryujinx.Graphics.Texture/LayoutConverter.cs @@ -248,6 +248,7 @@ namespace Ryujinx.Graphics.Texture int height, int blockWidth, int blockHeight, + int lineSize, int stride, int bytesPerPixel, ReadOnlySpan data) @@ -256,7 +257,7 @@ namespace Ryujinx.Graphics.Texture int h = BitUtils.DivRoundUp(height, blockHeight); int outStride = BitUtils.AlignUp(w * bytesPerPixel, HostStrideAlignment); - int lineSize = Math.Min(stride, outStride); + lineSize = Math.Min(lineSize, outStride); Span output = new byte[h * outStride]; -- cgit v1.2.3