From d03839dfefb35a4a46012f468e8a3692cdbf5bbe Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Fri, 22 Mar 2019 13:54:13 +0100 Subject: [PATCH] - do not signal mRenderFinishedSemaphore if the submitted commands aren't about to be presented --- src/rendering/vulkan/system/vk_framebuffer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rendering/vulkan/system/vk_framebuffer.cpp b/src/rendering/vulkan/system/vk_framebuffer.cpp index a71d7ea27..817a10549 100644 --- a/src/rendering/vulkan/system/vk_framebuffer.cpp +++ b/src/rendering/vulkan/system/vk_framebuffer.cpp @@ -249,7 +249,7 @@ void VulkanFrameBuffer::SubmitCommands(bool finish) submitInfo.pWaitDstStageMask = waitStages; submitInfo.commandBufferCount = 1; submitInfo.pCommandBuffers = &mDrawCommands->buffer; - submitInfo.signalSemaphoreCount = 1; + submitInfo.signalSemaphoreCount = finish ? 1 : 0; submitInfo.pSignalSemaphores = &mRenderFinishedSemaphore->semaphore; result = vkQueueSubmit(device->graphicsQueue, 1, &submitInfo, mRenderFinishedFence->fence); if (result < VK_SUCCESS) @@ -267,7 +267,7 @@ void VulkanFrameBuffer::SubmitCommands(bool finish) submitInfo.pWaitDstStageMask = waitStages; submitInfo.commandBufferCount = 1; submitInfo.pCommandBuffers = &mDrawCommands->buffer; - submitInfo.signalSemaphoreCount = 1; + submitInfo.signalSemaphoreCount = finish ? 1 : 0; submitInfo.pSignalSemaphores = &mRenderFinishedSemaphore->semaphore; VkResult result = vkQueueSubmit(device->graphicsQueue, 1, &submitInfo, mRenderFinishedFence->fence); if (result < VK_SUCCESS)