configure: make swscale_vulkan depend on unstable

The SPIR-V backend is built on top of the ops code, which is only compiled
with CONFIG_UNSTABLE. Express this dependency in configure instead of
guarding the vulkan Makefile include and ff_sws_vk_init() call separately.

This also fixes linking with --disable-unstable when vulkan is enabled, as
graph.c referenced ff_sws_vk_device_ref() from the excluded vulkan objects.

Fixes: 51d4406e07 ("swscale/graph: support allocating hardware intermediate frames")
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Niklas Haas <git@haasn.dev>
This commit is contained in:
Niklas HaasandClaude Opus 5.5 authored and Niklas Haas committed 2026-10-30 10:55:13 +00:00
1 parent 60a2818f76
commit 9bbaa0cdd8
3 files changed
+2 -4

No files matched your search

Vendored
+1 -1
View File
@@ -3354,7 +3354,7 @@ vulkan_deps="threads"
vulkan_deps_any="libdl LoadLibrary"
spirv_headers_spirv_h_deps="vulkan"
spirv_unified1_spirv_h_deps="vulkan"
swscale_vulkan_deps="vulkan"
swscale_vulkan_deps="vulkan unstable"
swscale_vulkan_if_any="spirv_headers_spirv_h spirv_unified1_spirv_h"
apv_vulkan_hwaccel_deps="vulkan spirv_compiler"
-2
View File
@@ -38,9 +38,7 @@ OBJS-$(CONFIG_UNSTABLE) += \
uops.o \
uops_backend.o \
ifeq ($(CONFIG_UNSTABLE),yes)
include $(SRC_PATH)/libswscale/vulkan/Makefile
endif
# Objects duplicated from other libraries for shared builds
SHLIBOBJS += framepool.o log2_tab.o half2float.o
+1 -1
View File
@@ -1580,7 +1580,7 @@ int sws_frame_setup(SwsContext *ctx, const AVFrame *dst, const AVFrame *src)
if (dev_ctx->type != AV_HWDEVICE_TYPE_VULKAN)
return AVERROR(ENOTSUP);
#if CONFIG_UNSTABLE && CONFIG_SWSCALE_VULKAN
#if CONFIG_SWSCALE_VULKAN
ret = ff_sws_vk_init(ctx, src_hwfc->device_ref);
if (ret < 0)
return ret;