fb92954854a1c7520d8a351bc9e47c06d9a90aed
[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/midgard_print.c',
31 'midgard/midgard_ra.c',
32 'midgard/midgard_liveness.c',
33 'midgard/midgard_ops.c',
34
35 'midgard/nir_lower_blend.c',
36 'midgard/cppwrap.cpp',
37 'midgard/disassemble.c',
38
39 'bifrost/disassemble.c',
40
41 'pan_context.c',
42 'pan_job.c',
43 'pan_trace.c',
44 'pan_drm.c',
45 'pan_allocate.c',
46 'pan_assemble.c',
47 'pan_format.c',
48 'pan_swizzle.c',
49 'pan_blending.c',
50 'pan_blend_shaders.c',
51 'pan_wallpaper.c',
52 'pan_pretty_print.c',
53 'pan_fragment.c',
54 'pan_sfbd.c',
55 'pan_mfbd.c'
56 )
57
58 inc_panfrost = [
59 inc_common,
60 inc_gallium,
61 inc_gallium_aux,
62 inc_include,
63 inc_src,
64 include_directories('include'),
65 include_directories('midgard'),
66 include_directories('bifrost'),
67 ]
68
69 compile_args_panfrost = [
70 '-DGALLIUM_PANFROST',
71 '-Wno-pointer-arith'
72 ]
73
74 midgard_nir_algebraic_c = custom_target(
75 'midgard_nir_algebraic.c',
76 input : 'midgard/midgard_nir_algebraic.py',
77 output : 'midgard_nir_algebraic.c',
78 command : [
79 prog_python, '@INPUT@',
80 '-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
81 ],
82 capture : true,
83 depend_files : nir_algebraic_py,
84 )
85
86 libpanfrost = static_library(
87 'panfrost',
88 [files_panfrost, midgard_nir_algebraic_c],
89 dependencies: [
90 dep_thread,
91 dep_libdrm,
92 idep_nir
93 ],
94 include_directories : inc_panfrost,
95 c_args : [c_vis_args, c_msvc_compat_args, compile_args_panfrost],
96 )
97
98 driver_panfrost = declare_dependency(
99 compile_args : compile_args_panfrost,
100 link_with : [libpanfrost, libpanfrostwinsys],
101 )
102
103 files_bifrost = files(
104 'bifrost/disassemble.c',
105 'bifrost/cmdline.c',
106 )
107
108 bifrost_compiler = executable(
109 'bifrost_compiler',
110 [files_bifrost],
111 include_directories : [
112 inc_common,
113 inc_src,
114 inc_include,
115 inc_gallium,
116 inc_gallium_aux,
117 include_directories('bifrost')
118 ],
119 dependencies : [
120 dep_thread,
121 idep_nir
122 ],
123 link_with : [
124 libgallium,
125 libglsl_standalone,
126 libmesa_util
127 ],
128 build_by_default : true
129 )
130
131 files_pandecode = files(
132 'pandecode/cmdline.c',
133 'pandecode/decode.c',
134
135 'pan_pretty_print.c',
136
137 'midgard/disassemble.c',
138 'midgard/midgard_ops.c',
139 'bifrost/disassemble.c',
140 )
141
142 pandecode = executable(
143 'pandecode',
144 files_pandecode,
145 include_directories : inc_panfrost,
146 dependencies : [
147 dep_thread,
148 ],
149 link_with : [
150 libmesa_util
151 ],
152 build_by_default : true
153 )