Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mesa
Path: blob/21.2-virgl/src/intel/common/meson.build
4547 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
files_libintel_common = files(
22
'intel_aux_map.c',
23
'intel_aux_map.h',
24
'intel_buffer_alloc.h',
25
'intel_clflush.h',
26
'intel_decoder.h',
27
'intel_disasm.c',
28
'intel_disasm.h',
29
'intel_gem.c',
30
'intel_gem.h',
31
'intel_guardband.h',
32
'intel_l3_config.c',
33
'intel_l3_config.h',
34
'intel_urb_config.c',
35
'intel_sample_positions.c',
36
'intel_sample_positions.h',
37
'intel_uuid.c',
38
'intel_uuid.h',
39
'intel_measure.c',
40
'intel_measure.h',
41
)
42
43
files_batch_decoder = files(
44
'intel_batch_decoder.c',
45
'intel_decoder.c',
46
)
47
48
batch_decoder_dependencies = []
49
if with_platform_android
50
files_libintel_common += 'intel_batch_decoder_stub.c'
51
else
52
batch_decoder_dependencies += dep_expat
53
files_libintel_common += files_batch_decoder
54
endif
55
56
libintel_common = static_library(
57
'intel_common',
58
[files_libintel_common, genX_xml_h, sha1_h],
59
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_intel],
60
c_args : [no_override_init_args],
61
gnu_symbol_visibility : 'hidden',
62
link_with : [libisl],
63
dependencies : [batch_decoder_dependencies, dep_libdrm, dep_thread, idep_genxml, idep_mesautil],
64
)
65
66
libintel_extra_dependencies = []
67
if with_platform_android
68
libintel_extra_dependencies += dep_android
69
endif
70
71
idep_libintel_common = declare_dependency(
72
link_with: [libintel_common],
73
dependencies: [libintel_extra_dependencies],
74
)
75
76
install_intel_gpu_tests = get_option('install-intel-gpu-tests')
77
78
if install_intel_gpu_tests
79
foreach g : [['70', 'gfx7'], ['75', 'hsw'], ['80', 'gfx8'],
80
['90', 'gfx9'], ['110', 'gfx11'], ['120', 'gfx12'],
81
['125', 'gfx125']]
82
executable(
83
'intel_@0@_mi_builder_test'.format(g[1]),
84
files('tests/mi_builder_test.cpp'),
85
cpp_args : [
86
cpp_msvc_compat_args,
87
'-DGFX_VERx10=@0@'.format(g[0])
88
],
89
gnu_symbol_visibility : 'hidden',
90
include_directories : [inc_include, inc_src, inc_intel],
91
link_with : [libintel_dev],
92
dependencies : [dep_libdrm, idep_gtest, idep_genxml, idep_mesautil],
93
install : install_intel_gpu_tests,
94
)
95
endforeach
96
endif
97
98
if with_tests
99
gentest_xml = files('tests/gentest.xml')
100
_name = 'gentest_pack.h'
101
gentest_pack = custom_target(
102
_name,
103
input : [gen_pack_header_py, gentest_xml],
104
output : _name,
105
command : [prog_python, '@INPUT@'],
106
capture : true,
107
)
108
109
genxml_path = join_paths(meson.source_root(),
110
'@0@'.format(gentest_xml[0]))
111
112
test(
113
'genxml_test',
114
executable(
115
'genxml_test',
116
['tests/genxml_test.c', gentest_pack],
117
include_directories : [inc_include, inc_src, inc_intel],
118
dependencies : idep_mesautil,
119
link_with : libintel_common,
120
c_args : [
121
'-DGENXML_PATH="@0@"'.format(genxml_path)
122
],
123
),
124
args : ['-quiet'],
125
suite : ['intel'],
126
)
127
endif
128
129