From 4f4745ebf3c39bde6faf2fc8baedf69a321c2b2f Mon Sep 17 00:00:00 2001 From: Thong Thai Date: Tue, 2 Dec 2025 16:28:33 +0000 Subject: [PATCH] frontends/va: get libva api version from va_version.h Signed-off-by: Thong Thai Reviewed-by: Leo Liu Reviewed-by: David Rosca Part-of: --- meson.build | 2 ++ src/gallium/frontends/va/meson.build | 2 -- src/gallium/targets/va/meson.build | 3 +-- subprojects/libva.wrap | 1 - 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index 6098c567df5..aecca8fda00 100644 --- a/meson.build +++ b/meson.build @@ -708,6 +708,8 @@ if dep_va.found() dependencies: dep_va_headers) pre_args += '-DHAVE_VA_SURFACE_ATTRIB_DRM_FORMAT_MODIFIERS' endif + libva_version = cc.get_define('VA_VERSION', prefix: '#include "va/va_version.h"', + dependencies: dep_va_headers).split('.') endif with_gallium_va = dep_va.found() diff --git a/src/gallium/frontends/va/meson.build b/src/gallium/frontends/va/meson.build index 0e4d69009a4..b82504fdb52 100644 --- a/src/gallium/frontends/va/meson.build +++ b/src/gallium/frontends/va/meson.build @@ -1,8 +1,6 @@ # Copyright © 2017-2019 Intel Corporation # SPDX-License-Identifier: MIT -libva_version = dep_va.version().split('.') - libva_st = static_library( 'va_st', files( diff --git a/src/gallium/targets/va/meson.build b/src/gallium/targets/va/meson.build index efd88956321..23e6035e359 100644 --- a/src/gallium/targets/va/meson.build +++ b/src/gallium/targets/va/meson.build @@ -34,10 +34,9 @@ devenv.set('LIBVA_DRIVERS_PATH', meson.current_build_dir()) if host_machine.system() == 'windows' link_with_libva_gallium += [libwsgdi] - libva_init_version = dep_va.version().split('.') vaon12_def_input = configure_file( configuration: { - '__vaDriverInit_X_Y': '__vaDriverInit_@0@_@1@'.format(libva_init_version[0], libva_init_version[1]) + '@4' + '__vaDriverInit_X_Y': '__vaDriverInit_@0@_@1@'.format(libva_version[0], libva_version[1]) + '@4' }, input: 'vaon12.def.in', output: 'vaon12.def.in', diff --git a/subprojects/libva.wrap b/subprojects/libva.wrap index f8bcd3dfde0..ee64d09e340 100644 --- a/subprojects/libva.wrap +++ b/subprojects/libva.wrap @@ -3,7 +3,6 @@ directory = libva-2.22.0 source_url = https://github.com/intel/libva/archive/refs/tags/2.22.0.tar.gz source_filename = 2.22.0.tar.gz source_hash = 467c418c2640a178c6baad5be2e00d569842123763b80507721ab87eb7af8735 -wrapdb_version = 2.22.0-1 [provide] libva = libva_dep \ No newline at end of file