diff options
author | Rob Clark <[email protected]> | 2020-03-08 16:42:23 -0700 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-10 16:52:02 +0000 |
commit | 30dd0599250c4743ded25663d32c263ab226510c (patch) | |
tree | bc1657c060e136e6a54e72e12025df432b5df52a /src/freedreno/computerator/main.h | |
parent | af68b0d3460259b4d9255c36f31381059e482019 (diff) |
freedreno/computerator: add performance counter support
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4119>
Diffstat (limited to 'src/freedreno/computerator/main.h')
-rw-r--r-- | src/freedreno/computerator/main.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/freedreno/computerator/main.h b/src/freedreno/computerator/main.h index 9e9325aa7f6..57b1ac07cb6 100644 --- a/src/freedreno/computerator/main.h +++ b/src/freedreno/computerator/main.h @@ -46,12 +46,31 @@ struct kernel { struct fd_bo *bufs[MAX_BUFS]; }; +struct perfcntr { + const char *name; + + /* for backend to configure/read the counter, describes + * the selected counter: + */ + unsigned select_reg; + unsigned counter_reg_lo; + unsigned counter_reg_hi; + /* and selected countable: + */ + unsigned selector; +}; + /* per-generation entry-points: */ struct backend { struct kernel *(*assemble)(struct backend *b, FILE *in); void (*disassemble)(struct kernel *kernel, FILE *out); void (*emit_grid)(struct kernel *kernel, uint32_t grid[3], struct fd_submit *submit); + + /* performance-counter API: */ + void (*set_perfcntrs)(struct backend *b, const struct perfcntr *perfcntrs, + unsigned num_perfcntrs); + void (*read_perfcntrs)(struct backend *b, uint64_t *results); }; #define define_cast(_from, _to) \ |