• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright © 2017 Intel Corporation
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_r600 = files(
22  'r600d_common.h',
23  'compute_memory_pool.c',
24  'compute_memory_pool.h',
25  'eg_asm.c',
26  'eg_debug.c',
27  'eg_sq.h',
28  'evergreen_compute.c',
29  'evergreen_compute.h',
30  'evergreen_compute_internal.h',
31  'evergreend.h',
32  'evergreen_hw_context.c',
33  'evergreen_state.c',
34  'r600_asm.c',
35  'r600_asm.h',
36  'r600_blit.c',
37  'r600d.h',
38  'r600_dump.c',
39  'r600_dump.h',
40  'r600_formats.h',
41  'r600_hw_context.c',
42  'r600_isa.c',
43  'r600_isa.h',
44  'r600_opcodes.h',
45  'r600_pipe.c',
46  'r600_pipe.h',
47  'r600_public.h',
48  'r600_sfn.cpp',
49  'r600_sfn.h',
50  'r600_shader.c',
51  'r600_shader.h',
52  'r600_shader_common.h',
53  'r600_sq.h',
54  'r600_state.c',
55  'r600_state_common.c',
56  'r600_uvd.c',
57  'r700_asm.c',
58  'r700_sq.h',
59  'cayman_msaa.c',
60  'r600_buffer_common.c',
61  'r600_cs.h',
62  'r600_gpu_load.c',
63  'r600_perfcounter.c',
64  'r600_pipe_common.c',
65  'r600_pipe_common.h',
66  'r600_query.c',
67  'r600_query.h',
68  'r600_streamout.c',
69  'r600_test_dma.c',
70  'r600_texture.c',
71  'r600_viewport.c',
72  'radeon_uvd.c',
73  'radeon_uvd.h',
74  'radeon_vce.c',
75  'radeon_vce.h',
76  'radeon_video.c',
77  'radeon_video.h',
78  'sfn/sfn_alu_defines.cpp',
79  'sfn/sfn_alu_defines.h',
80  'sfn/sfn_alu_readport_validation.cpp',
81  'sfn/sfn_alu_readport_validation.h',
82  'sfn/sfn_assembler.cpp',
83  'sfn/sfn_assembler.h',
84  'sfn/sfn_callstack.cpp',
85  'sfn/sfn_callstack.h',
86  'sfn/sfn_conditionaljumptracker.cpp',
87  'sfn/sfn_conditionaljumptracker.h',
88  'sfn/sfn_defines.h',
89  'sfn/sfn_debug.cpp',
90  'sfn/sfn_debug.h',
91  'sfn/sfn_instr.cpp',
92  'sfn/sfn_instr.h',
93  'sfn/sfn_instr_alu.cpp',
94  'sfn/sfn_instr_alu.h',
95  'sfn/sfn_instr_alugroup.cpp',
96  'sfn/sfn_instr_alugroup.h',
97  'sfn/sfn_instr_controlflow.cpp',
98  'sfn/sfn_instr_controlflow.h',
99  'sfn/sfn_instr_export.cpp',
100  'sfn/sfn_instr_export.h',
101  'sfn/sfn_instr_fetch.cpp',
102  'sfn/sfn_instr_fetch.h',
103  'sfn/sfn_instr_mem.cpp',
104  'sfn/sfn_instr_mem.h',
105  'sfn/sfn_instr_lds.cpp',
106  'sfn/sfn_instr_lds.h',
107  'sfn/sfn_instr_tex.cpp',
108  'sfn/sfn_instr_tex.h',
109  'sfn/sfn_instrfactory.cpp',
110  'sfn/sfn_instrfactory.h',
111  'sfn/sfn_liverangeevaluator.cpp',
112  'sfn/sfn_liverangeevaluator.h',
113  'sfn/sfn_liverangeevaluator_helpers.cpp',
114  'sfn/sfn_liverangeevaluator_helpers.h',
115  'sfn/sfn_memorypool.cpp',
116  'sfn/sfn_memorypool.h',
117  'sfn/sfn_nir.cpp',
118  'sfn/sfn_nir.h',
119  'sfn/sfn_nir_legalize_image_load_store.cpp',
120  'sfn/sfn_nir_lower_64bit.cpp',
121  'sfn/sfn_nir_lower_alu.cpp',
122  'sfn/sfn_nir_lower_alu.h',
123  'sfn/sfn_nir_lower_tex.cpp',
124  'sfn/sfn_nir_lower_tex.h',
125  'sfn/sfn_nir_lower_fs_out_to_vector.cpp',
126  'sfn/sfn_nir_lower_fs_out_to_vector.h',
127  'sfn/sfn_nir_lower_tess_io.cpp',
128  'sfn/sfn_nir_vectorize_vs_inputs.c',
129  'sfn/sfn_optimizer.cpp',
130  'sfn/sfn_peephole.cpp',
131  'sfn/sfn_ra.cpp',
132  'sfn/sfn_ra.h',
133  'sfn/sfn_scheduler.cpp',
134  'sfn/sfn_scheduler.h',
135  'sfn/sfn_shader.cpp',
136  'sfn/sfn_shader.h',
137  'sfn/sfn_shader_cs.cpp',
138  'sfn/sfn_shader_cs.h',
139  'sfn/sfn_shader_fs.cpp',
140  'sfn/sfn_shader_fs.h',
141  'sfn/sfn_shader_gs.cpp',
142  'sfn/sfn_shader_gs.h',
143  'sfn/sfn_shader_tess.cpp',
144  'sfn/sfn_shader_tess.h',
145  'sfn/sfn_shader_vs.cpp',
146  'sfn/sfn_shader_vs.h',
147  'sfn/sfn_split_address_loads.cpp',
148  'sfn/sfn_split_address_loads.h',
149  'sfn/sfn_valuefactory.cpp',
150  'sfn/sfn_valuefactory.h',
151  'sfn/sfn_virtualvalues.cpp',
152  'sfn/sfn_virtualvalues.h',
153  )
154
155egd_tables_h = custom_target(
156  'egd_tables.h',
157  input : ['egd_tables.py', 'evergreend.h'],
158  output : 'egd_tables.h',
159  command : [prog_python, '@INPUT@'],
160  capture : true,
161)
162
163r600_c_args = []
164if with_gallium_opencl
165  if dep_elf.found()
166    r600_c_args += '-DHAVE_OPENCL'
167  else
168    warning('r600 requires libelf to support opencl.')
169  endif
170endif
171
172r600_cpp_args = []
173if cpp.has_type('std::pmr::monotonic_buffer_resource',
174                 prefix : '#include <memory_resource>')
175   r600_cpp_args += '-DHAVE_MEMORY_RESOURCE'
176endif
177
178libr600 = static_library(
179  'r600',
180  [files_r600, egd_tables_h, sha1_h],
181  c_args : [r600_c_args, '-Wstrict-overflow=0'],
182  cpp_args: r600_cpp_args,
183  gnu_symbol_visibility : 'hidden',
184  include_directories : [
185    inc_src, inc_mapi, inc_mesa, inc_include, inc_gallium, inc_gallium_aux, inc_amd_common,
186    inc_gallium_drivers,
187  ],
188  link_with : [ libgalliumvl ],
189  dependencies: [dep_libdrm_radeon, dep_elf, dep_llvm, idep_nir, idep_nir_headers],
190)
191
192driver_r600 = declare_dependency(
193  compile_args : '-DGALLIUM_R600',
194  link_with : [libr600, libmesa, libradeonwinsys],
195)
196
197if with_tests
198  subdir('sfn/tests')
199endif
200
201
202