mirror of https://gitlab.freedesktop.org/mesa/mesa
d3d12/ci: Add vainfo with appverifier CI check
This trivially covers VA initialization/destruction path is working with the d3d12 gallium driver, and also check for leaks using appverifier. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28577>
This commit is contained in:
parent
5028a9ede3
commit
54ca0b3b21
|
@ -40,7 +40,7 @@ variables:
|
|||
WINDOWS_X64_MSVC_TAG: "20231222-msvc"
|
||||
|
||||
WINDOWS_X64_BUILD_PATH: "windows/x86_64_build"
|
||||
WINDOWS_X64_BUILD_TAG: "20240322-agility-sdk"
|
||||
WINDOWS_X64_BUILD_TAG: "20240405-vainfo-ci-1"
|
||||
|
||||
WINDOWS_X64_TEST_PATH: "windows/x86_64_test"
|
||||
WINDOWS_X64_TEST_TAG: "20240402-agility-sdk"
|
||||
WINDOWS_X64_TEST_TAG: "20240405-vainfo-ci-1"
|
||||
|
|
|
@ -7,6 +7,10 @@ COPY mesa_deps_vulkan_sdk.ps1 C:\
|
|||
RUN C:\mesa_deps_vulkan_sdk.ps1
|
||||
|
||||
COPY mesa_init_msvc.ps1 C:\
|
||||
|
||||
COPY mesa_deps_libva.ps1 C:\
|
||||
RUN C:\mesa_deps_libva.ps1
|
||||
|
||||
COPY mesa_deps_build.ps1 C:\
|
||||
RUN C:\mesa_deps_build.ps1
|
||||
|
||||
|
|
|
@ -14,6 +14,9 @@ RUN C:\mesa_deps_rust.ps1
|
|||
|
||||
COPY mesa_init_msvc.ps1 C:\
|
||||
|
||||
COPY mesa_deps_libva.ps1 C:\
|
||||
RUN C:\mesa_deps_libva.ps1
|
||||
|
||||
COPY mesa_deps_test_piglit.ps1 C:\
|
||||
RUN C:\mesa_deps_test_piglit.ps1
|
||||
COPY mesa_deps_test_deqp.ps1 c:\
|
||||
|
|
|
@ -84,4 +84,6 @@ Copy-Item ".\.gitlab-ci\windows\spirv2dxil_run.ps1" -Destination $installdir
|
|||
|
||||
Copy-Item ".\.gitlab-ci\windows\deqp_runner_run.ps1" -Destination $installdir
|
||||
|
||||
Copy-Item ".\.gitlab-ci\windows\vainfo_run.ps1" -Destination $installdir
|
||||
|
||||
Get-ChildItem -Recurse -Filter "ci" | Get-ChildItem -Include "*.txt","*.toml" | Copy-Item -Destination $installdir
|
||||
|
|
|
@ -55,35 +55,6 @@ if (!$buildstatus) {
|
|||
Exit 1
|
||||
}
|
||||
|
||||
|
||||
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 df3c584bb79d1a1e521372d62fa62e8b1c52ce6c"
|
||||
# libva-win32 is released with libva version 2.17 (see https://github.com/intel/libva/releases/tag/2.17.0)
|
||||
git checkout 2.17.0
|
||||
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
|
||||
Write-Host "Cloning LLVM release/15.x"
|
||||
git clone -b release/15.x --depth=1 https://github.com/llvm/llvm-project deps/llvm-project
|
||||
|
|
|
@ -0,0 +1,79 @@
|
|||
# Compiling libva/libva-utils deps
|
||||
|
||||
$ProgressPreference = "SilentlyContinue"
|
||||
$MyPath = $MyInvocation.MyCommand.Path | Split-Path -Parent
|
||||
. "$MyPath\mesa_init_msvc.ps1"
|
||||
|
||||
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "deps" | Out-Null
|
||||
$depsInstallPath="C:\mesa-deps"
|
||||
|
||||
Write-Host "Cloning libva at:"
|
||||
Get-Date
|
||||
git clone https://github.com/intel/libva.git deps/libva
|
||||
if (!$?) {
|
||||
Write-Host "Failed to clone libva repository"
|
||||
Exit 1
|
||||
}
|
||||
|
||||
Write-Host "Cloning libva finished at:"
|
||||
Get-Date
|
||||
|
||||
Write-Host "Building libva at:"
|
||||
Get-Date
|
||||
|
||||
Push-Location -Path ".\deps\libva"
|
||||
Write-Host "Checking out libva..."
|
||||
git checkout 2.21.0
|
||||
Pop-Location
|
||||
|
||||
# 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
|
||||
}
|
||||
|
||||
Write-Host "Building libva finished at:"
|
||||
Get-Date
|
||||
|
||||
Write-Host "Cloning libva-utils at:"
|
||||
Get-Date
|
||||
git clone https://github.com/intel/libva-utils.git deps/libva-utils
|
||||
if (!$?) {
|
||||
Write-Host "Failed to clone libva-utils repository"
|
||||
Exit 1
|
||||
}
|
||||
|
||||
Write-Host "Cloning libva-utils finished at:"
|
||||
Get-Date
|
||||
|
||||
Write-Host "Building libva-utils at:"
|
||||
Get-Date
|
||||
|
||||
Push-Location -Path ".\deps\libva-utils"
|
||||
Write-Host "Checking out libva-utils..."
|
||||
git checkout 2.21.0
|
||||
Pop-Location
|
||||
|
||||
Write-Host "Building libva-utils"
|
||||
# libva-utils already has a build dir in their repo, use builddir instead
|
||||
$libva_utils_build = New-Item -ItemType Directory -Path ".\deps\libva-utils" -Name "builddir"
|
||||
Push-Location -Path $libva_utils_build.FullName
|
||||
meson .. -Dprefix="$depsInstallPath" --pkg-config-path="$depsInstallPath\lib\pkgconfig;$depsInstallPath\share\pkgconfig"
|
||||
ninja -j32 install
|
||||
$buildstatus = $?
|
||||
Pop-Location
|
||||
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path $libva_utils_build
|
||||
if (!$buildstatus) {
|
||||
Write-Host "Failed to compile libva-utils"
|
||||
Exit 1
|
||||
}
|
||||
|
||||
Write-Host "Building libva-utils finished at:"
|
||||
Get-Date
|
|
@ -0,0 +1,99 @@
|
|||
|
||||
function Deploy-Dependencies {
|
||||
param (
|
||||
[string] $deploy_directory
|
||||
)
|
||||
|
||||
Write-Host "Copying libva runtime and driver at:"
|
||||
Get-Date
|
||||
|
||||
# Copy the VA runtime binaries from the mesa built dependencies so the versions match with the built mesa VA driver binary
|
||||
$depsInstallPath="C:\mesa-deps"
|
||||
Copy-Item "$depsInstallPath\bin\vainfo.exe" -Destination "$deploy_directory\vainfo.exe"
|
||||
Copy-Item "$depsInstallPath\bin\va_win32.dll" -Destination "$deploy_directory\va_win32.dll"
|
||||
Copy-Item "$depsInstallPath\bin\va.dll" -Destination "$deploy_directory\va.dll"
|
||||
|
||||
# Copy Agility SDK into D3D12 subfolder of vainfo
|
||||
New-Item -ItemType Directory -Force -Path "$deploy_directory\D3D12" | Out-Null
|
||||
Copy-Item "$depsInstallPath\bin\D3D12\D3D12Core.dll" -Destination "$deploy_directory\D3D12\D3D12Core.dll"
|
||||
Copy-Item "$depsInstallPath\bin\D3D12\d3d12SDKLayers.dll" -Destination "$deploy_directory\D3D12\d3d12SDKLayers.dll"
|
||||
|
||||
# Copy WARP next to vainfo
|
||||
Copy-Item "$depsInstallPath\bin\d3d10warp.dll" -Destination "$deploy_directory\d3d10warp.dll"
|
||||
|
||||
Write-Host "Copying libva runtime and driver finished at:"
|
||||
Get-Date
|
||||
}
|
||||
|
||||
function Check-VAInfo-Entrypoint {
|
||||
param (
|
||||
[string] $vainfo_app_path,
|
||||
[string] $entrypoint
|
||||
)
|
||||
|
||||
$vainfo_run_cmd = "$vainfo_app_path --display win32 --device 0 2>&1 | Select-String $entrypoint -Quiet"
|
||||
Write-Host "Running: $vainfo_run_cmd"
|
||||
$vainfo_ret_code= Invoke-Expression $vainfo_run_cmd
|
||||
if (-not($vainfo_ret_code)) {
|
||||
return 0
|
||||
}
|
||||
return 1
|
||||
}
|
||||
|
||||
# Set testing environment variables
|
||||
$successful_run=1
|
||||
$testing_dir="$PWD\_install\bin" # vaon12_drv_video.dll is placed on this directory by the build
|
||||
$vainfo_app_path = "$testing_dir\vainfo.exe"
|
||||
|
||||
# Deploy vainfo and dependencies
|
||||
Deploy-Dependencies -deploy_directory $testing_dir
|
||||
|
||||
# Set VA runtime environment variables
|
||||
$env:LIBVA_DRIVER_NAME="vaon12"
|
||||
$env:LIBVA_DRIVERS_PATH="$testing_dir"
|
||||
|
||||
Write-Host "LIBVA_DRIVER_NAME: $env:LIBVA_DRIVER_NAME"
|
||||
Write-Host "LIBVA_DRIVERS_PATH: $env:LIBVA_DRIVERS_PATH"
|
||||
|
||||
# Check video processing entrypoint is supported
|
||||
# Inbox WARP/D3D12 supports this entrypoint with VA frontend shaders support (e.g no video APIs support required)
|
||||
$entrypoint = "VAEntrypointVideoProc"
|
||||
|
||||
# First run without app verifier
|
||||
Write-Host "Disabling appverifier for $vainfo_app_path and checking for the presence of $entrypoint supported..."
|
||||
appverif.exe /disable * -for "$vainfo_app_path"
|
||||
$result_without_appverifier = Check-VAInfo-Entrypoint -vainfo_app_path $vainfo_app_path -entrypoint $entrypoint
|
||||
if ($result_without_appverifier -eq 1) {
|
||||
Write-Host "Process exited successfully."
|
||||
} else {
|
||||
$successful_run=0
|
||||
Write-Error "Process exit not successful for $vainfo_run_cmd. Please see vainfo verbose output below for diagnostics..."
|
||||
# verbose run to print more info on error (helpful to investigate issues from the CI output)
|
||||
Invoke-Expression "$vainfo_app_path -a --display win32 --device help"
|
||||
Invoke-Expression "$vainfo_app_path -a --display win32 --device 0"
|
||||
}
|
||||
|
||||
# Enable appverif and run again
|
||||
Write-Host "Enabling appverifier for $vainfo_app_path and checking for the presence of $entrypoint supported..."
|
||||
appverif.exe /logtofile enable
|
||||
appverif.exe /verify "$vainfo_app_path"
|
||||
appverif.exe /enable "Leak" -for "$vainfo_app_path"
|
||||
$verifier_log_path="$testing_dir\vainfo_appverif_log.xml"
|
||||
$result_with_appverifier = Check-VAInfo-Entrypoint -vainfo_app_path $vainfo_app_path -entrypoint $entrypoint
|
||||
if ($result_with_appverifier -eq 1) {
|
||||
Write-Host "Process exited successfully."
|
||||
appverif.exe /logtofile disable
|
||||
} else {
|
||||
Write-Host "Process failed. Please see Application Verifier log contents below."
|
||||
# Need to wait for appverif to exit before gathering log
|
||||
Start-Process -Wait -FilePath "appverif.exe" -ArgumentList "-export", "log", "-for", "$vainfo_app_path", "-with", "to=$verifier_log_path"
|
||||
Get-Content $verifier_log_path
|
||||
Write-Error "Process exit not successful for $vainfo_run_cmd."
|
||||
appverif.exe /logtofile disable
|
||||
$successful_run=0
|
||||
}
|
||||
|
||||
if ($successful_run -ne 1) {
|
||||
Exit 1
|
||||
}
|
||||
|
|
@ -43,3 +43,9 @@ test-d3d12-quick_shader:
|
|||
variables:
|
||||
PIGLIT_SUITE: d3d12-quick_shader.toml
|
||||
PIGLIT_BASELINE: d3d12-quick_shader.txt
|
||||
|
||||
test-d3d12-vainfo:
|
||||
extends:
|
||||
- .d3d12-test
|
||||
script:
|
||||
- . _install/vainfo_run.ps1
|
||||
|
|
Loading…
Reference in New Issue