From 0607c27fd11e97789d82a6ee261c59707205a672 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 5 May 2022 09:08:33 -0400 Subject: [PATCH] zink: restore conditional ordering for query begin/end this is the case which (also) handles query[0] for primgen queries, so it can't be an else case Fixes: a9451f25995 ("zink: use VK_EXT_primitives_generated_query when available") Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/zink/zink_query.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/zink/zink_query.c b/src/gallium/drivers/zink/zink_query.c index 96dd3bfeb3e..e50e220e12b 100644 --- a/src/gallium/drivers/zink/zink_query.c +++ b/src/gallium/drivers/zink/zink_query.c @@ -855,7 +855,8 @@ begin_query(struct zink_context *ctx, struct zink_batch *batch, struct zink_quer } } else if (q->vkqtype == VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT) { begin_vk_query_indexed(ctx, start->vkq[0], q->index, flags); - } else + } + if (q->vkqtype != VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT && q->vkqtype != VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT) VKCTX(CmdBeginQuery)(batch->state->cmdbuf, start->vkq[0]->pool->query_pool, start->vkq[0]->query_id, flags); if (q->type == PIPE_QUERY_PIPELINE_STATISTICS_SINGLE && q->index == PIPE_STAT_QUERY_IA_VERTICES) { assert(!ctx->vertices_query); @@ -932,7 +933,9 @@ end_query(struct zink_context *ctx, struct zink_batch *batch, struct zink_query } } else if (q->vkqtype == VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT) { end_vk_query_indexed(ctx, start->vkq[0], q->index); - } else if (!is_time_query(q)) + } + if (q->vkqtype != VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT && + q->vkqtype != VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT && !is_time_query(q)) VKCTX(CmdEndQuery)(batch->state->cmdbuf, start->vkq[0]->pool->query_pool, start->vkq[0]->query_id); if (q->type == PIPE_QUERY_PIPELINE_STATISTICS_SINGLE &&