Mesa (master): zink: reset queries when suspending if >50% of total pool is used

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 6 02:09:48 UTC 2021


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

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Mon Apr  5 19:13:34 2021 -0400

zink: reset queries when suspending if >50% of total pool is used

this is a great time for resets since there's never a renderpass active,
so an early reset here may mean avoiding a renderpass split later

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

---

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

diff --git a/src/gallium/drivers/zink/zink_query.c b/src/gallium/drivers/zink/zink_query.c
index 23f7a2af559..5755818d3ad 100644
--- a/src/gallium/drivers/zink/zink_query.c
+++ b/src/gallium/drivers/zink/zink_query.c
@@ -780,6 +780,8 @@ 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)
+         reset_pool(ctx, batch, query);
    }
 }
 



More information about the mesa-commit mailing list