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: a9451f2599 ("zink: use VK_EXT_primitives_generated_query when available")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16345>
This commit is contained in:
Mike Blumenkrantz 2022-05-05 09:08:33 -04:00 committed by Marge Bot
parent d74cd2a34b
commit 0607c27fd1
1 changed files with 5 additions and 2 deletions

View File

@ -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 &&