Mesa (master): zink: always reset query pools on next query begin

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Nov 2 23:20:11 UTC 2020


Module: Mesa
Branch: master
Commit: e8a332b972ef10f42fd490365bdff15a127d504a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e8a332b972ef10f42fd490365bdff15a127d504a

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Thu Sep 10 16:07:45 2020 -0400

zink: always reset query pools on next query begin

this ensures we pull in any flushes that are about to happen if we're
ending the query during a batch flush, which helps us roll over our pending
results

Reviewed-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7195>

---

 src/gallium/drivers/zink/zink_query.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/zink/zink_query.c b/src/gallium/drivers/zink/zink_query.c
index 070d6c8ecd5..4df778e3f3e 100644
--- a/src/gallium/drivers/zink/zink_query.c
+++ b/src/gallium/drivers/zink/zink_query.c
@@ -391,11 +391,8 @@ end_query(struct zink_context *ctx, struct zink_batch *batch, struct zink_query
    if (q->type == PIPE_QUERY_PRIMITIVES_GENERATED)
       list_delinit(&q->stats_list);
    if (++q->curr_query == q->num_queries) {
-      /* can't do zink_batch_no_rp here because we might already be inside a zink_batch_no_rp */
-      if (batch->rp)
-         q->needs_reset = true;
-      else
-        reset_pool(ctx, batch, q);
+      /* always reset on start; this ensures we can actually submit the batch that the current query is on */
+      q->needs_reset = true;
    }
 }
 



More information about the mesa-commit mailing list