zink: remove zink_fence_init()

contents moved to more correct places

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885>
This commit is contained in:
Mike Blumenkrantz 2021-03-22 11:28:07 -04:00 committed by Marge Bot
parent 95af27f032
commit ef538e50c8
3 changed files with 3 additions and 14 deletions

View File

@ -82,6 +82,7 @@ zink_reset_batch_state(struct zink_context *ctx, struct zink_batch_state *bs)
}
bs->flush_res = NULL;
bs->fence.deferred_ctx = NULL;
bs->descs_used = 0;
ctx->resource_size -= bs->resource_size;
@ -267,8 +268,7 @@ zink_end_batch(struct zink_context *ctx, struct zink_batch *batch)
debug_printf("vkEndCommandBuffer failed\n");
return;
}
zink_fence_init(ctx, batch);
vkResetFences(zink_screen(ctx->base.screen)->dev, 1, &batch->state->fence.fence);
util_dynarray_foreach(&batch->state->persistent_resources, struct zink_resource*, res) {
struct zink_screen *screen = zink_screen(ctx->base.screen);
@ -311,6 +311,7 @@ zink_end_batch(struct zink_context *ctx, struct zink_batch *batch)
ctx->reset.reset(ctx->reset.data, PIPE_GUILTY_CONTEXT_RESET);
}
}
batch->state->fence.submitted = true;
simple_mtx_lock(&ctx->batch_mtx);
ctx->last_fence = &batch->state->fence;
_mesa_hash_table_insert_pre_hashed(&ctx->batch_states, batch->state->fence.batch_id, (void*)(uintptr_t)batch->state->fence.batch_id, batch->state);

View File

@ -75,16 +75,6 @@ fail:
return false;
}
void
zink_fence_init(struct zink_context *ctx, struct zink_batch *batch)
{
struct zink_fence *fence = zink_fence(batch->state);
vkResetFences(zink_screen(ctx->base.screen)->dev, 1, &fence->fence);
fence->deferred_ctx = NULL;
fence->submitted = true;
}
void
zink_fence_reference(struct zink_screen *screen,
struct zink_fence **ptr,

View File

@ -52,8 +52,6 @@ zink_fence(void *pfence)
return (struct zink_fence *)pfence;
}
void
zink_fence_init(struct zink_context *ctx, struct zink_batch *batch);
bool
zink_create_fence(struct zink_screen *screen, struct zink_batch_state *bs);