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@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>
This commit is contained in:
Christian Gmeiner 2020-07-05 13:32:19 +02:00 committed by Marge Bot
parent 42c814158b
commit 01a1926fb9
3 changed files with 6 additions and 6 deletions

View 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++; ctx->stats.draw_calls++;
/* Update state for this draw operation */ /* Update state for this draw operation */

View file

@ -184,7 +184,7 @@ struct etna_context {
/* stats/counters */ /* stats/counters */
struct { struct {
uint64_t prims_emitted; uint64_t prims_generated;
uint64_t draw_calls; uint64_t draw_calls;
uint64_t rs_operations; uint64_t rs_operations;
} stats; } stats;

View file

@ -45,8 +45,8 @@ static uint64_t
read_counter(struct etna_context *ctx, unsigned type) read_counter(struct etna_context *ctx, unsigned type)
{ {
switch (type) { switch (type) {
case PIPE_QUERY_PRIMITIVES_EMITTED: case PIPE_QUERY_PRIMITIVES_GENERATED:
return ctx->stats.prims_emitted; return ctx->stats.prims_generated;
case ETNA_QUERY_DRAW_CALLS: case ETNA_QUERY_DRAW_CALLS:
return ctx->stats.draw_calls; return ctx->stats.draw_calls;
case ETNA_QUERY_RS_OPERATIONS: case ETNA_QUERY_RS_OPERATIONS:
@ -97,7 +97,7 @@ etna_sw_create_query(struct etna_context *ctx, unsigned query_type)
struct etna_query *q; struct etna_query *q;
switch (query_type) { switch (query_type) {
case PIPE_QUERY_PRIMITIVES_EMITTED: case PIPE_QUERY_PRIMITIVES_GENERATED:
case ETNA_QUERY_DRAW_CALLS: case ETNA_QUERY_DRAW_CALLS:
case ETNA_QUERY_RS_OPERATIONS: case ETNA_QUERY_RS_OPERATIONS:
break; break;
@ -117,7 +117,7 @@ etna_sw_create_query(struct etna_context *ctx, unsigned query_type)
} }
static const struct pipe_driver_query_info list[] = { 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 }}, {"draw-calls", ETNA_QUERY_DRAW_CALLS, { 0 }},
{"rs-operations", ETNA_QUERY_RS_OPERATIONS, { 0 }}, {"rs-operations", ETNA_QUERY_RS_OPERATIONS, { 0 }},
}; };