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
This commit is contained in:
kd-11 authored and kd-11 committed 2019-09-08 18:22:27 +03:00
1 parent f53361b966
commit d1603fbb0b
1 file changed
+1 -1
+1 -1
View File
@@ -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<u32>(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;