Mesa (main): zink: restore conditional ordering for query begin/end
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri May 6 14:50:55 UTC 2022
Module: Mesa
Branch: main
Commit: 0607c27fd11e97789d82a6ee261c59707205a672
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0607c27fd11e97789d82a6ee261c59707205a672
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Thu May 5 09:08:33 2022 -0400
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 <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16345>
---
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 &&
More information about the mesa-commit
mailing list