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.
This commit is contained in:
Lynne 2021-11-12 13:05:42 +01:00
parent ec6187b05b
commit 57e11321ea
No known key found for this signature in database
GPG Key ID: A2FEA5F03F034464
2 changed files with 4 additions and 9 deletions

View File

@ -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);

View File

@ -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) \