hwcontext_vulkan: fix inverted condition when exporting images to drm_prime

Calling vkGetImageSubresourceLayout is only legal for linear and drm images.
This commit is contained in:
Lynne 2020-05-10 21:30:15 +01:00
parent acfef378b7
commit 7c080dc190
No known key found for this signature in database
GPG Key ID: A2FEA5F03F034464

View File

@ -2327,7 +2327,7 @@ static int vulkan_map_to_drm(AVHWFramesContext *hwfc, AVFrame *dst,
drm_desc->layers[i].planes[0].object_index = FFMIN(i, drm_desc->nb_objects - 1);
if (f->tiling != VK_IMAGE_TILING_OPTIMAL)
if (f->tiling == VK_IMAGE_TILING_OPTIMAL)
continue;
vkGetImageSubresourceLayout(hwctx->act_dev, f->img[i], &sub, &layout);