- fix SubmitCommands bug if it no swapchain image was acquired

This commit is contained in:
Magnus Norddahl 2019-04-10 16:39:33 +02:00
parent 7b06fbe28e
commit 5f70ce2148

View file

@ -225,7 +225,7 @@ void VulkanFrameBuffer::SubmitCommands(bool finish)
{
submit.addWait(VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, mTransferSemaphore.get());
}
if (finish)
if (finish && presentImageIndex != 0xffffffff)
{
submit.addWait(VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, mSwapChainImageAvailableSemaphore.get());
submit.addSignal(mRenderFinishedSemaphore.get());