meson: fix android vulkan build
[mesa.git] / src / freedreno / vulkan / meson.build
index 70efd26008bce3e8de3d7302ab43bee433c65db1..8696f246da0ffbbaa8624ec22bc62a9c9fc303f6 100644 (file)
@@ -39,18 +39,8 @@ tu_extensions_c = custom_target(
   ],
 )
 
-tu_format_table_c = custom_target(
-  'tu_format_table.c',
-  input : ['vk_format_table.py', 'vk_format_layout.csv'],
-  output : 'vk_format_table.c',
-  command : [prog_python, '@INPUT@'],
-  depend_files : files('vk_format_parse.py'),
-  capture : true,
-)
-
 libtu_files = files(
-  'tu_blit.c',
-  'tu_blit.h',
+  'tu_clear_blit.c',
   'tu_cmd_buffer.c',
   'tu_cs.c',
   'tu_cs.h',
@@ -61,11 +51,6 @@ libtu_files = files(
   'tu_fence.c',
   'tu_formats.c',
   'tu_image.c',
-  'tu_meta_blit.c',
-  'tu_meta_buffer.c',
-  'tu_meta_clear.c',
-  'tu_meta_copy.c',
-  'tu_meta_resolve.c',
   'tu_pass.c',
   'tu_pipeline.c',
   'tu_pipeline_cache.c',
@@ -81,31 +66,61 @@ libtu_files = files(
 tu_deps = []
 tu_flags = []
 
+if with_platform_x11
+  tu_deps += dep_xcb_dri3
+  tu_flags += [
+    '-DVK_USE_PLATFORM_XCB_KHR',
+    '-DVK_USE_PLATFORM_XLIB_KHR',
+  ]
+  libtu_files += files('tu_wsi_x11.c')
+endif
+
 if with_platform_wayland
   tu_deps += dep_wayland_client
   tu_flags += '-DVK_USE_PLATFORM_WAYLAND_KHR'
   libtu_files += files('tu_wsi_wayland.c')
 endif
 
+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
+
+if with_platform_android
+  tu_flags += '-DVK_USE_PLATFORM_ANDROID_KHR'
+  libtu_files += files('tu_android.c')
+  tu_deps += [dep_android]
+endif
+
+if with_xlib_lease
+  tu_deps += [dep_xcb_xrandr, dep_xlib_xrandr]
+  tu_flags += '-DVK_USE_PLATFORM_XLIB_XRANDR_EXT'
+endif
+
 libvulkan_freedreno = shared_library(
   'vulkan_freedreno',
-  [libtu_files, tu_entrypoints, tu_extensions_c, tu_format_table_c, freedreno_xml_header_files],
+  [libtu_files, tu_entrypoints, tu_extensions_c, freedreno_xml_header_files],
   include_directories : [
-    inc_common,
+    inc_include,
+    inc_src,
+    inc_mapi,
+    inc_mesa,
+    inc_gallium,
+    inc_gallium_aux,
     inc_compiler,
     inc_vulkan_wsi,
     inc_freedreno,
   ],
   link_with : [
     libvulkan_wsi,
-    libfreedreno_drm, # required by ir3_shader_get_variant, which we don't use
     libfreedreno_ir3,
+    libfreedreno_layout,
   ],
   dependencies : [
+    idep_libfreedreno_common,
     dep_dl,
     dep_elf,
     dep_libdrm,
-    dep_llvm,
     dep_m,
     dep_thread,
     dep_valgrind,
@@ -114,7 +129,8 @@ libvulkan_freedreno = shared_library(
     idep_vulkan_util,
     idep_mesautil,
   ],
-  c_args : [c_vis_args, no_override_init_args, tu_flags],
+  c_args : [no_override_init_args, tu_flags],
+  gnu_symbol_visibility : 'hidden',
   link_args : [ld_args_bsymbolic, ld_args_gc_sections],
   install : true,
 )