mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 09:18:04 +02:00
pps: Generate libgpudataprofiling.so from pps-producer sources for Android CTS
Android CTS expects GPU counters to be provided by a DSO named libgpudataprofiling.so. This change leaves pps-producer unchanged and builds this DSO from the same sources. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36052>
This commit is contained in:
parent
a739889789
commit
b74e641c04
2 changed files with 29 additions and 3 deletions
|
|
@ -40,6 +40,16 @@ executable(
|
|||
install: true
|
||||
)
|
||||
|
||||
if with_platform_android
|
||||
shared_library(
|
||||
'gpudataproducer',
|
||||
sources: producer_sources,
|
||||
include_directories: [include_pps, inc_src],
|
||||
dependencies: [dep_pps, dep_perfetto],
|
||||
install: true
|
||||
)
|
||||
endif
|
||||
|
||||
config_sources = [
|
||||
'pps_config.cc'
|
||||
]
|
||||
|
|
|
|||
|
|
@ -9,9 +9,10 @@
|
|||
|
||||
#include <cstdlib>
|
||||
|
||||
#include "util/detect_os.h"
|
||||
#include "pps_datasource.h"
|
||||
|
||||
int main(int argc, const char **argv)
|
||||
int init(std::string &driver_name)
|
||||
{
|
||||
using namespace pps;
|
||||
|
||||
|
|
@ -20,8 +21,6 @@ int main(int argc, const char **argv)
|
|||
args.backends = perfetto::kSystemBackend;
|
||||
perfetto::Tracing::Initialize(args);
|
||||
|
||||
std::string driver_name =
|
||||
(argc > 1) ? Driver::find_driver_name(argv[1]) : Driver::default_driver_name();
|
||||
GpuDataSource::register_data_source(driver_name);
|
||||
|
||||
const auto &driver = Driver::get_supported_drivers().at(driver_name);
|
||||
|
|
@ -35,3 +34,20 @@ int main(int argc, const char **argv)
|
|||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
int main(int argc, const char **argv)
|
||||
{
|
||||
using namespace pps;
|
||||
std::string driver_name =
|
||||
(argc > 1) ? Driver::find_driver_name(argv[1]) : Driver::default_driver_name();
|
||||
return init(driver_name);
|
||||
}
|
||||
|
||||
#if DETECT_OS_ANDROID
|
||||
extern "C" int start()
|
||||
{
|
||||
using namespace pps;
|
||||
std::string driver_name = Driver::default_driver_name();
|
||||
return init(driver_name);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue