From c6244899689916e1ffad8f35b08847ef20d295e3 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 7 Jan 2021 13:01:45 -0500 Subject: [PATCH] zink: move cmdpool reset to batch state reset this is a more logical place for it Reviewed-by: Dave Airlie Part-of: --- 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; }