meson: fix android vulkan build
authorEric Engestrom <eric@engestrom.ch>
Sat, 11 Jul 2020 08:17:30 +0000 (10:17 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 14 Jul 2020 09:34:54 +0000 (09:34 +0000)
Android doesn't have `pthread_cancel()` and is unlikely to ever
implement it [1], but `wsi_common_display.c` needs it (or an
alternative).

Let's just disable the platform on Android (as it used to be
before 448eb19158f483d807ef).

[1] https://android-review.googlesource.com/c/platform/bionic/+/1215779/1/docs/status.md

Fixes: 448eb19158f483d807ef ("vulkan: automatically compile the `display` platform when available")
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Acked-by: Nataraj Deshpande <nataraj.deshpande@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5860>

src/amd/vulkan/meson.build
src/freedreno/vulkan/meson.build
src/intel/vulkan/meson.build
src/vulkan/meson.build
src/vulkan/wsi/meson.build

index aa27b82c98a072d5583ca85eed68faf1e43906f7..e5fba9de21bc4ae65edfe04063a20b1decd49173 100644 (file)
@@ -131,7 +131,7 @@ if with_platform_wayland
   libradv_files += files('radv_wsi_wayland.c')
 endif
 
-if system_has_kms_drm
+if system_has_kms_drm and not with_platform_android
   radv_flags += '-DVK_USE_PLATFORM_DISPLAY_KHR'
   libradv_files += files('radv_wsi_display.c')
 endif
index eab543e1c12767a3512fcda19ff2044ef9a7a7f4..8696f246da0ffbbaa8624ec22bc62a9c9fc303f6 100644 (file)
@@ -81,7 +81,7 @@ if with_platform_wayland
   libtu_files += files('tu_wsi_wayland.c')
 endif
 
-if system_has_kms_drm
+if system_has_kms_drm and not with_platform_android
   tu_flags += '-DVK_USE_PLATFORM_DISPLAY_KHR'
   libtu_files += files('tu_wsi_display.c')
 endif
index aff495506d32939c0dd7dd6f376d31dc7db95f68..2d37fa0eb5e341a16465354a0dbf657e7f6e9e88 100644 (file)
@@ -155,7 +155,7 @@ if with_platform_wayland
   libanv_files += files('anv_wsi_wayland.c')
 endif
 
-if system_has_kms_drm
+if system_has_kms_drm and not with_platform_android
   anv_flags += '-DVK_USE_PLATFORM_DISPLAY_KHR'
   libanv_files += files('anv_wsi_display.c')
 endif
index 1e3f65c18d0a263d8a9e920585964831e5aefbef..ae84e0d739d664fac4a882b982c8a898b1a90d17 100644 (file)
@@ -45,7 +45,7 @@ if with_platform_wayland
   vulkan_wsi_deps += dep_wayland_client
   vulkan_wsi_list += ['wayland']
 endif
-if system_has_kms_drm
+if system_has_kms_drm and not with_platform_android
   vulkan_wsi_args += '-DVK_USE_PLATFORM_DISPLAY_KHR'
   vulkan_wsi_deps += [dep_libdrm]
   vulkan_wsi_list += ['drm']
index 0186ca6d4a1640d4f80c1d4c695f1a8561eb447f..687f5894882e47fcdb1dbcd48f05655f60c4e698 100644 (file)
@@ -34,7 +34,7 @@ if with_platform_wayland
   ]
 endif
 
-if system_has_kms_drm
+if system_has_kms_drm and not with_platform_android
   files_vulkan_wsi += files('wsi_common_display.c')
 endif