1 # Copyright © 2017 Rob Clark
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_libfreedreno = files(
25 'freedreno_batch_cache.c',
26 'freedreno_batch_cache.h',
27 'freedreno_blitter.c',
28 'freedreno_blitter.h',
29 'freedreno_context.c',
30 'freedreno_context.h',
37 'freedreno_perfcntr.h',
38 'freedreno_program.c',
39 'freedreno_program.h',
42 'freedreno_query_acc.c',
43 'freedreno_query_acc.h',
44 'freedreno_query_hw.c',
45 'freedreno_query_hw.h',
46 'freedreno_query_sw.c',
47 'freedreno_query_sw.h',
48 'freedreno_resource.c',
49 'freedreno_resource.h',
54 'freedreno_surface.c',
55 'freedreno_surface.h',
56 'freedreno_texture.c',
57 'freedreno_texture.h',
71 'a2xx/fd2_perfcntr.c',
76 'a2xx/fd2_rasterizer.c',
77 'a2xx/fd2_rasterizer.h',
78 'a2xx/fd2_resource.c',
79 'a2xx/fd2_resource.h',
91 'a2xx/ir2_assemble.c',
108 'a3xx/fd3_program.c',
109 'a3xx/fd3_program.h',
112 'a3xx/fd3_rasterizer.c',
113 'a3xx/fd3_rasterizer.h',
114 'a3xx/fd3_resource.c',
115 'a3xx/fd3_resource.h',
118 'a3xx/fd3_texture.c',
119 'a3xx/fd3_texture.h',
124 'a4xx/fd4_context.c',
125 'a4xx/fd4_context.h',
134 'a4xx/fd4_program.c',
135 'a4xx/fd4_program.h',
138 'a4xx/fd4_rasterizer.c',
139 'a4xx/fd4_rasterizer.h',
142 'a4xx/fd4_texture.c',
143 'a4xx/fd4_texture.h',
148 'a5xx/fd5_blitter.c',
149 'a5xx/fd5_blitter.h',
150 'a5xx/fd5_compute.c',
151 'a5xx/fd5_compute.h',
152 'a5xx/fd5_context.c',
153 'a5xx/fd5_context.h',
164 'a5xx/fd5_perfcntr.c',
165 'a5xx/fd5_program.c',
166 'a5xx/fd5_program.h',
169 'a5xx/fd5_rasterizer.c',
170 'a5xx/fd5_rasterizer.h',
171 'a5xx/fd5_resource.c',
172 'a5xx/fd5_resource.h',
175 'a5xx/fd5_texture.c',
176 'a5xx/fd5_texture.h',
181 'a6xx/fd6_blitter.c',
182 'a6xx/fd6_blitter.h',
183 'a6xx/fd6_compute.c',
184 'a6xx/fd6_compute.h',
185 'a6xx/fd6_context.c',
186 'a6xx/fd6_context.h',
197 'a6xx/fd6_perfcntr.c',
198 'a6xx/fd6_program.c',
199 'a6xx/fd6_program.h',
202 'a6xx/fd6_rasterizer.c',
203 'a6xx/fd6_rasterizer.h',
204 'a6xx/fd6_resource.c',
205 'a6xx/fd6_resource.h',
208 'a6xx/fd6_texture.c',
209 'a6xx/fd6_texture.h',
218 freedreno_includes = [
220 inc_src, inc_include, inc_gallium, inc_gallium_aux,
221 inc_freedreno, include_directories('ir3'),
224 freedreno_c_args = [ c_vis_args, no_override_init_args ]
225 if cc.has_argument('-Wpacked-bitfield-compat')
226 freedreno_c_args += '-Wno-packed-bitfield-compat'
229 freedreno_cpp_args = []
230 if cpp.has_argument('-Wpacked-bitfield-compat')
231 freedreno_cpp_args += '-Wno-packed-bitfield-compat'
234 libfreedreno = static_library(
236 [files_libfreedreno, freedreno_xml_header_files],
237 include_directories : freedreno_includes,
238 c_args : [freedreno_c_args, c_vis_args],
239 cpp_args : [freedreno_cpp_args, cpp_vis_args],
240 dependencies : [dep_libdrm, idep_nir_headers],
243 driver_freedreno = declare_dependency(
244 compile_args : '-DGALLIUM_FREEDRENO',
251 dependencies : idep_nir,
254 ir3_compiler = executable(
257 include_directories : freedreno_includes,
269 build_by_default : with_tools.contains('freedreno'),
270 install : with_tools.contains('freedreno'),