1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 12:12:50 +01:00

vk: Check for uninitialized target before going into any scaling op

This commit is contained in:
kd-11 2021-03-10 23:30:39 +03:00 committed by kd-11
parent 608f8de347
commit a5f0faefc3

View File

@ -1071,6 +1071,13 @@ namespace vk
vk::image* real_src = src;
vk::image* real_dst = dst;
if (dst->current_layout == VK_IMAGE_LAYOUT_UNDEFINED)
{
// Watch out for lazy init
ensure(src != dst);
dst->change_layout(cmd, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
}
// Optimization pass; check for pass-through data transfer
if (!xfer_info.flip_horizontal && !xfer_info.flip_vertical && src_area.height() == dst_area.height())
{