Mesa (master): etnaviv: replace prims-emitted query

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jul 6 18:35:47 UTC 2020


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

Author: Christian Gmeiner <christian.gmeiner at gmail.com>
Date:   Sun Jul  5 13:32:19 2020 +0200

etnaviv: replace prims-emitted query

As we do not support stream output buffers we only count the primitives
processed by the pipeline. Use the correct query type.

Cc: <mesa-stable at lists.freedesktop.org>
Signed-off-by: Christian Gmeiner <christian.gmeiner at gmail.com>
Reviewed-by: Lucas Stach <l.stach at pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5754>

---

 src/gallium/drivers/etnaviv/etnaviv_context.c  | 2 +-
 src/gallium/drivers/etnaviv/etnaviv_context.h  | 2 +-
 src/gallium/drivers/etnaviv/etnaviv_query_sw.c | 8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/gallium/drivers/etnaviv/etnaviv_context.c b/src/gallium/drivers/etnaviv/etnaviv_context.c
index a9c34171281..15dbdedffb3 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_context.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_context.c
@@ -347,7 +347,7 @@ etna_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info)
       }
    }
 
-   ctx->stats.prims_emitted += u_reduced_prims_for_vertices(info->mode, info->count);
+   ctx->stats.prims_generated += u_reduced_prims_for_vertices(info->mode, info->count);
    ctx->stats.draw_calls++;
 
    /* Update state for this draw operation */
diff --git a/src/gallium/drivers/etnaviv/etnaviv_context.h b/src/gallium/drivers/etnaviv/etnaviv_context.h
index 4f489a10877..dd6af3d93e6 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_context.h
+++ b/src/gallium/drivers/etnaviv/etnaviv_context.h
@@ -184,7 +184,7 @@ struct etna_context {
 
    /* stats/counters */
    struct {
-      uint64_t prims_emitted;
+      uint64_t prims_generated;
       uint64_t draw_calls;
       uint64_t rs_operations;
    } stats;
diff --git a/src/gallium/drivers/etnaviv/etnaviv_query_sw.c b/src/gallium/drivers/etnaviv/etnaviv_query_sw.c
index 9e9ec99edea..6bcd04d829e 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_query_sw.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_query_sw.c
@@ -45,8 +45,8 @@ static uint64_t
 read_counter(struct etna_context *ctx, unsigned type)
 {
    switch (type) {
-   case PIPE_QUERY_PRIMITIVES_EMITTED:
-      return ctx->stats.prims_emitted;
+   case PIPE_QUERY_PRIMITIVES_GENERATED:
+      return ctx->stats.prims_generated;
    case ETNA_QUERY_DRAW_CALLS:
       return ctx->stats.draw_calls;
    case ETNA_QUERY_RS_OPERATIONS:
@@ -97,7 +97,7 @@ etna_sw_create_query(struct etna_context *ctx, unsigned query_type)
    struct etna_query *q;
 
    switch (query_type) {
-   case PIPE_QUERY_PRIMITIVES_EMITTED:
+   case PIPE_QUERY_PRIMITIVES_GENERATED:
    case ETNA_QUERY_DRAW_CALLS:
    case ETNA_QUERY_RS_OPERATIONS:
       break;
@@ -117,7 +117,7 @@ etna_sw_create_query(struct etna_context *ctx, unsigned query_type)
 }
 
 static const struct pipe_driver_query_info list[] = {
-   {"prims-emitted", PIPE_QUERY_PRIMITIVES_EMITTED, { 0 }},
+   {"prims-generated", PIPE_QUERY_PRIMITIVES_GENERATED, { 0 }},
    {"draw-calls", ETNA_QUERY_DRAW_CALLS, { 0 }},
    {"rs-operations", ETNA_QUERY_RS_OPERATIONS, { 0 }},
 };



More information about the mesa-commit mailing list