mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-08-19 23:28:42 +02:00
Fix DMA copy fast path line size when xCount < stride (#2942)
This commit is contained in:
parent
7c7bf30ad3
commit
a87f7f2029
3 changed files with 4 additions and 1 deletions
|
@ -222,6 +222,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Dma
|
||||||
target.Info.Height,
|
target.Info.Height,
|
||||||
1,
|
1,
|
||||||
1,
|
1,
|
||||||
|
xCount * srcBpp,
|
||||||
srcStride,
|
srcStride,
|
||||||
target.Info.FormatInfo.BytesPerPixel,
|
target.Info.FormatInfo.BytesPerPixel,
|
||||||
srcSpan);
|
srcSpan);
|
||||||
|
|
|
@ -760,6 +760,7 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||||
Info.FormatInfo.BlockWidth,
|
Info.FormatInfo.BlockWidth,
|
||||||
Info.FormatInfo.BlockHeight,
|
Info.FormatInfo.BlockHeight,
|
||||||
Info.Stride,
|
Info.Stride,
|
||||||
|
Info.Stride,
|
||||||
Info.FormatInfo.BytesPerPixel,
|
Info.FormatInfo.BytesPerPixel,
|
||||||
data);
|
data);
|
||||||
}
|
}
|
||||||
|
|
|
@ -248,6 +248,7 @@ namespace Ryujinx.Graphics.Texture
|
||||||
int height,
|
int height,
|
||||||
int blockWidth,
|
int blockWidth,
|
||||||
int blockHeight,
|
int blockHeight,
|
||||||
|
int lineSize,
|
||||||
int stride,
|
int stride,
|
||||||
int bytesPerPixel,
|
int bytesPerPixel,
|
||||||
ReadOnlySpan<byte> data)
|
ReadOnlySpan<byte> data)
|
||||||
|
@ -256,7 +257,7 @@ namespace Ryujinx.Graphics.Texture
|
||||||
int h = BitUtils.DivRoundUp(height, blockHeight);
|
int h = BitUtils.DivRoundUp(height, blockHeight);
|
||||||
|
|
||||||
int outStride = BitUtils.AlignUp(w * bytesPerPixel, HostStrideAlignment);
|
int outStride = BitUtils.AlignUp(w * bytesPerPixel, HostStrideAlignment);
|
||||||
int lineSize = Math.Min(stride, outStride);
|
lineSize = Math.Min(lineSize, outStride);
|
||||||
|
|
||||||
Span<byte> output = new byte[h * outStride];
|
Span<byte> output = new byte[h * outStride];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue