diff options
Diffstat (limited to 'src/vkvg_context.c')
| -rw-r--r-- | src/vkvg_context.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vkvg_context.c b/src/vkvg_context.c index 2e5c039..77aab8a 100644 --- a/src/vkvg_context.c +++ b/src/vkvg_context.c @@ -51,6 +51,9 @@ VkvgContext vkvg_create(VkvgSurface surf) _init_cmd_buff (ctx); _clear_path (ctx); + ctx->cmdPoolCompute = vkh_cmd_pool_create (dev->vkDev, dev->cQueue->familyIndex, VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT); + ctx->computeFence = vkh_fence_create (dev->vkDev); + return ctx; } void vkvg_flush (VkvgContext ctx){ @@ -86,6 +89,9 @@ void vkvg_destroy (VkvgContext ctx) VkDevice dev = ctx->pSurf->dev->vkDev; + vkDestroyFence (dev, ctx->computeFence, NULL); + vkDestroyCommandPool(dev, ctx->cmdPoolCompute, NULL); + vkDestroyFence (dev, ctx->flushFence,NULL); vkFreeCommandBuffers(dev, ctx->cmdPool, 1, &ctx->cmd); vkDestroyCommandPool(dev, ctx->cmdPool, NULL); |