Message ID | 20211109091843.2024927-6-wenbin.chen@intel.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,1/7] hwcontext_vaapi: Use PRIME_2 memory type for modifiers. | expand |
Context | Check | Description |
---|---|---|
andriy/configurex86 | warning | Failed to apply patch |
andriy/configureppc | warning | Failed to apply patch |
9 Nov 2021, 10:18 by wenbin.chen@intel.com: > sem_sig_val is wrongly assigned to pWaitSemaphoreValues when export drm. Now fix > it. > > Signed-off-by: Wenbin Chen <> wenbin.chen@intel.com> > > Thanks for spotting this, I fixed that in my patchset and updated branch. frame->sem_value is safe to use for waiting, as it's only updated after the command buffer is successfully submitted.
> 9 Nov 2021, 10:18 by wenbin.chen@intel.com: > > > sem_sig_val is wrongly assigned to pWaitSemaphoreValues when export > drm. Now fix > > it. > > > > Signed-off-by: Wenbin Chen <> wenbin.chen@intel.com> > > > > > Thanks for spotting this, I fixed that in my patchset and updated branch. > frame->sem_value is safe to use for waiting, as it's only updated after > the command buffer is successfully submitted. > Ok, Got it. Thanks Wenbin > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index b857d1a9ed..29ade94b7f 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -1718,7 +1718,7 @@ static int prepare_frame(AVHWFramesContext *hwfc, VulkanExecCtx *ectx, const int planes = av_pix_fmt_count_planes(hwfc->sw_format); VulkanDevicePriv *p = hwfc->device_ctx->internal->priv; FFVulkanFunctions *vk = &p->vkfn; - uint64_t sem_sig_val[AV_NUM_DATA_POINTERS]; + uint64_t sem_sig_val[AV_NUM_DATA_POINTERS], sem_wait_val[AV_NUM_DATA_POINTERS]; VkImageMemoryBarrier img_bar[AV_NUM_DATA_POINTERS] = { 0 }; @@ -1738,6 +1738,7 @@ static int prepare_frame(AVHWFramesContext *hwfc, VulkanExecCtx *ectx, VkPipelineStageFlagBits wait_st[AV_NUM_DATA_POINTERS]; for (int i = 0; i < planes; i++) { wait_st[i] = VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT; + sem_wait_val[i] = frame->sem_value[i]; sem_sig_val[i] = frame->sem_value[i] + 1; } @@ -1756,7 +1757,7 @@ static int prepare_frame(AVHWFramesContext *hwfc, VulkanExecCtx *ectx, new_layout = VK_IMAGE_LAYOUT_GENERAL; new_access = VK_ACCESS_MEMORY_READ_BIT | VK_ACCESS_MEMORY_WRITE_BIT; dst_qf = VK_QUEUE_FAMILY_EXTERNAL_KHR; - s_timeline_sem_info.pWaitSemaphoreValues = sem_sig_val; + s_timeline_sem_info.pWaitSemaphoreValues = sem_wait_val; s_timeline_sem_info.waitSemaphoreValueCount = planes; s_info.pWaitSemaphores = frame->sem; s_info.pWaitDstStageMask = wait_st;
sem_sig_val is wrongly assigned to pWaitSemaphoreValues when export drm. Now fix it. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> --- libavutil/hwcontext_vulkan.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)