Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mesa
Path: blob/21.2-virgl/src/freedreno/vulkan/meson.build
4565 views
1
# Copyright © 2017 Intel Corporation
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
tu_entrypoints = custom_target(
22
'tu_entrypoints',
23
input : [vk_entrypoints_gen, vk_api_xml],
24
output : ['tu_entrypoints.h', 'tu_entrypoints.c'],
25
command : [
26
prog_python, '@INPUT0@', '--xml', '@INPUT1@', '--proto', '--weak',
27
'--out-h', '@OUTPUT0@', '--out-c', '@OUTPUT1@', '--prefix', 'tu',
28
],
29
depend_files : vk_entrypoints_gen_depend_files,
30
)
31
32
33
libtu_files = files(
34
'tu_clear_blit.c',
35
'tu_cmd_buffer.c',
36
'tu_cs.c',
37
'tu_cs.h',
38
'tu_device.c',
39
'tu_descriptor_set.c',
40
'tu_descriptor_set.h',
41
'tu_formats.c',
42
'tu_image.c',
43
'tu_legacy.c',
44
'tu_nir_lower_multiview.c',
45
'tu_pass.c',
46
'tu_pipeline.c',
47
'tu_pipeline_cache.c',
48
'tu_private.h',
49
'tu_query.c',
50
'tu_shader.c',
51
'tu_util.c',
52
'tu_util.h',
53
'vk_format.h',
54
)
55
56
tu_deps = []
57
tu_flags = []
58
tu_link_with = []
59
60
tu_wsi = false
61
62
if with_platform_x11
63
tu_deps += dep_xcb_dri3
64
tu_flags += [
65
'-DVK_USE_PLATFORM_XCB_KHR',
66
'-DVK_USE_PLATFORM_XLIB_KHR',
67
]
68
libtu_files += files('tu_wsi_x11.c')
69
tu_wsi = true
70
endif
71
72
if with_platform_wayland
73
tu_deps += dep_wayland_client
74
tu_flags += '-DVK_USE_PLATFORM_WAYLAND_KHR'
75
libtu_files += files('tu_wsi_wayland.c')
76
tu_wsi = true
77
endif
78
79
if system_has_kms_drm and not with_platform_android
80
tu_flags += '-DVK_USE_PLATFORM_DISPLAY_KHR'
81
libtu_files += files('tu_wsi_display.c')
82
tu_wsi = true
83
endif
84
85
if tu_wsi
86
libtu_files += 'tu_wsi.c'
87
tu_link_with += libvulkan_wsi
88
endif
89
90
if with_platform_android
91
tu_flags += '-DVK_USE_PLATFORM_ANDROID_KHR'
92
libtu_files += files('tu_android.c')
93
tu_deps += [dep_android]
94
endif
95
96
if with_xlib_lease
97
tu_deps += [dep_xlib_xrandr]
98
tu_flags += '-DVK_USE_PLATFORM_XLIB_XRANDR_EXT'
99
endif
100
101
if with_freedreno_kgsl
102
tu_flags += '-DTU_USE_KGSL'
103
libtu_files += files('tu_kgsl.c')
104
else
105
libtu_files += files('tu_drm.c')
106
tu_deps += dep_libdrm
107
endif
108
109
libvulkan_freedreno = shared_library(
110
'vulkan_freedreno',
111
[libtu_files, tu_entrypoints, freedreno_xml_header_files],
112
include_directories : [
113
inc_include,
114
inc_src,
115
inc_mapi,
116
inc_mesa,
117
inc_gallium,
118
inc_gallium_aux,
119
inc_compiler,
120
inc_vulkan_wsi,
121
inc_freedreno,
122
],
123
link_with : [
124
tu_link_with,
125
libfreedreno_ir3,
126
libfreedreno_layout,
127
libfreedreno_perfcntrs,
128
],
129
dependencies : [
130
idep_libfreedreno_common,
131
dep_dl,
132
dep_elf,
133
dep_m,
134
dep_thread,
135
dep_valgrind,
136
idep_nir,
137
tu_deps,
138
idep_vulkan_util,
139
idep_mesautil,
140
],
141
c_args : [no_override_init_args, tu_flags],
142
gnu_symbol_visibility : 'hidden',
143
link_args : [ld_args_bsymbolic, ld_args_gc_sections, ld_args_build_id],
144
install : true,
145
)
146
147
if with_symbols_check
148
test(
149
'tu symbols check',
150
symbols_check,
151
args : [
152
'--lib', libvulkan_freedreno,
153
'--symbols-file', vulkan_icd_symbols,
154
symbols_check_args,
155
],
156
suite : ['freedreno'],
157
)
158
endif
159
160
freedreno_icd = custom_target(
161
'freedreno_icd',
162
input : [vk_icd_gen, vk_api_xml],
163
output : 'freedreno_icd.@[email protected]'.format(host_machine.cpu()),
164
command : [
165
prog_python, '@INPUT0@',
166
'--api-version', '1.1', '--xml', '@INPUT1@',
167
'--lib-path', join_paths(get_option('prefix'), get_option('libdir'),
168
'libvulkan_freedreno.so'),
169
'--out', '@OUTPUT@',
170
],
171
build_by_default : true,
172
install_dir : with_vulkan_icd_dir,
173
install : true,
174
)
175
176