1# Copyright © 2021 Collabora, Ltd. 2# Author: Antonio Caggiano <[email protected]> 3# SPDX-License-Identifier: MIT 4 5pan_hw_metrics = [ 6 'G31', 'G51', 'G52', 'G57', 'G68', 'G71', 'G72', 'G76', 'G77', 7 'G78', 'T72x', 'T76x', 'T82x', 'T83x', 'T86x', 'T88x', 8] 9 10pan_hw_metrics_xml_files = [] 11foreach hw : pan_hw_metrics 12 pan_hw_metrics_xml_files += '@[email protected]'.format(hw) 13endforeach 14 15pan_perf_sources = [ 16 'pan_perf.c', 17] 18 19pan_perf_sources += custom_target( 20 'pan-perf-sources', 21 input : pan_hw_metrics_xml_files, 22 output : [ 'pan_perf_metrics.c', 'pan_perf_metrics.h' ], 23 command : [ 24 prog_python, files('pan_gen_perf.py'), 25 '--code', '@OUTPUT0@', '--header', '@OUTPUT1@', 26 '@INPUT@', 27 ], 28) 29 30libpanfrost_perf = static_library( 31 'panfrost_perf', 32 pan_perf_sources, 33 include_directories : [inc_include, inc_src, inc_panfrost], 34 dependencies: libpanfrost_dep 35) 36 37dep_panfrost_perf = declare_dependency( 38 link_with: libpanfrost_perf, 39 include_directories: [inc_panfrost, inc_src, inc_include] 40) 41 42panfrost_quick = executable( 43 'panquick', 44 'quick.c', 45 include_directories : [ 46 inc_include, 47 inc_src, 48 inc_panfrost, 49 inc_panfrost_hw, 50 ], 51 dependencies : [ 52 dep_libdrm, 53 libpanfrost_dep, 54 dep_panfrost_perf, 55 ], 56 build_by_default : with_tools.contains('panfrost') 57) 58