1# Copyright © 2017 Dylan Baker
2
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:
9
10# The above copyright notice and this permission notice shall be included in
11# all copies or substantial portions of the Software.
12
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
19# SOFTWARE.
20
21files_libradeonsi = files(
22  'driinfo_radeonsi.h',
23  'gfx10_query.c',
24  'gfx10_shader_ngg.c',
25  'si_blit.c',
26  'si_buffer.c',
27  'si_build_pm4.h',
28  'si_clear.c',
29  'si_compute.c',
30  'si_compute.h',
31  'si_compute_blit.c',
32  'si_cp_dma.c',
33  'si_cp_reg_shadowing.c',
34  'si_debug.c',
35  'si_descriptors.c',
36  'si_fence.c',
37  'si_get.c',
38  'si_gfx_cs.c',
39  'si_gpu_load.c',
40  'si_perfcounter.c',
41  'si_pipe.c',
42  'si_pipe.h',
43  'si_pm4.c',
44  'si_pm4.h',
45  'si_public.h',
46  'si_query.c',
47  'si_query.h',
48  'si_nir_optim.c',
49  'si_sdma_copy_image.c',
50  'si_shader.c',
51  'si_shader.h',
52  'si_shader_info.c',
53  'si_shader_internal.h',
54  'si_shader_llvm.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',
59  'si_shader_llvm_vs.c',
60  'si_shader_nir.c',
61  'si_shaderlib_nir.c',
62  'si_shaderlib_tgsi.c',
63  'si_sqtt.c',
64  'si_state.c',
65  'si_state.h',
66  'si_state_binning.c',
67  'si_state_msaa.c',
68  'si_state_shaders.cpp',
69  'si_state_streamout.c',
70  'si_state_viewport.c',
71  'si_test_image_copy_region.c',
72  'si_test_dma_perf.c',
73  'si_texture.c',
74  'si_uvd.c',
75  'pspdecryptionparam.h',
76  'radeon_temporal.h',
77  'radeon_uvd.c',
78  'radeon_uvd.h',
79  'radeon_uvd_enc.c',
80  'radeon_uvd_enc.h',
81  'radeon_uvd_enc_1_1.c',
82  'radeon_vce.c',
83  'radeon_vce.h',
84  'radeon_vce_40_2_2.c',
85  'radeon_vce_50.c',
86  'radeon_vce_52.c',
87  'radeon_vcn.h',
88  'radeon_vcn.c',
89  'radeon_vcn_av1_default.h',
90  'radeon_vcn_dec.c',
91  'radeon_vcn_dec.h',
92  'radeon_vcn_dec_jpeg.c',
93  'radeon_vcn_enc.c',
94  'radeon_vcn_enc.h',
95  'radeon_vcn_enc_1_2.c',
96  'radeon_vcn_enc_2_0.c',
97  'radeon_vcn_enc_3_0.c',
98  'radeon_vcn_enc_4_0.c',
99  'radeon_video.c',
100  'radeon_video.h',
101)
102
103radeonsi_include_dirs = [inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_amd_common,
104                         inc_amd_common_llvm, inc_gallium_drivers]
105radeonsi_deps = [dep_llvm, dep_clock, dep_libdrm_radeon, idep_nir_headers, idep_amdgfxregs_h, idep_mesautil]
106
107radeonsi_gfx_libs = []
108foreach ver : ['6', '7', '8', '9', '10', '103', '11']
109  radeonsi_gfx_libs += static_library(
110    'radeonsi_gfx@0@'.format(ver),
111    ['si_state_draw.cpp'],
112    include_directories : radeonsi_include_dirs,
113    cpp_args : ['-DGFX_VER=@0@'.format(ver)],
114    gnu_symbol_visibility : 'hidden',
115    dependencies : radeonsi_deps,
116  )
117endforeach
118
119libradeonsi = static_library(
120  'radeonsi',
121  [files_libradeonsi, sid_tables_h],
122  include_directories : radeonsi_include_dirs,
123  gnu_symbol_visibility : 'hidden',
124  dependencies : radeonsi_deps,
125)
126
127driver_radeonsi = declare_dependency(
128  compile_args : '-DGALLIUM_RADEONSI',
129  link_with : radeonsi_gfx_libs + [
130    libradeonsi, libradeonwinsys, libamdgpuwinsys, libamd_common, libamd_common_llvm, libgalliumvl
131  ],
132  dependencies : idep_nir,
133)
134