|
|
|
@ -85,24 +85,24 @@ VkResult draw_frame(
|
|
|
|
|
}
|
|
|
|
|
VK_RESULT(vkEndCommandBuffer(transfer_commands));
|
|
|
|
|
|
|
|
|
|
VkPipelineStageFlags wait_stages[] = {VK_PIPELINE_STAGE_TRANSFER_BIT};
|
|
|
|
|
VkTimelineSemaphoreSubmitInfo timeline_info = {
|
|
|
|
|
VkPipelineStageFlags transfer_wait_stages[] = {VK_PIPELINE_STAGE_TRANSFER_BIT};
|
|
|
|
|
VkTimelineSemaphoreSubmitInfo transfer_timeline = {
|
|
|
|
|
.sType = VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO,
|
|
|
|
|
.waitSemaphoreValueCount = 1,
|
|
|
|
|
.pWaitSemaphoreValues = &frame->frame_index,
|
|
|
|
|
};
|
|
|
|
|
VkSubmitInfo submit_info = {
|
|
|
|
|
VkSubmitInfo transfer_submit = {
|
|
|
|
|
.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO,
|
|
|
|
|
.commandBufferCount = 1,
|
|
|
|
|
.pCommandBuffers = &transfer_commands,
|
|
|
|
|
.pSignalSemaphores = &frame->transfer,
|
|
|
|
|
.signalSemaphoreCount = 1,
|
|
|
|
|
.pWaitSemaphores = &frame->frame,
|
|
|
|
|
.pWaitDstStageMask = wait_stages,
|
|
|
|
|
.pWaitDstStageMask = transfer_wait_stages,
|
|
|
|
|
.waitSemaphoreCount = 1,
|
|
|
|
|
.pNext = &timeline_info,
|
|
|
|
|
.pNext = &transfer_timeline,
|
|
|
|
|
};
|
|
|
|
|
VK_RESULT(vkQueueSubmit(context->transfer_queue.handle, 1, &submit_info, VK_NULL_HANDLE));
|
|
|
|
|
VK_RESULT(vkQueueSubmit(context->transfer_queue.handle, 1, &transfer_submit, VK_NULL_HANDLE));
|
|
|
|
|
frame->transfer_count = 0;
|
|
|
|
|
frame->transfer_written = 0;
|
|
|
|
|
|
|
|
|
|