zink: store vertices statistics query to context
Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15401>
This commit is contained in:

committed by
Marge Bot

parent
c36f3f2db8
commit
d25437d54f
@@ -289,6 +289,7 @@ struct zink_context {
|
||||
|
||||
struct list_head suspended_queries;
|
||||
struct list_head primitives_generated_queries;
|
||||
struct zink_query *vertices_query;
|
||||
bool queries_disabled, render_condition_active;
|
||||
struct {
|
||||
struct zink_query *query;
|
||||
|
@@ -686,6 +686,10 @@ begin_query(struct zink_context *ctx, struct zink_batch *batch, struct zink_quer
|
||||
}
|
||||
if (q->vkqtype != VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT)
|
||||
VKCTX(CmdBeginQuery)(batch->state->cmdbuf, q->query_pool, q->curr_query, flags);
|
||||
if (q->type == PIPE_QUERY_PIPELINE_STATISTICS_SINGLE && q->index == PIPE_STAT_QUERY_IA_VERTICES) {
|
||||
assert(!ctx->vertices_query);
|
||||
ctx->vertices_query = q;
|
||||
}
|
||||
if (needs_stats_list(q))
|
||||
list_addtail(&q->stats_list, &ctx->primitives_generated_queries);
|
||||
zink_batch_usage_set(&q->batch_id, batch->state);
|
||||
@@ -749,6 +753,10 @@ end_query(struct zink_context *ctx, struct zink_batch *batch, struct zink_query
|
||||
if (q->vkqtype != VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT && !is_time_query(q))
|
||||
VKCTX(CmdEndQuery)(batch->state->cmdbuf, q->query_pool, q->curr_query);
|
||||
|
||||
if (q->type == PIPE_QUERY_PIPELINE_STATISTICS_SINGLE &&
|
||||
q->index == PIPE_STAT_QUERY_IA_VERTICES)
|
||||
ctx->vertices_query = NULL;
|
||||
|
||||
if (needs_stats_list(q))
|
||||
list_delinit(&q->stats_list);
|
||||
|
||||
|
Reference in New Issue
Block a user