[PATCH 07/12] etnaviv: support RA performance counters
Christian Gmeiner
christian.gmeiner at gmail.com
Sun Mar 25 20:30:02 UTC 2018
Signed-off-by: Christian Gmeiner <christian.gmeiner at gmail.com>
---
src/gallium/drivers/etnaviv/etnaviv_query_pm.c | 49 ++++++++++++++++++++++++++
src/gallium/drivers/etnaviv/etnaviv_query_pm.h | 8 +++++
2 files changed, 57 insertions(+)
diff --git a/src/gallium/drivers/etnaviv/etnaviv_query_pm.c b/src/gallium/drivers/etnaviv/etnaviv_query_pm.c
index 759e3a5d09..3601d4086c 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_query_pm.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_query_pm.c
@@ -227,6 +227,55 @@ static const struct etna_perfmon_config query_config[] = {
.source = (const struct etna_perfmon_source[]) {
{ "SE", "CULLED_LINES_COUNT" }
}
+ },
+ {
+ .name = "ra-valid-pixel-count",
+ .type = ETNA_QUERY_RA_VALID_PIXEL_COUNT,
+ .source = (const struct etna_perfmon_source[]) {
+ { "RA", "VALID_PIXEL_COUNT" }
+ }
+ },
+ {
+ .name = "ra-total-quad-count",
+ .type = ETNA_QUERY_RA_TOTAL_QUAD_COUNT,
+ .source = (const struct etna_perfmon_source[]) {
+ { "RA", "TOTAL_QUAD_COUNT" }
+ }
+ },
+ {
+ .name = "ra-valid-quad-count-after-early-z",
+ .type = ETNA_QUERY_RA_VALID_QUAD_COUNT_AFTER_EARLY_Z,
+ .source = (const struct etna_perfmon_source[]) {
+ { "RA", "VALID_QUAD_COUNT_AFTER_EARLY_Z" }
+ }
+ },
+ {
+ .name = "ra-total-primitive-count",
+ .type = ETNA_QUERY_RA_TOTAL_PRIMITIVE_COUNT,
+ .source = (const struct etna_perfmon_source[]) {
+ { "RA", "TOTAL_PRIMITIVE_COUNT" }
+ }
+ },
+ {
+ .name = "ra-pipe-cache-miss-counter",
+ .type = ETNA_QUERY_RA_PIPE_CACHE_MISS_COUNTER,
+ .source = (const struct etna_perfmon_source[]) {
+ { "RA", "PIPE_CACHE_MISS_COUNTER" }
+ }
+ },
+ {
+ .name = "ra-prefetch-cache-miss-counter",
+ .type = ETNA_QUERY_RA_PREFETCH_CACHE_MISS_COUNTER,
+ .source = (const struct etna_perfmon_source[]) {
+ { "RA", "PREFETCH_CACHE_MISS_COUNTER" }
+ }
+ },
+ {
+ .name = "ra-pculled-quad-count",
+ .type = ETNA_QUERY_RA_CULLED_QUAD_COUNT,
+ .source = (const struct etna_perfmon_source[]) {
+ { "RA", "CULLED_QUAD_COUNT" }
+ }
}
};
diff --git a/src/gallium/drivers/etnaviv/etnaviv_query_pm.h b/src/gallium/drivers/etnaviv/etnaviv_query_pm.h
index d93d12c718..01dd135392 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_query_pm.h
+++ b/src/gallium/drivers/etnaviv/etnaviv_query_pm.h
@@ -65,6 +65,14 @@ struct etna_screen;
#define ETNA_QUERY_SE_CULLED_TRIANGLE_COUNT (ETNA_PM_QUERY_BASE + 25)
#define ETNA_QUERY_SE_CULLED_LINES_COUNT (ETNA_PM_QUERY_BASE + 26)
+#define ETNA_QUERY_RA_VALID_PIXEL_COUNT (ETNA_PM_QUERY_BASE + 27)
+#define ETNA_QUERY_RA_TOTAL_QUAD_COUNT (ETNA_PM_QUERY_BASE + 28)
+#define ETNA_QUERY_RA_VALID_QUAD_COUNT_AFTER_EARLY_Z (ETNA_PM_QUERY_BASE + 29)
+#define ETNA_QUERY_RA_TOTAL_PRIMITIVE_COUNT (ETNA_PM_QUERY_BASE + 30)
+#define ETNA_QUERY_RA_PIPE_CACHE_MISS_COUNTER (ETNA_PM_QUERY_BASE + 31)
+#define ETNA_QUERY_RA_PREFETCH_CACHE_MISS_COUNTER (ETNA_PM_QUERY_BASE + 32)
+#define ETNA_QUERY_RA_CULLED_QUAD_COUNT (ETNA_PM_QUERY_BASE + 33)
+
struct etna_pm_query {
struct etna_query base;
struct etna_perfmon_signal *signal;
--
2.14.3
More information about the etnaviv
mailing list