diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2022-02-18 15:49:55 +0100 |
|---|---|---|
| committer | j-p <jp_bruyere@hotmail.com> | 2022-02-18 21:09:23 +0100 |
| commit | e7f0aae994656c2b8893bbf673d3659ea7bd8f7f (patch) | |
| tree | 247d5863abf0b35b3bb73b7f3a2d7f0aeb54a0ac /src/vkvg_context_internal.c | |
| parent | 595d435b5414ae3c52a4f54345dcda49ce3e4d39 (diff) | |
buggy font cache mutex guarding, multithreaded tests
Diffstat (limited to 'src/vkvg_context_internal.c')
| -rw-r--r-- | src/vkvg_context_internal.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vkvg_context_internal.c b/src/vkvg_context_internal.c index c9fc67b..b1bd258 100644 --- a/src/vkvg_context_internal.c +++ b/src/vkvg_context_internal.c @@ -424,8 +424,8 @@ bool _wait_and_submit_cmd (VkvgContext ctx){ if (!_wait_flush_fence (ctx)) return false; - _device_reset_fence(ctx->pSurf->dev, ctx->flushFence); - _device_submit_cmd (ctx->pSurf->dev, &ctx->cmd, ctx->flushFence); + _device_reset_fence(ctx->dev, ctx->flushFence); + _device_submit_cmd (ctx->dev, &ctx->cmd, ctx->flushFence); if (ctx->cmd == ctx->cmdBuffers[0]) ctx->cmd = ctx->cmdBuffers[1]; @@ -591,7 +591,7 @@ void _start_cmd_for_render_pass (VkvgContext ctx) { LOG(VKVG_LOG_INFO, "START RENDER PASS: ctx = %p\n", ctx); vkh_cmd_begin (ctx->cmd,VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT); - if (ctx->pSurf->img->layout != VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL){ + if (ctx->pSurf->img->layout != VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL || ctx->dev->threadAware){ VkhImage imgMs = ctx->pSurf->imgMS; if (imgMs != NULL) vkh_image_set_layout(ctx->cmd, imgMs, VK_IMAGE_ASPECT_COLOR_BIT, @@ -870,6 +870,7 @@ void _release_context_ressources (VkvgContext ctx) { free(ctx->vertexCache); free(ctx->indexCache); + vkh_image_destroy (ctx->fontCacheImg); //TODO:check this for source counter //vkh_image_destroy (ctx->source); |