zink: always reset query pools on next query begin
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 10 Sep 2020 20:07:45 +0000 (16:07 -0400)
committerMarge Bot <eric+marge@anholt.net>
Mon, 2 Nov 2020 23:11:27 +0000 (23:11 +0000)
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@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7195>

src/gallium/drivers/zink/zink_query.c

index 070d6c8..4df778e 100644 (file)
@@ -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;
    }
 }