turnip: Move stream functions to tu_cs.c
[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 vk_format_table_c = custom_target(
43 'vk_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_formats.c',
59 'tu_image.c',
60 'tu_meta_blit.c',
61 'tu_meta_buffer.c',
62 'tu_meta_clear.c',
63 'tu_meta_copy.c',
64 'tu_meta_resolve.c',
65 'tu_pass.c',
66 'tu_pipeline.c',
67 'tu_pipeline_cache.c',
68 'tu_private.h',
69 'tu_query.c',
70 'tu_util.c',
71 'tu_util.h',
72 'vk_format.h',
73 )
74
75 tu_deps = []
76 tu_flags = []
77
78 libvulkan_freedreno = shared_library(
79 'vulkan_freedreno',
80 [libtu_files, tu_entrypoints, tu_extensions_c, vk_format_table_c],
81 include_directories : [
82 inc_common,
83 inc_compiler,
84 inc_vulkan_util,
85 inc_freedreno,
86 ],
87 link_with : [
88 libvulkan_util,
89 libmesa_util,
90 ],
91 dependencies : [
92 dep_dl,
93 dep_elf,
94 dep_libdrm,
95 dep_llvm,
96 dep_m,
97 dep_thread,
98 dep_valgrind,
99 idep_nir,
100 ],
101 c_args : [c_vis_args, no_override_init_args, tu_flags],
102 link_args : [ld_args_bsymbolic, ld_args_gc_sections],
103 install : true,
104 )
105
106 freedreno_icd = custom_target(
107 'freedreno_icd',
108 input : 'tu_icd.py',
109 output : 'freedreno_icd.@0@.json'.format(host_machine.cpu()),
110 command : [
111 prog_python, '@INPUT@',
112 '--lib-path', join_paths(get_option('prefix'), get_option('libdir')),
113 '--out', '@OUTPUT@',
114 ],
115 depend_files : files('tu_extensions.py'),
116 build_by_default : true,
117 install_dir : with_vulkan_icd_dir,
118 install : true,
119 )
120
121 tu_dev_icd = custom_target(
122 'tu_dev_icd',
123 input : 'tu_icd.py',
124 output : 'dev_icd.json',
125 command : [
126 prog_python, '@INPUT@', '--lib-path', meson.current_build_dir(),
127 '--out', '@OUTPUT@'
128 ],
129 depend_files : files('tu_extensions.py'),
130 build_by_default : true,
131 install : false,
132 )