From 6a8ac389e5038b34fdbbd6641fdf786dace64088 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Sat, 10 Feb 2024 20:41:17 -0300 Subject: [PATCH] Fix mip offset/size for full 3D texture upload on Vulkan (#6294) --- src/Ryujinx.Graphics.Vulkan/TextureView.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Ryujinx.Graphics.Vulkan/TextureView.cs b/src/Ryujinx.Graphics.Vulkan/TextureView.cs index 393db261..ef511565 100644 --- a/src/Ryujinx.Graphics.Vulkan/TextureView.cs +++ b/src/Ryujinx.Graphics.Vulkan/TextureView.cs @@ -839,7 +839,9 @@ namespace Ryujinx.Graphics.Vulkan for (int level = 0; level < levels; level++) { - int mipSize = GetBufferDataLength(Info.GetMipSize2D(dstLevel + level) * dstLayers); + int mipSize = GetBufferDataLength(is3D && !singleSlice + ? Info.GetMipSize(dstLevel + level) + : Info.GetMipSize2D(dstLevel + level) * dstLayers); int endOffset = offset + mipSize;