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 21tu_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 32tu_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 42tu_format_table_c = custom_target( 43 'tu_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 51libtu_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_fence.c', 59 'tu_formats.c', 60 'tu_image.c', 61 'tu_meta_blit.c', 62 'tu_meta_buffer.c', 63 'tu_meta_clear.c', 64 'tu_meta_copy.c', 65 'tu_meta_resolve.c', 66 'tu_pass.c', 67 'tu_pipeline.c', 68 'tu_pipeline_cache.c', 69 'tu_private.h', 70 'tu_query.c', 71 'tu_shader.c', 72 'tu_util.c', 73 'tu_util.h', 74 'tu_wsi.c', 75 'vk_format.h', 76) 77 78tu_deps = [] 79tu_flags = [] 80 81if with_platform_wayland 82 tu_deps += dep_wayland_client 83 tu_flags += '-DVK_USE_PLATFORM_WAYLAND_KHR' 84 libtu_files += files('tu_wsi_wayland.c') 85endif 86 87libvulkan_freedreno = shared_library( 88 'vulkan_freedreno', 89 [libtu_files, tu_entrypoints, tu_extensions_c, tu_format_table_c], 90 include_directories : [ 91 inc_common, 92 inc_compiler, 93 inc_vulkan_wsi, 94 inc_freedreno, 95 ], 96 link_with : [ 97 libvulkan_wsi, 98 libmesa_util, 99 libfreedreno_drm, # required by ir3_shader_get_variant, which we don't use 100 libfreedreno_ir3, 101 ], 102 dependencies : [ 103 dep_dl, 104 dep_elf, 105 dep_libdrm, 106 dep_llvm, 107 dep_m, 108 dep_thread, 109 dep_valgrind, 110 idep_nir, 111 tu_deps, 112 idep_vulkan_util, 113 ], 114 c_args : [c_vis_args, no_override_init_args, tu_flags], 115 link_args : [ld_args_bsymbolic, ld_args_gc_sections], 116 install : true, 117) 118 119freedreno_icd = custom_target( 120 'freedreno_icd', 121 input : 'tu_icd.py', 122 output : 'freedreno_icd.@0@.json'.format(host_machine.cpu()), 123 command : [ 124 prog_python, '@INPUT@', 125 '--lib-path', join_paths(get_option('prefix'), get_option('libdir')), 126 '--out', '@OUTPUT@', 127 ], 128 depend_files : files('tu_extensions.py'), 129 build_by_default : true, 130 install_dir : with_vulkan_icd_dir, 131 install : true, 132) 133 134tu_dev_icd = custom_target( 135 'tu_dev_icd', 136 input : 'tu_icd.py', 137 output : 'dev_icd.json', 138 command : [ 139 prog_python, '@INPUT@', '--lib-path', meson.current_build_dir(), 140 '--out', '@OUTPUT@' 141 ], 142 depend_files : files('tu_extensions.py'), 143 build_by_default : true, 144 install : false, 145) 146