Path: blob/21.2-virgl/src/panfrost/vulkan/meson.build
4560 views
# Copyright © 2021 Collabora Ltd.1#2# Derived from the freedreno driver which is:3# Copyright © 2017 Intel Corporation45# Permission is hereby granted, free of charge, to any person obtaining a copy6# of this software and associated documentation files (the "Software"), to deal7# in the Software without restriction, including without limitation the rights8# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell9# copies of the Software, and to permit persons to whom the Software is10# furnished to do so, subject to the following conditions:1112# The above copyright notice and this permission notice shall be included in13# all copies or substantial portions of the Software.1415# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR16# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,17# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE18# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER19# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,20# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE21# SOFTWARE.2223panvk_entrypoints = custom_target(24'panvk_entrypoints.[ch]',25input : [vk_entrypoints_gen, vk_api_xml],26output : ['panvk_entrypoints.h', 'panvk_entrypoints.c'],27command : [28prog_python, '@INPUT0@', '--xml', '@INPUT1@', '--proto', '--weak',29'--out-h', '@OUTPUT0@', '--out-c', '@OUTPUT1@', '--prefix', 'panvk',30],31)3233libpanvk_files = files(34'panvk_cmd_buffer.c',35'panvk_cs.c',36'panvk_device.c',37'panvk_descriptor_set.c',38'panvk_formats.c',39'panvk_image.c',40'panvk_mempool.c',41'panvk_meta.c',42'panvk_pass.c',43'panvk_pipeline.c',44'panvk_pipeline_cache.c',45'panvk_private.h',46'panvk_query.c',47'panvk_shader.c',48'panvk_sync.c',49'panvk_util.c',50'panvk_varyings.c',51'panvk_wsi.c',52'panvk_wsi_display.c',53)5455panvk_deps = []56panvk_flags = []5758if system_has_kms_drm59panvk_flags += '-DVK_USE_PLATFORM_DISPLAY_KHR'60libpanvk_files += files('panvk_wsi_display.c')61endif6263if with_platform_wayland64panvk_deps += [dep_wayland_client, dep_wl_protocols]65panvk_flags += '-DVK_USE_PLATFORM_WAYLAND_KHR'66libpanvk_files += files('panvk_wsi_wayland.c')67libpanvk_files += [wayland_drm_client_protocol_h, wayland_drm_protocol_c]68endif6970libvulkan_panfrost = shared_library(71'vulkan_panfrost',72[libpanvk_files, panvk_entrypoints],73include_directories : [74inc_include,75inc_src,76inc_compiler,77inc_gallium, # XXX: pipe/p_format.h78inc_gallium_aux, # XXX: renderonly79inc_vulkan_wsi,80inc_panfrost,81],82link_with : [83libvulkan_wsi,84libpanfrost_shared,85libpanfrost_midgard,86libpanfrost_bifrost,87libpanfrost_decode,88libpanfrost_lib,89libpanfrost_util,90],91dependencies : [92dep_dl,93dep_elf,94dep_libdrm,95dep_m,96dep_thread,97dep_valgrind,98idep_nir,99panvk_deps,100idep_vulkan_util,101idep_mesautil,102],103c_args : [no_override_init_args, panvk_flags],104link_args : [ld_args_bsymbolic, ld_args_gc_sections],105install : true,106)107108panfrost_icd = custom_target(109'panfrost_icd',110input : [vk_icd_gen, vk_api_xml],111output : 'panfrost_icd.@[email protected]'.format(host_machine.cpu()),112command : [113prog_python, '@INPUT0@',114'--api-version', '1.1', '--xml', '@INPUT1@',115'--lib-path', join_paths(get_option('prefix'), get_option('libdir'),116'libvulkan_panfrost.so'),117'--out', '@OUTPUT@',118],119build_by_default : true,120install_dir : with_vulkan_icd_dir,121install : true,122)123124125