From 7a4eee9db506eb7bfc3969b6907cf3279b9e9e1e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Fri, 17 Dec 2021 03:43:48 +0100 Subject: [PATCH] wait for flush_fence on image pattern descriptor update --- src/vkvg_context_internal.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vkvg_context_internal.c b/src/vkvg_context_internal.c index d18e697..71fa25b 100644 --- a/src/vkvg_context_internal.c +++ b/src/vkvg_context_internal.c @@ -581,6 +581,7 @@ void _update_cur_pattern (VkvgContext ctx, VkvgPattern pat) { if (lastPat->type == VKVG_PATTERN_TYPE_SURFACE){ //unbind current source surface by replacing it with empty texture _flush_cmd_buff (ctx); + _wait_flush_fence (ctx); _update_descriptor_set (ctx, ctx->pSurf->dev->emptyImg, ctx->dsSrc); } break; @@ -604,8 +605,9 @@ void _update_cur_pattern (VkvgContext ctx, VkvgPattern pat) { VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT); - vkh_cmd_end (ctx->cmd); - _wait_and_submit_cmd (ctx); + vkh_cmd_end (ctx->cmd); + _wait_and_submit_cmd (ctx); + _wait_flush_fence (ctx); ctx->source = surf->img; -- 2.47.3