Mesa (main): zink: don't try to sync previous timestamp query qbo values
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Aug 27 14:36:37 UTC 2021
Module: Mesa
Branch: main
Commit: 0f40ac286b978184b49dd69606ada992586f538c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0f40ac286b978184b49dd69606ada992586f538c
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Mon Aug 2 10:52:20 2021 -0400
zink: don't try to sync previous timestamp query qbo values
this makes no sense, so don't explode the qbo by trying
Reviewed-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12578>
---
src/gallium/drivers/zink/zink_query.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/gallium/drivers/zink/zink_query.c b/src/gallium/drivers/zink/zink_query.c
index f78951b16fc..a62bb375563 100644
--- a/src/gallium/drivers/zink/zink_query.c
+++ b/src/gallium/drivers/zink/zink_query.c
@@ -589,13 +589,15 @@ reset_pool(struct zink_context *ctx, struct zink_batch *batch, struct zink_query
memset(q->have_xfb, 0, sizeof(q->have_xfb));
q->last_start = q->curr_query = 0;
q->needs_reset = false;
- /* create new qbo for non-timestamp queries */
- if (q->type != PIPE_QUERY_TIMESTAMP) {
- if (qbo_append(ctx->base.screen, q))
- reset_qbo(q);
- else
- debug_printf("zink: qbo alloc failed on reset!");
- }
+ /* create new qbo for non-timestamp queries:
+ * timestamp queries should never need more than 2 entries in the qbo
+ */
+ if (q->type == PIPE_QUERY_TIMESTAMP)
+ return;
+ if (qbo_append(ctx->base.screen, q))
+ reset_qbo(q);
+ else
+ debug_printf("zink: qbo alloc failed on reset!");
if (id_offset)
qbo_sync_from_prev(ctx, q, id_offset, last_start);
}
More information about the mesa-commit
mailing list