mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 05:10:11 +01:00
meson: Allow configuring with Android-internal perfetto
This enables ninja-to-soong to generate an Android.bp that builds Mesa against Android's `libperfetto_client_experimental` library. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36561>
This commit is contained in:
parent
eb6f6c1976
commit
a8ab696033
6 changed files with 35 additions and 1 deletions
|
|
@ -2176,6 +2176,10 @@ if with_perfetto
|
|||
pre_args += '-DHAVE_PERFETTO'
|
||||
endif
|
||||
|
||||
if get_option('android-libperfetto').enabled()
|
||||
pre_args += '-DANDROID_LIBPERFETTO'
|
||||
endif
|
||||
|
||||
with_teflon = get_option('teflon')
|
||||
if with_teflon and with_tests
|
||||
dep_xtensor = dependency('xtensor')
|
||||
|
|
|
|||
|
|
@ -51,6 +51,12 @@ option(
|
|||
description : 'Use Android\'s libbacktrace',
|
||||
)
|
||||
|
||||
option(
|
||||
'android-libperfetto',
|
||||
type : 'feature',
|
||||
description : 'Use Android\'s libperfetto',
|
||||
)
|
||||
|
||||
option(
|
||||
'dri-drivers-path',
|
||||
type : 'string',
|
||||
|
|
|
|||
|
|
@ -7,7 +7,16 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#ifndef ANDROID_LIBPERFETTO
|
||||
#include <perfetto.h>
|
||||
#else
|
||||
#include <perfetto/tracing.h>
|
||||
#include <perfetto/common/gpu_counter_descriptor.gen.h>
|
||||
#include <perfetto/common/gpu_counter_descriptor.pbzero.h>
|
||||
#include <perfetto/config/gpu/gpu_counter_config.pbzero.h>
|
||||
#include <perfetto/trace/clock_snapshot.pbzero.h>
|
||||
#include <perfetto/trace/gpu/gpu_counter_event.pbzero.h>
|
||||
#endif
|
||||
|
||||
#define PPS_LOG PERFETTO_LOG
|
||||
#define PPS_LOG_IMPORTANT PERFETTO_ILOG
|
||||
|
|
|
|||
|
|
@ -23,7 +23,11 @@
|
|||
|
||||
#include "u_perfetto.h"
|
||||
|
||||
#ifndef ANDROID_LIBPERFETTO
|
||||
#include <perfetto.h>
|
||||
#else
|
||||
#include <perfetto/tracing.h>
|
||||
#endif
|
||||
|
||||
#include "c11/threads.h"
|
||||
#include "util/macros.h"
|
||||
|
|
|
|||
|
|
@ -23,7 +23,11 @@
|
|||
|
||||
#include "vulkan/runtime/vk_object.h"
|
||||
|
||||
#include "perfetto.h"
|
||||
#ifndef ANDROID_LIBPERFETTO
|
||||
#include <perfetto.h>
|
||||
#else
|
||||
#include <perfetto/tracing.h>
|
||||
#endif
|
||||
|
||||
#include "util/hash_table.h"
|
||||
#include "util/perf/u_trace.h"
|
||||
|
|
|
|||
|
|
@ -673,7 +673,14 @@ perfetto_utils_hdr_template = """\
|
|||
#ifndef ${guard_name}
|
||||
#define ${guard_name}
|
||||
|
||||
#ifndef ANDROID_LIBPERFETTO
|
||||
#include <perfetto.h>
|
||||
#else
|
||||
#include <perfetto/tracing.h>
|
||||
#include <perfetto/trace/clock_snapshot.pbzero.h>
|
||||
#include <perfetto/trace/gpu/gpu_render_stage_event.pbzero.h>
|
||||
#include <perfetto/trace/gpu/vulkan_api_event.pbzero.h>
|
||||
#endif
|
||||
|
||||
% for header in HEADERS:
|
||||
#include "${header.hdr}"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue