|
|
@ -152,9 +152,9 @@ void Application::drawFrame() { |
|
|
|
VkSubmitInfo submitInfo {}; |
|
|
|
VkSubmitInfo submitInfo {}; |
|
|
|
submitInfo.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; |
|
|
|
submitInfo.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; |
|
|
|
|
|
|
|
|
|
|
|
VkSemaphore waitSemaphores[] = {imageAvailableSemaphore}; |
|
|
|
VkSemaphore waitSemaphores[] = {imageAvailableSemaphore, computeFinishedSemaphore}; |
|
|
|
VkPipelineStageFlags waitStages[] = {VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT}; |
|
|
|
VkPipelineStageFlags waitStages[] = {VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT}; |
|
|
|
submitInfo.waitSemaphoreCount = 1; |
|
|
|
submitInfo.waitSemaphoreCount = 2; |
|
|
|
submitInfo.pWaitSemaphores = waitSemaphores; |
|
|
|
submitInfo.pWaitSemaphores = waitSemaphores; |
|
|
|
submitInfo.pWaitDstStageMask = waitStages; |
|
|
|
submitInfo.pWaitDstStageMask = waitStages; |
|
|
|
submitInfo.commandBufferCount = 1; |
|
|
|
submitInfo.commandBufferCount = 1; |
|
|
@ -163,8 +163,6 @@ void Application::drawFrame() { |
|
|
|
VkSemaphore signalSemaphores[] = {renderFinishedSemaphore}; |
|
|
|
VkSemaphore signalSemaphores[] = {renderFinishedSemaphore}; |
|
|
|
submitInfo.signalSemaphoreCount = 1; |
|
|
|
submitInfo.signalSemaphoreCount = 1; |
|
|
|
submitInfo.pSignalSemaphores = signalSemaphores; |
|
|
|
submitInfo.pSignalSemaphores = signalSemaphores; |
|
|
|
submitInfo.waitSemaphoreCount = 1; |
|
|
|
|
|
|
|
submitInfo.pWaitSemaphores = &computeFinishedSemaphore; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vkQueueSubmit(Instance::instance->graphicsQueue, 1, &submitInfo, renderInFlightFence); |
|
|
|
vkQueueSubmit(Instance::instance->graphicsQueue, 1, &submitInfo, renderInFlightFence); |
|
|
|
|
|
|
|
|
|
|
|