freedreno/a5xx: perfmance counters
[mesa.git] / src / gallium / drivers / freedreno / meson.build
1 # Copyright © 2017 Rob Clark
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
21 ir3_nir_trig_c = custom_target(
22 'ir3_nir_trig.c',
23 input : 'ir3/ir3_nir_trig.py',
24 output : 'ir3_nir_trig.c',
25 command : [
26 prog_python2, '@INPUT@',
27 '-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
28 ],
29 capture : true,
30 depend_files : nir_algebraic_py,
31 )
32
33 files_libfreedreno = files(
34 'adreno_common.xml.h',
35 'adreno_pm4.xml.h',
36 'disasm.h',
37 'freedreno_batch.c',
38 'freedreno_batch.h',
39 'freedreno_batch_cache.c',
40 'freedreno_batch_cache.h',
41 'freedreno_blitter.c',
42 'freedreno_blitter.h',
43 'freedreno_context.c',
44 'freedreno_context.h',
45 'freedreno_draw.c',
46 'freedreno_draw.h',
47 'freedreno_fence.c',
48 'freedreno_fence.h',
49 'freedreno_gmem.c',
50 'freedreno_gmem.h',
51 'freedreno_perfcntr.h',
52 'freedreno_program.c',
53 'freedreno_program.h',
54 'freedreno_query.c',
55 'freedreno_query.h',
56 'freedreno_query_acc.c',
57 'freedreno_query_acc.h',
58 'freedreno_query_hw.c',
59 'freedreno_query_hw.h',
60 'freedreno_query_sw.c',
61 'freedreno_query_sw.h',
62 'freedreno_resource.c',
63 'freedreno_resource.h',
64 'freedreno_screen.c',
65 'freedreno_screen.h',
66 'freedreno_state.c',
67 'freedreno_state.h',
68 'freedreno_surface.c',
69 'freedreno_surface.h',
70 'freedreno_texture.c',
71 'freedreno_texture.h',
72 'freedreno_util.c',
73 'freedreno_util.h',
74 'a2xx/a2xx.xml.h',
75 'a2xx/disasm-a2xx.c',
76 'a2xx/fd2_blend.c',
77 'a2xx/fd2_blend.h',
78 'a2xx/fd2_compiler.c',
79 'a2xx/fd2_compiler.h',
80 'a2xx/fd2_context.c',
81 'a2xx/fd2_context.h',
82 'a2xx/fd2_draw.c',
83 'a2xx/fd2_draw.h',
84 'a2xx/fd2_emit.c',
85 'a2xx/fd2_emit.h',
86 'a2xx/fd2_gmem.c',
87 'a2xx/fd2_gmem.h',
88 'a2xx/fd2_program.c',
89 'a2xx/fd2_program.h',
90 'a2xx/fd2_rasterizer.c',
91 'a2xx/fd2_rasterizer.h',
92 'a2xx/fd2_screen.c',
93 'a2xx/fd2_screen.h',
94 'a2xx/fd2_texture.c',
95 'a2xx/fd2_texture.h',
96 'a2xx/fd2_util.c',
97 'a2xx/fd2_util.h',
98 'a2xx/fd2_zsa.c',
99 'a2xx/fd2_zsa.h',
100 'a2xx/instr-a2xx.h',
101 'a2xx/ir-a2xx.c',
102 'a2xx/ir-a2xx.h',
103 'a3xx/a3xx.xml.h',
104 'a3xx/fd3_blend.c',
105 'a3xx/fd3_blend.h',
106 'a3xx/fd3_context.c',
107 'a3xx/fd3_context.h',
108 'a3xx/fd3_draw.c',
109 'a3xx/fd3_draw.h',
110 'a3xx/fd3_emit.c',
111 'a3xx/fd3_emit.h',
112 'a3xx/fd3_format.c',
113 'a3xx/fd3_format.h',
114 'a3xx/fd3_gmem.c',
115 'a3xx/fd3_gmem.h',
116 'a3xx/fd3_program.c',
117 'a3xx/fd3_program.h',
118 'a3xx/fd3_query.c',
119 'a3xx/fd3_query.h',
120 'a3xx/fd3_rasterizer.c',
121 'a3xx/fd3_rasterizer.h',
122 'a3xx/fd3_screen.c',
123 'a3xx/fd3_screen.h',
124 'a3xx/fd3_texture.c',
125 'a3xx/fd3_texture.h',
126 'a3xx/fd3_zsa.c',
127 'a3xx/fd3_zsa.h',
128 'a4xx/a4xx.xml.h',
129 'a4xx/fd4_blend.c',
130 'a4xx/fd4_blend.h',
131 'a4xx/fd4_context.c',
132 'a4xx/fd4_context.h',
133 'a4xx/fd4_draw.c',
134 'a4xx/fd4_draw.h',
135 'a4xx/fd4_emit.c',
136 'a4xx/fd4_emit.h',
137 'a4xx/fd4_format.c',
138 'a4xx/fd4_format.h',
139 'a4xx/fd4_gmem.c',
140 'a4xx/fd4_gmem.h',
141 'a4xx/fd4_program.c',
142 'a4xx/fd4_program.h',
143 'a4xx/fd4_query.c',
144 'a4xx/fd4_query.h',
145 'a4xx/fd4_rasterizer.c',
146 'a4xx/fd4_rasterizer.h',
147 'a4xx/fd4_screen.c',
148 'a4xx/fd4_screen.h',
149 'a4xx/fd4_texture.c',
150 'a4xx/fd4_texture.h',
151 'a4xx/fd4_zsa.c',
152 'a4xx/fd4_zsa.h',
153 'a5xx/a5xx.xml.h',
154 'a5xx/fd5_blend.c',
155 'a5xx/fd5_blend.h',
156 'a5xx/fd5_blitter.c',
157 'a5xx/fd5_blitter.h',
158 'a5xx/fd5_compute.c',
159 'a5xx/fd5_compute.h',
160 'a5xx/fd5_context.c',
161 'a5xx/fd5_context.h',
162 'a5xx/fd5_draw.c',
163 'a5xx/fd5_draw.h',
164 'a5xx/fd5_emit.c',
165 'a5xx/fd5_emit.h',
166 'a5xx/fd5_format.c',
167 'a5xx/fd5_format.h',
168 'a5xx/fd5_gmem.c',
169 'a5xx/fd5_gmem.h',
170 'a5xx/fd5_image.c',
171 'a5xx/fd5_image.h',
172 'a5xx/fd5_perfcntr.c',
173 'a5xx/fd5_program.c',
174 'a5xx/fd5_program.h',
175 'a5xx/fd5_query.c',
176 'a5xx/fd5_query.h',
177 'a5xx/fd5_rasterizer.c',
178 'a5xx/fd5_rasterizer.h',
179 'a5xx/fd5_resource.c',
180 'a5xx/fd5_resource.h',
181 'a5xx/fd5_screen.c',
182 'a5xx/fd5_screen.h',
183 'a5xx/fd5_texture.c',
184 'a5xx/fd5_texture.h',
185 'a5xx/fd5_zsa.c',
186 'a5xx/fd5_zsa.h',
187 'ir3/disasm-a3xx.c',
188 'ir3/instr-a3xx.h',
189 'ir3/ir3.c',
190 'ir3/ir3_compiler_nir.c',
191 'ir3/ir3_compiler.c',
192 'ir3/ir3_compiler.h',
193 'ir3/ir3_cp.c',
194 'ir3/ir3_depth.c',
195 'ir3/ir3_group.c',
196 'ir3/ir3.h',
197 'ir3/ir3_legalize.c',
198 'ir3/ir3_nir.c',
199 'ir3/ir3_nir.h',
200 'ir3/ir3_nir_lower_tg4_to_tex.c',
201 'ir3/ir3_print.c',
202 'ir3/ir3_ra.c',
203 'ir3/ir3_sched.c',
204 'ir3/ir3_shader.c',
205 'ir3/ir3_shader.h',
206 )
207
208 freedreno_includes = [
209 inc_src, inc_include, inc_gallium, inc_gallium_aux,
210 include_directories('ir3')
211 ]
212
213 freedreno_c_args = []
214 if cc.has_argument('-Wpacked-bitfield-compat')
215 freedreno_c_args += '-Wno-packed-bitfield-compat'
216 endif
217
218 freedreno_cpp_args = []
219 if cpp.has_argument('-Wpacked-bitfield-compat')
220 freedreno_cpp_args += '-Wno-packed-bitfield-compat'
221 endif
222
223 libfreedreno = static_library(
224 'freedreno',
225 [files_libfreedreno, ir3_nir_trig_c],
226 include_directories : freedreno_includes,
227 c_args : [freedreno_c_args, c_vis_args],
228 cpp_args : [freedreno_cpp_args, cpp_vis_args],
229 dependencies : [dep_libdrm, dep_libdrm_freedreno, idep_nir_headers],
230 )
231
232 driver_freedreno = declare_dependency(
233 compile_args : '-DGALLIUM_FREEDRENO',
234 link_with : [libfreedrenowinsys, libfreedreno],
235 dependencies : idep_nir,
236 )
237
238 ir3_compiler = executable(
239 'ir3_compiler',
240 'ir3/ir3_cmdline.c',
241 include_directories : freedreno_includes,
242 dependencies : [
243 dep_libdrm,
244 dep_libdrm_freedreno,
245 dep_thread,
246 idep_nir,
247 ],
248 link_with : [
249 libfreedreno,
250 libgallium,
251 libglsl_standalone,
252 libmesa_util,
253 ],
254 build_by_default : with_tools.contains('freedreno'),
255 install : with_tools.contains('freedreno'),
256 )