From d1603fbb0bed3d197f476a1ca7f009227d4a404d Mon Sep 17 00:00:00 2001 From: kd-11 Date: Sun, 8 Sep 2019 16:21:06 +0300 Subject: [PATCH] vk: Crop malformed image descriptors - Some image descriptors (lle vdec?) are malformed with pitch being smaller than width - Crop these for now pending hardware tests --- rpcs3/Emu/RSX/VK/VKTexture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpcs3/Emu/RSX/VK/VKTexture.cpp b/rpcs3/Emu/RSX/VK/VKTexture.cpp index e143efe91f..ba33ba9d70 100644 --- a/rpcs3/Emu/RSX/VK/VKTexture.cpp +++ b/rpcs3/Emu/RSX/VK/VKTexture.cpp @@ -563,7 +563,7 @@ namespace vk auto& copy_info = copy_regions.back(); copy_info.bufferOffset = offset_in_buffer; copy_info.imageExtent.height = layout.height_in_block * block_in_pixel; - copy_info.imageExtent.width = layout.width_in_block * block_in_pixel; + copy_info.imageExtent.width = std::min(layout.width_in_block, layout.pitch_in_block) * block_in_pixel; copy_info.imageExtent.depth = layout.depth; copy_info.imageSubresource.aspectMask = flags; copy_info.imageSubresource.layerCount = 1;