Mesa (master): zink: move cmdpool reset to batch state reset

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Apr 5 22:44:58 UTC 2021


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

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Thu Jan  7 13:01:45 2021 -0500

zink: move cmdpool reset to batch state reset

this is a more logical place for it

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

---

 src/gallium/drivers/zink/zink_batch.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/zink/zink_batch.c b/src/gallium/drivers/zink/zink_batch.c
index be760dcface..2f7dd462cb7 100644
--- a/src/gallium/drivers/zink/zink_batch.c
+++ b/src/gallium/drivers/zink/zink_batch.c
@@ -27,6 +27,9 @@ zink_reset_batch_state(struct zink_context *ctx, struct zink_batch_state *bs)
 {
    struct zink_screen *screen = zink_screen(ctx->base.screen);
 
+   if (vkResetCommandPool(screen->dev, bs->cmdpool, 0) != VK_SUCCESS)
+      debug_printf("vkResetCommandPool failed\n");
+
    zink_fence_clear_resources(screen, &bs->fence);
 
    set_foreach(bs->active_queries, entry) {
@@ -291,10 +294,6 @@ zink_reset_batch(struct zink_context *ctx, struct zink_batch *batch)
    batch->state = get_batch_state(ctx, batch);
    assert(batch->state);
 
-   if (!fresh) {
-      if (vkResetCommandPool(screen->dev, batch->state->cmdpool, 0) != VK_SUCCESS)
-         debug_printf("vkResetCommandPool failed\n");
-   }
    batch->has_work = false;
 }
 



More information about the mesa-commit mailing list