Module: Mesa
Branch: master
Commit: 1f603402f6f279549853f24a634da9ecd0a15027
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=1f603402f6f279549853f24a634da9ecd0a15027

Author: Christian Gmeiner <christian.gmei...@gmail.com>
Date:   Sun Mar 25 22:29:58 2018 +0200

etnaviv: support PE performance counters

Signed-off-by: Christian Gmeiner <christian.gmei...@gmail.com>
Tested-by: Chris Healy <cphe...@gmail.com>

---

 src/gallium/drivers/etnaviv/etnaviv_query_pm.c | 28 ++++++++++++++++++++++++++
 src/gallium/drivers/etnaviv/etnaviv_query_pm.h |  6 ++++++
 2 files changed, 34 insertions(+)

diff --git a/src/gallium/drivers/etnaviv/etnaviv_query_pm.c 
b/src/gallium/drivers/etnaviv/etnaviv_query_pm.c
index 2feca9d1dd..9be65cc6c5 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_query_pm.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_query_pm.c
@@ -80,6 +80,34 @@ static const struct etna_perfmon_config query_config[] = {
       .source = (const struct etna_perfmon_source[]) {
          { "HI", "AXI_CYCLES_WRITE_DATA_STALLED" }
       }
+   },
+   {
+      .name = "pe-pixel-count-killed-by-color-pipe",
+      .type = ETNA_QUERY_PE_PIXEL_COUNT_KILLED_BY_COLOR_PIPE,
+      .source = (const struct etna_perfmon_source[]) {
+         { "PE", "PIXEL_COUNT_KILLED_BY_COLOR_PIPE" }
+      }
+   },
+   {
+      .name = "pe-pixel-count-killed-by-depth-pipe",
+      .type = ETNA_QUERY_PE_PIXEL_COUNT_KILLED_BY_DEPTH_PIPE,
+      .source = (const struct etna_perfmon_source[]) {
+         { "PE", "PIXEL_COUNT_KILLED_BY_DEPTH_PIPE" }
+      }
+   },
+   {
+      .name = "pe-pixel-count-drawn-by-color-pipe",
+      .type = ETNA_QUERY_PE_PIXEL_COUNT_DRAWN_BY_COLOR_PIPE,
+      .source = (const struct etna_perfmon_source[]) {
+         { "PE", "PIXEL_COUNT_DRAWN_BY_COLOR_PIPE" }
+      }
+   },
+   {
+      .name = "pe-pixel-count-drawn-by-depth-pipe",
+      .type = ETNA_QUERY_PE_PIXEL_COUNT_DRAWN_BY_DEPTH_PIPE,
+      .source = (const struct etna_perfmon_source[]) {
+         { "PE", "PIXEL_COUNT_DRAWN_BY_DEPTH_PIPE" }
+      }
    }
 };
 
diff --git a/src/gallium/drivers/etnaviv/etnaviv_query_pm.h 
b/src/gallium/drivers/etnaviv/etnaviv_query_pm.h
index ce823cf3bf..77fb37b333 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_query_pm.h
+++ b/src/gallium/drivers/etnaviv/etnaviv_query_pm.h
@@ -39,6 +39,12 @@ struct etna_screen;
 #define ETNA_QUERY_HI_AXI_CYCLES_WRITE_REQUEST_STALLED   (ETNA_PM_QUERY_BASE + 
3)
 #define ETNA_QUERY_HI_AXI_CYCLES_WRITE_DATA_STALLED      (ETNA_PM_QUERY_BASE + 
4)
 
+#define ETNA_QUERY_PE_PIXEL_COUNT_KILLED_BY_COLOR_PIPE   (ETNA_PM_QUERY_BASE + 
5)
+#define ETNA_QUERY_PE_PIXEL_COUNT_KILLED_BY_DEPTH_PIPE   (ETNA_PM_QUERY_BASE + 
6)
+#define ETNA_QUERY_PE_PIXEL_COUNT_DRAWN_BY_COLOR_PIPE    (ETNA_PM_QUERY_BASE + 
7)
+#define ETNA_QUERY_PE_PIXEL_COUNT_DRAWN_BY_DEPTH_PIPE    (ETNA_PM_QUERY_BASE + 
8)
+#define ETNA_QUERY_PE_PIXELS_RENDERED_2D                 (ETNA_PM_QUERY_BASE + 
9)
+
 struct etna_pm_query {
    struct etna_query base;
    struct etna_perfmon_signal *signal;

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to