Mesa (main): zink: pass query object to get_num_query_pools()

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed May 4 01:19:17 UTC 2022


Module: Mesa
Branch: main
Commit: 6af4a74f8a5a42d26714e3a33d0704600e04a3eb
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6af4a74f8a5a42d26714e3a33d0704600e04a3eb

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Mon May  2 08:35:07 2022 -0400

zink: pass query object to get_num_query_pools()

no functional changes

Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16274>

---

 src/gallium/drivers/zink/zink_query.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/zink/zink_query.c b/src/gallium/drivers/zink/zink_query.c
index 98729554e07..260733ec506 100644
--- a/src/gallium/drivers/zink/zink_query.c
+++ b/src/gallium/drivers/zink/zink_query.c
@@ -188,9 +188,9 @@ static void
 reset_qbos(struct zink_context *ctx, struct zink_query *q);
 
 static inline unsigned
-get_num_query_pools(enum pipe_query_type query_type)
+get_num_query_pools(struct zink_query *q)
 {
-   if (query_type == PIPE_QUERY_PRIMITIVES_GENERATED)
+   if (q->type == PIPE_QUERY_PRIMITIVES_GENERATED)
       return 2;
    return 1;
 }
@@ -455,7 +455,7 @@ zink_create_query(struct pipe_context *pctx,
    else if (query_type == PIPE_QUERY_PIPELINE_STATISTICS_SINGLE)
       pipeline_stats = pipeline_statistic_convert(index);
 
-   int num_pools = get_num_query_pools(query_type);
+   int num_pools = get_num_query_pools(query);
    for (unsigned i = 0; i < num_pools; i++) {
       VkQueryType vkqtype = query->vkqtype;
       /* if xfb is active, we need to use an xfb query, otherwise we need pipeline statistics */



More information about the mesa-commit mailing list