Skip to content

Commit

Permalink
patch: fix spirv_compiler for 5.0~7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed Feb 24, 2025
1 parent f585ffa commit 7438820
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 5 deletions.
26 changes: 26 additions & 0 deletions patches/common/0001-add-spirv_compiler-to-avfilter_suggest.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From edd5b7a0908d7eadc2630e2b9e722e82cb9be127 Mon Sep 17 00:00:00 2001
From: wang-bin <[email protected]>
Date: Mon, 24 Feb 2025 09:27:04 +0800
Subject: [PATCH] add spirv_compiler to avfilter_suggest

if spirv_compiler is enabled without any vulkan filter
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 45412d728f..56bd9016bb 100755
--- a/configure
+++ b/configure
@@ -4044,7 +4044,7 @@ avcodec_suggest="libm stdatomic liblcevc_dec"
avdevice_deps="avformat avcodec avutil"
avdevice_suggest="libm stdatomic"
avfilter_deps="avutil"
-avfilter_suggest="libm stdatomic"
+avfilter_suggest="libm stdatomic spirv_compiler"
avformat_deps="avcodec avutil"
avformat_suggest="libm network zlib stdatomic"
avutil_suggest="clock_gettime ffnvcodec gcrypt libm libdrm libmfx opencl openssl user32 vaapi vulkan videotoolbox corefoundation corevideo coremedia bcrypt stdatomic"
--
2.39.5 (Apple Git-154)

13 changes: 8 additions & 5 deletions tools/mklibffmpeg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,23 @@ DUP_OBJS=(libswscale/log2_tab.o libswresample/log2_tab.o libavcodec/log2_tab.o l
libavcodec/avcodecres.o
libavcodec/half2float.o # half2float.c is in libavutil, but not built into libavutil, always built in swscale
libavcodec/vulkan.o
# vulkan_shaderc.o and vulkan_glslang.o are not included in avutil, so keep avcodec ones
#libavcodec/vulkan_shaderc.o
#libavcodec/vulkan_glslang.o
libavdevice/avdeviceres.o
libavformat/avformatres.o
libavfilter/avfilterres.o
libavfilter/vulkan.o
libavfilter/vulkan_shaderc.o
libavfilter/vulkan_glslang.o
libavresample/avresample.o
libswscale/swscaleres.o
libswresample/swresampleres.o
libpostproc/postprocres.o
)
if [ -f "$BUILD_DIR/src/libavutil/vulkan_shaderc.c" ]; then
# ffmpeg > 7.1
DUP_OBJS+=(libavfilter/vulkan_shaderc.o libavfilter/vulkan_glslang.o
# vulkan_shaderc.o and vulkan_glslang.o are not included in avutil, so keep avcodec ones
#libavcodec/vulkan_shaderc.o
#libavcodec/vulkan_glslang.o
)
fi
grep -q ffjni.c libavformat/file.d 2>/dev/null && DUP_OBJS+=(libavcodec/ffjni.o)
OBJS=`find compat lib* -name "*.o" |grep -vE "$(join '|' ${DUP_OBJS[@]})"`
# appveyor PATH value is very large, xargs gets error "environment is too large for exec", so use echo
Expand Down

0 comments on commit 7438820

Please sign in to comment.