1 # Copyright © 2017 Intel Corporation
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:
10 # The above copyright notice and this permission notice shall be included in
11 # all copies or substantial portions of the Software.
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
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'],
26 prog_python, '@INPUT0@', '--xml', '@INPUT1@', '--outdir',
27 meson.current_build_dir()
29 depend_files : files('tu_extensions.py'),
32 tu_extensions_c = custom_target(
34 input : ['tu_extensions.py', vk_api_xml],
35 output : ['tu_extensions.c', 'tu_extensions.h'],
37 prog_python, '@INPUT0@', '--xml', '@INPUT1@', '--out-c', '@OUTPUT0@',
38 '--out-h', '@OUTPUT1@'
42 tu_format_table_c = custom_target(
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'),
55 'tu_descriptor_set.c',
56 'tu_descriptor_set.h',
68 'tu_pipeline_cache.c',
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')
87 libvulkan_freedreno = shared_library(
89 [libtu_files, tu_entrypoints, tu_extensions_c, tu_format_table_c],
90 include_directories : [
101 libfreedreno_drm, # required by ir3_shader_get_variant, which we don't use
115 c_args : [c_vis_args, no_override_init_args, tu_flags],
116 link_args : [ld_args_bsymbolic, ld_args_gc_sections],
120 freedreno_icd = custom_target(
123 output : 'freedreno_icd.@0@.json'.format(host_machine.cpu()),
125 prog_python, '@INPUT@',
126 '--lib-path', join_paths(get_option('prefix'), get_option('libdir')),
129 depend_files : files('tu_extensions.py'),
130 build_by_default : true,
131 install_dir : with_vulkan_icd_dir,
135 tu_dev_icd = custom_target(
138 output : 'dev_icd.json',
140 prog_python, '@INPUT@', '--lib-path', meson.current_build_dir(),
143 depend_files : files('tu_extensions.py'),
144 build_by_default : true,