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 ir3_nir_trig_c = custom_target(
23 input : 'ir3/ir3_nir_trig.py',
24 output : 'ir3_nir_trig.c',
26 prog_python2, '@INPUT@',
27 '-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
30 depend_files : nir_algebraic_py,
33 files_libfreedreno = files(
34 'adreno_common.xml.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',
51 'freedreno_program.c',
52 'freedreno_program.h',
55 'freedreno_query_acc.c',
56 'freedreno_query_acc.h',
57 'freedreno_query_hw.c',
58 'freedreno_query_hw.h',
59 'freedreno_query_sw.c',
60 'freedreno_query_sw.h',
61 'freedreno_resource.c',
62 'freedreno_resource.h',
67 'freedreno_surface.c',
68 'freedreno_surface.h',
69 'freedreno_texture.c',
70 'freedreno_texture.h',
77 'a2xx/fd2_compiler.c',
78 'a2xx/fd2_compiler.h',
89 'a2xx/fd2_rasterizer.c',
90 'a2xx/fd2_rasterizer.h',
105 'a3xx/fd3_context.c',
106 'a3xx/fd3_context.h',
115 'a3xx/fd3_program.c',
116 'a3xx/fd3_program.h',
119 'a3xx/fd3_rasterizer.c',
120 'a3xx/fd3_rasterizer.h',
123 'a3xx/fd3_texture.c',
124 'a3xx/fd3_texture.h',
130 'a4xx/fd4_context.c',
131 'a4xx/fd4_context.h',
140 'a4xx/fd4_program.c',
141 'a4xx/fd4_program.h',
144 'a4xx/fd4_rasterizer.c',
145 'a4xx/fd4_rasterizer.h',
148 'a4xx/fd4_texture.c',
149 'a4xx/fd4_texture.h',
155 'a5xx/fd5_blitter.c',
156 'a5xx/fd5_blitter.h',
157 'a5xx/fd5_compute.c',
158 'a5xx/fd5_compute.h',
159 'a5xx/fd5_context.c',
160 'a5xx/fd5_context.h',
171 'a5xx/fd5_program.c',
172 'a5xx/fd5_program.h',
175 'a5xx/fd5_rasterizer.c',
176 'a5xx/fd5_rasterizer.h',
177 'a5xx/fd5_resource.c',
178 'a5xx/fd5_resource.h',
181 'a5xx/fd5_texture.c',
182 'a5xx/fd5_texture.h',
188 'ir3/ir3_compiler_nir.c',
189 'ir3/ir3_compiler.c',
190 'ir3/ir3_compiler.h',
195 'ir3/ir3_legalize.c',
198 'ir3/ir3_nir_lower_if_else.c',
199 'ir3/ir3_nir_lower_tg4_to_tex.c',
207 freedreno_includes = [
208 inc_src, inc_include, inc_gallium, inc_gallium_aux,
209 include_directories('ir3')
212 freedreno_c_args = []
213 if cc.has_argument('-Wpacked-bitfield-compat')
214 freedreno_c_args += '-Wno-packed-bitfield-compat'
217 freedreno_cpp_args = []
218 if cpp.has_argument('-Wpacked-bitfield-compat')
219 freedreno_cpp_args += '-Wno-packed-bitfield-compat'
222 libfreedreno = static_library(
224 [files_libfreedreno, ir3_nir_trig_c],
225 include_directories : freedreno_includes,
226 c_args : [freedreno_c_args, c_vis_args],
227 cpp_args : [freedreno_cpp_args, cpp_vis_args],
228 dependencies : [dep_libdrm, dep_libdrm_freedreno, idep_nir_headers],
231 driver_freedreno = declare_dependency(
232 compile_args : '-DGALLIUM_FREEDRENO',
233 link_with : [libfreedrenowinsys, libfreedreno],
236 ir3_compiler = executable(
239 include_directories : freedreno_includes,
242 dep_libdrm_freedreno,
252 build_by_default : true,