1# Copyright © 2021 Collabora, Ltd. 2# Author: Antonio Caggiano <antonio.caggiano@collabora.com> 3 4# Permission is hereby granted, free of charge, to any person obtaining a copy 5# of this software and associated documentation files (the "Software"), to deal 6# in the Software without restriction, including without limitation the rights 7# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8# copies of the Software, and to permit persons to whom the Software is 9# furnished to do so, subject to the following conditions: 10 11# The above copyright notice and this permission notice shall be included in 12# all copies or substantial portions of the Software. 13 14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20# THE SOFTWARE. 21 22pan_hw_metrics = [ 23 'G31', 'G51', 'G52', 'G57', 'G68', 'G71', 'G72', 'G76', 'G77', 24 'G78', 'T72x', 'T76x', 'T82x', 'T83x', 'T86x', 'T88x', 25] 26 27pan_hw_metrics_xml_files = [] 28foreach hw : pan_hw_metrics 29 pan_hw_metrics_xml_files += '@0@.xml'.format(hw) 30endforeach 31 32pan_perf_sources = [ 33 'pan_perf.c', 34] 35 36pan_perf_sources += custom_target( 37 'pan-perf-sources', 38 input : pan_hw_metrics_xml_files, 39 output : [ 'pan_perf_metrics.c', 'pan_perf_metrics.h' ], 40 command : [ 41 prog_python, files('pan_gen_perf.py'), 42 '--code', '@OUTPUT0@', '--header', '@OUTPUT1@', 43 '@INPUT@', 44 ], 45) 46 47libpanfrost_perf = static_library( 48 'panfrost_perf', 49 pan_perf_sources, 50 include_directories : [inc_include, inc_src, inc_panfrost], 51 dependencies: libpanfrost_dep 52) 53 54dep_panfrost_perf = declare_dependency( 55 link_with: libpanfrost_perf, 56 include_directories: [inc_panfrost, inc_src, inc_include] 57) 58 59panfrost_quick = executable( 60 'panquick', 61 'quick.c', 62 include_directories : [ 63 inc_mapi, 64 inc_mesa, 65 inc_gallium, 66 inc_gallium_aux, 67 inc_include, 68 inc_src, 69 inc_panfrost, 70 inc_panfrost_hw, 71 ], 72 dependencies : [ 73 dep_libdrm, 74 libpanfrost_dep, 75 dep_panfrost_perf, 76 ], 77 build_by_default : with_tools.contains('panfrost') 78) 79