# Copyright © 2017 Intel Corporation # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. libresoc_extensions_h = custom_target( 'libresoc_extensions.h', input : ['libresoc_extensions_gen.py', vk_api_xml], output : 'libresoc_extensions.h', command : [ prog_python, '@INPUT0@', '--xml', '@INPUT1@', '--out-h', '@OUTPUT@', ], depend_files : files('libresoc_extensions.py'), ) libresoc_extensions_c = custom_target( 'libresoc_extensions.c', input : ['libresoc_extensions_gen.py', vk_api_xml], output : 'libresoc_extensions.c', command : [ prog_python, '@INPUT0@', '--xml', '@INPUT1@', '--out-c', '@OUTPUT@', ], depend_files : files('libresoc_extensions.py'), ) libresoc_entrypoints = custom_target( 'libresoc_entrypoints.[ch]', input : ['libresoc_entrypoints_gen.py', vk_api_xml], output : ['libresoc_entrypoints.h', 'libresoc_entrypoints.c'], command : [ prog_python, '@INPUT0@', '--xml', '@INPUT1@', '--outdir', meson.current_build_dir() ], depend_files : files('libresoc_extensions.py'), ) libresoc_vk_format_table_c = custom_target( 'libresoc_vk_format_table.c', input : ['vk_format_table.py', 'vk_format_layout.csv'], output : 'vk_format_table.c', command : [prog_python, '@INPUT@'], depend_files : files('vk_format_parse.py'), capture : true, ) liblibresoc_files = files( 'libresoc_device.c', 'libresoc_debug.c', 'libresoc_shader.c', 'libresoc_descriptor_set.c', 'libresoc_pass.c', 'libresoc_meta_clear.c', 'libresoc_image.c', 'libresoc_cmd_buffer.c', 'libresoc_formats.c', 'libresoc_pipeline.c', 'libresoc_pipeline_cache.c', 'libresoc_util.c', 'libresoc_wsi.c', 'libresoc_private.h', 'vk_format.h', ) libresoc_deps = [] libresoc_flags = [] libresoc_flags += '-DVK_USE_PLATFORM_DISPLAY_KHR' libresoc_flags += '-DVK_USE_PLATFORM_XLIB_KHR' libresoc_flags += '-DVK_USE_PLATFORM_XCB_KHR' if with_platform_x11 libresoc_deps += dep_xcb_dri3 libresoc_flags += [ '-DVK_USE_PLATFORM_XCB_KHR', '-DVK_USE_PLATFORM_XLIB_KHR', ] liblibresoc_files += files('libresoc_wsi_x11.c') endif libvulkan_libresoc = shared_library( 'vulkan_libresoc', [liblibresoc_files, libresoc_entrypoints, libresoc_extensions_c, libresoc_extensions_h, libresoc_vk_format_table_c, sha1_h], include_directories : [ 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, ], link_with : [ libvulkan_wsi, #libamd_common, libamd_common_llvm, libamdgpu_addrlib, ], dependencies : [idep_vulkan_util, libresoc_deps,idep_xmlconfig, dep_libdrm, dep_llvm, dep_thread, dep_elf, dep_dl, dep_m,dep_valgrind, idep_mesautil, idep_nir, libresoc_deps, #idep_aco, dep_libdrm_amdgpu, # idep_amdgfxregs_h, ], c_args : [no_override_init_args, libresoc_flags], cpp_args : [libresoc_flags], link_args : [ld_args_build_id, ld_args_bsymbolic, ld_args_gc_sections], gnu_symbol_visibility : 'hidden', install : true, ) if with_symbols_check test( 'libresoc symbols check', symbols_check, args : [ '--lib', libvulkan_libresoc, '--symbols-file', vulkan_icd_symbols, '--ignore-symbol', 'ac_init_llvm_once', symbols_check_args, ], suite : ['libresoc'], ) endif libresoc_icd = custom_target( 'libresoc_icd', input : 'libresoc_icd.py', output : 'libresoc_icd.@0@.json'.format(host_machine.cpu()), command : [ prog_python, '@INPUT@', '--lib-path', join_paths(get_option('prefix'), get_option('libdir')), '--out', '@OUTPUT@', ], depend_files : files('libresoc_extensions.py'), build_by_default : true, install_dir : with_vulkan_icd_dir, install : true, )