diff --git a/buildscript/build.cmd b/buildscript/build.cmd index 9ba7c71f..0868612b 100644 --- a/buildscript/build.cmd +++ b/buildscript/build.cmd @@ -69,15 +69,15 @@ @rem If using MSVC do SPIR-V Tools build @IF %toolchain%==msvc call "%devroot%\%projectname%\buildscript\modules\spirv.cmd" +@rem If using MSVC do VA-API library build +@IF %toolchain%==msvc call "%devroot%\%projectname%\buildscript\modules\libva.cmd" + @rem If using MSYS2 Mingw-w64 update MSYS2 packages @IF NOT %toolchain%==msvc call "%devroot%\%projectname%\buildscript\modules\msysupdate.cmd" @rem If using MSYS2 Mingw-w64 install necessary packages @IF NOT %toolchain%==msvc call "%devroot%\%projectname%\buildscript\modules\msyspackages.cmd" -@rem VA-API library build -@call "%devroot%\%projectname%\buildscript\modules\libva.cmd" - @rem If using MSVC do LLVM build. @IF %toolchain%==msvc call "%devroot%\%projectname%\buildscript\modules\llvm.cmd" @IF %toolchain%==msvc call "%devroot%\%projectname%\buildscript\modules\libclc.cmd" diff --git a/buildscript/modules/envdump.cmd b/buildscript/modules/envdump.cmd index 26382051..50f89d0a 100644 --- a/buildscript/modules/envdump.cmd +++ b/buildscript/modules/envdump.cmd @@ -139,11 +139,9 @@ set "exitloop=" ) @rem Get libva and VA-API versions -@IF EXIST "%devroot%\libva\build\%toolchain%-%abi%\lib\pkgconfig\libva-win32.pc" for /f tokens^=1^-2^ delims^=^=^ eol^= %%a IN ('type "%devroot%\libva\build\%toolchain%-%abi%\lib\pkgconfig\libva-win32.pc"') DO @( -@IF %toolchain%==msvc if "%%a"=="libva_version" echo libva %%b>>"%devroot%\%projectname%\buildinfo\msvc.txt" -@IF NOT %toolchain%==msvc if "%%a"=="libva_version" echo libva %%b>>"%devroot%\%projectname%\buildinfo\mingw.txt" -@IF %toolchain%==msvc if "%%a"=="va_api_version" echo VA-API %%b>>"%devroot%\%projectname%\buildinfo\msvc.txt" -@IF NOT %toolchain%==msvc if "%%a"=="va_api_version" echo VA-API %%b>>"%devroot%\%projectname%\buildinfo\mingw.txt" +@IF %toolchain%==msvc IF EXIST "%devroot%\libva\build\%abi%\lib\pkgconfig\libva-win32.pc" for /f tokens^=1^-2^ delims^=^=^ eol^= %%a IN ('type "%devroot%\libva\build\%abi%\lib\pkgconfig\libva-win32.pc"') DO @( +@if "%%a"=="libva_version" echo libva %%b>>"%devroot%\%projectname%\buildinfo\msvc.txt" +@if "%%a"=="va_api_version" echo VA-API %%b>>"%devroot%\%projectname%\buildinfo\msvc.txt" ) @rem Get DirectX headers version diff --git a/buildscript/modules/libva.cmd b/buildscript/modules/libva.cmd index ee970306..d4af2212 100644 --- a/buildscript/modules/libva.cmd +++ b/buildscript/modules/libva.cmd @@ -14,36 +14,26 @@ @git checkout 2.17.0 ) @IF %gitstate% GTR 0 echo. -@IF %toolchain%==msvc IF "%pkgconfigstate%"=="0" GOTO nolibva +@IF "%pkgconfigstate%"=="0" GOTO nolibva @set /p buildlibva=Do you want to build VA-API library (y/n): @echo. @IF /I NOT "%buildlibva%"=="y" GOTO nolibva -@IF %toolchain%==msvc call %vsenv% %vsabi% -@IF %toolchain%==msvc cd "%devroot%\libva" -@IF %toolchain%==msvc echo. +@call %vsenv% %vsabi% +@cd "%devroot%\libva" +@echo. @IF NOT EXIST "build\" MD build @echo Cleanning VA-API library build... @echo. -@IF EXIST "build\%toolchain%-%abi%" RD /S /Q build\%toolchain%-%abi% -@IF EXIST "build\buildsys-%toolchain%-%abi%" RD /S /Q build\buildsys-%toolchain%-%abi% +@IF EXIST "build\%abi%" RD /S /Q build\%abi% +@IF EXIST "build\buildsys-%abi%" RD /S /Q build\buildsys-%abi% @call "%devroot%\%projectname%\buildscript\modules\useninja.cmd" -@IF %toolchain%==msvc IF NOT "%pkgconfigstate%"=="0" set PATH=%pkgconfigloc%\;%PATH% - -@IF NOT %toolchain%==msvc IF %abi%==aarch64 set CFLAGS=-march^=armv8-a -pipe -@IF NOT %toolchain%==msvc IF NOT %abi%==aarch64 set CFLAGS=-march^=core2 -pipe +@IF NOT "%pkgconfigstate%"=="0" set PATH=%pkgconfigloc%\;%PATH% -@set buildconf=%mesonloc% setup build/buildsys-%toolchain%-%abi% --buildtype=release --pkgconfig.relocatable --prefix="%devroot:\=/%/libva/build/%toolchain%-%abi%" +@set buildconf=%mesonloc% setup build/buildsys-%abi% --buildtype=release --pkgconfig.relocatable --prefix="%devroot:\=/%/libva/build/%abi%" -Db_vscrt=mt @IF /I NOT "%useninja%"=="y" set buildconf=%buildconf% --backend=vs @IF /I "%useninja%"=="y" set buildconf=%buildconf% --backend=ninja -@IF NOT %toolchain%==msvc set /p dynamiclink=Link binaries dynamically (y/n): -@IF NOT %toolchain%==msvc echo. -@IF NOT %toolchain%==msvc set buildconf=%buildconf% -Dc_args="%CFLAGS%" -Dcpp_args="%CFLAGS%" -@IF /I "%dynamiclink%"=="y" set buildconf=%buildconf% -Dc_link_args="-s" -Dcpp_link_args="-s" -@IF NOT %toolchain%==msvc IF /I NOT "%dynamiclink%"=="y" set buildconf=%buildconf% --prefer-static -Dc_link_args="-s -static" -Dcpp_link_args="-s -static" -@IF %toolchain%==msvc set buildconf=%buildconf% -Db_vscrt=mt -@IF NOT %toolchain%==msvc set CFLAGS= @echo Configuring VA-API build with : %buildconf% @echo. @@ -51,13 +41,12 @@ @echo. @pause @echo. -@cd build\buildsys-%toolchain%-%abi% +@cd build\buildsys-%abi% @IF /I NOT "%useninja%"=="y" IF %abi%==x64 set buildcmd=msbuild /p^:Configuration=release,Platform=x64 libva.sln /m^:%throttle% ^&^& msbuild /p^:Configuration=release,Platform=x64 RUN_INSTALL.vcxproj /m^:%throttle% @IF /I NOT "%useninja%"=="y" IF %abi%==x86 set buildcmd=msbuild /p^:Configuration=release,Platform=Win32 libva.sln /m^:%throttle% ^&^& msbuild /p^:Configuration=release,Platform=Win32 RUN_INSTALL.vcxproj /m^:%throttle% @IF /I NOT "%useninja%"=="y" IF %abi%==aarch64 set buildcmd=msbuild /p^:Configuration=release,Platform=ARM64 libva.sln /m^:%throttle% ^&^& msbuild /p^:Configuration=release,Platform=ARM64 RUN_INSTALL.vcxproj /m^:%throttle% -@IF /I "%useninja%"=="y" IF %toolchain%==msvc set buildcmd=ninja -j %throttle% install -@IF NOT %toolchain%==msvc set buildcmd=%runmsys% /%LMSYSTEM%/bin/ninja -j %throttle% install +@IF /I "%useninja%"=="y" set buildcmd=ninja -j %throttle% install @echo Performing VA-API build with ^: %buildcmd% @echo. @%buildcmd% diff --git a/buildscript/modules/mesa3d.cmd b/buildscript/modules/mesa3d.cmd index df1b87ff..07b60bdc 100644 --- a/buildscript/modules/mesa3d.cmd +++ b/buildscript/modules/mesa3d.cmd @@ -449,8 +449,8 @@ @rem Build VA-API D3D12 driver @IF %intmesaver% GEQ 22200 set buildconf=%buildconf% -Dgallium-d3d12-video=auto -@IF /I "%d3d12%"=="y" IF %intmesaver% GEQ 22300 IF EXIST "%devroot%\libva\build\%toolchain%-%abi%\lib\pkgconfig\" set /p buildvaapi=Build Mesa3D VA-API interface (y/n): -@IF /I "%d3d12%"=="y" IF %intmesaver% GEQ 22300 IF EXIST "%devroot%\libva\build\%toolchain%-%abi%\lib\pkgconfig\" echo. +@IF /I "%d3d12%"=="y" IF %intmesaver% GEQ 22300 IF EXIST "%devroot%\libva\build\%abi%\lib\pkgconfig\" set /p buildvaapi=Build Mesa3D VA-API interface (y/n): +@IF /I "%d3d12%"=="y" IF %intmesaver% GEQ 22300 IF EXIST "%devroot%\libva\build\%abi%\lib\pkgconfig\" echo. @IF /I "%buildvaapi%"=="y" set buildconf=%buildconf% -Dgallium-va=%mesonbooltrue% @IF /I "%buildvaapi%"=="y" set PKG_CONFIG_LIBVA=1 @IF %intmesaver% GEQ 22200 set buildconf=%buildconf% -Dvideo-codecs= @@ -463,7 +463,7 @@ @IF %PKG_CONFIG_LIBCLC% EQU 1 set buildconf=%buildconf% -Dstatic-libclc=all @IF %PKG_CONFIG_LIBCLC% EQU 1 IF %toolchain%==msvc set PKG_CONFIG_PATH=%PKG_CONFIG_PATH%%llvminstloc:\=/%/clc/share/pkgconfig; @IF %PKG_CONFIG_SPV% EQU 1 IF %toolchain%==msvc set PKG_CONFIG_PATH=%PKG_CONFIG_PATH%%llvminstloc:\=/%/spv-%abi%/lib/pkgconfig;%devroot:\=/%/spirv-tools/build/%abi%/lib/pkgconfig; -@IF %PKG_CONFIG_LIBVA% EQU 1 set PKG_CONFIG_PATH=%PKG_CONFIG_PATH%%devroot:\=/%/libva/build/%toolchain%-%abi%/lib/pkgconfig; +@IF %PKG_CONFIG_LIBVA% EQU 1 IF %toolchain%==msvc set PKG_CONFIG_PATH=%PKG_CONFIG_PATH%%devroot:\=/%/libva/build/%abi%/lib/pkgconfig; @IF NOT defined PKG_CONFIG_PATH set PKG_CONFIG_PATH=; @set buildconf=%buildconf% --pkg-config-path="%PKG_CONFIG_PATH:~0,-1%" @set "PKG_CONFIG_LIBCLC=" diff --git a/buildscript/modules/msys.cmd b/buildscript/modules/msys.cmd index c3c45427..823c8e65 100644 --- a/buildscript/modules/msys.cmd +++ b/buildscript/modules/msys.cmd @@ -10,4 +10,4 @@ @IF NOT EXIST "%msysloc%" set msysstate=0 @endlocal&set msysstate=%msysstate%&set msysloc=%msysloc% @set runmsys=call "%devroot%\%projectname%\buildscript\modules\runmsys.cmd" -@set mingwpkglst={cc,clang,gdb,libclc,libelf,meson,pkgconf,python-mako,spirv-llvm-translator,vulkan-devel,zstd} \ No newline at end of file +@set mingwpkglst={cc,clang,gdb,libclc,libelf,libva,meson,pkgconf,python-mako,spirv-llvm-translator,vulkan-devel,zstd} \ No newline at end of file diff --git a/releasenotes.md b/releasenotes.md index 05094f1e..32fbe550 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -7,6 +7,8 @@ ### MSVC build environment - Update SPIRV Tools to 2023.1; - Update pkgconf 1.9.4. +### MSYS2 build environment +- libva: Use distro package. # 22.3.3-2 ### Build environment - MSVC: Update LLVM to 15.0.7.