panfrost/midgard: Helpers for pipeline
[mesa.git] / src / gallium / drivers / panfrost / meson.build
1 # Copyright © 2017 Intel Corporation
2 # Copyright © 2018 Alyssa Rosenzweig
3
4 # Permission is hereby granted, free of charge, to any person obtaining a copy
5 # of this software and associated documentation files (the "Software"), to deal
6 # in the Software without restriction, including without limitation the rights
7 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 # copies of the Software, and to permit persons to whom the Software is
9 # furnished to do so, subject to the following conditions:
10
11 # The above copyright notice and this permission notice shall be included in
12 # all copies or substantial portions of the 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 THE
17 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 # SOFTWARE.
21
22 files_panfrost = files(
23 'pan_public.h',
24 'pan_screen.c',
25 'pan_screen.h',
26 'pan_resource.c',
27 'pan_resource.h',
28
29 'midgard/midgard_compile.c',
30 'midgard/mir.c',
31 'midgard/midgard_print.c',
32 'midgard/midgard_schedule.c',
33 'midgard/midgard_emit.c',
34 'midgard/midgard_ra.c',
35 'midgard/midgard_liveness.c',
36 'midgard/midgard_ops.c',
37
38 'midgard/nir_lower_blend.c',
39 'midgard/cppwrap.cpp',
40 'midgard/disassemble.c',
41
42 'bifrost/disassemble.c',
43
44 'pan_context.c',
45 'pan_job.c',
46 'pan_trace.c',
47 'pan_drm.c',
48 'pan_allocate.c',
49 'pan_assemble.c',
50 'pan_format.c',
51 'pan_swizzle.c',
52 'pan_blending.c',
53 'pan_blend_shaders.c',
54 'pan_wallpaper.c',
55 'pan_pretty_print.c',
56 'pan_fragment.c',
57 'pan_sfbd.c',
58 'pan_mfbd.c'
59 )
60
61 inc_panfrost = [
62 inc_common,
63 inc_gallium,
64 inc_gallium_aux,
65 inc_include,
66 inc_src,
67 include_directories('include'),
68 include_directories('midgard'),
69 include_directories('bifrost'),
70 ]
71
72 compile_args_panfrost = [
73 '-DGALLIUM_PANFROST',
74 '-Wno-pointer-arith'
75 ]
76
77 midgard_nir_algebraic_c = custom_target(
78 'midgard_nir_algebraic.c',
79 input : 'midgard/midgard_nir_algebraic.py',
80 output : 'midgard_nir_algebraic.c',
81 command : [
82 prog_python, '@INPUT@',
83 '-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
84 ],
85 capture : true,
86 depend_files : nir_algebraic_py,
87 )
88
89 libpanfrost = static_library(
90 'panfrost',
91 [files_panfrost, midgard_nir_algebraic_c],
92 dependencies: [
93 dep_thread,
94 dep_libdrm,
95 idep_nir
96 ],
97 include_directories : inc_panfrost,
98 c_args : [c_vis_args, c_msvc_compat_args, compile_args_panfrost],
99 )
100
101 driver_panfrost = declare_dependency(
102 compile_args : compile_args_panfrost,
103 link_with : [libpanfrost, libpanfrostwinsys],
104 )
105
106 files_bifrost = files(
107 'bifrost/disassemble.c',
108 'bifrost/cmdline.c',
109 )
110
111 bifrost_compiler = executable(
112 'bifrost_compiler',
113 [files_bifrost],
114 include_directories : [
115 inc_common,
116 inc_src,
117 inc_include,
118 inc_gallium,
119 inc_gallium_aux,
120 include_directories('bifrost')
121 ],
122 dependencies : [
123 dep_thread,
124 idep_nir
125 ],
126 link_with : [
127 libgallium,
128 libglsl_standalone,
129 libmesa_util
130 ],
131 build_by_default : true
132 )
133
134 files_pandecode = files(
135 'pandecode/cmdline.c',
136 'pandecode/decode.c',
137
138 'pan_pretty_print.c',
139
140 'midgard/disassemble.c',
141 'midgard/midgard_ops.c',
142 'bifrost/disassemble.c',
143 )
144
145 pandecode = executable(
146 'pandecode',
147 files_pandecode,
148 include_directories : inc_panfrost,
149 dependencies : [
150 dep_thread,
151 ],
152 link_with : [
153 libmesa_util
154 ],
155 build_by_default : true
156 )