broadcom/vc5: Use the sampler view's format, not the resource's.
[mesa.git] / meson.build
index ef06ea8f6b755ccbb6ce567a972ccfcd5211a0e3..24d997b3e0a761e0d0eae897ae6b3fa418bb8244 100644 (file)
@@ -150,7 +150,7 @@ endif
 # TODO: other OSes
 with_dri_platform = 'drm'
 
-# TODO: android platform
+with_platform_android = false
 with_platform_wayland = false
 with_platform_x11 = false
 with_platform_drm = false
@@ -159,6 +159,7 @@ egl_native_platform = ''
 _platforms = get_option('platforms')
 if _platforms != ''
   _split = _platforms.split(',')
+  with_platform_android = _split.contains('android')
   with_platform_x11 = _split.contains('x11')
   with_platform_wayland = _split.contains('wayland')
   with_platform_drm = _split.contains('drm')
@@ -250,8 +251,8 @@ if _vulkan_drivers != ''
   with_intel_vk = _split.contains('intel')
   with_amd_vk = _split.contains('amd')
   with_any_vk = with_amd_vk or with_intel_vk
-  if not (with_platform_x11 or with_platform_wayland)
-    error('Vulkan requires at least one platform (x11, wayland)')
+  if not (with_platform_x11 or with_platform_wayland or with_platform_android)
+    error('Vulkan requires at least one platform (x11, wayland, android)')
   endif
 endif
 
@@ -328,6 +329,14 @@ endif
 if with_platform_surfaceless
   pre_args += '-DHAVE_SURFACELESS_PLATFORM'
 endif
+if with_platform_android
+  dep_android = [
+    dependency('cutils'),
+    dependency('hardware'),
+    dependency('sync'),
+  ]
+  pre_args += '-DHAVE_ANDROID_PLATFORM'
+endif
 
 prog_python2 = find_program('python2')
 has_mako = run_command(prog_python2, '-c', 'import mako')
@@ -715,6 +724,9 @@ if with_osmesa != 'none'
   if with_osmesa == 'classic' and not with_dri_swrast
     error('OSMesa classic requires dri (classic) swrast.')
   endif
+  if with_osmesa == 'gallium' and not with_gallium_softpipe
+    error('OSMesa gallium requires gallium softpipe or llvmpipe.')
+  endif
   osmesa_lib_name = 'OSMesa'
   osmesa_bits = get_option('osmesa-bits')
   if osmesa_bits != '8'