Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libva for openSUSE:Factory checked 
in at 2023-04-14 13:12:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libva (Old)
 and      /work/SRC/openSUSE:Factory/.libva.new.19717 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libva"

Fri Apr 14 13:12:31 2023 rev:70 rq:1079220 version:2.18.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/libva/libva.changes      2023-01-17 
17:34:58.485063078 +0100
+++ /work/SRC/openSUSE:Factory/.libva.new.19717/libva.changes   2023-04-14 
13:12:39.391419193 +0200
@@ -1,0 +2,38 @@
+Thu Apr 13 07:40:20 UTC 2023 - Bjørn Lie <bjorn....@gmail.com>
+
+- Update to version 2.18.0:
+  * doc: Add build and install libva informatio in home page.
+  * fix:
+    - Add libva.def into distribution package
+    - NULL check before calling strncmp.
+    - Remove reference to non-existent symbol
+  * meson: docs:
+    - Add encoder interface for av1
+    - Use libva_version over project_version()
+  * va:
+    - Add VAProfileH264High10
+    - Always build with va-messaging API
+    - Fix the codying style of CHECK_DISPLAY
+    - Remove Android pre Jelly Bean workarounds
+    - Remove dummy isValid() hook
+    - Remove unused drm_sarea.h include & ANDROID references in
+      va_dricommon.h
+    - va/sysdeps.h: remove Android section
+  * x11:
+    - Allow disabling DRI3 via LIBVA_DRI3_DISABLe env var
+    - Use LIBVA_DRI3_DISABLE in GetNumCandidates
+- Switch to multibuild style. Drop libva-gl.spec|changes and
+  pre_checkin.sh.
+- Switch to meson build system, add meson BuildRequires, drop
+  libtool and xz BuildRequires, and replace gcc-c++ with generic
+  c++_compiler.
+- Use autosetup and ldconfig_scriptlets macros.
+- Add libva-wayland to baselibs.conf, now that its build have moved
+  to the main part of spec, source validator should no longer
+  complain on SLE.
+- Drop propagate-dpy.patch: The upstream issue was closed without
+  the patch ever getting applied, and the issue that it fixed was
+  deemed to not be a libva issue. See upstream issue:
+  https://github.com/intel/libva/issues/479
+
+-------------------------------------------------------------------

Old:
----
  libva-2.17.0.tar.gz
  libva-gl.changes
  libva-gl.spec
  pre_checkin.sh
  propagate-dpy.patch

New:
----
  _multibuild
  libva-2.18.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libva.spec ++++++
--- /var/tmp/diff_new_pack.zZAGLv/_old  2023-04-14 13:12:39.975422534 +0200
+++ /var/tmp/diff_new_pack.zZAGLv/_new  2023-04-14 13:12:39.983422579 +0200
@@ -1,5 +1,5 @@
 #
-# spec file for package libva
+# spec file
 #
 # Copyright (c) 2023 SUSE LLC
 #
@@ -16,14 +16,21 @@
 #
 
 
-#
+%define flavor @BUILD_FLAVOR@%nil
 
 %define build_gl 0
 %define sover 2
 
-Name:           libva
+%if "%flavor" == "gl"
+%define build_gl 1
+%define name_suffix -%{flavor}
+%else
+%define name_suffix %{nil}
+%endif
+
+Name:           libva%{name_suffix}
 %define _name   libva
-Version:        2.17.0
+Version:        2.18.0
 Release:        0
 Summary:        Video Acceleration (VA) API
 License:        MIT
@@ -31,13 +38,14 @@
 URL:            https://01.org/linuxmedia
 Source0:        
https://github.com/intel/libva/archive/%{version}.tar.gz#/libva-%{version}.tar.gz
 Source2:        baselibs.conf
-Patch1:         propagate-dpy.patch
-BuildRequires:  gcc-c++
-BuildRequires:  libtool
+
+BuildRequires:  c++_compiler
+BuildRequires:  meson
 BuildRequires:  pkg-config
-BuildRequires:  xz
 BuildRequires:  pkgconfig(libdrm)
 BuildRequires:  pkgconfig(libudev)
+BuildRequires:  pkgconfig(wayland-client) >= 1.11.0
+BuildRequires:  pkgconfig(wayland-scanner) >= 1.11.0
 BuildRequires:  pkgconfig(x11)
 BuildRequires:  pkgconfig(xext)
 BuildRequires:  pkgconfig(xfixes)
@@ -45,8 +53,6 @@
 BuildRequires:  pkgconfig(xv)
 %if %{build_gl}
 BuildRequires:  pkgconfig(gl)
-BuildRequires:  pkgconfig(wayland-client) >= 1.11.0
-BuildRequires:  pkgconfig(wayland-scanner) >= 1.11.0
 %endif
 
 %description
@@ -78,11 +84,11 @@
 %if 0%{?build_gl}
 BuildRequires:  libva-devel = %{version}
 Requires:       libva-glx%{sover} = %{version}
-Requires:       libva-wayland%{sover} = %{version}
 Requires:       pkgconfig(gl)
 %else
 Requires:       libva%{sover} = %{version}
 Requires:       libva-drm%{sover} = %{version}
+Requires:       libva-wayland%{sover} = %{version}
 Requires:       libva-x11-%{sover} = %{version}
 Requires:       pkgconfig(libdrm)
 Requires:       pkgconfig(x11)
@@ -133,72 +139,48 @@
 This is the VA/X11 runtime library.
 
 %prep
-%setup -q -n %{_name}-%{version}
-# Add "libva-wayland%%{sover}" to baselibs.conf when enabling wayland build;
-# ugly I know ...This is needed since otherwise source validator
-#
-#   osc service run source_validator
-#
-# fails on sle
-echo libva-wayland%{sover} >> $RPM_SOURCE_DIR/baselibs.conf
-%patch1 -p1
+%autosetup -n %{_name}-%{version} -p1
 
 %build
-[ -d m4 ]  || mkdir m4
-autoreconf -v --install
-%configure \
+%meson \
+       -D driverdir=%{_libdir}/dri \
 %if %{build_gl}
