Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mesa
Path: blob/21.2-virgl/src/panfrost/ds/pan_pps_perf.h
4560 views
1
/*
2
* Copyright © 2021 Collabora, Ltd.
3
* Author: Antonio Caggiano <[email protected]>
4
*
5
* SPDX-License-Identifier: MIT
6
*/
7
8
#pragma once
9
10
struct panfrost_device;
11
struct panfrost_perf;
12
13
namespace pps
14
{
15
class PanfrostDevice
16
{
17
public:
18
PanfrostDevice(int fd);
19
~PanfrostDevice();
20
21
PanfrostDevice(const PanfrostDevice &) = delete;
22
PanfrostDevice &operator=(const PanfrostDevice &) = delete;
23
24
PanfrostDevice(PanfrostDevice&&);
25
PanfrostDevice& operator=(PanfrostDevice&&);
26
27
void *ctx = nullptr;
28
struct panfrost_device* dev = nullptr;
29
};
30
31
class PanfrostPerf
32
{
33
public:
34
PanfrostPerf(const PanfrostDevice& dev);
35
~PanfrostPerf();
36
37
PanfrostPerf(const PanfrostPerf &) = delete;
38
PanfrostPerf &operator=(const PanfrostPerf &) = delete;
39
40
PanfrostPerf(PanfrostPerf&&);
41
PanfrostPerf& operator=(PanfrostPerf&&);
42
43
int enable() const;
44
void disable() const;
45
int dump() const;
46
47
struct panfrost_perf *perf = nullptr;
48
};
49
50
} // namespace pps
51
52