CI: Add gallium-va and video-codecs in windows-vs2019 and debian-mingw32-x86_64
authorSil Vilerino <sivileri@microsoft.com>
Fri, 14 Oct 2022 14:36:58 +0000 (10:36 -0400)
committerMarge Bot <emma+marge@anholt.net>
Wed, 19 Oct 2022 00:45:48 +0000 (00:45 +0000)
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19063>

.gitlab-ci/build/gitlab-ci.yml
.gitlab-ci/container/debian/x86_build-mingw-source-deps.sh
.gitlab-ci/image-tags.yml
.gitlab-ci/windows/mesa_build.ps1
.gitlab-ci/windows/mesa_deps_build.ps1

index 5cb14ae..cff465e 100644 (file)
@@ -611,6 +611,8 @@ debian-mingw32-x86_64:
       -D microsoft-clc=enabled
       -D static-libclc=all
       -D llvm=enabled
+      -D gallium-va=true
+      -D video-codecs=h264dec,h264enc,h265dec,h265enc,vc1dec
     EXTRA_OPTION: >
       -D min-windows-version=7
       -D spirv-to-dxil=true
index 0dc5833..e42a65f 100644 (file)
@@ -3,6 +3,9 @@
 
 set -e
 
+# Building libdrm (libva dependency)
+. .gitlab-ci/container/build-libdrm.sh
+
 wd=$PWD
 CMAKE_TOOLCHAIN_MINGW_PATH=$wd/.gitlab-ci/container/debian/x86_mingw-toolchain.cmake
 mkdir -p ~/tmp
@@ -21,6 +24,25 @@ meson .. \
 ninja install
 popd
 
+# Building libva
+git clone https://github.com/intel/libva
+pushd libva/
+# Checking out commit hash with libva-win32 support
+# This feature will be released with libva version 2.17
+git checkout 2579eb0f77897dc01a02c1e43defc63c40fd2988
+popd
+# libva already has a build dir in their repo, use builddir instead
+mkdir -p libva/builddir
+pushd libva/builddir
+meson .. \
+--backend=ninja \
+--buildtype=release \
+-Dprefix=/usr/x86_64-w64-mingw32/ \
+--cross-file=$wd/.gitlab-ci/x86_64-w64-mingw32
+
+ninja install
+popd
+
 export VULKAN_SDK_VERSION=1.3.211.0
 
 # Building SPIRV Tools
index 3da0611..ade4972 100644 (file)
@@ -6,7 +6,7 @@ variables:
    DEBIAN_BUILD_TAG: "2022-09-30-mkbootimg"
 
    DEBIAN_X86_BUILD_MINGW_IMAGE_PATH: "debian/x86_build-mingw"
-   DEBIAN_BUILD_MINGW_TAG: "2022-08-25-shellcheck"
+   DEBIAN_BUILD_MINGW_TAG: "2022-10-17-add-libdrm-libva-deps.3"
 
    DEBIAN_X86_TEST_BASE_IMAGE: "debian/x86_test-base"
 
@@ -21,7 +21,7 @@ variables:
    WINDOWS_X64_VS_TAG: "2022-08-17-bump"
 
    WINDOWS_X64_BUILD_PATH: "windows/x64_build"
-   WINDOWS_X64_BUILD_TAG: "2022-08-17-bump"
+   WINDOWS_X64_BUILD_TAG: "2022-10-17-add-libva-deps.1"
 
    WINDOWS_X64_TEST_PATH: "windows/x64_test"
    WINDOWS_X64_TEST_TAG: "2022-08-17-bump"
index 88f7d2f..ce9759d 100644 (file)
@@ -49,6 +49,8 @@ meson `
 -Dshared-llvm=disabled `
 -Dvulkan-drivers="swrast,amd,microsoft-experimental" `
 -Dgallium-drivers="swrast,d3d12,zink" `
+-Dgallium-va=true `
+-Dvideo-codecs="h264dec,h264enc,h265dec,h265enc,vc1dec" `
 -Dshared-glapi=enabled `
 -Dgles1=enabled `
 -Dgles2=enabled `
index 1034981..afeb8bf 100644 (file)
@@ -33,6 +33,35 @@ Pop-Location
 $depsInstallPath="C:\mesa-deps"
 
 Get-Date
+Write-Host "Cloning libva"
+git clone https://github.com/intel/libva.git deps/libva
+if (!$?) {
+  Write-Host "Failed to clone libva repository"
+  Exit 1
+}
+
+Push-Location -Path ".\deps\libva"
+Write-Host "Checking out libva commit 2579eb0f77897dc01a02c1e43defc63c40fd2988"
+# Checking out commit hash with libva-win32 support
+# This feature will be released with libva version 2.17
+git checkout 2579eb0f77897dc01a02c1e43defc63c40fd2988
+Pop-Location
+
+Write-Host "Building libva"
+# libva already has a build dir in their repo, use builddir instead
+$libva_build = New-Item -ItemType Directory -Path ".\deps\libva" -Name "builddir"
+Push-Location -Path $libva_build.FullName
+meson .. -Dprefix="$depsInstallPath"
+ninja -j32 install
+$buildstatus = $?
+Pop-Location
+Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path $libva_build
+if (!$buildstatus) {
+  Write-Host "Failed to compile libva"
+  Exit 1
+}
+
+Get-Date
 # slightly convoluted syntax but avoids the CWD being under the PS filesystem meta-path
 $llvm_build = New-Item -ItemType Directory -ErrorAction SilentlyContinue -Force -Path ".\deps\llvm-project" -Name "build"
 Push-Location -Path $llvm_build.FullName