diff options
author | Lynne <dev@lynne.ee> | 2021-11-07 15:58:31 +0100 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2021-11-12 05:23:40 +0100 |
commit | fef85c376adabc15715ed8d9c53cc8e889c9c7dc (patch) | |
tree | 5585ec6c1cd10b02fb93aab0d84e266204123827 /libavfilter/vf_scale_vulkan.c | |
parent | d05a18cdc7ea245843a1c785e1e3d7fdf980a130 (diff) | |
download | ffmpeg-fef85c376adabc15715ed8d9c53cc8e889c9c7dc.tar.gz |
lavfi/vulkan: use libavutil's vulkan loader
This finally fully eliminates the need to statically link to libvulkan!
Diffstat (limited to 'libavfilter/vf_scale_vulkan.c')
-rw-r--r-- | libavfilter/vf_scale_vulkan.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libavfilter/vf_scale_vulkan.c b/libavfilter/vf_scale_vulkan.c index 3dd6e3ff0b..83e101954b 100644 --- a/libavfilter/vf_scale_vulkan.c +++ b/libavfilter/vf_scale_vulkan.c @@ -295,6 +295,7 @@ static int process_frames(AVFilterContext *avctx, AVFrame *out_f, AVFrame *in_f) int err = 0; VkCommandBuffer cmd_buf; ScaleVulkanContext *s = avctx->priv; + FFVulkanFunctions *vk = &s->vkctx.vkfn; AVVkFrame *in = (AVVkFrame *)in_f->data[0]; AVVkFrame *out = (AVVkFrame *)out_f->data[0]; VkImageMemoryBarrier barriers[AV_NUM_DATA_POINTERS*2]; @@ -366,15 +367,15 @@ static int process_frames(AVFilterContext *avctx, AVFrame *out_f, AVFrame *in_f) out->access[i] = bar.dstAccessMask; } - vkCmdPipelineBarrier(cmd_buf, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, - VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, - 0, NULL, 0, NULL, barrier_count, barriers); + vk->CmdPipelineBarrier(cmd_buf, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, + VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, + 0, NULL, 0, NULL, barrier_count, barriers); ff_vk_bind_pipeline_exec(avctx, s->exec, s->pl); - vkCmdDispatch(cmd_buf, - FFALIGN(s->vkctx.output_width, CGROUPS[0])/CGROUPS[0], - FFALIGN(s->vkctx.output_height, CGROUPS[1])/CGROUPS[1], 1); + vk->CmdDispatch(cmd_buf, + FFALIGN(s->vkctx.output_width, CGROUPS[0])/CGROUPS[0], + FFALIGN(s->vkctx.output_height, CGROUPS[1])/CGROUPS[1], 1); ff_vk_add_exec_dep(avctx, s->exec, in_f, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT); ff_vk_add_exec_dep(avctx, s->exec, out_f, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT); |