From 25ba73ef6ed5234e49f8e22a809f073c4dd61353 Mon Sep 17 00:00:00 2001 From: Thong Thai Date: Mon, 11 May 2026 15:07:30 +0000 Subject: [PATCH] meson: Make with_gfx_compute depend on video encode support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update the with_gfx_compute flag so decode-only builds do not unnecessarily compile gfx/compute code. Signed-off-by: Thong Thai Acked-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Marek Olšák Part-of: --- meson.build | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/meson.build b/meson.build index 620ac001e84..247df3e0f03 100644 --- a/meson.build +++ b/meson.build @@ -832,14 +832,6 @@ if with_gallium_rusticl endif endif -# Do built drivers need to include gfx/compute queues support? -# TODO: add a separate option to allow to build a VA-API driver without the features -# that depend on these queues. When added a lightweight decode-only VA-API driver could be built -with_gfx_compute = with_any_opengl or get_option('vulkan-drivers').length() > 0 or with_gallium_rusticl or with_gallium_va -if with_gfx_compute - pre_args += '-DHAVE_GFX_COMPUTE' -endif - with_virtgpu_kumquat = get_option('virtgpu_kumquat') and with_gfxstream_vk if with_gallium_rusticl or with_nouveau_vk or with_tools.contains('etnaviv') or with_virtgpu_kumquat # rust.bindgen() does not pass `--rust-target` to bindgen until 1.7.0. @@ -955,6 +947,16 @@ if with_clc dep_clc = dependency('libclc') endif +with_gfx_compute = [ + with_any_opengl, + with_any_vk, + with_clc, + with_gallium_va and with_video_encode, +].contains(true) +if with_gfx_compute + pre_args += '-DHAVE_GFX_COMPUTE' +endif + gl_pkgconfig_c_flags = [] with_glx_indirect_rendering = false if with_platform_x11 @@ -2600,6 +2602,7 @@ if with_gallium endif gallium_summary += {'Frontends': gallium_frontends} gallium_summary += {'HUD lm-sensors': dep_lmsensors.found()} + gallium_summary += {'GFX/Compute': with_gfx_compute} endif summary(gallium_summary, section: 'Gallium', bool_yn: true, list_sep: ' ')