[PATCH 05/12] etnaviv: support PA performance counters
Christian Gmeiner
christian.gmeiner at gmail.com
Sun Mar 25 20:30:00 UTC 2018
Signed-off-by: Christian Gmeiner <christian.gmeiner at gmail.com>
---
src/gallium/drivers/etnaviv/etnaviv_query_pm.c | 42 ++++++++++++++++++++++++++
src/gallium/drivers/etnaviv/etnaviv_query_pm.h | 7 +++++
2 files changed, 49 insertions(+)
diff --git a/src/gallium/drivers/etnaviv/etnaviv_query_pm.c b/src/gallium/drivers/etnaviv/etnaviv_query_pm.c
index eaad925e60..8e83eb185c 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_query_pm.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_query_pm.c
@@ -171,6 +171,48 @@ static const struct etna_perfmon_config query_config[] = {
.source = (const struct etna_perfmon_source[]) {
{ "SH", "PXL_TEXLD_INST_COUNTER" }
}
+ },
+ {
+ .name = "pa-input-vtx-counter",
+ .type = ETNA_QUERY_PA_INPUT_VTX_COUNTER,
+ .source = (const struct etna_perfmon_source[]) {
+ { "PA", "INPUT_VTX_COUNTER" }
+ }
+ },
+ {
+ .name = "pa-input-prim-counter",
+ .type = ETNA_QUERY_PA_INPUT_PRIM_COUNTER,
+ .source = (const struct etna_perfmon_source[]) {
+ { "PA", "INPUT_PRIM_COUNTER" }
+ }
+ },
+ {
+ .name = "pa-output-prim-counter",
+ .type = ETNA_QUERY_PA_OUTPUT_PRIM_COUNTER,
+ .source = (const struct etna_perfmon_source[]) {
+ { "PA", "OUTPUT_PRIM_COUNTER" }
+ }
+ },
+ {
+ .name = "pa-depth-clipped-counter",
+ .type = ETNA_QUERY_PA_DEPTH_CLIPPED_COUNTER,
+ .source = (const struct etna_perfmon_source[]) {
+ { "PA", "DEPTH_CLIPPED_COUNTER" }
+ }
+ },
+ {
+ .name = "pa-trivial-rejected-counter",
+ .type = ETNA_QUERY_PA_TRIVIAL_REJECTED_COUNTER,
+ .source = (const struct etna_perfmon_source[]) {
+ { "PA", "TRIVIAL_REJECTED_COUNTER" }
+ }
+ },
+ {
+ .name = "pa-culled-counter",
+ .type = ETNA_QUERY_PA_CULLED_COUNTER,
+ .source = (const struct etna_perfmon_source[]) {
+ { "PA", "CULLED_COUNTER" }
+ }
}
};
diff --git a/src/gallium/drivers/etnaviv/etnaviv_query_pm.h b/src/gallium/drivers/etnaviv/etnaviv_query_pm.h
index b5e7fe5ad3..00fea71f23 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_query_pm.h
+++ b/src/gallium/drivers/etnaviv/etnaviv_query_pm.h
@@ -55,6 +55,13 @@ struct etna_screen;
#define ETNA_QUERY_SH_PXL_BRANCH_INST_COUNTER (ETNA_PM_QUERY_BASE + 17)
#define ETNA_QUERY_SH_PXL_TEXLD_INST_COUNTER (ETNA_PM_QUERY_BASE + 18)
+#define ETNA_QUERY_PA_INPUT_VTX_COUNTER (ETNA_PM_QUERY_BASE + 19)
+#define ETNA_QUERY_PA_INPUT_PRIM_COUNTER (ETNA_PM_QUERY_BASE + 20)
+#define ETNA_QUERY_PA_OUTPUT_PRIM_COUNTER (ETNA_PM_QUERY_BASE + 21)
+#define ETNA_QUERY_PA_DEPTH_CLIPPED_COUNTER (ETNA_PM_QUERY_BASE + 22)
+#define ETNA_QUERY_PA_TRIVIAL_REJECTED_COUNTER (ETNA_PM_QUERY_BASE + 23)
+#define ETNA_QUERY_PA_CULLED_COUNTER (ETNA_PM_QUERY_BASE + 24)
+
struct etna_pm_query {
struct etna_query base;
struct etna_perfmon_signal *signal;
--
2.14.3
More information about the etnaviv
mailing list