From 4b5edbb85cb7c9999e08f3e160959ea1775ba384 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Fri, 7 Aug 2026 19:42:14 +1000 Subject: [PATCH] VulkanDevice: Preserve mapped texture upload pitch Commit and copy partial texture maps with the same mapped-width pitch that was reserved and returned to the caller. --- src/util/vulkan_texture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/vulkan_texture.cpp b/src/util/vulkan_texture.cpp index 1c4fd7542..73f7417fd 100644 --- a/src/util/vulkan_texture.cpp +++ b/src/util/vulkan_texture.cpp @@ -396,7 +396,7 @@ void VulkanTexture::Unmap() { VulkanDevice& dev = VulkanDevice::GetInstance(); VulkanStreamBuffer& sb = dev.GetTextureUploadBuffer(); - const u32 aligned_pitch = Common::AlignUpPow2(CalcUploadPitch(m_width), dev.GetBufferCopyRowPitchAlignment()); + const u32 aligned_pitch = Common::AlignUpPow2(CalcUploadPitch(m_map_width), dev.GetBufferCopyRowPitchAlignment()); const u32 req_size = CalcUploadSize(m_map_height, aligned_pitch); const u32 offset = sb.GetCurrentOffset(); sb.CommitMemory(req_size);