anv+tu+radv: delete unusable dev_icd.json
[mesa.git] / src / freedreno / vulkan / meson.build
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 tu_entrypoints = custom_target(
22 'tu_entrypoints.[ch]',
23 input : ['tu_entrypoints_gen.py', vk_api_xml],
24 output : ['tu_entrypoints.h', 'tu_entrypoints.c'],
25 command : [
26 prog_python, '@INPUT0@', '--xml', '@INPUT1@', '--outdir',
27 meson.current_build_dir()
28 ],
29 depend_files : files('tu_extensions.py'),
30 )
31
32 tu_extensions_c = custom_target(
33 'tu_extensions.c',
34 input : ['tu_extensions.py', vk_api_xml],
35 output : ['tu_extensions.c', 'tu_extensions.h'],
36 command : [
37 prog_python, '@INPUT0@', '--xml', '@INPUT1@', '--out-c', '@OUTPUT0@',
38 '--out-h', '@OUTPUT1@'
39 ],
40 )
41
42 tu_format_table_c = custom_target(
43 'tu_format_table.c',
44 input : ['vk_format_table.py', 'vk_format_layout.csv'],
45 output : 'vk_format_table.c',
46 command : [prog_python, '@INPUT@'],
47 depend_files : files('vk_format_parse.py'),
48 capture : true,
49 )
50
51 libtu_files = files(
52 'tu_cmd_buffer.c',
53 'tu_cs.c',
54 'tu_device.c',
55 'tu_descriptor_set.c',
56 'tu_descriptor_set.h',
57 'tu_drm.c',
58 'tu_fence.c',
59 'tu_formats.c',
60 'tu_image.c',
61 'tu_meta_blit.c',
62 'tu_meta_buffer.c',
63 'tu_meta_clear.c',
64 'tu_meta_copy.c',
65 'tu_meta_resolve.c',
66 'tu_pass.c',
67 'tu_pipeline.c',
68 'tu_pipeline_cache.c',
69 'tu_private.h',
70 'tu_query.c',
71 'tu_shader.c',
72 'tu_util.c',
73 'tu_util.h',
74 'tu_wsi.c',
75 'vk_format.h',
76 )
77
78 tu_deps = []
79 tu_flags = []
80
81 if with_platform_wayland
82 tu_deps += dep_wayland_client
83 tu_flags += '-DVK_USE_PLATFORM_WAYLAND_KHR'
84 libtu_files += files('tu_wsi_wayland.c')
85 endif
86
87 libvulkan_freedreno = shared_library(
88 'vulkan_freedreno',
89 [libtu_files, tu_entrypoints, tu_extensions_c, tu_format_table_c, freedreno_xml_header_files],
90 include_directories : [
91 inc_common,
92 inc_compiler,
93 inc_vulkan_wsi,
94 inc_freedreno,
95 ],
96 link_with : [
97 libvulkan_wsi,
98 libmesa_util,
99 libfreedreno_drm, # required by ir3_shader_get_variant, which we don't use
100 libfreedreno_ir3,
101 ],
102 dependencies : [
103 dep_dl,
104 dep_elf,
105 dep_libdrm,
106 dep_llvm,
107 dep_m,
108 dep_thread,
109 dep_valgrind,
110 idep_nir,
111 tu_deps,
112 idep_vulkan_util,
113 ],
114 c_args : [c_vis_args, no_override_init_args, tu_flags],
115 link_args : [ld_args_bsymbolic, ld_args_gc_sections],
116 install : true,
117 )
118
119 if with_tests and prog_nm.found()
120 test(
121 'tu symbols check',
122 symbols_check,
123 args : [
124 '--lib', libvulkan_freedreno,
125 '--symbols-file', vulkan_icd_symbols,
126 '--nm', prog_nm.path(),
127 ],
128 suite : ['freedreno'],
129 )
130 endif
131
132 freedreno_icd = custom_target(
133 'freedreno_icd',
134 input : 'tu_icd.py',
135 output : 'freedreno_icd.@0@.json'.format(host_machine.cpu()),
136 command : [
137 prog_python, '@INPUT@',
138 '--lib-path', join_paths(get_option('prefix'), get_option('libdir')),
139 '--out', '@OUTPUT@',
140 ],
141 depend_files : files('tu_extensions.py'),
142 build_by_default : true,
143 install_dir : with_vulkan_icd_dir,
144 install : true,
145 )