aco: add framework for testing isel and integration tests
[mesa.git] / src / amd / compiler / tests / meson.build
index c63b860630ad1c8430ffe6190d328d984e251c5e..bb8e7ca9288af824064455c681fadd0e9f8c7102 100644 (file)
@@ -23,15 +23,26 @@ aco_tests_files = files(
   'helpers.h',
   'main.cpp',
   'test_assembler.cpp',
   'helpers.h',
   'main.cpp',
   'test_assembler.cpp',
+  'test_isel.cpp',
   'test_optimizer.cpp',
   'test_tests.cpp',
 )
 
   'test_optimizer.cpp',
   'test_tests.cpp',
 )
 
+spirv_files = files(
+  'test_isel.cpp',
+)
+
+gen_spirv = generator(prog_python,
+                      output    : '@BASENAME@-spirv.h',
+                      arguments : [join_paths(meson.current_source_dir(), 'glsl_scraper.py'),
+                                   '@INPUT@', '--with-glslang', prog_glslang.path(), '-o', '@OUTPUT@'])
+gen_spirv_files = gen_spirv.process(spirv_files)
+
 test(
   'aco_tests',
   executable(
     'aco_tests',
 test(
   'aco_tests',
   executable(
     'aco_tests',
-    aco_tests_files,
+    [aco_tests_files, gen_spirv_files],
     cpp_args : ['-DACO_TEST_SOURCE_DIR="@0@"'.format(meson.current_source_dir()),
                 '-DACO_TEST_BUILD_ROOT="@0@"'.format(meson.build_root()),
                 '-DACO_TEST_PYTHON_BIN="@0@"'.format(prog_python.path())],
     cpp_args : ['-DACO_TEST_SOURCE_DIR="@0@"'.format(meson.current_source_dir()),
                 '-DACO_TEST_BUILD_ROOT="@0@"'.format(meson.build_root()),
                 '-DACO_TEST_PYTHON_BIN="@0@"'.format(prog_python.path())],
@@ -39,7 +50,7 @@ test(
       inc_include, inc_src, inc_gallium, inc_compiler, inc_mesa, inc_mapi, inc_amd, inc_amd_common, inc_amd_common_llvm,
     ],
     link_with : [
       inc_include, inc_src, inc_gallium, inc_compiler, inc_mesa, inc_mapi, inc_amd, inc_amd_common, inc_amd_common_llvm,
     ],
     link_with : [
-      libamd_common, libamd_common_llvm
+      libamd_common, libamd_common_llvm, libvulkan_radeon,
     ],
     dependencies : [
       dep_llvm, dep_thread, idep_aco, idep_nir, idep_mesautil
     ],
     dependencies : [
       dep_llvm, dep_thread, idep_aco, idep_nir, idep_mesautil