From 6af4a74f8a5a42d26714e3a33d0704600e04a3eb Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 2 May 2022 08:35:07 -0400 Subject: [PATCH] zink: pass query object to get_num_query_pools() no functional changes Reviewed-by: Dave Airlie Part-of: --- 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 */