| 1 |
# Copyright © 2021 Collabora, Ltd. |
| 2 |
# Author: Antonio Caggiano <[email protected]> |
| 3 |
# SPDX-License-Identifier: MIT |
| 4 |
|
| 5 |
pan_hw_metrics = [ |
| 6 |
'G31', 'G51', 'G52', 'G57', 'G68', 'G71', 'G72', 'G76', 'G77', |
| 7 |
'G78', 'T72x', 'T76x', 'T82x', 'T83x', 'T86x', 'T88x', |
| 8 |
] |
| 9 |
|
| 10 |
pan_hw_metrics_xml_files = [] |
| 11 |
foreach hw : pan_hw_metrics |
| 12 |
pan_hw_metrics_xml_files += '@[email protected]'.format(hw) |
| 13 |
endforeach |
| 14 |
|
| 15 |
pan_perf_sources = [ |
| 16 |
'pan_perf.c', |
| 17 |
] |
| 18 |
|
| 19 |
pan_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 |
|
| 30 |
libpanfrost_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 |
|
| 37 |
dep_panfrost_perf = declare_dependency( |
| 38 |
link_with: libpanfrost_perf, |
| 39 |
include_directories: [inc_panfrost, inc_src, inc_include] |
| 40 |
) |
| 41 |
|
| 42 |
panfrost_quick = executable( |
| 43 |
'panquick', |
| 44 |
'quick.c', |
| 45 |
include_directories : [inc_include, inc_src, inc_panfrost], |
| 46 |
dependencies : [ |
| 47 |
dep_libdrm, |
| 48 |
libpanfrost_dep, |
| 49 |
dep_panfrost_perf, |
| 50 |
], |
| 51 |
build_by_default : with_tools.contains('panfrost') |
| 52 |
) |