}
void
-zink_start_cmdbuf(struct zink_context *ctx, struct zink_batch *batch)
+zink_start_batch(struct zink_context *ctx, struct zink_batch *batch)
{
reset_batch(zink_screen(ctx->base.screen), batch);
}
void
-zink_end_cmdbuf(struct zink_context *ctx, struct zink_batch *batch)
+zink_end_batch(struct zink_context *ctx, struct zink_batch *batch)
{
if (vkEndCommandBuffer(batch->cmdbuf) != VK_SUCCESS) {
debug_printf("vkEndCommandBuffer failed\n");
};
void
-zink_start_cmdbuf(struct zink_context *ctx, struct zink_batch *batch);
+zink_start_batch(struct zink_context *ctx, struct zink_batch *batch);
void
-zink_end_cmdbuf(struct zink_context *ctx, struct zink_batch *batch);
+zink_end_batch(struct zink_context *ctx, struct zink_batch *batch);
void
zink_batch_reference_resoure(struct zink_batch *cmdbuf,
return entry->data;
}
-static void
-end_batch(struct zink_context *ctx, struct zink_batch *batch)
-{
- if (batch->rp)
- vkCmdEndRenderPass(batch->cmdbuf);
-
- zink_end_cmdbuf(ctx, batch);
-}
-
void
zink_begin_render_pass(struct zink_context *ctx, struct zink_batch *batch)
{
static void
flush_batch(struct zink_context *ctx)
{
- end_batch(ctx, zink_context_curr_batch(ctx));
+ struct zink_batch *batch = zink_context_curr_batch(ctx);
+ if (batch->rp)
+ vkCmdEndRenderPass(batch->cmdbuf);
+
+ zink_end_batch(ctx, batch);
ctx->curr_batch++;
if (ctx->curr_batch == ARRAY_SIZE(ctx->batches))
ctx->curr_batch = 0;
- struct zink_batch *batch = zink_context_curr_batch(ctx);
- zink_start_cmdbuf(ctx, batch);
+ batch = zink_context_curr_batch(ctx);
+ zink_start_batch(ctx, batch);
}
static void
ctx->dirty = ZINK_DIRTY_PROGRAM;
/* start the first batch */
- zink_start_cmdbuf(ctx, zink_context_curr_batch(ctx));
+ zink_start_batch(ctx, zink_context_curr_batch(ctx));
return &ctx->base;