From: Jean-Philippe Bruyère Date: Fri, 17 Dec 2021 02:43:48 +0000 (+0100) Subject: wait for flush_fence on image pattern descriptor update X-Git-Tag: v0.2.0~15 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=7a4eee9db506eb7bfc3969b6907cf3279b9e9e1e;p=jp%2Fvkvg.git wait for flush_fence on image pattern descriptor update --- 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;