diff --git a/src/vulkan.c b/src/vulkan.c index c3d4dba..f7b0b50 100644 --- a/src/vulkan.c +++ b/src/vulkan.c @@ -738,6 +738,7 @@ struct Vk *init_vk(void *data, int width, int heigh, paw_da_make_inplace(&state->kitties); + CHECK_VK_RESULT(vkDeviceWaitIdle(state->device)); return state; } @@ -781,6 +782,8 @@ void vk_draw(struct Vk *state) { state->device, 1, &state->flights[state->current_frame].in_flight_fence, VK_TRUE, UINT64_MAX)); state->should_wait_for_fences = true; + } else { + CHECK_VK_RESULT(vkDeviceWaitIdle(state->device)); } CHECK_VK_RESULT(vkResetFences( state->device, 1, &state->flights[state->current_frame].in_flight_fence));