zink: pass query object to get_num_query_pools()

no functional changes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16274>
This commit is contained in:
Mike Blumenkrantz
2022-05-02 08:35:07 -04:00
committed by Marge Bot
parent 24626b954d
commit 6af4a74f8a
+3 -3
View File
@@ -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 */