Path: blob/21.2-virgl/src/amd/common/meson.build
7188 views
# Copyright © 2017 Intel Corporation12# Permission is hereby granted, free of charge, to any person obtaining a copy3# of this software and associated documentation files (the "Software"), to deal4# in the Software without restriction, including without limitation the rights5# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell6# copies of the Software, and to permit persons to whom the Software is7# furnished to do so, subject to the following conditions:89# The above copyright notice and this permission notice shall be included in10# all copies or substantial portions of the Software.1112# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR13# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,14# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE15# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER16# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,17# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE18# SOFTWARE.1920amd_json_files = [21# Generated:22'../registers/gfx6.json',23'../registers/gfx7.json',24'../registers/gfx8.json',25'../registers/gfx81.json',26'../registers/gfx9.json',27'../registers/gfx10.json',28'../registers/gfx103.json',2930# Manually written:31'../registers/pkt3.json',32'../registers/gfx10-rsrc.json',33'../registers/registers-manually-defined.json',34]3536sid_tables_h = custom_target(37'sid_tables_h',38input : ['sid_tables.py', 'sid.h'] + amd_json_files,39output : 'sid_tables.h',40command : [prog_python, '@INPUT@'],41capture : true,42)4344amdgfxregs_h = custom_target(45'amdgfxregs_h',46input : ['../registers/makeregheader.py'] + amd_json_files,47output : 'amdgfxregs.h',48command : [prog_python, '@INPUT@', '--sort', 'address', '--guard', 'AMDGFXREGS_H'],49capture : true,50)5152gfx10_format_table_c = custom_target(53'gfx10_format_table.c',54input : files(55'gfx10_format_table.py',56'../../util/format/u_format.csv', '../registers/gfx10-rsrc.json'57),58output : 'gfx10_format_table.c',59command : [prog_python, '@INPUT@'],60capture : true,61depend_files : ['../registers/regdb.py']62)6364amd_common_files = files(65'ac_binary.c',66'ac_binary.h',67'ac_exp_param.h',68'ac_shader_args.c',69'ac_shader_args.h',70'ac_shader_util.c',71'ac_shader_util.h',72'ac_gpu_info.c',73'ac_gpu_info.h',74'ac_rtld.c',75'ac_rtld.h',76'ac_surface.c',77'ac_surface.h',78'ac_debug.c',79'ac_debug.h',80'ac_shadowed_regs.c',81'ac_shadowed_regs.h',82'ac_sqtt.c',83'ac_sqtt.h',84'ac_rgp.c',85'ac_rgp.h',86'ac_msgpack.c',87'ac_msgpack.h',88'ac_rgp_elf_object_pack.c',89'ac_nir.c',90'ac_nir.h',91'ac_nir_cull.c',92'ac_nir_lower_esgs_io_to_mem.c',93'ac_nir_lower_tess_io_to_mem.c',94'ac_nir_lower_ngg.c',95'amd_family.c',96'ac_perfcounter.c',97'ac_perfcounter.h',98)99100libamd_common = static_library(101'amd_common',102[amd_common_files, sid_tables_h, amdgfxregs_h, gfx10_format_table_c],103include_directories : [104inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_compiler, inc_mapi, inc_amd,105],106dependencies : [107dep_thread, dep_elf, dep_libdrm_amdgpu, dep_valgrind,108idep_mesautil, idep_nir_headers, idep_nir109],110gnu_symbol_visibility : 'hidden',111)112113idep_amdgfxregs_h = declare_dependency(sources : [amdgfxregs_h])114115116if with_tests and not with_platform_windows117test(118'ac_surface_modifier_test',119executable(120'ac_surface_modifier_test',121['ac_surface_modifier_test.c'],122link_with: [libamd_common, libamdgpu_addrlib],123include_directories : [124inc_amd, inc_gallium, inc_include, inc_src,125],126dependencies: [idep_amdgfxregs_h, dep_libdrm_amdgpu, idep_mesautil],127),128suite: ['amd']129)130131# Limit this to only a few architectures for the Gitlab CI.132if ['x86', 'x86_64', 'aarch64'].contains(host_machine.cpu_family())133test(134'ac_surface_meta_address_test',135executable(136'ac_surface_meta_address_test',137['ac_surface_meta_address_test.c'],138link_with: [libamd_common, libamdgpu_addrlib],139include_directories : [140inc_amd, inc_gallium, inc_include, inc_src,141],142dependencies: [idep_amdgfxregs_h, dep_libdrm_amdgpu, idep_mesautil, dep_openmp],143),144suite: ['amd']145)146endif147endif148149150