Added few more stubs so that control reaches to DestroyDevice().
[mesa.git] / src / libre-soc / 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 libresoc_extensions_h = custom_target(
22 'libresoc_extensions.h',
23 input : ['libresoc_extensions_gen.py', vk_api_xml],
24 output : 'libresoc_extensions.h',
25 command : [
26 prog_python, '@INPUT0@', '--xml', '@INPUT1@',
27 '--out-h', '@OUTPUT@',
28 ],
29 depend_files : files('libresoc_extensions.py'),
30 )
31
32 libresoc_extensions_c = custom_target(
33 'libresoc_extensions.c',
34 input : ['libresoc_extensions_gen.py', vk_api_xml],
35 output : 'libresoc_extensions.c',
36 command : [
37 prog_python, '@INPUT0@', '--xml', '@INPUT1@',
38 '--out-c', '@OUTPUT@',
39 ],
40 depend_files : files('libresoc_extensions.py'),
41 )
42
43
44 libresoc_entrypoints = custom_target(
45 'libresoc_entrypoints.[ch]',
46 input : ['libresoc_entrypoints_gen.py', vk_api_xml],
47 output : ['libresoc_entrypoints.h', 'libresoc_entrypoints.c'],
48 command : [
49 prog_python, '@INPUT0@', '--xml', '@INPUT1@', '--outdir',
50 meson.current_build_dir()
51 ],
52 depend_files : files('libresoc_extensions.py'),
53 )
54
55 libresoc_vk_format_table_c = custom_target(
56 'libresoc_vk_format_table.c',
57 input : ['vk_format_table.py', 'vk_format_layout.csv'],
58 output : 'vk_format_table.c',
59 command : [prog_python, '@INPUT@'],
60 depend_files : files('vk_format_parse.py'),
61 capture : true,
62 )
63
64 liblibresoc_files = files(
65 'libresoc_device.c',
66 'libresoc_debug.c',
67 'libresoc_shader.c',
68 'libresoc_descriptor_set.c',
69 'libresoc_pass.c',
70 'libresoc_meta_clear.c',
71 'libresoc_image.c',
72 'libresoc_cmd_buffer.c',
73 'libresoc_formats.c',
74 'libresoc_pipeline.c',
75 'libresoc_pipeline_cache.c',
76 'libresoc_util.c',
77 'libresoc_wsi.c',
78 'libresoc_private.h',
79 'vk_format.h',
80 )
81
82 libresoc_deps = []
83 libresoc_flags = []
84 libresoc_flags += '-DVK_USE_PLATFORM_DISPLAY_KHR'
85 libresoc_flags += '-DVK_USE_PLATFORM_XLIB_KHR'
86 libresoc_flags += '-DVK_USE_PLATFORM_XCB_KHR'
87 if with_platform_x11
88 libresoc_deps += dep_xcb_dri3
89 libresoc_flags += [
90 '-DVK_USE_PLATFORM_XCB_KHR',
91 '-DVK_USE_PLATFORM_XLIB_KHR',
92 ]
93 liblibresoc_files += files('libresoc_wsi_x11.c')
94 endif
95
96 libvulkan_libresoc = shared_library(
97 'vulkan_libresoc',
98 [liblibresoc_files, libresoc_entrypoints, libresoc_extensions_c, libresoc_extensions_h, libresoc_vk_format_table_c, sha1_h],
99 include_directories : [
100 inc_include, inc_src, inc_mapi, inc_mesa, inc_compiler, inc_util, inc_vulkan_wsi, inc_gallium_aux, inc_gallium, #inc_amd, inc_amd_common, inc_amd_common_llvm,
101 ],
102 link_with : [
103 libvulkan_wsi, #libamd_common, libamd_common_llvm, libamdgpu_addrlib,
104 ],
105 dependencies : [idep_vulkan_util, libresoc_deps,idep_xmlconfig, dep_libdrm,
106 dep_llvm, dep_thread, dep_elf, dep_dl, dep_m,dep_valgrind, idep_mesautil, idep_nir,
107 libresoc_deps, #idep_aco, dep_libdrm_amdgpu,
108 # idep_amdgfxregs_h,
109 ],
110 c_args : [no_override_init_args, libresoc_flags],
111 cpp_args : [libresoc_flags],
112 link_args : [ld_args_build_id, ld_args_bsymbolic, ld_args_gc_sections],
113 gnu_symbol_visibility : 'hidden',
114 install : true,
115 )
116
117 if with_symbols_check
118 test(
119 'libresoc symbols check',
120 symbols_check,
121 args : [
122 '--lib', libvulkan_libresoc,
123 '--symbols-file', vulkan_icd_symbols,
124 '--ignore-symbol', 'ac_init_llvm_once',
125 symbols_check_args,
126 ],
127 suite : ['libresoc'],
128 )
129 endif
130
131 libresoc_icd = custom_target(
132 'libresoc_icd',
133 input : 'libresoc_icd.py',
134 output : 'libresoc_icd.@0@.json'.format(host_machine.cpu()),
135 command : [
136 prog_python, '@INPUT@',
137 '--lib-path', join_paths(get_option('prefix'), get_option('libdir')),
138 '--out', '@OUTPUT@',
139 ],
140 depend_files : files('libresoc_extensions.py'),
141 build_by_default : true,
142 install_dir : with_vulkan_icd_dir,
143 install : true,
144 )