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

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

etnaviv: support TX 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 | 63 ++++++++++++++++++++++++++
 src/gallium/drivers/etnaviv/etnaviv_query_pm.h | 10 ++++
 2 files changed, 73 insertions(+)

diff --git a/src/gallium/drivers/etnaviv/etnaviv_query_pm.c 
b/src/gallium/drivers/etnaviv/etnaviv_query_pm.c
index 3601d4086c..88485b5640 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_query_pm.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_query_pm.c
@@ -276,6 +276,69 @@ static const struct etna_perfmon_config query_config[] = {
       .source = (const struct etna_perfmon_source[]) {
          { "RA", "CULLED_QUAD_COUNT" }
       }
+   },
+   {
+      .name = "tx-total-bilinear-requests",
+      .type = ETNA_QUERY_TX_TOTAL_BILINEAR_REQUESTS,
+      .source = (const struct etna_perfmon_source[]) {
+         { "TX", "TOTAL_BILINEAR_REQUESTS" }
+      }
+   },
+   {
+      .name = "tx-total-trilinear-requests",
+      .type = ETNA_QUERY_TX_TOTAL_TRILINEAR_REQUESTS,
+      .source = (const struct etna_perfmon_source[]) {
+         { "TX", "TOTAL_TRILINEAR_REQUESTS" }
+      }
+   },
+   {
+      .name = "tx-total-discarded-texture-requests",
+      .type = ETNA_QUERY_TX_TOTAL_DISCARDED_TEXTURE_REQUESTS,
+      .source = (const struct etna_perfmon_source[]) {
+         { "TX", "TOTAL_DISCARDED_TEXTURE_REQUESTS" }
+      }
+   },
+   {
+      .name = "tx-total-texture-requests",
+      .type = ETNA_QUERY_TX_TOTAL_TEXTURE_REQUESTS,
+      .source = (const struct etna_perfmon_source[]) {
+         { "TX", "TOTAL_TEXTURE_REQUESTS" }
+      }
+   },
+   {
+      .name = "tx-mem-read-count",
+      .type = ETNA_QUERY_TX_MEM_READ_COUNT,
+      .source = (const struct etna_perfmon_source[]) {
+         { "TX", "MEM_READ_COUNT" }
+      }
+   },
+   {
+      .name = "tx-mem-read-in-8b-count",
+      .type = ETNA_QUERY_TX_MEM_READ_IN_8B_COUNT,
+      .source = (const struct etna_perfmon_source[]) {
+         { "TX", "MEM_READ_IN_8B_COUNT" }
+      }
+   },
+   {
+      .name = "tx-cache-miss-count",
+      .type = ETNA_QUERY_TX_CACHE_MISS_COUNT,
+      .source = (const struct etna_perfmon_source[]) {
+         { "TX", "CACHE_MISS_COUNT" }
+      }
+   },
+   {
+      .name = "tx-cache-hit-texel-count",
+      .type = ETNA_QUERY_TX_CACHE_HIT_TEXEL_COUNT,
+      .source = (const struct etna_perfmon_source[]) {
+         { "TX", "CACHE_HIT_TEXEL_COUNT" }
+      }
+   },
+   {
+      .name = "tx-cache-miss-texel-count",
+      .type = ETNA_QUERY_TX_CACHE_MISS_TEXEL_COUNT,
+      .source = (const struct etna_perfmon_source[]) {
+         { "TX", "CACHE_MISS_TEXEL_COUNT" }
+      }
    }
 };
 
diff --git a/src/gallium/drivers/etnaviv/etnaviv_query_pm.h 
b/src/gallium/drivers/etnaviv/etnaviv_query_pm.h
index 01dd135392..9cfd06e0ec 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_query_pm.h
+++ b/src/gallium/drivers/etnaviv/etnaviv_query_pm.h
@@ -73,6 +73,16 @@ struct etna_screen;
 #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)
 
+#define ETNA_QUERY_TX_TOTAL_BILINEAR_REQUESTS            (ETNA_PM_QUERY_BASE + 
34)
+#define ETNA_QUERY_TX_TOTAL_TRILINEAR_REQUESTS           (ETNA_PM_QUERY_BASE + 
35)
+#define ETNA_QUERY_TX_TOTAL_DISCARDED_TEXTURE_REQUESTS   (ETNA_PM_QUERY_BASE + 
36)
+#define ETNA_QUERY_TX_TOTAL_TEXTURE_REQUESTS             (ETNA_PM_QUERY_BASE + 
37)
+#define ETNA_QUERY_TX_MEM_READ_COUNT                     (ETNA_PM_QUERY_BASE + 
38)
+#define ETNA_QUERY_TX_MEM_READ_IN_8B_COUNT               (ETNA_PM_QUERY_BASE + 
39)
+#define ETNA_QUERY_TX_CACHE_MISS_COUNT                   (ETNA_PM_QUERY_BASE + 
40)
+#define ETNA_QUERY_TX_CACHE_HIT_TEXEL_COUNT              (ETNA_PM_QUERY_BASE + 
41)
+#define ETNA_QUERY_TX_CACHE_MISS_TEXEL_COUNT             (ETNA_PM_QUERY_BASE + 
42)
+
 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