aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_transpose_vulkan.c
diff options
context:
space:
mode:
authorLynne <dev@lynne.ee>2024-12-03 15:31:49 +0900
committerLynne <dev@lynne.ee>2024-12-23 04:25:09 +0900
commit2e06b84e2747ef4ea4d9f5c20c936aa866f7647d (patch)
treeba037209826667bf2eb78796b180b673e40b36dc /libavfilter/vf_transpose_vulkan.c
parent157cd820adbbfcfd1870a6ce12d072dc0f623e9b (diff)
downloadffmpeg-2e06b84e2747ef4ea4d9f5c20c936aa866f7647d.tar.gz
vulkan: do not reinvent a queue context struct
We recently introduced a public field which was a superset of the queue context we used to have. Switch to using it entirely. This also allows us to get rid of the NIH function which was valid only for video queues.
Diffstat (limited to 'libavfilter/vf_transpose_vulkan.c')
-rw-r--r--libavfilter/vf_transpose_vulkan.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/libavfilter/vf_transpose_vulkan.c b/libavfilter/vf_transpose_vulkan.c
index 0a07858f5f..fa21704a62 100644
--- a/libavfilter/vf_transpose_vulkan.c
+++ b/libavfilter/vf_transpose_vulkan.c
@@ -33,7 +33,7 @@ typedef struct TransposeVulkanContext {
int initialized;
FFVkExecPool e;
- FFVkQueueFamilyCtx qf;
+ AVVulkanDeviceQueueFamily *qf;
FFVulkanShader shd;
VkSampler sampler;
@@ -61,8 +61,14 @@ static av_cold int init_filter(AVFilterContext *ctx, AVFrame *in)
return AVERROR_EXTERNAL;
}
- ff_vk_qf_init(vkctx, &s->qf, VK_QUEUE_COMPUTE_BIT);
- RET(ff_vk_exec_pool_init(vkctx, &s->qf, &s->e, s->qf.nb_queues*4, 0, 0, 0, NULL));
+ s->qf = ff_vk_qf_find(vkctx, VK_QUEUE_COMPUTE_BIT, 0);
+ if (!s->qf) {
+ av_log(ctx, AV_LOG_ERROR, "Device has no compute queues\n");
+ err = AVERROR(ENOTSUP);
+ goto fail;
+ }
+
+ RET(ff_vk_exec_pool_init(vkctx, s->qf, &s->e, s->qf->num*4, 0, 0, 0, NULL));
RET(ff_vk_init_sampler(vkctx, &s->sampler, 1, VK_FILTER_LINEAR));
RET(ff_vk_shader_init(vkctx, &s->shd, "transpose",
VK_SHADER_STAGE_COMPUTE_BIT,