summaryrefslogtreecommitdiffstatsci
path: root/src
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-12-17 03:43:48 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-12-17 03:43:48 +0100
commit7a4eee9db506eb7bfc3969b6907cf3279b9e9e1e (patch)
tree574231993e030b06ef0b71f2c75c86f274a4a97b /src
parent9e9e9707849764e5c16fc6edaac736980f2a5055 (diff)
wait for flush_fence on image pattern descriptor update
Diffstat (limited to 'src')
-rw-r--r--src/vkvg_context_internal.c6
1 files 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;