main
noah metz 2024-10-29 00:34:21 -06:00
parent f09b09aff9
commit ae9e6ca687
1 changed files with 6 additions and 6 deletions

@ -85,24 +85,24 @@ VkResult draw_frame(
} }
VK_RESULT(vkEndCommandBuffer(transfer_commands)); VK_RESULT(vkEndCommandBuffer(transfer_commands));
VkPipelineStageFlags wait_stages[] = {VK_PIPELINE_STAGE_TRANSFER_BIT}; VkPipelineStageFlags transfer_wait_stages[] = {VK_PIPELINE_STAGE_TRANSFER_BIT};
VkTimelineSemaphoreSubmitInfo timeline_info = { VkTimelineSemaphoreSubmitInfo transfer_timeline = {
.sType = VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO, .sType = VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO,
.waitSemaphoreValueCount = 1, .waitSemaphoreValueCount = 1,
.pWaitSemaphoreValues = &frame->frame_index, .pWaitSemaphoreValues = &frame->frame_index,
}; };
VkSubmitInfo submit_info = { VkSubmitInfo transfer_submit = {
.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO, .sType = VK_STRUCTURE_TYPE_SUBMIT_INFO,
.commandBufferCount = 1, .commandBufferCount = 1,
.pCommandBuffers = &transfer_commands, .pCommandBuffers = &transfer_commands,
.pSignalSemaphores = &frame->transfer, .pSignalSemaphores = &frame->transfer,
.signalSemaphoreCount = 1, .signalSemaphoreCount = 1,
.pWaitSemaphores = &frame->frame, .pWaitSemaphores = &frame->frame,
.pWaitDstStageMask = wait_stages, .pWaitDstStageMask = transfer_wait_stages,
.waitSemaphoreCount = 1, .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_count = 0;
frame->transfer_written = 0; frame->transfer_written = 0;