1 # Copyright © 2017 Dylan Baker
3 # Permission is hereby granted, free of charge, to any person obtaining a copy
4 # of this software and associated documentation files (the "Software"), to deal
5 # in the Software without restriction, including without limitation the rights
6 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 # copies of the Software, and to permit persons to whom the Software is
8 # furnished to do so, subject to the following conditions:
10 # The above copyright notice and this permission notice shall be included in
11 # all copies or substantial portions of the Software.
13 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 files_libradeonsi = files(
31 'si_compute_prim_discard.c',
52 'si_shader_internal.h',
54 'si_shader_llvm_build.c',
55 'si_shader_llvm_gs.c',
56 'si_shader_llvm_ps.c',
57 'si_shader_llvm_resources.c',
58 'si_shader_llvm_tess.c',
60 'si_shaderlib_tgsi.c',
67 'si_state_streamout.c',
68 'si_state_viewport.c',
73 '../radeon/radeon_uvd.c',
74 '../radeon/radeon_uvd.h',
75 '../radeon/radeon_vcn_enc_1_2.c',
76 '../radeon/radeon_vcn_enc_2_0.c',
77 '../radeon/radeon_vcn_enc.c',
78 '../radeon/radeon_vcn_enc.h',
79 '../radeon/radeon_vcn_dec_jpeg.c',
80 '../radeon/radeon_vcn_dec.c',
81 '../radeon/radeon_vcn_dec.h',
82 '../radeon/radeon_uvd_enc_1_1.c',
83 '../radeon/radeon_uvd_enc.c',
84 '../radeon/radeon_uvd_enc.h',
85 '../radeon/radeon_vce_40_2_2.c',
86 '../radeon/radeon_vce_50.c',
87 '../radeon/radeon_vce_52.c',
88 '../radeon/radeon_vce.c',
89 '../radeon/radeon_vce.h',
90 '../radeon/radeon_video.c',
91 '../radeon/radeon_video.h',
92 '../radeon/radeon_winsys.h',
95 si_driinfo_h = custom_target(
98 '../../../util/merge_driinfo.py',
99 '../../auxiliary/pipe-loader/driinfo_gallium.h', 'driinfo_radeonsi.h'
101 output : 'si_driinfo.h',
102 command : [prog_python, '@INPUT@'],
106 gfx10_format_table_h = custom_target(
107 'gfx10_format_table.h',
109 'gfx10_format_table.py',
110 '../../../util/format/u_format.csv', '../../../amd/registers/gfx10-rsrc.json'
112 output : 'gfx10_format_table.h',
113 command : [prog_python, '@INPUT@'],
115 depend_files : ['../../../amd/registers/regdb.py']
118 libradeonsi = static_library(
120 [files_libradeonsi, si_driinfo_h, sid_tables_h, gfx10_format_table_h],
121 include_directories : [
122 inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_amd_common, inc_amd_common_llvm,
125 c_args : ['-Wstrict-overflow=0', c_vis_args],
126 cpp_args : [cpp_vis_args],
127 dependencies : [dep_llvm, dep_clock, dep_libdrm_radeon, idep_nir_headers, idep_amdgfxregs_h],
130 driver_radeonsi = declare_dependency(
131 compile_args : '-DGALLIUM_RADEONSI',
132 sources : si_driinfo_h,
134 libradeonsi, libradeonwinsys, libamdgpuwinsys, libamd_common, libamd_common_llvm, libgalliumvl
136 dependencies : idep_nir,