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

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Apr 24 12:31:35 UTC 2021


Module: Mesa
Branch: staging/21.1
Commit: d4fc2cfdd0f9532ed896ca6c7d2fe6b18a81edc6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d4fc2cfdd0f9532ed896ca6c7d2fe6b18a81edc6

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>
(cherry picked from commit 55b2b9b389a82cb0fd2e82cfb63ac1ac3a687358)

---

 .pick_status.json                     | 2 +-
 src/gallium/drivers/zink/zink_query.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 927354ae9b0..22de79866e9 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -391,7 +391,7 @@
         "description": "zink: only reset query on suspend if the query has previously been stopped",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "00fc85a01194e9fc150d4a0ec80826f2f16504ee"
     },
diff --git a/src/gallium/drivers/zink/zink_query.c b/src/gallium/drivers/zink/zink_query.c
index 5755818d3ad..a0dfc75a6f4 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