diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 46737820f7..6d76a76bf9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -555,6 +555,7 @@ jobs: update: true install: git pacboy: >- + amf-headers:p angleproject:p ca-certificates:p cc:p diff --git a/ci/build-mingw64.sh b/ci/build-mingw64.sh index 4a85e0ac2c..daf8dbe546 100755 --- a/ci/build-mingw64.sh +++ b/ci/build-mingw64.sh @@ -155,6 +155,17 @@ _lcms2 () { } _lcms2_mark=lib/liblcms2.dll.a +_amf_headers () { + local ver=1.5.0 + gettar "https://github.com/GPUOpen-LibrariesAndSDKs/AMF/releases/download/v${ver}/AMF-headers-v${ver}.tar.gz" + pushd amf-headers-v${ver} + mkdir -p "$prefix_dir/include" + cp -r AMF "$prefix_dir/include/" + touch "$prefix_dir/include/AMF/core/Version.h" + popd +} +_amf_headers_mark=include/AMF/core/Version.h + _ffmpeg () { [ -d ffmpeg ] || $gitclone https://github.com/FFmpeg/FFmpeg.git ffmpeg builddir ffmpeg @@ -291,7 +302,7 @@ _subrandr () { } _subrandr_mark=lib/libsubrandr.dll.a -for x in iconv zlib shaderc spirv-cross nv-headers dav1d lcms2; do +for x in iconv zlib shaderc spirv-cross amf-headers nv-headers dav1d lcms2; do build_if_missing $x done if [[ "$TARGET" != "i686-"* ]]; then @@ -321,7 +332,7 @@ meson setup $build --cross-file "$prefix_dir/crossfile" $common_args \ -Dmujs:werror=false \ -Dmujs:default_library=static \ -Dlua=luajit \ - -D{shaderc,spirv-cross,d3d11,javascript}=enabled + -D{amf,shaderc,spirv-cross,d3d11,javascript}=enabled meson compile -C $build if [ "$2" = pack ]; then diff --git a/ci/build-msys2.sh b/ci/build-msys2.sh index e51b985966..2ba3c992e7 100755 --- a/ci/build-msys2.sh +++ b/ci/build-msys2.sh @@ -3,7 +3,7 @@ . ./ci/build-common.sh args=( - -D{cdda,d3d-hwaccel,d3d11,dvdnav,jpeg,lcms2,libarchive}=enabled + -D{amf,cdda,d3d-hwaccel,d3d11,dvdnav,jpeg,lcms2,libarchive}=enabled -D{libbluray,lua,shaderc,spirv-cross,uchardet,vapoursynth}=enabled -D{egl-angle-lib,egl-angle-win32,pdf-build,rubberband,win32-smtc}=enabled ) diff --git a/ci/build-win32.ps1 b/ci/build-win32.ps1 index c4cfc4edaf..533a847ca7 100644 --- a/ci/build-win32.ps1 +++ b/ci/build-win32.ps1 @@ -7,6 +7,19 @@ if (-not (Test-Path $subprojects)) { New-Item -Path $subprojects -ItemType Directory | Out-Null } +$amfVersion = "1.5.0" +$amfUrl = "https://github.com/GPUOpen-LibrariesAndSDKs/AMF/releases/download/v$amfVersion/AMF-headers-v$amfVersion.tar.gz" +$amfArchive = "AMF-headers-v$amfVersion.tar.gz" +$amfExtractPath = "$subprojects/amf-headers" +if (-not (Test-Path $amfArchive)) { + Invoke-WebRequest -Uri $amfUrl -OutFile $amfArchive +} +if (-not (Test-Path "$amfExtractPath/AMF")) { + New-Item -Path $amfExtractPath -ItemType Directory -Force | Out-Null + tar -xzf $amfArchive --strip-components=1 -C $amfExtractPath +} +$amfExtractPath = Resolve-Path $amfExtractPath + # Wrap shaderc to run git-sync-deps and patch unsupported generator expression if (-not (Test-Path "$subprojects/shaderc_cmake")) { git clone https://github.com/google/shaderc --depth 1 $subprojects/shaderc_cmake @@ -227,6 +240,7 @@ clone-recursive = true meson setup build ` --wrap-mode=forcefallback ` -Ddefault_library=static ` + -Dc_args="-I$amfExtractPath" ` -Dlibmpv=true ` -Dtests=true ` -Dgpl=true ` @@ -254,6 +268,7 @@ meson setup build ` -Dxxhash:inline-all=true ` -Dxxhash:cli=false ` -Dluajit:amalgam=true ` + -Damf=enabled ` -Dd3d11=enabled ` -Dvulkan=enabled ` -Djavascript=enabled `