Mesa (main): zink: only update last_finished during batch reset if the batch was used

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 22 21:08:01 UTC 2021


Module: Mesa
Branch: main
Commit: 618784732a227e5aa4970b303b1e34541c5f400a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=618784732a227e5aa4970b303b1e34541c5f400a

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Thu Apr  8 09:09:06 2021 -0400

zink: only update last_finished during batch reset if the batch was used

0 is never a valid batch_id, so don't try to update this

minor cosmetic change

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

---

 src/gallium/drivers/zink/zink_batch.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/zink/zink_batch.c b/src/gallium/drivers/zink/zink_batch.c
index d60db4a8bef..b890c4df7c3 100644
--- a/src/gallium/drivers/zink/zink_batch.c
+++ b/src/gallium/drivers/zink/zink_batch.c
@@ -91,7 +91,8 @@ zink_reset_batch_state(struct zink_context *ctx, struct zink_batch_state *bs)
     */
    bs->fence.submitted = false;
    bs->has_barriers = false;
-   zink_screen_update_last_finished(screen, bs->fence.batch_id);
+   if (bs->fence.batch_id)
+      zink_screen_update_last_finished(screen, bs->fence.batch_id);
    bs->fence.batch_id = 0;
    bs->draw_count = bs->compute_count = 0;
 }



More information about the mesa-commit mailing list