hwcontext_vulkan: use vkDeviceWaitIdle instead of vkWaitSemaphores on uninit

To silence a possible validation layer bug, switch the function. It only gets
triggered by vf_libplacebo, which is odd.
pull/374/head
Lynne 3 years ago
parent ec6187b05b
commit 57e11321ea
No known key found for this signature in database
GPG Key ID: A2FEA5F03F034464
  1. 12
      libavutil/hwcontext_vulkan.c
  2. 1
      libavutil/vulkan_functions.h

@ -1589,15 +1589,9 @@ static void vulkan_frame_free(void *opaque, uint8_t *data)
FFVulkanFunctions *vk = &p->vkfn;
int planes = av_pix_fmt_count_planes(hwfc->sw_format);
VkSemaphoreWaitInfo wait_info = {
.sType = VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO,
.flags = 0x0,
.pSemaphores = f->sem,
.pValues = f->sem_value,
.semaphoreCount = planes,
};
vk->WaitSemaphores(hwctx->act_dev, &wait_info, UINT64_MAX);
/* We could use vkWaitSemaphores, but the validation layer seems to have
* issues tracking command buffer execution state on uninit. */
vk->DeviceWaitIdle(hwctx->act_dev);
vulkan_free_internal(f->internal);

@ -47,6 +47,7 @@ typedef enum FFVulkanExtensions {
MACRO(1, 0, FF_VK_EXT_NO_FLAG, CreateDevice) \
MACRO(1, 0, FF_VK_EXT_NO_FLAG, GetPhysicalDeviceFeatures2) \
MACRO(1, 0, FF_VK_EXT_NO_FLAG, GetPhysicalDeviceProperties) \
MACRO(1, 0, FF_VK_EXT_NO_FLAG, DeviceWaitIdle) \
MACRO(1, 0, FF_VK_EXT_NO_FLAG, DestroyDevice) \
\
MACRO(1, 0, FF_VK_EXT_NO_FLAG, EnumeratePhysicalDevices) \

Loading…
Cancel
Save