Skip to content

Commit

Permalink
ci: enable shaderc
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed Jan 25, 2025
1 parent f553988 commit 561b96b
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ jobs:
run: |
export FFSRC=$PWD/ffmpeg-${FF_VERSION}
[[ "${TARGET_OS}" == "iOS" || "${TARGET_OS}" == "tvOS"* || "${TARGET_OS}" == "xr"* || "${TARGET_OS}" == "vision"* ]] && export USER_OPT="--enable-wolfssl"
[[ "${TARGET_OS}" == "macOS" ]] && export USER_OPT="--enable-libshaderc"
./avbuild.sh ${TARGET_OS}
- name: Make SDK
shell: bash
Expand Down Expand Up @@ -192,6 +193,9 @@ jobs:
wget https://sourceforge.net/projects/avbuild/files/dep/dep.7z/download -O dep.7z
- name: Configure and Build
shell: cmd
env:
USER_OPT: --enable-libshaderc
if: ${{ matrix.target != 'uwp' }}
run: |
7z x -y dep.7z -otools
set PKG_CONFIG_PATH_MFX=%CD%\tools\dep\VS2022\lib\pkgconfig
Expand Down Expand Up @@ -273,6 +277,7 @@ jobs:
set HOME=%CD%
set FFSRC=%CD%\ffmpeg-%FF_VERSION%
set BUILD_NOW=true
set USER_OPT=--enable-libshaderc
tools\vcbuild.bat VS2022 %TARGET_OS%10 all
- name: Make SDK
shell: cmd
Expand Down Expand Up @@ -383,6 +388,7 @@ jobs:
export FFSRC=$PWD/ffmpeg-${FF_VERSION}
export WindowsSdkDir=${WINDOWSSDKDIR}
export WindowsSDKVersion=$(cat ${WINDOWSSDKDIR}/.version)
export USER_OPT="--enable-libshaderc"
USE_TOOLCHAIN=clang-${LLVM_VER:-$LLVM_VER_DEFAULT} ./avbuild.sh $TARGET_OS "arm64 x86 x64"
- name: Make SDK
shell: bash
Expand Down Expand Up @@ -512,7 +518,7 @@ jobs:
run: |
export FFSRC=$PWD/ffmpeg-${FF_VERSION}
export SYSROOT=/tmp/sysroot
export USER_OPT="--enable-wolfssl"
export USER_OPT="--enable-wolfssl --enable-libshaderc"
USE_TOOLCHAIN=clang-${LLVM_VER:-$LLVM_VER_DEFAULT} ./avbuild.sh linux "amd64 arm64 armhf"
- name: Make SDK
shell: bash
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build_gpl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ jobs:
set HOME=%CD%
set FFSRC=%CD%\ffmpeg-%FF_VERSION%
set BUILD_NOW=true
set USER_OPT=--enable-libshaderc
tools\vcbuild.bat VS2022 %TARGET_OS%10 x64
- name: Make SDK
shell: cmd
Expand Down Expand Up @@ -183,6 +184,7 @@ jobs:
export FFSRC=$PWD/ffmpeg-${FF_VERSION}
export WindowsSdkDir=${WINDOWSSDKDIR}
export WindowsSDKVersion=$(cat ${WINDOWSSDKDIR}/.version)
export USER_OPT="--enable-libshaderc"
USE_TOOLCHAIN=clang-${LLVM_VER:-$LLVM_VER_DEFAULT} ./avbuild.sh $TARGET_OS "x64 arm64"
- name: Make SDK
shell: bash
Expand Down Expand Up @@ -235,6 +237,7 @@ jobs:
run: |
export FFSRC=$PWD/ffmpeg-${FF_VERSION}
export SYSROOT=/tmp/sysroot
export USER_OPT="--enable-libshaderc"
USE_TOOLCHAIN=clang-${LLVM_VER:-$LLVM_VER_DEFAULT} ./avbuild.sh linux "amd64 arm64"
- name: Make SDK
shell: bash
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
From 17babeab7ee4cf290e7c9f9276500414fbedcb29 Mon Sep 17 00:00:00 2001
From: wang-bin <[email protected]>
Date: Thu, 16 Jan 2025 14:22:47 +0800
Subject: [PATCH] lavfi: fix undefined ff_vk_shader_print if vulkan filters are
disabled

---
libavfilter/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index 4d9681768b..0695039d05 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -649,8 +649,8 @@ OBJS-$(CONFIG_AMOVIE_FILTER) += src_movie.o
OBJS-$(CONFIG_MOVIE_FILTER) += src_movie.o

# vulkan libs
-OBJS-$(CONFIG_LIBGLSLANG) += vulkan_glslang.o
-OBJS-$(CONFIG_LIBSHADERC) += vulkan_shaderc.o
+OBJS-$(CONFIG_LIBGLSLANG) += vulkan_glslang.o vulkan.o
+OBJS-$(CONFIG_LIBSHADERC) += vulkan_shaderc.o vulkan.o

# Objects duplicated from other libraries for shared builds
SHLIBOBJS += log2_tab.o
--
2.39.5 (Apple Git-154)

5 changes: 5 additions & 0 deletions tools/mklibffmpeg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,15 @@ 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
Expand Down

0 comments on commit 561b96b

Please sign in to comment.