lima: put hardware related info to lima_gpu.h
[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
35 'ir/pp/ppir.h',
36 'ir/pp/nir.c',
37 'ir/pp/node.c',
38 'ir/pp/lower.c',
39 'ir/pp/scheduler.c',
40 'ir/pp/instr.c',
41 'ir/pp/regalloc.c',
42 'ir/pp/liveness.c',
43 'ir/pp/codegen.h',
44 'ir/pp/codegen.c',
45 'ir/pp/node_to_instr.c',
46 'ir/pp/disasm.c',
47
48 'ir/lima_nir_lower_uniform_to_scalar.c',
49 'ir/lima_nir_split_load_input.c',
50
51 'ir/lima_ir.h',
52
53 'lima_screen.c',
54 'lima_screen.h',
55 'lima_context.c',
56 'lima_context.h',
57 'lima_resource.c',
58 'lima_resource.h',
59 'lima_state.c',
60 'lima_draw.c',
61 'lima_program.c',
62 'lima_query.c',
63 'lima_bo.c',
64 'lima_bo.h',
65 'lima_submit.c',
66 'lima_submit.h',
67 'lima_parser.c',
68 'lima_parser.h',
69 'lima_util.c',
70 'lima_util.h',
71 'lima_texture.c',
72 'lima_texture.h',
73 'lima_fence.c',
74 'lima_fence.h',
75 'lima_format.h',
76 'lima_format.c',
77 'lima_gpu.h',
78 )
79
80 lima_nir_algebraic_c = custom_target(
81 'lima_nir_algebraic.c',
82 input : 'ir/lima_nir_algebraic.py',
83 output : 'lima_nir_algebraic.c',
84 command : [
85 prog_python, '@INPUT@',
86 '-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
87 ],
88 capture : true,
89 depend_files : nir_algebraic_py,
90 )
91
92 liblima = static_library(
93 'lima',
94 files_lima, lima_nir_algebraic_c,
95 include_directories : [
96 inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_gallium_drivers,
97 inc_panfrost
98 ],
99 dependencies : [dep_libdrm, idep_nir_headers],
100 )
101
102 driver_lima = declare_dependency(
103 compile_args : '-DGALLIUM_LIMA',
104 link_with : [liblima, liblimawinsys, libpanfrost_shared],
105 dependencies : idep_nir,
106 )
107
108
109 lima_compiler = executable(
110 'lima_compiler',
111 files(
112 'standalone/lima_compiler_cmdline.c',
113 'standalone/glsl.cpp'
114 ),
115 include_directories : [
116 inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_gallium_drivers, inc_mesa, inc_mapi, inc_compiler,
117 ],
118 dependencies : [
119 idep_nir,
120 idep_mesautil,
121 ],
122 link_with : [
123 liblima,
124 libgallium,
125 libglsl_standalone,
126 libpanfrost_shared,
127 ],
128 build_by_default : with_tools.contains('lima'),
129 install : with_tools.contains('lima'),
130 )
131
132 lima_disasm = executable(
133 'lima_disasm',
134 files(
135 'standalone/lima_disasm.c',
136 ),
137 include_directories : [
138 inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_gallium_drivers, inc_mesa, inc_mapi, inc_compiler,
139 ],
140 dependencies : [
141 idep_mesautil,
142 ],
143 link_with : [
144 liblima,
145 libpanfrost_shared,
146 ],
147 build_by_default : with_tools.contains('lima'),
148 install : with_tools.contains('lima'),
149 )