radeonsi: if there's just const buffer 0, set it in place of CONST/SSBO pointer
[mesa.git] / src / gallium / targets / dri / meson.build
1 # Copyright © 2017 Dylan Baker
2
3 # Permission is hereby granted, free of charge, to any person obtaining a copy
4 # of this software and associated documentation files (the "Software"), to deal
5 # in the Software without restriction, including without limitation the rights
6 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 # copies of the Software, and to permit persons to whom the Software is
8 # furnished to do so, subject to the following conditions:
9
10 # The above copyright notice and this permission notice shall be included in
11 # all copies or substantial portions of the Software.
12
13 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 # SOFTWARE.
20
21 # TODO: support non-static targets
22 # Static targets are always enabled in autotools (unless you modify
23 # configure.ac)
24
25 gallium_dri_c_args = [
26 '-DGALLIUM_DDEBUG',
27 '-DGALLIUM_NOOP',
28 '-DGALLIUM_RBUG',
29 '-DGALLIUME_TRACE',
30 ]
31 gallium_dri_ld_args = []
32 gallium_dri_link_with = []
33 gallium_dri_depends = []
34 gallium_dri_link_depends = []
35 gallium_dri_drivers = []
36 gallium_dri_sources = []
37
38 if with_ld_version_script
39 gallium_dri_ld_args += ['-Wl,--version-script', join_paths(meson.current_source_dir(), 'dri.sym')]
40 gallium_dri_link_depends += files('dri.sym')
41 endif
42 if with_ld_dynamic_list
43 gallium_dri_ld_args += ['-Wl,--dynamic-list', join_paths(meson.current_source_dir(), '../dri-vdpau.dyn')]
44 gallium_dri_link_depends += files('../dri-vdpau.dyn')
45 endif
46
47 if with_dri
48 gallium_dri_link_with += libswdri
49 endif
50 if with_gallium_drisw_kms
51 gallium_dri_link_with += libswkmsdri
52 endif
53
54 if with_gallium_radeonsi
55 gallium_dri_c_args += '-DGALLIUM_RADEONSI'
56 gallium_dri_link_with += [
57 libradeonsi, libnir, libradeonwinsys, libamdgpuwinsys, libradeon,
58 libamd_common,
59 ]
60 gallium_dri_drivers += 'radeonsi_dri.so'
61 endif
62 if with_gallium_nouveau
63 gallium_dri_c_args += '-DGALLIUM_NOUVEAU'
64 gallium_dri_link_with += [libnouveauwinsys, libnouveau]
65 gallium_dri_drivers += 'nouveau_dri.so'
66 endif
67 if with_gallium_softpipe
68 gallium_dri_c_args += '-DGALLIUM_SOFTPIPE'
69 gallium_dri_link_with += libsoftpipe
70 gallium_dri_drivers += 'swrast_dri.so'
71 if with_gallium_drisw_kms
72 gallium_dri_drivers += 'kms_swrast_dri.so'
73 endif
74 if with_llvm
75 gallium_dri_c_args += '-DGALLIUM_LLVMPIPE'
76 gallium_dri_link_with += libllvmpipe
77 endif
78 endif
79
80 libgallium_dri = shared_library(
81 'gallium_dri',
82 [files('target.c'), gallium_dri_sources],
83 include_directories : [
84 inc_common, inc_util, inc_dri_common, inc_gallium_drivers,
85 inc_gallium_winsys, include_directories('../../state_trackers/dri'),
86 ],
87 c_args : [c_vis_args, gallium_dri_c_args],
88 cpp_args : [cpp_vis_args],
89 link_args : [ld_args_gc_sections, gallium_dri_ld_args],
90 link_depends : gallium_dri_link_depends,
91 link_with : [
92 libmesa_gallium, libdricommon, libmegadriver_stub, libdri, libgalliumvl,
93 libgallium, libddebug, libnoop, librbug, libtrace, libglapi,
94 libpipe_loader_static, libws_null, libwsw, gallium_dri_link_with,
95 ],
96 dependencies : [
97 gallium_dri_depends, dep_selinux, dep_expat, dep_libdrm, dep_llvm,
98 ],
99 )
100
101 meson.add_install_script(
102 join_paths(meson.source_root(), 'bin/install_megadrivers.py'),
103 libgallium_dri.full_path(),
104 dri_drivers_path,
105 gallium_dri_drivers,
106 )