struct zink_cmdbuf *
zink_start_cmdbuf(struct zink_context *ctx)
{
- struct zink_cmdbuf *cmdbuf = &ctx->cmdbuf;
+ struct zink_cmdbuf *cmdbuf = &ctx->cmdbufs[0];
reset_cmdbuf(zink_screen(ctx->base.screen), cmdbuf);
VkCommandBufferBeginInfo cbbi = {};
{
struct zink_context *ctx = zink_context(pctx);
struct zink_screen *screen = zink_screen(pctx->screen);
- vkFreeCommandBuffers(screen->dev, ctx->cmdpool, 1, &ctx->cmdbuf.cmdbuf);
+ for (int i = 0; i < ARRAY_SIZE(ctx->cmdbufs); ++i)
+ vkFreeCommandBuffers(screen->dev, ctx->cmdpool, 1, &ctx->cmdbufs[i].cmdbuf);
vkDestroyCommandPool(screen->dev, ctx->cmdpool, NULL);
util_primconvert_destroy(ctx->primconvert);
cbai.commandPool = ctx->cmdpool;
cbai.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY;
cbai.commandBufferCount = 1;
- if (vkAllocateCommandBuffers(screen->dev, &cbai, &ctx->cmdbuf.cmdbuf) != VK_SUCCESS)
- goto fail;
+ for (int i = 0; i < ARRAY_SIZE(ctx->cmdbufs); ++i)
+ if (vkAllocateCommandBuffers(screen->dev, &cbai, &ctx->cmdbufs[i].cmdbuf) != VK_SUCCESS)
+ goto fail;
VkDescriptorPoolSize sizes[] = {
{VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1000}