zink: move fence reset to submit thread

try to reduce job queue latency

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11437>
This commit is contained in:
Mike Blumenkrantz 2021-06-09 11:25:28 -04:00 committed by Marge Bot
parent 97f8249336
commit c1d06c402a
1 changed files with 2 additions and 1 deletions

View File

@ -333,6 +333,8 @@ submit_queue(void *data, void *gdata, int thread_index)
bs->usage.unflushed = false;
simple_mtx_unlock(&ctx->batch_mtx);
vkResetFences(screen->dev, 1, &bs->fence.fence);
uint64_t batch_id = bs->fence.batch_id;
si.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
si.waitSemaphoreCount = 0;
@ -521,7 +523,6 @@ zink_end_batch(struct zink_context *ctx, struct zink_batch *batch)
debug_printf("vkEndCommandBuffer failed\n");
return;
}
vkResetFences(zink_screen(ctx->base.screen)->dev, 1, &batch->state->fence.fence);
struct zink_screen *screen = zink_screen(ctx->base.screen);
while (util_dynarray_contains(&batch->state->persistent_resources, struct zink_resource_object*)) {