zink: break out query suspend functionality for reuse

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
This commit is contained in:
Mike Blumenkrantz 2023-02-22 15:18:01 -05:00 committed by Marge Bot
parent 53c9f60ce4
commit b4deaf7b2c

View file

@ -1112,10 +1112,10 @@ suspend_query(struct zink_context *ctx, struct zink_query *query)
update_qbo(ctx, query);
}
void
zink_suspend_queries(struct zink_context *ctx, struct zink_batch *batch)
static void
suspend_queries(struct zink_context *ctx)
{
set_foreach(&batch->state->active_queries, entry) {
set_foreach(&ctx->batch.state->active_queries, entry) {
struct zink_query *query = (void*)entry->key;
if (query->suspended)
continue;
@ -1130,6 +1130,12 @@ zink_suspend_queries(struct zink_context *ctx, struct zink_batch *batch)
}
}
void
zink_suspend_queries(struct zink_context *ctx, struct zink_batch *batch)
{
suspend_queries(ctx);
}
void
zink_resume_queries(struct zink_context *ctx, struct zink_batch *batch)
{