mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2024-11-23 23:41:13 +00:00
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:
parent
95af27f032
commit
ef538e50c8
@ -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);
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user