etnaviv: replace prims-emitted query
authorChristian Gmeiner <christian.gmeiner@gmail.com>
Sun, 5 Jul 2020 11:32:19 +0000 (13:32 +0200)
committerMarge Bot <eric+marge@anholt.net>
Mon, 6 Jul 2020 18:22:19 +0000 (18:22 +0000)
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@lists.freedesktop.org>
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5754>

src/gallium/drivers/etnaviv/etnaviv_context.c
src/gallium/drivers/etnaviv/etnaviv_context.h
src/gallium/drivers/etnaviv/etnaviv_query_sw.c

index a9c341712819722c2765eb53b7a0e841fa14019f..15dbdedffb340c95ee0b93f77660dc44ec3fa7aa 100644 (file)
@@ -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 */
index 4f489a10877a0c406999ab961de316a0613634a8..dd6af3d93e6c85086f787381b455861792535e70 100644 (file)
@@ -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;
index 9e9ec99edeabb26c6b9d52f7d83de01b50aa22f0..6bcd04d829efde3f9dfe84535be4e7d0f5b7a087 100644 (file)
@@ -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 }},
 };