Mesa (staging/20.1): etnaviv: replace prims-emitted query
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jul 6 20:42:14 UTC 2020
Module: Mesa
Branch: staging/20.1
Commit: a29a115c3015b2556c01dc5b69fb4a148da67a28
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a29a115c3015b2556c01dc5b69fb4a148da67a28
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>
(cherry picked from commit 01a1926fb9da774e6f3d9c630d3a10cd7fc2942b)
---
.pick_status.json | 2 +-
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 ++++----
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index f758284ea3a..cd48fe4d2ef 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -13,7 +13,7 @@
"description": "etnaviv: replace prims-emitted query",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": null
},
diff --git a/src/gallium/drivers/etnaviv/etnaviv_context.c b/src/gallium/drivers/etnaviv/etnaviv_context.c
index 67c68f9eb4d..34698ce566c 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