summaryrefslogtreecommitdiffstatsci
path: root/src/vkvg_context_internal.c
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2022-01-26 22:01:48 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2022-01-26 22:01:48 +0100
commit19abdef1af4b28e40ba6b994ea22e92b7dde1d8f (patch)
treeffdc7f4d10e351ee1856158cc14ac0277542aa1b /src/vkvg_context_internal.c
parent88c83b6b9b465a670f4989bbe21bd2e5f9eb2dd0 (diff)
test threadctxthreadctxtests
Diffstat (limited to 'src/vkvg_context_internal.c')
-rw-r--r--src/vkvg_context_internal.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/vkvg_context_internal.c b/src/vkvg_context_internal.c
index c191c4e..39471b8 100644
--- a/src/vkvg_context_internal.c
+++ b/src/vkvg_context_internal.c
@@ -410,7 +410,7 @@ void _clear_attachment (VkvgContext ctx) {
}
bool _wait_flush_fence (VkvgContext ctx) {
LOG(VKVG_LOG_INFO, "CTX: _wait_flush_fence\n");
- if (WaitForFences (ctx->pSurf->dev->vkDev, 1, &ctx->flushFence, VK_TRUE, VKVG_FENCE_TIMEOUT) == VK_SUCCESS)
+ if (WaitForFences (ctx->pSurf->dev->vkDev, 1, &ctx->syncCtx.fence, VK_TRUE, VKVG_FENCE_TIMEOUT) == VK_SUCCESS)
return true;
LOG(VKVG_LOG_DEBUG, "CTX: _wait_flush_fence timeout\n");
ctx->status = VKVG_STATUS_TIMEOUT;
@@ -418,7 +418,7 @@ bool _wait_flush_fence (VkvgContext ctx) {
}
void _reset_flush_fence (VkvgContext ctx) {
LOG(VKVG_LOG_INFO, "CTX: _reset_flush_fence\n");
- ResetFences (ctx->pSurf->dev->vkDev, 1, &ctx->flushFence);
+ ResetFences (ctx->pSurf->dev->vkDev, 1, &ctx->syncCtx.fence);
}
bool _wait_and_submit_cmd (VkvgContext ctx){
if (!ctx->cmdStarted)//current cmd buff is empty, be aware that wait is also canceled!!
@@ -426,11 +426,11 @@ bool _wait_and_submit_cmd (VkvgContext ctx){
LOG(VKVG_LOG_INFO, "CTX: _wait_and_submit_cmd\n");
- if (!_wait_flush_fence (ctx))
+ /*if (!_wait_flush_fence (ctx))
return false;
- _reset_flush_fence(ctx);
-
- _submit_cmd (ctx->pSurf->dev, &ctx->cmd, ctx->flushFence);
+ _reset_flush_fence(ctx);*/
+ _sync_context_wait_and_reset (&ctx->syncCtx, VKVG_FENCE_TIMEOUT);
+ _submit_cmd (ctx->pSurf->dev, &ctx->cmd, &ctx->syncCtx);
if (ctx->cmd == ctx->cmdBuffers[0])
ctx->cmd = ctx->cmdBuffers[1];