xref: /aosp_15_r20/external/mesa3d/src/amd/compiler/tests/meson.build (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1# Copyright © 2020 Valve Corporation
2# SPDX-License-Identifier: MIT
3
4aco_tests_files = files(
5  'framework.h',
6  'helpers.cpp',
7  'helpers.h',
8  'main.cpp',
9  'test_assembler.cpp',
10  'test_builder.cpp',
11  'test_d3d11_derivs.cpp',
12  'test_hard_clause.cpp',
13  'test_insert_nops.cpp',
14  'test_insert_waitcnt.cpp',
15  'test_isel.cpp',
16  'test_lower_subdword.cpp',
17  'test_optimizer.cpp',
18  'test_reduce_assign.cpp',
19  'test_regalloc.cpp',
20  'test_optimizer_postRA.cpp',
21  'test_scheduler.cpp',
22  'test_sdwa.cpp',
23  'test_to_hw_instr.cpp',
24  'test_tests.cpp',
25)
26
27spirv_files = files(
28  'test_isel.cpp',
29  'test_d3d11_derivs.cpp',
30)
31
32gen_spirv = generator(
33  prog_python,
34  output : '@[email protected]',
35  arguments : [
36    join_paths(meson.current_source_dir(), 'glsl_scraper.py'),
37    '@INPUT@', '--with-glslang', prog_glslang.full_path(), '-o', '@OUTPUT@',
38  ],
39)
40gen_spirv_files = gen_spirv.process(spirv_files)
41
42test(
43  'aco_tests',
44  executable(
45    'aco_tests',
46    [aco_tests_files, gen_spirv_files],
47    cpp_args : ['-DACO_TEST_SOURCE_DIR="@0@"'.format(meson.current_source_dir()),
48                '-DACO_TEST_BUILD_ROOT="@0@"'.format(meson.project_build_root()),
49                '-DACO_TEST_PYTHON_BIN="@0@"'.format(prog_python.full_path())] +
50               cpp_args_aco,
51    include_directories : [
52      inc_include, inc_src, inc_amd, inc_amd_common, inc_amd_common_llvm,
53    ],
54    link_with : [
55      libamd_common, libamd_common_llvm, libvulkan_radeon,
56    ],
57    dependencies : [
58      dep_llvm, dep_thread, idep_aco, idep_nir, idep_mesautil, idep_vulkan_util_headers, idep_amdgfxregs_h,
59    ],
60    gnu_symbol_visibility : 'hidden',
61    build_by_default : true,
62  ),
63  suite : ['amd', 'compiler'],
64)
65