Mesa (master): zink: only reset query on suspend if the query has previously been stopped

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Apr 23 04:02:30 UTC 2021


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

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Thu Apr 15 15:10:30 2021 -0400

zink: only reset query on suspend if the query has previously been stopped

if the query has never been stopped, then doing an implicit reset here does
nothing except give the gpu more work

Fixes: 00fc85a0119 ("zink: reset queries when suspending if >50% of total pool is used")

Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10268>

---

 src/gallium/drivers/zink/zink_query.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/zink/zink_query.c b/src/gallium/drivers/zink/zink_query.c
index 8f7a4c7621a..98dd0e120cb 100644
--- a/src/gallium/drivers/zink/zink_query.c
+++ b/src/gallium/drivers/zink/zink_query.c
@@ -780,7 +780,7 @@ zink_suspend_queries(struct zink_context *ctx, struct zink_batch *batch)
       }
       if (query->needs_update)
          update_qbo(ctx, query);
-      if (query->curr_query > NUM_QUERIES / 2)
+      if (query->last_start && query->curr_query > NUM_QUERIES / 2)
          reset_pool(ctx, batch, query);
    }
 }



More information about the mesa-commit mailing list