1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-11-23 21:54:53 +02:00

vulkan: check if current buffer has finished execution before picking another

This saves resources, as dependencies are freed/reclaimed with a lower latency,
and provies a speedup.
This commit is contained in:
Lynne
2024-09-29 08:07:05 +02:00
parent 877c5a9692
commit 37d5cb84e8
8 changed files with 23 additions and 15 deletions

View File

@@ -2253,7 +2253,7 @@ static int prepare_frame(AVHWFramesContext *hwfc, FFVkExecPool *ectx,
};
VkCommandBuffer cmd_buf;
FFVkExecContext *exec = ff_vk_exec_get(ectx);
FFVkExecContext *exec = ff_vk_exec_get(&p->vkctx, ectx);
cmd_buf = exec->buf;
ff_vk_exec_start(&p->vkctx, exec);
@@ -3190,7 +3190,7 @@ static int vulkan_map_from_drm_frame_sync(AVHWFramesContext *hwfc, AVFrame *dst,
}
}
exec = ff_vk_exec_get(&fp->compute_exec);
exec = ff_vk_exec_get(&p->vkctx, &fp->compute_exec);
cmd_buf = exec->buf;
ff_vk_exec_start(&p->vkctx, exec);
@@ -4098,7 +4098,7 @@ static int vulkan_transfer_frame(AVHWFramesContext *hwfc,
}
}
exec = ff_vk_exec_get(&fp->upload_exec);
exec = ff_vk_exec_get(&p->vkctx, &fp->upload_exec);
cmd_buf = exec->buf;
ff_vk_exec_start(&p->vkctx, exec);