Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mesa
Path: blob/21.2-virgl/src/panfrost/vulkan/meson.build
4560 views
1
# Copyright © 2021 Collabora Ltd.
2
#
3
# Derived from the freedreno driver which is:
4
# Copyright © 2017 Intel Corporation
5
6
# Permission is hereby granted, free of charge, to any person obtaining a copy
7
# of this software and associated documentation files (the "Software"), to deal
8
# in the Software without restriction, including without limitation the rights
9
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
# copies of the Software, and to permit persons to whom the Software is
11
# furnished to do so, subject to the following conditions:
12
13
# The above copyright notice and this permission notice shall be included in
14
# all copies or substantial portions of the Software.
15
16
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
# SOFTWARE.
23
24
panvk_entrypoints = custom_target(
25
'panvk_entrypoints.[ch]',
26
input : [vk_entrypoints_gen, vk_api_xml],
27
output : ['panvk_entrypoints.h', 'panvk_entrypoints.c'],
28
command : [
29
prog_python, '@INPUT0@', '--xml', '@INPUT1@', '--proto', '--weak',
30
'--out-h', '@OUTPUT0@', '--out-c', '@OUTPUT1@', '--prefix', 'panvk',
31
],
32
)
33
34
libpanvk_files = files(
35
'panvk_cmd_buffer.c',
36
'panvk_cs.c',
37
'panvk_device.c',
38
'panvk_descriptor_set.c',
39
'panvk_formats.c',
40
'panvk_image.c',
41
'panvk_mempool.c',
42
'panvk_meta.c',
43
'panvk_pass.c',
44
'panvk_pipeline.c',
45
'panvk_pipeline_cache.c',
46
'panvk_private.h',
47
'panvk_query.c',
48
'panvk_shader.c',
49
'panvk_sync.c',
50
'panvk_util.c',
51
'panvk_varyings.c',
52
'panvk_wsi.c',
53
'panvk_wsi_display.c',
54
)
55
56
panvk_deps = []
57
panvk_flags = []
58
59
if system_has_kms_drm
60
panvk_flags += '-DVK_USE_PLATFORM_DISPLAY_KHR'
61
libpanvk_files += files('panvk_wsi_display.c')
62
endif
63
64
if with_platform_wayland
65
panvk_deps += [dep_wayland_client, dep_wl_protocols]
66
panvk_flags += '-DVK_USE_PLATFORM_WAYLAND_KHR'
67
libpanvk_files += files('panvk_wsi_wayland.c')
68
libpanvk_files += [wayland_drm_client_protocol_h, wayland_drm_protocol_c]
69
endif
70
71
libvulkan_panfrost = shared_library(
72
'vulkan_panfrost',
73
[libpanvk_files, panvk_entrypoints],
74
include_directories : [
75
inc_include,
76
inc_src,
77
inc_compiler,
78
inc_gallium, # XXX: pipe/p_format.h
79
inc_gallium_aux, # XXX: renderonly
80
inc_vulkan_wsi,
81
inc_panfrost,
82
],
83
link_with : [
84
libvulkan_wsi,
85
libpanfrost_shared,
86
libpanfrost_midgard,
87
libpanfrost_bifrost,
88
libpanfrost_decode,
89
libpanfrost_lib,
90
libpanfrost_util,
91
],
92
dependencies : [
93
dep_dl,
94
dep_elf,
95
dep_libdrm,
96
dep_m,
97
dep_thread,
98
dep_valgrind,
99
idep_nir,
100
panvk_deps,
101
idep_vulkan_util,
102
idep_mesautil,
103
],
104
c_args : [no_override_init_args, panvk_flags],
105
link_args : [ld_args_bsymbolic, ld_args_gc_sections],
106
install : true,
107
)
108
109
panfrost_icd = custom_target(
110
'panfrost_icd',
111
input : [vk_icd_gen, vk_api_xml],
112
output : 'panfrost_icd.@[email protected]'.format(host_machine.cpu()),
113
command : [
114
prog_python, '@INPUT0@',
115
'--api-version', '1.1', '--xml', '@INPUT1@',
116
'--lib-path', join_paths(get_option('prefix'), get_option('libdir'),
117
'libvulkan_panfrost.so'),
118
'--out', '@OUTPUT@',
119
],
120
build_by_default : true,
121
install_dir : with_vulkan_icd_dir,
122
install : true,
123
)
124
125