1bf215546Sopenharmony_ci# Copyright © 2017 Intel Corporation 2bf215546Sopenharmony_ci 3bf215546Sopenharmony_ci# Permission is hereby granted, free of charge, to any person obtaining a copy 4bf215546Sopenharmony_ci# of this software and associated documentation files (the "Software"), to deal 5bf215546Sopenharmony_ci# in the Software without restriction, including without limitation the rights 6bf215546Sopenharmony_ci# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7bf215546Sopenharmony_ci# copies of the Software, and to permit persons to whom the Software is 8bf215546Sopenharmony_ci# furnished to do so, subject to the following conditions: 9bf215546Sopenharmony_ci 10bf215546Sopenharmony_ci# The above copyright notice and this permission notice shall be included in 11bf215546Sopenharmony_ci# all copies or substantial portions of the Software. 12bf215546Sopenharmony_ci 13bf215546Sopenharmony_ci# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14bf215546Sopenharmony_ci# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15bf215546Sopenharmony_ci# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16bf215546Sopenharmony_ci# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17bf215546Sopenharmony_ci# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18bf215546Sopenharmony_ci# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19bf215546Sopenharmony_ci# SOFTWARE. 20bf215546Sopenharmony_ci 21bf215546Sopenharmony_ci# Mesa-local imports in the Python files must be declared here for correct 22bf215546Sopenharmony_ci# dependency tracking. 23bf215546Sopenharmony_civk_extensions_depend_files = [ 24bf215546Sopenharmony_ci] 25bf215546Sopenharmony_civk_entrypoints_depend_files = [ 26bf215546Sopenharmony_ci files('vk_extensions.py'), 27bf215546Sopenharmony_ci vk_extensions_depend_files, 28bf215546Sopenharmony_ci] 29bf215546Sopenharmony_civk_extensions_gen_depend_files = [ 30bf215546Sopenharmony_ci files('vk_extensions.py'), 31bf215546Sopenharmony_ci vk_extensions_depend_files, 32bf215546Sopenharmony_ci] 33bf215546Sopenharmony_civk_dispatch_table_gen_depend_files = [ 34bf215546Sopenharmony_ci files('vk_entrypoints.py'), 35bf215546Sopenharmony_ci vk_entrypoints_depend_files, 36bf215546Sopenharmony_ci] 37bf215546Sopenharmony_civk_dispatch_trampolines_gen_depend_files = [ 38bf215546Sopenharmony_ci files('vk_entrypoints.py'), 39bf215546Sopenharmony_ci vk_entrypoints_depend_files, 40bf215546Sopenharmony_ci] 41bf215546Sopenharmony_civk_entrypoints_gen_depend_files = [ 42bf215546Sopenharmony_ci files('vk_entrypoints.py'), 43bf215546Sopenharmony_ci vk_entrypoints_depend_files, 44bf215546Sopenharmony_ci] 45bf215546Sopenharmony_civk_cmd_queue_gen_depend_files = [ 46bf215546Sopenharmony_ci files('vk_entrypoints.py'), 47bf215546Sopenharmony_ci vk_entrypoints_depend_files, 48bf215546Sopenharmony_ci] 49bf215546Sopenharmony_ci 50bf215546Sopenharmony_civk_entrypoints_gen = files('vk_entrypoints_gen.py') 51bf215546Sopenharmony_civk_extensions_gen = files('vk_extensions_gen.py') 52bf215546Sopenharmony_civk_icd_gen = files('vk_icd_gen.py') 53bf215546Sopenharmony_civk_cmd_queue_gen = files('vk_cmd_queue_gen.py') 54bf215546Sopenharmony_civk_dispatch_trampolines_gen = files('vk_dispatch_trampolines_gen.py') 55bf215546Sopenharmony_ci 56bf215546Sopenharmony_cifiles_vulkan_util = files( 57bf215546Sopenharmony_ci 'vk_alloc.c', 58bf215546Sopenharmony_ci 'vk_alloc.h', 59bf215546Sopenharmony_ci 'vk_format.c', 60bf215546Sopenharmony_ci 'vk_util.c', 61bf215546Sopenharmony_ci 'vk_util.h', 62bf215546Sopenharmony_ci) 63bf215546Sopenharmony_ci 64bf215546Sopenharmony_civk_dispatch_table = custom_target( 65bf215546Sopenharmony_ci 'vk_dispatch_table', 66bf215546Sopenharmony_ci input : ['vk_dispatch_table_gen.py', vk_api_xml], 67bf215546Sopenharmony_ci output : ['vk_dispatch_table.c', 'vk_dispatch_table.h'], 68bf215546Sopenharmony_ci command : [ 69bf215546Sopenharmony_ci prog_python, '@INPUT0@', '--xml', '@INPUT1@', 70bf215546Sopenharmony_ci '--out-c', '@OUTPUT0@', '--out-h', '@OUTPUT1@' 71bf215546Sopenharmony_ci ], 72bf215546Sopenharmony_ci depend_files : vk_dispatch_table_gen_depend_files, 73bf215546Sopenharmony_ci) 74bf215546Sopenharmony_ci 75bf215546Sopenharmony_civk_enum_to_str = custom_target( 76bf215546Sopenharmony_ci 'vk_enum_to_str', 77bf215546Sopenharmony_ci input : ['gen_enum_to_str.py', vk_api_xml], 78bf215546Sopenharmony_ci output : ['vk_enum_to_str.c', 'vk_enum_to_str.h', 'vk_enum_defines.h'], 79bf215546Sopenharmony_ci command : [ 80bf215546Sopenharmony_ci prog_python, '@INPUT0@', '--xml', '@INPUT1@', 81bf215546Sopenharmony_ci '--outdir', meson.current_build_dir() 82bf215546Sopenharmony_ci ], 83bf215546Sopenharmony_ci) 84bf215546Sopenharmony_ci 85bf215546Sopenharmony_civk_extensions = custom_target( 86bf215546Sopenharmony_ci 'vk_extensions', 87bf215546Sopenharmony_ci input : ['vk_extensions_gen.py', vk_api_xml], 88bf215546Sopenharmony_ci output : ['vk_extensions.c', 'vk_extensions.h'], 89bf215546Sopenharmony_ci command : [ 90bf215546Sopenharmony_ci prog_python, '@INPUT0@', '--xml', '@INPUT1@', 91bf215546Sopenharmony_ci '--out-c', '@OUTPUT0@', '--out-h', '@OUTPUT1@' 92bf215546Sopenharmony_ci ], 93bf215546Sopenharmony_ci depend_files : vk_extensions_gen_depend_files, 94bf215546Sopenharmony_ci) 95bf215546Sopenharmony_ci 96bf215546Sopenharmony_cilibvulkan_util = static_library( 97bf215546Sopenharmony_ci 'vulkan_util', 98bf215546Sopenharmony_ci [files_vulkan_util, vk_dispatch_table, vk_enum_to_str, vk_extensions], 99bf215546Sopenharmony_ci include_directories : [inc_include, inc_src, inc_gallium], 100bf215546Sopenharmony_ci dependencies : [vulkan_wsi_deps, idep_mesautil, idep_nir_headers], 101bf215546Sopenharmony_ci c_args : [c_msvc_compat_args], 102bf215546Sopenharmony_ci gnu_symbol_visibility : 'hidden', 103bf215546Sopenharmony_ci build_by_default : false, 104bf215546Sopenharmony_ci) 105bf215546Sopenharmony_ci 106bf215546Sopenharmony_ciidep_vulkan_util_headers = declare_dependency( 107bf215546Sopenharmony_ci sources : [vk_dispatch_table[1], vk_enum_to_str[1], vk_extensions[1]], 108bf215546Sopenharmony_ci include_directories : include_directories('.') 109bf215546Sopenharmony_ci) 110bf215546Sopenharmony_ci 111bf215546Sopenharmony_ciidep_vulkan_util = declare_dependency( 112bf215546Sopenharmony_ci link_with : libvulkan_util, 113bf215546Sopenharmony_ci dependencies : idep_vulkan_util_headers 114bf215546Sopenharmony_ci) 115