• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright © 2017 Dylan Baker
2# Copyright © 2017-2018 Intel Corporation
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
22sym_config = configuration_data()
23
24foreach d : [[with_gallium_r300 or with_gallium_radeonsi or with_gallium_r600, 'radeon_drm_winsys_create'],
25             [with_gallium_radeonsi, 'amdgpu_winsys_create'],
26             [with_gallium_nouveau, 'nouveau_drm_screen_create'],
27             [with_gallium_freedreno, 'fd_drm_screen_create_renderonly'],
28             [with_llvm and with_gallium_radeonsi, 'ac_init_shared_llvm_once']]
29  if d[0]
30    sym_config.set(d[1], d[1] + ';')
31  else
32    sym_config.set(d[1], '')
33  endif
34endforeach
35
36inc_gallium_drivers = include_directories('drivers')
37inc_gallium_winsys = include_directories('winsys')
38inc_gallium_winsys_sw = include_directories('winsys/sw')
39
40subdir('auxiliary')
41subdir('auxiliary/pipe-loader')
42subdir('winsys/sw/null')
43if with_dri
44  subdir('winsys/sw/dri')
45else
46  libswdri = []
47endif
48if with_gallium_drisw_kms
49  subdir('winsys/sw/kms-dri')
50else
51  libswkmsdri = []
52endif
53if with_platform_windows
54  subdir('winsys/sw/gdi')
55else
56  libwsgdi = null_dep
57endif
58subdir('winsys/sw/wrapper')
59if with_platform_haiku
60  subdir('winsys/sw/hgl')
61endif
62if with_gallium_softpipe
63  subdir('drivers/softpipe')
64  if draw_with_llvm
65    subdir('drivers/llvmpipe')
66  endif
67else
68  driver_swrast = declare_dependency()
69endif
70if with_gallium_asahi
71  subdir('winsys/asahi/drm')
72  subdir('drivers/asahi')
73else
74  driver_asahi = declare_dependency()
75endif
76if with_gallium_r300 or with_gallium_radeonsi or with_gallium_r600
77  subdir('winsys/radeon/drm')
78endif
79if with_gallium_r300
80  subdir('drivers/r300')
81else
82  driver_r300 = declare_dependency()
83endif
84if with_gallium_r600
85  subdir('drivers/r600')
86else
87  driver_r600 = declare_dependency()
88endif
89if with_gallium_radeonsi
90  subdir('winsys/amdgpu/drm')
91  subdir('drivers/radeonsi')
92else
93  driver_radeonsi = declare_dependency()
94endif
95if with_gallium_nouveau
96  subdir('winsys/nouveau/drm')
97  subdir('drivers/nouveau')
98else
99  driver_nouveau = declare_dependency()
100endif
101if with_gallium_freedreno
102  subdir('winsys/freedreno/drm')
103  subdir('drivers/freedreno')
104else
105  driver_freedreno = declare_dependency()
106endif
107if with_gallium_vc4
108  subdir('winsys/vc4/drm')
109  subdir('drivers/vc4')
110else
111  driver_vc4 = declare_dependency()
112endif
113if with_gallium_panfrost
114  subdir('winsys/panfrost/drm')
115  subdir('drivers/panfrost')
116else
117  driver_panfrost = declare_dependency()
118endif
119if with_gallium_etnaviv
120  subdir('winsys/etnaviv/drm')
121  subdir('drivers/etnaviv')
122else
123  driver_etnaviv = declare_dependency()
124endif
125if with_gallium_kmsro
126  subdir('winsys/kmsro/drm')
127else
128  driver_kmsro = declare_dependency()
129endif
130if with_gallium_v3d
131  subdir('winsys/v3d/drm')
132  subdir('drivers/v3d')
133else
134  driver_v3d = declare_dependency()
135endif
136if with_gallium_tegra
137  subdir('winsys/tegra/drm')
138  subdir('drivers/tegra')
139else
140  driver_tegra = declare_dependency()
141endif
142if with_gallium_crocus
143  subdir('winsys/crocus/drm')
144  subdir('drivers/crocus')
145else
146  driver_crocus = declare_dependency()
147endif
148if with_gallium_iris
149  subdir('winsys/iris/drm')
150  subdir('drivers/iris')
151else
152  driver_iris = declare_dependency()
153endif
154if with_gallium_i915
155  subdir('winsys/i915/drm')
156  subdir('drivers/i915')
157else
158  driver_i915 = declare_dependency()
159endif
160if with_gallium_svga
161  if not with_platform_windows
162     subdir('winsys/svga/drm')
163  endif
164  subdir('drivers/svga')
165else
166  driver_svga = declare_dependency()
167endif
168if with_gallium_virgl
169  subdir('winsys/virgl/common')
170  if not with_platform_windows
171    subdir('winsys/virgl/drm')
172    subdir('winsys/virgl/vtest')
173  endif
174  subdir('drivers/virgl')
175else
176  driver_virgl = declare_dependency()
177endif
178if with_gallium_lima
179  subdir('winsys/lima/drm')
180  subdir('drivers/lima')
181else
182  driver_lima = declare_dependency()
183endif
184if with_gallium_zink
185  subdir('drivers/zink')
186else
187  driver_zink = declare_dependency()
188endif
189if with_gallium_d3d12
190  subdir('drivers/d3d12')
191else
192  driver_d3d12 = declare_dependency()
193endif
194if with_gallium_opencl
195  # TODO: this isn't really clover specific, but ATM clover is the only
196  # consumer
197  subdir('targets/pipe-loader')
198
199  subdir('frontends/clover')
200  subdir('targets/opencl')
201endif
202if with_gallium_rusticl
203  subdir('frontends/rusticl')
204  subdir('targets/rusticl')
205endif
206if with_dri
207  subdir('frontends/dri')
208  subdir('targets/dri')
209endif
210if with_osmesa
211  subdir('frontends/osmesa')
212  subdir('targets/osmesa')
213endif
214if with_glx == 'xlib'
215  subdir('winsys/sw/xlib')
216  subdir('frontends/glx/xlib')
217  subdir('targets/libgl-xlib')
218endif
219if with_gallium_vdpau
220  subdir('frontends/vdpau')
221  subdir('targets/vdpau')
222endif
223if with_gallium_omx != 'disabled'
224  subdir('frontends/omx')
225  subdir('targets/omx')
226endif
227if with_gallium_va
228  subdir('frontends/va')
229  subdir('targets/va')
230endif
231if with_gallium_xa
232  subdir('frontends/xa')
233  subdir('targets/xa')
234endif
235if with_platform_haiku
236  subdir('frontends/hgl')
237endif
238if with_gallium_st_nine
239  subdir('frontends/nine')
240  subdir('targets/d3dadapter9')
241endif
242if with_gallium_st_d3d10umd
243  subdir('frontends/d3d10umd')
244  subdir('targets/d3d10umd')
245endif
246if with_platform_windows
247  if with_opengl
248    subdir('frontends/wgl')
249    if with_gallium_d3d12
250      subdir('winsys/d3d12/wgl')
251    else
252      winsys_d3d12_wgl = declare_dependency()
253    endif
254    subdir('targets/wgl')
255    subdir('targets/libgl-gdi')
256  endif
257endif
258if with_tests
259  subdir('tests')
260endif
261if with_swrast_vk
262  subdir('frontends/lavapipe')
263  subdir('targets/lavapipe')
264endif
265
266if with_teflon
267  subdir('frontends/teflon')
268  subdir('targets/teflon')
269endif
270