-           --enable-glx \
-           --enable-wayland \
+       -D with_glx=yes \
+       -D with_x11=yes \
+       -D disable_drm=true \
+       -D with_wayland=no \
+       -D with_win32=no \
+%else
+       -D with_glx=no \
 %endif
-           --with-drivers-path=%{_libdir}/dri
-make %{?_smp_mflags} V=1
+       %{nil}
+%meson_build
 
 %install
-%makeinstall V=1
-find %{buildroot} -name '*.la' -delete -print
+%meson_install
 
 %if %{build_gl}
 # remove all files packaged during without gl mode
-rm -rf `find %{buildroot}%{_includedir}/va/* | grep -v "glx\|wayland"`
-rm -rf `find %{buildroot}%{_libdir}/libva* | grep -v "glx\|wayland"`
-rm -rf `find %{buildroot}%{_libdir}/pkgconfig/libva*.pc | grep -v 
"glx\|wayland"`
+rm -rf `find %{buildroot}%{_includedir}/va/* | grep -v "glx"`
+rm -rf `find %{buildroot}%{_libdir}/libva* | grep -v "glx"`
+rm -rf `find %{buildroot}%{_libdir}/pkgconfig/libva*.pc | grep -v "glx"`
 %endif
 
-%post -n libva-glx%{sover} -p /sbin/ldconfig
-
-%postun -n libva-glx%{sover} -p /sbin/ldconfig
-
-%post -n libva-wayland%{sover} -p /sbin/ldconfig
-
-%postun -n libva-wayland%{sover} -p /sbin/ldconfig
-
-%post -n libva%{sover} -p /sbin/ldconfig
-
-%postun -n libva%{sover} -p /sbin/ldconfig
-
-%post -n libva-drm%{sover} -p /sbin/ldconfig
-
-%postun -n libva-drm%{sover} -p /sbin/ldconfig
-
-%post -n libva-x11-%{sover} -p /sbin/ldconfig
-
-%postun -n libva-x11-%{sover} -p /sbin/ldconfig
+%ldconfig_scriptlets -n libva-glx%{sover}
+%ldconfig_scriptlets -n libva-wayland%{sover}
+%ldconfig_scriptlets -n libva%{sover}
+%ldconfig_scriptlets -n libva-drm%{sover}
+%ldconfig_scriptlets -n libva-x11-%{sover}
 
 %if %{build_gl}
 %files -n libva-glx%{sover}
 %{_libdir}/libva-glx.so.%{sover}*
 
-%files -n libva-wayland%{sover}
-%{_libdir}/libva-wayland.so.%{sover}*
-
 %files devel
 %{_libdir}/libva-glx.so
-%{_includedir}/va
+%{_includedir}/va/va_glx.h
+%{_includedir}/va/va_backend_glx.h
 %{_libdir}/pkgconfig/libva-glx.pc
-%{_libdir}/pkgconfig/libva-wayland.pc
-%{_libdir}/libva-wayland.so
-
 %else
 
 %files -n libva%{sover}
@@ -211,13 +193,18 @@
 %files -n libva-drm%{sover}
 %{_libdir}/libva-drm.so.*
 
+%files -n libva-wayland%{sover}
+%{_libdir}/libva-wayland.so.%{sover}*
+
 %files devel
 %{_libdir}/libva.so
 %{_libdir}/libva-x11.so
 %{_libdir}/libva-drm.so
+%{_libdir}/libva-wayland.so
 %{_includedir}/va
 %{_libdir}/pkgconfig/libva-drm.pc
 %{_libdir}/pkgconfig/libva-x11.pc
+%{_libdir}/pkgconfig/libva-wayland.pc
 %{_libdir}/pkgconfig/libva.pc
 %endif
 

++++++ _multibuild ++++++
<multibuild>
  <package>gl</package>
</multibuild>

++++++ baselibs.conf ++++++
--- /var/tmp/diff_new_pack.zZAGLv/_old  2023-04-14 13:12:40.039422899 +0200
+++ /var/tmp/diff_new_pack.zZAGLv/_new  2023-04-14 13:12:40.043422922 +0200
@@ -1,11 +1,13 @@
 libva2
 libva-drm2
 libva-glx2
+libva-wayland2
 libva-x11-2
 libva-devel
  requires -libva-<targettype>
  requires "libva2-<targettype> = <version>"
  requires "libva-drm2-<targettype> = <version>"
+ requires "libva-wayland2-<targettype> = <version>"
  requires "libva-x11-2-<targettype> = <version>"
 libva-gl-devel
  requires -libva-gl-<targettype>

++++++ libva-2.17.0.tar.gz -> libva-2.18.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.17.0/.github/dependabot.yml 
new/libva-2.18.0/.github/dependabot.yml
--- old/libva-2.17.0/.github/dependabot.yml     1970-01-01 01:00:00.000000000 
+0100
+++ new/libva-2.18.0/.github/dependabot.yml     2023-03-19 13:27:04.000000000 
+0100
@@ -0,0 +1,6 @@
+version: 2
+updates:
+  - package-ecosystem: "github-actions"
+    directory: "/"
+    schedule:
+      interval: "weekly"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.17.0/.github/workflows/freebsd.yml 
new/libva-2.18.0/.github/workflows/freebsd.yml
--- old/libva-2.17.0/.github/workflows/freebsd.yml      2022-12-21 
15:28:59.000000000 +0100
+++ new/libva-2.18.0/.github/workflows/freebsd.yml      2023-03-19 
13:27:04.000000000 +0100
@@ -15,6 +15,6 @@
           pkg install -y meson pkgconf libdrm libXext libXfixes wayland
           pkg install -y -x '^mesa($|-libs)'
         run: |
-          meson setup _build
+          meson setup _build -D werror=true
           meson compile -C _build
           meson install -C _build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.17.0/.github/workflows/ghpages.yml 
