Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mesa
Path: blob/21.2-virgl/src/gallium/drivers/zink/meson.build
4570 views
1
# Copyright © 2018 Collabora Ltd
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
files_libzink = files(
22
'nir_lower_dynamic_bo_access.c',
23
'nir_to_spirv/nir_to_spirv.c',
24
'nir_to_spirv/spirv_builder.c',
25
'zink_batch.c',
26
'zink_blit.c',
27
'zink_clear.c',
28
'zink_compiler.c',
29
'zink_context.c',
30
'zink_descriptors.c',
31
'zink_descriptors_lazy.c',
32
'zink_draw.c',
33
'zink_fence.c',
34
'zink_format.c',
35
'zink_framebuffer.c',
36
'zink_pipeline.c',
37
'zink_program.c',
38
'zink_query.c',
39
'zink_render_pass.c',
40
'zink_resource.c',
41
'zink_screen.c',
42
'zink_state.c',
43
'zink_surface.c',
44
)
45
46
zink_device_info = custom_target(
47
'zink_device_info.c',
48
input : ['zink_device_info.py'],
49
output : ['zink_device_info.h', 'zink_device_info.c'],
50
command : [
51
prog_python, '@INPUT@', '@OUTPUT@', join_paths(meson.source_root(), 'src/vulkan/registry/vk.xml')
52
]
53
)
54
55
zink_instance = custom_target(
56
'zink_instance.c',
57
input : ['zink_instance.py'],
58
output : ['zink_instance.h', 'zink_instance.c'],
59
command : [
60
prog_python, '@INPUT@', '@OUTPUT@', join_paths(meson.source_root(), 'src/vulkan/registry/vk.xml')
61
]
62
)
63
64
zink_nir_algebraic_c = custom_target(
65
'zink_nir_algebraic.c',
66
input : 'nir_to_spirv/zink_nir_algebraic.py',
67
output : 'zink_nir_algebraic.c',
68
command : [
69
prog_python, '@INPUT@',
70
'-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
71
],
72
capture : true,
73
depend_files : nir_algebraic_py,
74
)
75
76
zink_c_args = []
77
inc_zink_vk = []
78
79
if with_swrast_vk
80
zink_c_args += '-DZINK_WITH_SWRAST_VK'
81
endif
82
83
# MoltenVK options
84
if with_moltenvk_dir != ''
85
inc_zink_vk = [inc_zink_vk, include_directories( join_paths(with_moltenvk_dir, 'include') )]
86
zink_c_args += ['-x','objective-c'] # Put compiler into objective-C mode to allow for MacOS types, like IOSurface and CAMetalLayer
87
zink_c_args += ['-iframework' , 'Foundation']
88
endif
89
90
libzink = static_library(
91
'zink',
92
[files_libzink, zink_device_info, zink_instance, zink_nir_algebraic_c, vk_dispatch_table],
93
gnu_symbol_visibility : 'hidden',
94
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_vulkan_wsi, inc_vulkan_util, inc_zink_vk],
95
dependencies: [dep_vulkan, idep_nir_headers, idep_mesautil, idep_vulkan_util_headers],
96
c_args: zink_c_args,
97
)
98
99
driver_zink = declare_dependency(
100
compile_args : '-DGALLIUM_ZINK',
101
link_with : [libzink],
102
)
103
104
if with_tests
105
test(
106
'zink_format_test',
107
executable(
108
'zink_format_test',
109
['zink_format_test.c', 'zink_format.c'],
110
dependencies : [idep_mesautil, idep_vulkan_util],
111
include_directories : [inc_gallium, inc_gallium_aux, inc_include, inc_src],
112
),
113
suite : ['zink'],
114
)
115
endif
116
117