Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mesa
Path: blob/21.2-virgl/src/panfrost/bifrost/meson.build
4564 views
1
# Copyright © 2018 Rob Clark
2
# Copyright © 2019 Collabora
3
4
# Permission is hereby granted, free of charge, to any person obtaining a copy
5
# of this software and associated documentation files (the "Software"), to deal
6
# in the Software without restriction, including without limitation the rights
7
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
# copies of the Software, and to permit persons to whom the Software is
9
# furnished to do so, subject to the following conditions:
10
11
# The above copyright notice and this permission notice shall be included in
12
# all copies or substantial portions of the Software.
13
14
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
# SOFTWARE.
21
22
libpanfrost_bifrost_files = files(
23
'bi_helper_invocations.c',
24
'bi_layout.c',
25
'bi_liveness.c',
26
'bi_lower_divergent_indirects.c',
27
'bi_lower_swizzle.c',
28
'bi_print.c',
29
'bi_opt_constant_fold.c',
30
'bi_opt_copy_prop.c',
31
'bi_opt_dce.c',
32
'bi_opt_cse.c',
33
'bi_opt_push_ubo.c',
34
'bi_opt_mod_props.c',
35
'bi_pack.c',
36
'bi_ra.c',
37
'bi_schedule.c',
38
'bi_scoreboard.c',
39
'bi_test_pack.c',
40
'bir.c',
41
'bifrost_compile.c',
42
)
43
44
bifrost_gen_disasm_c = custom_target(
45
'bifrost_gen_disasm.c',
46
input : ['gen_disasm.py', 'ISA.xml'],
47
output : 'bifrost_gen_disasm.c',
48
command : [prog_python, '@INPUT@'],
49
capture : true,
50
depend_files : files('bifrost_isa.py'),
51
)
52
53
bi_opcodes_c = custom_target(
54
'bi_opcodes.c',
55
input : ['bi_opcodes.c.py', 'ISA.xml'],
56
output : 'bi_opcodes.c',
57
command : [prog_python, '@INPUT@'],
58
capture : true,
59
depend_files : files('bifrost_isa.py'),
60
)
61
62
bi_printer_c = custom_target(
63
'bi_printer.c',
64
input : ['bi_printer.c.py', 'ISA.xml'],
65
output : 'bi_printer.c',
66
command : [prog_python, '@INPUT@'],
67
capture : true,
68
depend_files : files('bifrost_isa.py'),
69
)
70
71
bi_packer_c = custom_target(
72
'bi_packer.c',
73
input : ['bi_packer.c.py', 'ISA.xml'],
74
output : 'bi_packer.c',
75
command : [prog_python, '@INPUT@'],
76
capture : true,
77
depend_files : files('bifrost_isa.py'),
78
)
79
80
bi_opcodes_h = custom_target(
81
'bi_opcodes.h',
82
input : ['bi_opcodes.h.py', 'ISA.xml'],
83
output : 'bi_opcodes.h',
84
command : [prog_python, '@INPUT@'],
85
capture : true,
86
depend_files : files('bifrost_isa.py'),
87
)
88
89
idep_bi_opcodes_h = declare_dependency(
90
sources : [bi_opcodes_h],
91
include_directories : include_directories('.'),
92
)
93
94
bi_builder_h = custom_target(
95
'bi_builder.h',
96
input : ['bi_builder.h.py', 'ISA.xml'],
97
output : 'bi_builder.h',
98
command : [prog_python, '@INPUT@'],
99
capture : true,
100
depend_files : files('bifrost_isa.py'),
101
)
102
103
idep_bi_builder_h = declare_dependency(
104
sources : [bi_builder_h],
105
include_directories : include_directories('.'),
106
)
107
108
bifrost_nir_algebraic_c = custom_target(
109
'bifrost_nir_algebraic.c',
110
input : 'bifrost_nir_algebraic.py',
111
output : 'bifrost_nir_algebraic.c',
112
command : [
113
prog_python, '@INPUT@',
114
'-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
115
],
116
capture : true,
117
depend_files : nir_algebraic_py,
118
)
119
120
libpanfrost_bifrost_disasm = static_library(
121
'panfrost_bifrost_disasm',
122
['disassemble.c', 'bi_print_common.c', bifrost_gen_disasm_c],
123
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_panfrost_hw],
124
dependencies: [idep_nir],
125
link_with: [libpanfrost_util],
126
c_args : [no_override_init_args],
127
gnu_symbol_visibility : 'hidden',
128
build_by_default : false,
129
)
130
131
libpanfrost_bifrost = static_library(
132
'panfrost_bifrost',
133
[libpanfrost_bifrost_files, bi_opcodes_c, bi_printer_c, bi_packer_c, bifrost_nir_algebraic_c],
134
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_panfrost_hw],
135
dependencies: [idep_nir, idep_bi_opcodes_h, idep_bi_builder_h],
136
link_with: [libpanfrost_util, libpanfrost_bifrost_disasm],
137
c_args : [no_override_init_args],
138
gnu_symbol_visibility : 'hidden',
139
build_by_default : false,
140
)
141
142