aae30917bad40194ec2f0767d1fddf0990ab37b0
[mesa.git] / src / gallium / drivers / lima / meson.build
1 # Copyright © 2018 Lima Project
2 #
3 # Permission is hereby granted, free of charge, to any person obtaining a
4 # copy of this software and associated documentation files (the "Software"),
5 # to deal in the Software without restriction, including without limitation
6 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
7 # and/or sell copies of the Software, and to permit persons to whom the
8 # Software is furnished to do so, subject to the following conditions:
9 #
10 # The above copyright notice and this permission notice (including the next
11 # paragraph) shall be included in all copies or substantial portions of the
12 # Software.
13 #
14 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20 # IN THE SOFTWARE.
21
22 files_lima = files(
23 'ir/gp/gpir.h',
24 'ir/gp/nir.c',
25 'ir/gp/node.c',
26 'ir/gp/lower.c',
27 'ir/gp/scheduler.c',
28 'ir/gp/instr.c',
29 'ir/gp/codegen.h',
30 'ir/gp/codegen.c',
31 'ir/gp/reduce_scheduler.c',
32 'ir/gp/regalloc.c',
33 'ir/gp/disasm.c',
34 'ir/gp/optimize.c',
35
36 'ir/pp/ppir.h',
37 'ir/pp/nir.c',
38 'ir/pp/node.c',
39 'ir/pp/lower.c',
40 'ir/pp/scheduler.c',
41 'ir/pp/instr.c',
42 'ir/pp/regalloc.c',
43 'ir/pp/liveness.c',
44 'ir/pp/codegen.h',
45 'ir/pp/codegen.c',
46 'ir/pp/node_to_instr.c',
47 'ir/pp/disasm.c',
48
49 'ir/lima_nir_duplicate_intrinsic.c',
50 'ir/lima_nir_lower_uniform_to_scalar.c',
51 'ir/lima_nir_split_load_input.c',
52
53 'ir/lima_ir.h',
54
55 'lima_screen.c',
56 'lima_screen.h',
57 'lima_context.c',
58 'lima_context.h',
59 'lima_resource.c',
60 'lima_resource.h',
61 'lima_state.c',
62 'lima_draw.c',
63 'lima_program.c',
64 'lima_query.c',
65 'lima_bo.c',
66 'lima_bo.h',
67 'lima_job.c',
68 'lima_job.h',
69 'lima_parser.c',
70 'lima_parser.h',
71 'lima_util.c',
72 'lima_util.h',
73 'lima_texture.c',
74 'lima_texture.h',
75 'lima_fence.c',
76 'lima_fence.h',
77 'lima_format.h',
78 'lima_format.c',
79 'lima_gpu.h',
80 )
81
82 lima_nir_algebraic_c = custom_target(
83 'lima_nir_algebraic.c',
84 input : 'ir/lima_nir_algebraic.py',
85 output : 'lima_nir_algebraic.c',
86 command : [
87 prog_python, '@INPUT@',
88 '-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
89 ],
90 capture : true,
91 depend_files : nir_algebraic_py,
92 )
93
94 liblima = static_library(
95 'lima',
96 files_lima, lima_nir_algebraic_c,
97 include_directories : [
98 inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_gallium_drivers,
99 inc_panfrost
100 ],
101 dependencies : [dep_libdrm, idep_nir_headers],
102 )
103
104 driver_lima = declare_dependency(
105 compile_args : '-DGALLIUM_LIMA',
106 link_with : [liblima, liblimawinsys, libpanfrost_shared],
107 dependencies : idep_nir,
108 )
109
110
111 lima_compiler = executable(
112 'lima_compiler',
113 files(
114 'standalone/lima_compiler_cmdline.c',
115 'standalone/glsl.cpp'
116 ),
117 include_directories : [
118 inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_gallium_drivers, inc_mesa, inc_mapi, inc_compiler,
119 ],
120 dependencies : [
121 idep_nir,
122 idep_mesautil,
123 ],
124 link_with : [
125 liblima,
126 libgallium,
127 libglsl_standalone,
128 libpanfrost_shared,
129 ],
130 build_by_default : with_tools.contains('lima'),
131 install : with_tools.contains('lima'),
132 )
133
134 lima_disasm = executable(
135 'lima_disasm',
136 files(
137 'standalone/lima_disasm.c',
138 ),
139 include_directories : [
140 inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_gallium_drivers, inc_mesa, inc_mapi, inc_compiler,
141 ],
142 dependencies : [
143 idep_mesautil,
144 ],
145 link_with : [
146 liblima,
147 libpanfrost_shared,
148 ],
149 build_by_default : with_tools.contains('lima'),
150 install : with_tools.contains('lima'),
151 )