meson: factor out with_driver_using_cl

adding a new bindgen-using driver should not require touching 4 different meson
files! factor out the expression, since it's a pain otherwise.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
This commit is contained in:
Alyssa Rosenzweig 2025-01-30 09:50:37 -05:00 committed by Marge Bot
parent 41c163138d
commit 3b1166da8c
3 changed files with 7 additions and 12 deletions

View file

@ -828,6 +828,9 @@ else
with_drivers_clc = false with_drivers_clc = false
endif endif
with_driver_using_cl = with_gallium_iris or with_intel_vk or \
with_gallium_asahi or with_asahi_vk
if get_option('mesa-clc') == 'system' if get_option('mesa-clc') == 'system'
prog_mesa_clc = find_program('mesa_clc', native : true) prog_mesa_clc = find_program('mesa_clc', native : true)
prog_vtn_bindgen = find_program('vtn_bindgen', native : true) prog_vtn_bindgen = find_program('vtn_bindgen', native : true)
@ -835,10 +838,8 @@ if get_option('mesa-clc') == 'system'
with_clc = with_gallium_rusticl with_clc = with_gallium_rusticl
else else
with_clc = get_option('mesa-clc') != 'auto' or \ with_clc = get_option('mesa-clc') != 'auto' or \
with_microsoft_clc or with_drivers_clc or \ with_microsoft_clc or with_gallium_rusticl or \
with_gallium_iris or with_intel_vk or \ with_drivers_clc or with_driver_using_cl
with_gallium_asahi or with_asahi_vk or \
with_gallium_rusticl
endif endif
dep_clc = null_dep dep_clc = null_dep

View file

@ -120,10 +120,7 @@ idep_mesaclc = declare_dependency(
link_args : _idep_mesaclc_link_args, link_args : _idep_mesaclc_link_args,
) )
if get_option('mesa-clc') != 'system' and (with_gallium_asahi or \ if get_option('mesa-clc') != 'system' and (with_driver_using_cl or \
with_asahi_vk or \
with_intel_vk or \
with_gallium_iris or \
get_option('install-mesa-clc')) get_option('install-mesa-clc'))
prog_mesa_clc = executable( prog_mesa_clc = executable(
'mesa_clc', 'mesa_clc',

View file

@ -77,10 +77,7 @@ spirv2nir = executable(
install : with_tools.contains('nir'), install : with_tools.contains('nir'),
) )
if get_option('mesa-clc') != 'system' and (with_gallium_asahi or \ if get_option('mesa-clc') != 'system' and (with_driver_using_cl or \
with_asahi_vk or \
with_intel_vk or \
with_gallium_iris or \
get_option('install-mesa-clc')) get_option('install-mesa-clc'))
prog_vtn_bindgen = executable( prog_vtn_bindgen = executable(
'vtn_bindgen', 'vtn_bindgen',