configure: enable Vulkan only if the SPIR-V headers are installed

FFmpeg has had an issue with GLSL compilation libraries since they
were first merged 6 years ago. The libraries don't have a stable ABI,
are very difficult for packagers to compile and integrate, are slow,
not threadsafe, and uncomfortable to use. The decision to switch all
Vulkan code to either compile-time GLSL or SPIR-V assembly was taken
in January, and since then, and included with the release of FFmpeg 8.1,
the progress has been steadily eliminating all remaining runtime GLSL
compilation.

Sponsored-by: Sovereign Tech Fund
This commit is contained in:
Lynne
2026-03-27 15:14:39 +01:00
parent ebfd18ad03
commit 72a0b20e42

4
configure vendored
View File

@@ -7804,6 +7804,10 @@ elif enabled vulkan; then
check_cpp_condition vulkan "vulkan/vulkan.h" "defined(VK_VERSION_1_4) || (defined(VK_VERSION_1_3) && VK_HEADER_VERSION >= 277)" $vulkan_incflags
fi
if enabled vulkan; then
check_cpp_condition vulkan "spirv/unified1/spirv.h" "defined(SPV_VERSION)" || die "spirv-headers is required to build with Vulkan support enabled."
fi
probe_glslc(){
glslc_probe=$1
if test_cmd $glslc_probe -v; then