Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mesa
Path: blob/21.2-virgl/src/virtio/vulkan/meson.build
4560 views
1
# Copyright 2019 Google LLC
2
# SPDX-License-Identifier: MIT
3
#
4
# based in part on anv and radv which are:
5
# Copyright © 2017 Intel Corporation
6
7
vn_entrypoints = custom_target(
8
'vn_entrypoints',
9
input : [vk_entrypoints_gen, vk_api_xml],
10
output : ['vn_entrypoints.h', 'vn_entrypoints.c'],
11
command : [
12
prog_python, '@INPUT0@', '--xml', '@INPUT1@', '--proto', '--weak',
13
'--out-h', '@OUTPUT0@', '--out-c', '@OUTPUT1@', '--prefix', 'vn',
14
],
15
)
16
17
virtio_icd = custom_target(
18
'virtio_icd',
19
input : [vk_icd_gen, vk_api_xml],
20
output : 'virtio_icd.@[email protected]'.format(host_machine.cpu()),
21
command : [
22
prog_python, '@INPUT0@',
23
'--api-version', '1.2', '--xml', '@INPUT1@',
24
'--lib-path', join_paths(get_option('prefix'), get_option('libdir'),
25
'libvulkan_virtio.so'),
26
'--out', '@OUTPUT@',
27
],
28
build_by_default : true,
29
install_dir : with_vulkan_icd_dir,
30
install : true,
31
)
32
33
libvn_files = files(
34
'vn_buffer.c',
35
'vn_command_buffer.c',
36
'vn_common.c',
37
'vn_cs.c',
38
'vn_descriptor_set.c',
39
'vn_device.c',
40
'vn_device_memory.c',
41
'vn_icd.c',
42
'vn_image.c',
43
'vn_pipeline.c',
44
'vn_query_pool.c',
45
'vn_queue.c',
46
'vn_render_pass.c',
47
'vn_ring.c',
48
'vn_renderer_virtgpu.c',
49
'vn_renderer_vtest.c',
50
)
51
52
vn_deps = [
53
dep_libdrm,
54
dep_thread,
55
idep_mesautil,
56
idep_vulkan_util,
57
idep_xmlconfig,
58
]
59
60
vn_flags = [
61
no_override_init_args,
62
]
63
64
vn_libs = []
65
66
if with_platform_wayland or with_platform_x11
67
libvn_files += files('vn_wsi.c')
68
vn_flags += '-DVN_USE_WSI_PLATFORM'
69
vn_libs += libvulkan_wsi
70
endif
71
72
if with_platform_wayland
73
libvn_files += files('vn_wsi_wayland.c')
74
vn_deps += dep_wayland_client
75
vn_flags += '-DVK_USE_PLATFORM_WAYLAND_KHR'
76
endif
77
78
if with_platform_x11
79
libvn_files += files('vn_wsi_x11.c')
80
vn_deps += dep_xcb_dri3
81
vn_flags += [
82
'-DVK_USE_PLATFORM_XCB_KHR',
83
'-DVK_USE_PLATFORM_XLIB_KHR',
84
]
85
endif
86
87
if with_platform_android
88
libvn_files += files('vn_android.c')
89
vn_deps += dep_android
90
vn_flags += '-DVK_USE_PLATFORM_ANDROID_KHR'
91
endif
92
93
libvulkan_virtio = shared_library(
94
'vulkan_virtio',
95
[libvn_files, vn_entrypoints, sha1_h],
96
include_directories : [
97
inc_include, inc_src, inc_vulkan_wsi, inc_virtio,
98
],
99
link_with : vn_libs,
100
dependencies : [vn_deps],
101
c_args : [vn_flags],
102
link_args : [ld_args_bsymbolic, ld_args_gc_sections],
103
gnu_symbol_visibility : 'hidden',
104
install : true,
105
)
106
107