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.
pull/3782/head
Stenzek 2 months ago
parent fc3e117f8d
commit 4b5edbb85c
No known key found for this signature in database

@ -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);

Loading…
Cancel
Save