From 76e5af967a39879187214f0973d226eba126e93f Mon Sep 17 00:00:00 2001 From: gdkchan Date: Fri, 3 Jul 2020 20:37:36 -0300 Subject: Fix buffer to 3D texture copy (#1354) --- Ryujinx.Graphics.Gpu/Engine/MethodCopyBuffer.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Ryujinx.Graphics.Gpu/Engine/MethodCopyBuffer.cs') diff --git a/Ryujinx.Graphics.Gpu/Engine/MethodCopyBuffer.cs b/Ryujinx.Graphics.Gpu/Engine/MethodCopyBuffer.cs index 2e6fe0ab..277054ce 100644 --- a/Ryujinx.Graphics.Gpu/Engine/MethodCopyBuffer.cs +++ b/Ryujinx.Graphics.Gpu/Engine/MethodCopyBuffer.cs @@ -44,6 +44,7 @@ namespace Ryujinx.Graphics.Gpu.Engine cbp.SrcStride, srcLinear, src.MemoryLayout.UnpackGobBlocksInY(), + src.MemoryLayout.UnpackGobBlocksInZ(), srcBpp); var dstCalculator = new OffsetCalculator( @@ -52,6 +53,7 @@ namespace Ryujinx.Graphics.Gpu.Engine cbp.DstStride, dstLinear, dst.MemoryLayout.UnpackGobBlocksInY(), + dst.MemoryLayout.UnpackGobBlocksInZ(), dstBpp); ulong srcBaseAddress = _context.MemoryManager.Translate(cbp.SrcAddress.Pack()); @@ -70,7 +72,7 @@ namespace Ryujinx.Graphics.Gpu.Engine { srcSpan.CopyTo(dstSpan); // No layout conversion has to be performed, just copy the data entirely. } - else + else { unsafe bool Convert(Span dstSpan, ReadOnlySpan srcSpan) where T : unmanaged { -- cgit v1.2.3