From 8d1fc18941b878c8f510190962fc99cac1536463 Mon Sep 17 00:00:00 2001 From: kd-11 Date: Mon, 12 Apr 2021 23:56:20 +0300 Subject: [PATCH] vk: Fix mip level packed pitch calculation --- rpcs3/Emu/RSX/VK/VKTexture.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/RSX/VK/VKTexture.cpp b/rpcs3/Emu/RSX/VK/VKTexture.cpp index 386b635b74..75980ede46 100644 --- a/rpcs3/Emu/RSX/VK/VKTexture.cpp +++ b/rpcs3/Emu/RSX/VK/VKTexture.cpp @@ -856,8 +856,8 @@ namespace vk if (!rsx::is_compressed_host_format(format)) { const auto host_texel_width = vk::get_format_texel_width(dst_image->format()); - const auto host_packed_pitch = host_texel_width * dst_image->width(); - row_pitch = std::max(row_pitch, host_packed_pitch); + const auto host_packed_pitch = host_texel_width * layout.width_in_texel; + row_pitch = std::max(row_pitch, host_packed_pitch); upload_pitch_in_texel = row_pitch / host_texel_width; } else