meson: Define a HAVE_XXXX macro for every gallium driver we build
authorAdam Jackson <ajax@redhat.com>
Thu, 24 Mar 2022 19:05:32 +0000 (15:05 -0400)
committerMarge Bot <emma+marge@anholt.net>
Thu, 7 Apr 2022 00:17:40 +0000 (00:17 +0000)
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541>

meson.build

index b6a2a9d..189a5c5 100644 (file)
@@ -231,6 +231,9 @@ with_gallium_lima = gallium_drivers.contains('lima')
 with_gallium_zink = gallium_drivers.contains('zink')
 with_gallium_d3d12 = gallium_drivers.contains('d3d12')
 with_gallium_asahi = gallium_drivers.contains('asahi')
+foreach gallium_driver : gallium_drivers
+  pre_args += '-DHAVE_@0@'.format(gallium_driver.to_upper())
+endforeach
 
 with_gallium = gallium_drivers.length() != 0
 with_gallium_kmsro = with_gallium_v3d or with_gallium_vc4 or with_gallium_etnaviv or with_gallium_panfrost or with_gallium_lima or with_gallium_freedreno