new/libva-2.18.0/.github/workflows/ghpages.yml
--- old/libva-2.17.0/.github/workflows/ghpages.yml      1970-01-01 
01:00:00.000000000 +0100
+++ new/libva-2.18.0/.github/workflows/ghpages.yml      2023-03-19 
13:27:04.000000000 +0100
@@ -0,0 +1,57 @@
+name: Deploy Docs to GitHub
+
+on:
+  release:
+    types: [published]
+
+permissions:
+  contents: read
+  pages: write
+  id-token: write
+
+concurrency:
+  group: "pages"
+  cancel-in-progress: true
+
+jobs:
+  deploy:
+    environment:
+      name: github-pages
+      url: ${{ steps.deployment.outputs.page_url }}
+
+    runs-on: ubuntu-22.04
+    steps:
+    - name: 'Checkout'
+      uses: actions/checkout@v3
+      with:
+        fetch-depth: 0
+    - name: 'Get latest tag'
+      run: echo "GIT_LATEST_TAG=$(git tag | grep 
'^[0-9]\+\.[0-9]\+\?\.[0-9]\+\?$' | sort -V -r | head -n1)" >> $GITHUB_ENV
+
+    - name: 'Variables'
+      run: |
+        echo $GITHUB_REF_NAME
+        echo $GIT_LATEST_TAG
+
+    - name: 'Install prerequisites'
+      if: github.ref_name == env.GIT_LATEST_TAG
+      run: |
+        sudo apt-get update
+        sudo apt-get install -y \
+          libdrm-dev \
+          doxygen \
+          meson \
+    - name: 'Build the Docs'
+      if: github.ref_name == env.GIT_LATEST_TAG
+      run: meson setup _build -D enable_docs=true && meson compile -C _build
+
+    - name: 'Upload the artifacts'
+      if: github.ref_name == env.GIT_LATEST_TAG
+      uses: actions/upload-pages-artifact@v1
+      with:
+        path: "_build/doc/html-out"
+
+    - name: 'Deploy to GitHub Pages'
+      if: github.ref_name == env.GIT_LATEST_TAG
+      id: deployment
+      uses: actions/deploy-pages@v1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.17.0/.github/workflows/windows.yml 
new/libva-2.18.0/.github/workflows/windows.yml
--- old/libva-2.17.0/.github/workflows/windows.yml      2022-12-21 
15:28:59.000000000 +0100
+++ new/libva-2.18.0/.github/workflows/windows.yml      2023-03-19 
13:27:04.000000000 +0100
@@ -18,7 +18,7 @@
       run: '.github\workflows\EnterDevShell.ps1 ${{ inputs.architecture }}'
       shell: pwsh
     - name: 'Configure with meson'
-      run: meson setup _build
+      run: meson setup _build -D werror=true
     - name: 'Build'
       run: meson compile -C _build
     - name: 'Install'
@@ -46,7 +46,7 @@
       run: '.github\workflows\EnterDevShell.ps1 ${{ inputs.architecture }}'
       shell: pwsh
     - name: 'Configure'
-      run: meson setup _build
+      run: meson setup _build -D werror=true
     - name: 'Build'
       run: meson compile -C _build
     - name: 'Install'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.17.0/NEWS new/libva-2.18.0/NEWS
--- old/libva-2.17.0/NEWS       2022-12-21 15:28:59.000000000 +0100
+++ new/libva-2.18.0/NEWS       2023-03-19 13:27:04.000000000 +0100
@@ -1,5 +1,30 @@
-libva NEWS -- summary of user visible changes.  2022-12-16
-Copyright (C) 2009-2022 Intel Corporation
+libva NEWS -- summary of user visible changes.  2022-03-19
+Copyright (C) 2009-2023 Intel Corporation
+
+version 2.18.0 - 19.Mar.2022
+* doc: Add build and install libva informatio in home page.
+* fix: NULL check before calling strncmp.
+* ci: add dependabot
+* va: fix the codying style of CHECK_DISPLAY
+* va: remove dummy isValid() hook
+* x11: use LIBVA_DRI3_DISABLE in GetNumCandidates
+* win: compat_win32: Add getenv wrapper for WIN32
+* win(WSL): va_drm_utils: Map d3d12 gallium driver for Windows Subsytem for 
Linux
+* fix: Add libva.def into distribution package
+* x11: allow disabling DRI3 via LIBVA_DRI3_DISABLe env var
+* ci: enable Werror across the build
+* win: explicitly ignore CloseAdapter return value
+* win: use wide string literal where needed
+* win: Add vaDisplayIsValid to .def export list
+* va: Always build with va-messaging API
+* meson: docs: use libva_version over project_version()
+* ci: add github pages workflow
+* meson: docs: add encoder interface for av1
+* va: add VAProfileH264High10
+* fix: Remove reference to non-existent symbol
+* va: va/sysdeps.h: remove Android section
+* va: remove Android pre Jelly Bean workarounds
+* va: remove unused drm_sarea.h include & ANDROID references in va_dricommon.h
 
 version 2.17.0 - 16.Dec.2022
 * win: Simplify signature for driver name loading
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.17.0/README.md new/libva-2.18.0/README.md
--- old/libva-2.17.0/README.md  2022-12-21 15:28:59.000000000 +0100
+++ new/libva-2.18.0/README.md  2023-03-19 13:27:04.000000000 +0100
@@ -2,24 +2,66 @@
 
 Libva is an implementation for VA-API (Video Acceleration API)
 
