Path: blob/21.2-virgl/src/freedreno/vulkan/meson.build
4565 views
# Copyright © 2017 Intel Corporation12# Permission is hereby granted, free of charge, to any person obtaining a copy3# of this software and associated documentation files (the "Software"), to deal4# in the Software without restriction, including without limitation the rights5# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell6# copies of the Software, and to permit persons to whom the Software is7# furnished to do so, subject to the following conditions:89# The above copyright notice and this permission notice shall be included in10# all copies or substantial portions of the Software.1112# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR13# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,14# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE15# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER16# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,17# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE18# SOFTWARE.1920tu_entrypoints = custom_target(21'tu_entrypoints',22input : [vk_entrypoints_gen, vk_api_xml],23output : ['tu_entrypoints.h', 'tu_entrypoints.c'],24command : [25prog_python, '@INPUT0@', '--xml', '@INPUT1@', '--proto', '--weak',26'--out-h', '@OUTPUT0@', '--out-c', '@OUTPUT1@', '--prefix', 'tu',27],28depend_files : vk_entrypoints_gen_depend_files,29)303132libtu_files = files(33'tu_clear_blit.c',34'tu_cmd_buffer.c',35'tu_cs.c',36'tu_cs.h',37'tu_device.c',38'tu_descriptor_set.c',39'tu_descriptor_set.h',40'tu_formats.c',41'tu_image.c',42'tu_legacy.c',43'tu_nir_lower_multiview.c',44'tu_pass.c',45'tu_pipeline.c',46'tu_pipeline_cache.c',47'tu_private.h',48'tu_query.c',49'tu_shader.c',50'tu_util.c',51'tu_util.h',52'vk_format.h',53)5455tu_deps = []56tu_flags = []57tu_link_with = []5859tu_wsi = false6061if with_platform_x1162tu_deps += dep_xcb_dri363tu_flags += [64'-DVK_USE_PLATFORM_XCB_KHR',65'-DVK_USE_PLATFORM_XLIB_KHR',66]67libtu_files += files('tu_wsi_x11.c')68tu_wsi = true69endif7071if with_platform_wayland72tu_deps += dep_wayland_client73tu_flags += '-DVK_USE_PLATFORM_WAYLAND_KHR'74libtu_files += files('tu_wsi_wayland.c')75tu_wsi = true76endif7778if system_has_kms_drm and not with_platform_android79tu_flags += '-DVK_USE_PLATFORM_DISPLAY_KHR'80libtu_files += files('tu_wsi_display.c')81tu_wsi = true82endif8384if tu_wsi85libtu_files += 'tu_wsi.c'86tu_link_with += libvulkan_wsi87endif8889if with_platform_android90tu_flags += '-DVK_USE_PLATFORM_ANDROID_KHR'91libtu_files += files('tu_android.c')92tu_deps += [dep_android]93endif9495if with_xlib_lease96tu_deps += [dep_xlib_xrandr]97tu_flags += '-DVK_USE_PLATFORM_XLIB_XRANDR_EXT'98endif99100if with_freedreno_kgsl101tu_flags += '-DTU_USE_KGSL'102libtu_files += files('tu_kgsl.c')103else104libtu_files += files('tu_drm.c')105tu_deps += dep_libdrm106endif107108libvulkan_freedreno = shared_library(109'vulkan_freedreno',110[libtu_files, tu_entrypoints, freedreno_xml_header_files],111include_directories : [112inc_include,113inc_src,114inc_mapi,115inc_mesa,116inc_gallium,117inc_gallium_aux,118inc_compiler,119inc_vulkan_wsi,120inc_freedreno,121],122link_with : [123tu_link_with,124libfreedreno_ir3,125libfreedreno_layout,126libfreedreno_perfcntrs,127],128dependencies : [129idep_libfreedreno_common,130dep_dl,131dep_elf,132dep_m,133dep_thread,134dep_valgrind,135idep_nir,136tu_deps,137idep_vulkan_util,138idep_mesautil,139],140c_args : [no_override_init_args, tu_flags],141gnu_symbol_visibility : 'hidden',142link_args : [ld_args_bsymbolic, ld_args_gc_sections, ld_args_build_id],143install : true,144)145146if with_symbols_check147test(148'tu symbols check',149symbols_check,150args : [151'--lib', libvulkan_freedreno,152'--symbols-file', vulkan_icd_symbols,153symbols_check_args,154],155suite : ['freedreno'],156)157endif158159freedreno_icd = custom_target(160'freedreno_icd',161input : [vk_icd_gen, vk_api_xml],162output : 'freedreno_icd.@[email protected]'.format(host_machine.cpu()),163command : [164prog_python, '@INPUT0@',165'--api-version', '1.1', '--xml', '@INPUT1@',166'--lib-path', join_paths(get_option('prefix'), get_option('libdir'),167'libvulkan_freedreno.so'),168'--out', '@OUTPUT@',169],170build_by_default : true,171install_dir : with_vulkan_icd_dir,172install : true,173)174175176