meson: move the generic symbols check arguments to a common variable
[mesa.git] / src / intel / vulkan / meson.build
index 03dbd98b5a4c009e4b320035d27ad412b4e486db..c21d7bd25074bc7305ca3bcf41ff8ac8c658d657 100644 (file)
@@ -68,19 +68,6 @@ intel_icd = custom_target(
   install : true,
 )
 
-dev_icd = custom_target(
-  'dev_icd',
-  input : 'anv_icd.py',
-  output : 'dev_icd.@0@.json'.format(host_machine.cpu()),
-  command : [
-    prog_python, '@INPUT@', '--lib-path', meson.current_build_dir(),
-    '--out', '@OUTPUT@'
-  ],
-  depend_files : files('anv_extensions.py'),
-  build_by_default : true,
-  install : false,
-)
-
 libanv_gen_libs = []
 anv_gen_files = files(
   'genX_blorp_exec.c',
@@ -92,7 +79,8 @@ anv_gen_files = files(
 )
 foreach g : [['70', ['gen7_cmd_buffer.c']], ['75', ['gen7_cmd_buffer.c']],
              ['80', ['gen8_cmd_buffer.c']], ['90', ['gen8_cmd_buffer.c']],
-             ['100', ['gen8_cmd_buffer.c']], ['110', ['gen8_cmd_buffer.c']]]
+             ['100', ['gen8_cmd_buffer.c']], ['110', ['gen8_cmd_buffer.c']],
+             ['120', ['gen8_cmd_buffer.c']]]
   _gen = g[0]
   libanv_gen_libs += static_library(
     'anv_gen@0@'.format(_gen),
@@ -112,7 +100,6 @@ endforeach
 
 libanv_files = files(
   'anv_allocator.c',
-  'anv_android_stubs.c',
   'anv_android.h',
   'anv_batch_chain.c',
   'anv_blorp.c',
@@ -127,11 +114,11 @@ libanv_files = files(
   'anv_nir.h',
   'anv_nir_add_base_work_group_id.c',
   'anv_nir_apply_pipeline_layout.c',
-  'anv_nir_lower_input_attachments.c',
   'anv_nir_lower_multiview.c',
   'anv_nir_lower_push_constants.c',
   'anv_nir_lower_ycbcr_textures.c',
   'anv_pass.c',
+  'anv_perf.c',
   'anv_pipeline.c',
   'anv_pipeline_cache.c',
   'anv_private.h',
@@ -146,6 +133,7 @@ anv_deps = [
   dep_valgrind,
   idep_nir_headers,
   idep_vulkan_util_headers,
+  idep_xmlconfig_headers,
 ]
 anv_flags = [
   c_vis_args,
@@ -178,6 +166,13 @@ if with_xlib_lease
   anv_flags += '-DVK_USE_PLATFORM_XLIB_XRANDR_EXT'
 endif
 
+if with_platform_android
+  anv_flags += '-DVK_USE_PLATFORM_ANDROID_KHR'
+  libanv_files += files('anv_android.c')
+else
+  libanv_files += files('anv_android_stubs.c')
+endif
+
 libanv_common = static_library(
   'anv_common',
   [
@@ -186,7 +181,7 @@ libanv_common = static_library(
   ],
   include_directories : [
     inc_common, inc_intel, inc_compiler, inc_include,
-    inc_vulkan_wsi,
+    inc_vulkan_wsi, inc_util,
   ],
   c_args : anv_flags,
   dependencies : anv_deps,
@@ -200,17 +195,31 @@ libvulkan_intel = shared_library(
   ],
   link_whole : [libanv_common, libanv_gen_libs],
   link_with : [
-    libintel_compiler, libintel_common, libintel_dev, libisl, libblorp,
-    libvulkan_wsi, libmesa_util,
+    libintel_compiler, libintel_dev, libisl, libblorp, libvulkan_wsi,
+    libintel_perf,
   ],
   dependencies : [
-    dep_thread, dep_dl, dep_m, anv_deps, idep_nir, idep_genxml, idep_vulkan_util
+    dep_thread, dep_dl, dep_m, anv_deps, idep_libintel_common,
+    idep_nir, idep_genxml, idep_vulkan_util, idep_mesautil, idep_xmlconfig,
   ],
   c_args : anv_flags,
   link_args : ['-Wl,--build-id=sha1', ld_args_bsymbolic, ld_args_gc_sections],
   install : true,
 )
 
+if with_symbols_check
+  test(
+    'anv symbols check',
+    symbols_check,
+    args : [
+      '--lib', libvulkan_intel,
+      '--symbols-file', vulkan_icd_symbols,
+      symbols_check_args,
+    ],
+    suite : ['intel'],
+  )
+endif
+
 if with_tests
   libvulkan_intel_test = static_library(
     'vulkan_intel_test',
@@ -221,17 +230,18 @@ if with_tests
     link_whole : libanv_common,
     link_with : [
       libanv_gen_libs, libintel_compiler, libintel_common, libintel_dev,
-      libisl, libblorp, libvulkan_wsi, libmesa_util,
+      libisl, libblorp, libvulkan_wsi, libintel_perf,
     ],
     dependencies : [
-      dep_thread, dep_dl, dep_m, anv_deps, idep_nir, idep_vulkan_util
+      dep_thread, dep_dl, dep_m, anv_deps,
+      idep_nir, idep_vulkan_util, idep_mesautil,
     ],
     c_args : anv_flags,
   )
 
-  foreach t : ['block_pool_no_free', 'state_pool_no_free',
-               'state_pool_free_list_only', 'state_pool',
-               'state_pool_padding']
+  foreach t : ['block_pool_no_free', 'block_pool_grow_first',
+               'state_pool_no_free', 'state_pool_free_list_only',
+               'state_pool', 'state_pool_padding']
     test(
       'anv_@0@'.format(t),
       executable(