-VA-API is an open-source library and API specification, which
-provides access to graphics hardware acceleration capabilities
-for video processing. It consists of a main library and
-driver-specific acceleration backends for each supported hardware
-vendor.
-
-If you would like to contribute to libva, check our [Contributing
-guide](https://github.com/intel/libva/blob/master/CONTRIBUTING.md).
-
-We also recommend taking a look at the ['janitorial'
-bugs](https://github.com/intel/libva/issues?q=is%3Aopen+is%3Aissue+label%3AJanitorial)
-in our list of open issues as these bugs can be solved without an
-extensive knowledge of libva.
+VA-API is an open-source library and API specification, which provides access 
to graphics hardware acceleration capabilities for video processing. It 
consists of a main library and driver-specific acceleration backends for each 
supported hardware vendor.
+
+If you would like to contribute to libva, check our [Contributing 
guide](https://github.com/intel/libva/blob/master/CONTRIBUTING.md).
+
+We also recommend taking a look at the ['janitorial' 
bugs](https://github.com/intel/libva/issues?q=is%3Aopen+is%3Aissue+label%3AJanitorial)
 in our list of open issues as these bugs can be solved without an extensive 
knowledge of libva.
 
 We would love to help you start contributing!
 
-Doxygen files are regularly updated through Github Pages and can
-be accessed directly through [github pages
-libva](http://intel.github.io/libva/)
+Doxygen files are regularly updated through Github Pages and can be accessed 
directly through [github pages libva](http://intel.github.io/libva/)
 
 The libva development team can be reached via github issues.
+
+
+# Build and Install Libva
+*This build documentation was tested under clear Ubuntu Server 18.04 (with 
gcc-7.3.0, gcc-8.1.0 and clang-6.0 compilers) but it should work on another OS 
distributions with various versions of gcc and clang.*
+## Install all required common packages: 
+```
+sudo apt-get install git cmake pkg-config meson libdrm-dev automake libtool
+```
+
+Take latest libva version:
+```
+git clone https://github.com/intel/libva.git
+cd libva
+```
+
+## Build with autogen and Meson
+
+When you install the libva from OSV package repositories, different OSV distro 
use different default location for libva. Basically, Debian/Ubuntu family 
install libva to /usr/lib/x86_64-linux-gnu and rpm family like 
Fedora/CentOS/SUSE/RHEL install libva to /usr/lib64. For Other media component 
default location, you could refer to [Install from OSV 
package](https://github.com/intel/media-driver/wiki/Install-from-OSV-package))
+
+Without prefix setting, libva will be install to /usr/local/lib as default. If 
you use other path as installation target folder or no prefix, you have to add 
the folder to your environment variable or use LD_LIBRARY_PATH to specify the 
location, like LD_LIBRARY_PATH=/usr/local/lib if no prefix.
+
+If you intent to overwrite system default libva, you could use same OSV distro 
prefix, then system libva will be replaced and also your new installed libva 
version will be overwrited when you upgrade it from OSV distro package 
repository. 
+
+For debian family, you could use autogen
+```
+./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
+make
+sudo make install
+```
+or build using Meson
+```
+mkdir build 
+cd build 
+meson .. -Dprefix=/usr -Dlibdir=/usr/lib/x86_64-linux-gnu
+ninja
+sudo ninja install
+```
+
+For rpm family, you could use autogen
+```
+./autogen.sh --prefix=/usr --libdir=/usr/lib64
+make
+sudo make install
+```
+or build using Meson
+```
+mkdir build 
+cd build 
+meson .. -Dprefix=/usr -Dlibdir=/usr/lib64
+ninja
+sudo ninja install
+```
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.17.0/configure.ac 
new/libva-2.18.0/configure.ac
--- old/libva-2.17.0/configure.ac       2022-12-21 15:28:59.000000000 +0100
+++ new/libva-2.18.0/configure.ac       2023-03-19 13:27:04.000000000 +0100
@@ -27,7 +27,7 @@
 # - reset micro version to zero when minor version is incremented
 # - reset minor version to zero when major version is incremented
 m4_define([va_api_major_version], [1])
-m4_define([va_api_minor_version], [17])
+m4_define([va_api_minor_version], [18])
 m4_define([va_api_micro_version], [0])
 
 m4_define([va_api_version],
@@ -149,11 +149,6 @@
                     [build with VA/Wayland API support @<:@default=auto@:>@])],
     [], [enable_wayland="auto"])
 
-AC_ARG_ENABLE([va-messaging],
-    [AC_HELP_STRING([--enable-va-messaging],
-                    [build with va info and error messaging 
@<:@default=yes@:>@])],
-    [], [enable_va_messaging="yes"])
-
 AC_ARG_WITH(legacy,
     [AC_HELP_STRING([--with-legacy=[[components]]],
                     [build with legacy components 
@<:@default=emgd,nvctrl,fglrx@:>@])],
@@ -197,11 +192,6 @@
 fi
 AM_CONDITIONAL(ENABLE_DOCS, test "$enable_docs" = "yes")
 
-# Check for va messaging
-if test "$enable_va_messaging" = "yes"; then
-    AC_DEFINE([ENABLE_VA_MESSAGING], [1], [Defined to 1 if va messaging is 
needed])
-fi
-
 # Check for -ldl (often not required)
 AC_SEARCH_LIBS([dlopen], [dl], [], [
   AC_MSG_ERROR([unable to find the dlopen() function])
@@ -376,5 +366,4 @@
 echo Extra window systems ............. : $BACKENDS
 echo Build with legacy ................ : $with_legacy
 echo Build documentation .............. : $enable_docs
-echo Build with messaging ............. : $enable_va_messaging
 echo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.17.0/doc/meson.build 
new/libva-2.18.0/doc/meson.build
--- old/libva-2.17.0/doc/meson.build    2022-12-21 15:28:59.000000000 +0100
+++ new/libva-2.18.0/doc/meson.build    2023-03-19 13:27:04.000000000 +0100
@@ -13,6 +13,7 @@
   'va_enc_hevc.h',
   'va_enc_vp8.h',
   'va_enc_vp9.h',
+  'va_enc_av1.h',
   'va_fei.h',
   'va_fei_h264.h',
   'va_fei_hevc.h',
@@ -33,7 +34,7 @@
 endforeach
 
 config = configuration_data()
-config.set('PACKAGE_VERSION', meson.project_version())
+config.set('PACKAGE_VERSION', libva_version)
 config.set('VA_HEADER_DIR', headerdir)
 config.set('VA_HEADER_FILES', headers)
 config.set('VA_HTML_FOOTER', footer)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.17.0/meson.build new/libva-2.18.0/meson.build
--- old/libva-2.17.0/meson.build        2022-12-21 15:28:59.000000000 +0100
+++ new/libva-2.18.0/meson.build        2023-03-19 13:27:04.000000000 +0100
@@ -7,7 +7,7 @@
 # - reset micro version to zero when VA-API major or minor version is changed
 project(
   'libva', 'c',
-  version : '2.17.0',
+  version : '2.18.0',
   meson_version : '>= 0.53.0',
   default_options : [ 'warning_level=1',
                       'buildtype=debugoptimized' ])
@@ -19,7 +19,7 @@
 # - reset micro version to zero when minor version is incremented
 # - reset minor version to zero when major version is incremented
 va_api_major_version = 1
-va_api_minor_version = 17
+va_api_minor_version = 18
 va_api_micro_version = 0
 
 va_api_version = '@0@.@1@.@2@'.format(va_api_major_version,
@@ -115,11 +115,6 @@
   WITH_WAYLAND = wayland_dep.found() and wayland_scanner_dep.found()
 endif
 
-va_c_args = []
-if get_option('enable_va_messaging')
-  va_c_args += ['-DENABLE_VA_MESSAGING=1']
-endif
-
 WITH_WIN32 = false
 libwin32_dep = []
 if get_option('with_win32') != 'no'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.17.0/meson_options.txt 
new/libva-2.18.0/meson_options.txt
--- old/libva-2.17.0/meson_options.txt  2022-12-21 15:28:59.000000000 +0100
+++ new/libva-2.18.0/meson_options.txt  2023-03-19 13:27:04.000000000 +0100
@@ -6,4 +6,3 @@
 option('with_win32', type : 'combo', choices : ['yes', 'no', 'auto'], value : 
'auto')
 option('with_legacy', type : 'array', choices : ['emdg', 'nvctrl', 'fglrx'], 
value : [])
 option('enable_docs', type : 'boolean', value : false)
-option('enable_va_messaging', type : 'boolean', value : true)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.17.0/va/Android.mk 
new/libva-2.18.0/va/Android.mk
--- old/libva-2.17.0/va/Android.mk      2022-12-21 15:28:59.000000000 +0100
+++ new/libva-2.18.0/va/Android.mk      2023-03-19 13:27:04.000000000 +0100
@@ -51,7 +51,6 @@
 
 LOCAL_CFLAGS := \
        $(IGNORED_WARNNING) \
-       $(if $(filter user,$(TARGET_BUILD_VARIANT)),,-DENABLE_VA_MESSAGING) \
        -DLOG_TAG=\"libva\"
 
 LOCAL_C_INCLUDES := $(LOCAL_PATH)/..
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.17.0/va/Makefile.am 
new/libva-2.18.0/va/Makefile.am
--- old/libva-2.17.0/va/Makefile.am     2022-12-21 15:28:59.000000000 +0100
+++ new/libva-2.18.0/va/Makefile.am     2023-03-19 13:27:04.000000000 +0100
@@ -149,4 +149,5 @@
        libva.syms              \
        va_version.h.in         \
        meson.build             \
+        libva.def               \
        $(NULL)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.17.0/va/android/va_android.cpp 
new/libva-2.18.0/va/android/va_android.cpp
--- old/libva-2.17.0/va/android/va_android.cpp  2022-12-21 15:28:59.000000000 
+0100
+++ new/libva-2.18.0/va/android/va_android.cpp  2023-03-19 13:27:04.000000000 
+0100
@@ -43,14 +43,6 @@
 #define CHECK_SYMBOL(func) { if (!func) printf("func %s not found\n", #func); 
return VA_STATUS_ERROR_UNKNOWN; }
 #define DEVICE_NAME "/dev/dri/renderD128"
 
-static int va_DisplayContextIsValid(
-    VADisplayContextP pDisplayContext
-)
-{
-    return (pDisplayContext != NULL &&
-            pDisplayContext->pDriverContext != NULL);
-}
-
 static void va_DisplayContextDestroy(
     VADisplayContextP pDisplayContext
 )
@@ -116,7 +108,6 @@
     if (!pDisplayContext)
         return NULL;
 
-    pDisplayContext->vaIsValid       = va_DisplayContextIsValid;
     pDisplayContext->vaDestroy       = va_DisplayContextDestroy;
     pDisplayContext->vaGetDriverNameByIndex = 
va_DisplayContextGetDriverNameByIndex;
     pDisplayContext->vaGetNumCandidates = va_DisplayContextGetNumCandidates;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.17.0/va/compat_win32.h 
new/libva-2.18.0/va/compat_win32.h
--- old/libva-2.17.0/va/compat_win32.h  2022-12-21 15:28:59.000000000 +0100
+++ new/libva-2.18.0/va/compat_win32.h  2023-03-19 13:27:04.000000000 +0100
@@ -29,6 +29,11 @@
 #include <io.h>
 #include <time.h>
 
+// Include stdlib.h here to make sure we
+// always replace MSVC getenv definition
+// with the macro / _getenv inline below
+#include <stdlib.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -46,6 +51,15 @@
 
 typedef unsigned int __uid_t;
 
+#if _MSC_VER
+#define getenv _getenv
+inline char* _getenv(const char *varname)
+{
+    static char _getenv_buf[32767];
+    return GetEnvironmentVariableA(varname, &_getenv_buf[0], 
sizeof(_getenv_buf)) ? &_getenv_buf[0] : NULL;
+}
+#endif
+
 #ifdef _MSC_VER
 inline char* strtok_r(char *s, const char *delim, char **save_ptr)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.17.0/va/drm/va_drm.c 
new/libva-2.18.0/va/drm/va_drm.c
--- old/libva-2.17.0/va/drm/va_drm.c    2022-12-21 15:28:59.000000000 +0100
+++ new/libva-2.18.0/va/drm/va_drm.c    2023-03-19 13:27:04.000000000 +0100
@@ -31,16 +31,6 @@
 #include "va_drm_auth.h"
 #include "va_drm_utils.h"
 
-static int
-va_DisplayContextIsValid(VADisplayContextP pDisplayContext)
-{
-    VADriverContextP const pDriverContext = pDisplayContext->pDriverContext;
-
-    return (pDriverContext &&
-            ((pDriverContext->display_type & VA_DISPLAY_MAJOR_MASK) ==
-             VA_DISPLAY_DRM));
-}
-
 static void
 va_DisplayContextDestroy(VADisplayContextP pDisplayContext)
 {
@@ -113,7 +103,6 @@
     if (!pDisplayContext)
         goto error;
 
-    pDisplayContext->vaIsValid       = va_DisplayContextIsValid;
     pDisplayContext->vaDestroy       = va_DisplayContextDestroy;
     pDisplayContext->vaGetNumCandidates = va_DisplayContextGetNumCandidates;
     pDisplayContext->vaGetDriverNameByIndex = 
va_DisplayContextGetDriverNameByIndex;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.17.0/va/drm/va_drm_utils.c 
new/libva-2.18.0/va/drm/va_drm_utils.c
--- old/libva-2.17.0/va/drm/va_drm_utils.c      2022-12-21 15:28:59.000000000 
+0100
+++ new/libva-2.18.0/va/drm/va_drm_utils.c      2023-03-19 13:27:04.000000000 
+0100
@@ -27,6 +27,7 @@
 #include "sysdeps.h"
 #include <xf86drm.h>
 #include <sys/stat.h>
+#include <sys/utsname.h>
 #include "va_drm_utils.h"
 #include "va_drmcommon.h"
 
@@ -42,6 +43,7 @@
     { "radeon",     "r600"     }, // Mesa Gallium driver
     { "radeon",     "radeonsi" }, // Mesa Gallium driver
     { "amdgpu",     "radeonsi" }, // Mesa Gallium driver
+    { "WSL",        "d3d12"    }, // Mesa Gallium driver
     { "nvidia-drm", "nvidia"   }, // NVIDIA driver
     { NULL,         NULL }
 };
@@ -110,9 +112,18 @@
         return VA_STATUS_ERROR_INVALID_DISPLAY;
 
     *driver_name_ptr = va_DRM_GetDrmDriverName(drm_state->fd);
+
     if (!*driver_name_ptr)
         return VA_STATUS_ERROR_UNKNOWN;
 
+    /* Map vgem to WSL2 for Windows subsystem for linux */
+    struct utsname sysinfo = {};
+    if (!strncmp(*driver_name_ptr, "vgem", 4) && uname(&sysinfo) >= 0 &&
+        strstr(sysinfo.release, "WSL")) {
+        free(*driver_name_ptr);
+        *driver_name_ptr = strdup("WSL");
+    }
+
     for (m = g_driver_name_map; m->key != NULL; m++) {
         if (strcmp(m->key, *driver_name_ptr) == 0) {
             if (current_index == candidate_index) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.17.0/va/libva.def 
new/libva-2.18.0/va/libva.def
--- old/libva-2.17.0/va/libva.def       2022-12-21 15:28:59.000000000 +0100
+++ new/libva-2.18.0/va/libva.def       2023-03-19 13:27:04.000000000 +0100
@@ -83,3 +83,4 @@
     vaSetSubpictureImage
     vaStatusStr
     vaSyncSurface2
+    vaDisplayIsValid
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.17.0/va/libva.syms 
new/libva-2.18.0/va/libva.syms
--- old/libva-2.17.0/va/libva.syms      2022-12-21 15:28:59.000000000 +0100
+++ new/libva-2.18.0/va/libva.syms      2023-03-19 13:27:04.000000000 +0100
@@ -6,6 +6,4 @@
 VA_API_0.33.0 {
     global:
         vaCreateSurfaces;
-    local:
-        vaCreateSurfaces_0_33_0;
 } VA_API_0.32.0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.17.0/va/meson.build 
new/libva-2.18.0/va/meson.build
--- old/libva-2.17.0/va/meson.build     2022-12-21 15:28:59.000000000 +0100
+++ new/libva-2.18.0/va/meson.build     2023-03-19 13:27:04.000000000 +0100
@@ -75,7 +75,7 @@
   vs_module_defs : 'libva.def',
   soversion : host_machine.system() == 'windows' ? '' : libva_lt_current,
   version : libva_lt_version,
-  c_args : [ '-DSYSCONFDIR="' + sysconfdir + '"'] + ['-DVA_DRIVERS_PATH="' + 
driverdir + '"'] + va_c_args,
+  c_args : [ '-DSYSCONFDIR="' + sysconfdir + '"'] + ['-DVA_DRIVERS_PATH="' + 
driverdir + '"'],
   include_directories : configinc,
   link_args : libva_link_args,
   link_depends : libva_link_depends,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.17.0/va/sysdeps.h 
new/libva-2.18.0/va/sysdeps.h
--- old/libva-2.17.0/va/sysdeps.h       2022-12-21 15:28:59.000000000 +0100
+++ new/libva-2.18.0/va/sysdeps.h       2023-03-19 13:27:04.000000000 +0100
@@ -36,18 +36,6 @@
 #include <stdint.h>
 #include <assert.h>
 
-#ifdef ANDROID
-# define Bool  int
-# define True  1
-# define False 0
-
-/* Macros generated from configure */
-# define LIBVA_VERSION_S "1.1.0"
-
-/* Android logging utilities */
-# include <log/log.h>
-#endif
-
 // Defines for visibility attribute
 // based on https://gcc.gnu.org/wiki/Visibility
 #if defined _WIN32 || defined __CYGWIN__
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.17.0/va/va.c new/libva-2.18.0/va/va.c
--- old/libva-2.17.0/va/va.c    2022-12-21 15:28:59.000000000 +0100
+++ new/libva-2.18.0/va/va.c    2023-03-19 13:27:04.000000000 +0100
@@ -50,13 +50,6 @@
 #endif
 #ifdef ANDROID
 #include <log/log.h>
-/* support versions < JellyBean */
-#ifndef ALOGE
-#define ALOGE LOGE
-#endif
-#ifndef ALOGI
-#define ALOGI LOGI
-#endif
 #endif
 
 #define ASSERT      assert
@@ -119,7 +112,9 @@
 int vaDisplayIsValid(VADisplay dpy)
 {
     VADisplayContextP pDisplayContext = (VADisplayContextP)dpy;
-    return pDisplayContext && (pDisplayContext->vadpy_magic == 
VA_DISPLAY_MAGIC) && pDisplayContext->vaIsValid(pDisplayContext);
+    return pDisplayContext &&
+           pDisplayContext->vadpy_magic == VA_DISPLAY_MAGIC &&
+           pDisplayContext->pDriverContext;
 }
 
 /*
@@ -195,7 +190,6 @@
 
 static void va_MessagingInit()
 {
-#if ENABLE_VA_MESSAGING
     char env_value[1024];
     int ret;
 
@@ -204,12 +198,10 @@
         if (ret < 1 || default_log_level < 0 || default_log_level > 2)
             default_log_level = 2;
     }
-#endif
 }
 
 void va_errorMessage(VADisplay dpy, const char *msg, ...)
 {
-#if ENABLE_VA_MESSAGING
     VADisplayContextP dctx = (VADisplayContextP)dpy;
     char buf[512], *dynbuf;
     va_list args;
@@ -234,12 +226,10 @@
         free(dynbuf);
     } else if (len > 0)
         dctx->error_callback(dctx->error_callback_user_context, buf);
-#endif
 }
 
 void va_infoMessage(VADisplay dpy, const char *msg, ...)
 {
-#if ENABLE_VA_MESSAGING
     VADisplayContextP dctx = (VADisplayContextP)dpy;
     char buf[512], *dynbuf;
     va_list args;
@@ -264,7 +254,6 @@
         free(dynbuf);
     } else if (len > 0)
         dctx->info_callback(dctx->info_callback_user_context, buf);
-#endif
 }
 
 static void va_driverErrorCallback(VADriverContextP ctx,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.17.0/va/va.h new/libva-2.18.0/va/va.h
--- old/libva-2.17.0/va/va.h    2022-12-21 15:28:59.000000000 +0100
+++ new/libva-2.18.0/va/va.h    2023-03-19 13:27:04.000000000 +0100
@@ -530,7 +530,8 @@
     VAProfileAV1Profile1                = 33,
     VAProfileHEVCSccMain444_10          = 34,
     /** \brief Profile ID used for protected video playback. */
-    VAProfileProtected                  = 35
+    VAProfileProtected                  = 35,
+    VAProfileH264High10                 = 36
 } VAProfile;
 
 /**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.17.0/va/va_backend.h 
new/libva-2.18.0/va/va_backend.h
--- old/libva-2.17.0/va/va_backend.h    2022-12-21 15:28:59.000000000 +0100
+++ new/libva-2.18.0/va/va_backend.h    2023-03-19 13:27:04.000000000 +0100
@@ -654,6 +654,7 @@
     VADisplayContextP pNext;
     VADriverContextP pDriverContext;
 
+    /* Deprecated */
     int (*vaIsValid)(
         VADisplayContextP ctx
     );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.17.0/va/va_internal.h 
new/libva-2.18.0/va/va_internal.h
--- old/libva-2.17.0/va/va_internal.h   2022-12-21 15:28:59.000000000 +0100
+++ new/libva-2.18.0/va/va_internal.h   2023-03-19 13:27:04.000000000 +0100
@@ -30,7 +30,7 @@
 #endif
 
 #define CTX(dpy) (((VADisplayContextP)dpy)->pDriverContext)
-#define CHECK_DISPLAY(dpy) if( !vaDisplayIsValid(dpy) ) { return 
VA_STATUS_ERROR_INVALID_DISPLAY; }
+#define CHECK_DISPLAY(dpy) if (!vaDisplayIsValid(dpy)) { return 
VA_STATUS_ERROR_INVALID_DISPLAY; }
 
 DLL_HIDDEN
 void va_errorMessage(VADisplay dpy, const char *msg, ...);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.17.0/va/va_str.c new/libva-2.18.0/va/va_str.c
--- old/libva-2.17.0/va/va_str.c        2022-12-21 15:28:59.000000000 +0100
+++ new/libva-2.18.0/va/va_str.c        2023-03-19 13:27:04.000000000 +0100
@@ -37,6 +37,7 @@
         TOSTR(VAProfileMPEG4Main);
         TOSTR(VAProfileH264Main);
         TOSTR(VAProfileH264High);
+        TOSTR(VAProfileH264High10);
         TOSTR(VAProfileVC1Simple);
         TOSTR(VAProfileVC1Main);
         TOSTR(VAProfileVC1Advanced);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.17.0/va/va_trace.c 
new/libva-2.18.0/va/va_trace.c
--- old/libva-2.17.0/va/va_trace.c      2022-12-21 15:28:59.000000000 +0100
+++ new/libva-2.18.0/va/va_trace.c      2023-03-19 13:27:04.000000000 +0100
@@ -5749,6 +5749,7 @@
                 va_TraceMPEG4Buf(dpy, context, buffers[i], type, size, 
num_elements, pbuf + size * j);
             }
             break;
+        case VAProfileH264High10:
         case VAProfileH264Main:
         case VAProfileH264High:
         case VAProfileH264ConstrainedBaseline:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.17.0/va/wayland/va_wayland.c 
new/libva-2.18.0/va/wayland/va_wayland.c
--- old/libva-2.17.0/va/wayland/va_wayland.c    2022-12-21 15:28:59.000000000 
+0100
+++ new/libva-2.18.0/va/wayland/va_wayland.c    2023-03-19 13:27:04.000000000 
+0100
@@ -54,15 +54,6 @@
     va_end(args);
 }
 
-static int
-va_DisplayContextIsValid(VADisplayContextP pDisplayContext)
-{
-    VADriverContextP const pDriverContext = pDisplayContext->pDriverContext;
-
-    return (pDriverContext &&
-            pDriverContext->display_type == VA_DISPLAY_WAYLAND);
-}
-
 static void
 va_DisplayContextDestroy(VADisplayContextP pDisplayContext)
 {
@@ -131,7 +122,6 @@
     if (!pDisplayContext)
         return NULL;
 
-    pDisplayContext->vaIsValid          = va_DisplayContextIsValid;
     pDisplayContext->vaDestroy          = va_DisplayContextDestroy;
     pDisplayContext->vaGetDriverName    = va_DisplayContextGetDriverName;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.17.0/va/win32/va_win32.c 
new/libva-2.18.0/va/win32/va_win32.c
--- old/libva-2.17.0/va/win32/va_win32.c        2022-12-21 15:28:59.000000000 
+0100
+++ new/libva-2.18.0/va/win32/va_win32.c        2023-03-19 13:27:04.000000000 
+0100
@@ -59,7 +59,7 @@
 #ifndef _WIN64
     BOOL isWowProcess = false;
     if (IsWow64Process(GetCurrentProcess(), &isWowProcess) && isWowProcess)
-        wcscpy(RegistryInfo.ValueName, "VAAPIDriverNameWow");
+        wcscpy(RegistryInfo.ValueName, L"VAAPIDriverNameWow");
 #endif
     D3DKMT_QUERYADAPTERINFO QAI = {
         .Type = KMTQAITYPE_QUERYREGISTRY,
@@ -107,19 +107,14 @@
         free(pRegistryInfo);
     if (pfnCloseAdapter && OpenArgs.hAdapter) {
         D3DKMT_CLOSEADAPTER Close = { OpenArgs.hAdapter };
-        pfnCloseAdapter(&Close);
+        /* The explicit negation is a no-op, yet required to silence the
+         * Wunused-result warning.
+         */
+        (void) !pfnCloseAdapter(&Close);
     }
     FreeLibrary(hGdi32);
 }
 
-static int va_DisplayContextIsValid(
-    VADisplayContextP pDisplayContext
-)
-{
-    return (pDisplayContext != NULL &&
-            pDisplayContext->pDriverContext != NULL);
-}
-
 static void va_DisplayContextDestroy(
     VADisplayContextP pDisplayContext
 )
@@ -193,7 +188,6 @@
     if (!pDisplayContext)
         return NULL;
 
-    pDisplayContext->vaIsValid       = va_DisplayContextIsValid;
     pDisplayContext->vaDestroy       = va_DisplayContextDestroy;
     pDisplayContext->vaGetDriverNameByIndex = 
va_DisplayContextGetDriverNameByIndex;
     pDisplayContext->vaGetNumCandidates = va_DisplayContextGetNumCandidates;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.17.0/va/x11/va_dricommon.h 
new/libva-2.18.0/va/x11/va_dricommon.h
--- old/libva-2.17.0/va/x11/va_dricommon.h      2022-12-21 15:28:59.000000000 
+0100
+++ new/libva-2.18.0/va/x11/va_dricommon.h      2023-03-19 13:27:04.000000000 
+0100
@@ -24,21 +24,13 @@
 #ifndef _VA_DRICOMMON_H_
 #define _VA_DRICOMMON_H_
 
-#ifndef ANDROID
 #include <X11/Xlib.h>
 #include <xf86drm.h>
 #include <drm.h>
-#include <drm_sarea.h>
-#endif
 
 #include <va/va_backend.h>
 #include <va/va_drmcommon.h>
 
-#ifdef ANDROID
-#define XID unsigned int
-#define Bool int
-#endif
-
 enum {
     /* Compatibility. Do not use for newly-written code. */
     VA_NONE     = VA_DRM_AUTH_NONE,
@@ -72,7 +64,6 @@
 #define DRAWABLE_HASH_SZ 32
 struct dri_state {
     struct drm_state base;
-#ifndef ANDROID
     struct dri_drawable *drawable_hash[DRAWABLE_HASH_SZ];
 
     struct dri_drawable *(*createDrawable)(VADriverContextP ctx, XID 
x_drawable);
@@ -80,7 +71,6 @@
     void (*swapBuffer)(VADriverContextP ctx, struct dri_drawable 
*dri_drawable);
     union dri_buffer *(*getRenderingBuffer)(VADriverContextP ctx, struct 
dri_drawable *dri_drawable);
     void (*close)(VADriverContextP ctx);
-#endif
     /** \brief Reserved bytes for future use, must be zero */
     unsigned long  va_reserved[16];
 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.17.0/va/x11/va_x11.c 
new/libva-2.18.0/va/x11/va_x11.c
--- old/libva-2.17.0/va/x11/va_x11.c    2022-12-21 15:28:59.000000000 +0100
+++ new/libva-2.18.0/va/x11/va_x11.c    2023-03-19 13:27:04.000000000 +0100
@@ -58,14 +58,6 @@
     { NULL,         NULL }
 };
 
-static int va_DisplayContextIsValid(
-    VADisplayContextP pDisplayContext
-)
-{
-    return (pDisplayContext != NULL &&
-            pDisplayContext->pDriverContext != NULL);
-}
-
 static void va_DisplayContextDestroy(
     VADisplayContextP pDisplayContext
 )
@@ -167,14 +159,15 @@
     char **driver_name, int candidate_index
 )
 {
-    VAStatus vaStatus;
+    VAStatus vaStatus = VA_STATUS_ERROR_UNKNOWN;
 
     if (driver_name)
         *driver_name = NULL;
     else
         return VA_STATUS_ERROR_UNKNOWN;
 
-    vaStatus = va_DRI3_GetDriverName(pDisplayContext, driver_name, 
candidate_index);
+    if (!getenv("LIBVA_DRI3_DISABLE"))
+        vaStatus = va_DRI3_GetDriverName(pDisplayContext, driver_name, 
candidate_index);
     if (vaStatus != VA_STATUS_SUCCESS)
         vaStatus = va_DRI2_GetDriverName(pDisplayContext, driver_name, 
candidate_index);
 #ifdef HAVE_NVCTRL
@@ -194,9 +187,10 @@
     int *num_candidates
 )
 {
-    VAStatus vaStatus;
+    VAStatus vaStatus = VA_STATUS_ERROR_UNKNOWN;
 
-    vaStatus = va_DRI3_GetNumCandidates(pDisplayContext, num_candidates);
+    if (!getenv("LIBVA_DRI3_DISABLE"))
+        vaStatus = va_DRI3_GetNumCandidates(pDisplayContext, num_candidates);
     if (vaStatus != VA_STATUS_SUCCESS)
         vaStatus = va_DRI2_GetNumCandidates(pDisplayContext, num_candidates);
 
@@ -225,7 +219,6 @@
     if (!pDisplayContext)
         return NULL;
 
-    pDisplayContext->vaIsValid       = va_DisplayContextIsValid;
     pDisplayContext->vaDestroy       = va_DisplayContextDestroy;
     pDisplayContext->vaGetNumCandidates = va_DisplayContextGetNumCandidates;
     pDisplayContext->vaGetDriverNameByIndex = va_DisplayContextGetDriverName;

Reply via email to