Changed queue submission pipeline wait stages to color_attachment
This commit is contained in:
parent
a56f2b2c6f
commit
26fa796517
3 changed files with 5 additions and 25 deletions
|
|
@ -581,21 +581,6 @@ void VulkanExampleBase::renderLoop()
|
||||||
vkDeviceWaitIdle(device);
|
vkDeviceWaitIdle(device);
|
||||||
}
|
}
|
||||||
|
|
||||||
VkSubmitInfo VulkanExampleBase::prepareSubmitInfo(
|
|
||||||
std::vector<VkCommandBuffer> commandBuffers,
|
|
||||||
VkPipelineStageFlags *pipelineStages)
|
|
||||||
{
|
|
||||||
VkSubmitInfo submitInfo = vkTools::initializers::submitInfo();
|
|
||||||
submitInfo.pWaitDstStageMask = pipelineStages;
|
|
||||||
submitInfo.waitSemaphoreCount = 1;
|
|
||||||
submitInfo.pWaitSemaphores = &semaphores.presentComplete;
|
|
||||||
submitInfo.commandBufferCount = static_cast<uint32_t>(commandBuffers.size());
|
|
||||||
submitInfo.pCommandBuffers = commandBuffers.data();
|
|
||||||
submitInfo.signalSemaphoreCount = 1;
|
|
||||||
submitInfo.pSignalSemaphores = &semaphores.renderComplete;
|
|
||||||
return submitInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
void VulkanExampleBase::updateTextOverlay()
|
void VulkanExampleBase::updateTextOverlay()
|
||||||
{
|
{
|
||||||
if (!enableTextOverlay)
|
if (!enableTextOverlay)
|
||||||
|
|
|
||||||
|
|
@ -108,8 +108,8 @@ protected:
|
||||||
std::vector<VkCommandBuffer> postPresentCmdBuffers = { VK_NULL_HANDLE };
|
std::vector<VkCommandBuffer> postPresentCmdBuffers = { VK_NULL_HANDLE };
|
||||||
// Command buffers for submitting a pre present image barrier
|
// Command buffers for submitting a pre present image barrier
|
||||||
std::vector<VkCommandBuffer> prePresentCmdBuffers = { VK_NULL_HANDLE };
|
std::vector<VkCommandBuffer> prePresentCmdBuffers = { VK_NULL_HANDLE };
|
||||||
// Pipeline stage flags for the submit info structure
|
/** @brief Pipeline stages used to wait at for graphics queue submissions */
|
||||||
VkPipelineStageFlags submitPipelineStages = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT;
|
VkPipelineStageFlags submitPipelineStages = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
|
||||||
// Contains command buffers and semaphores to be presented to the queue
|
// Contains command buffers and semaphores to be presented to the queue
|
||||||
VkSubmitInfo submitInfo;
|
VkSubmitInfo submitInfo;
|
||||||
// Command buffers used for rendering
|
// Command buffers used for rendering
|
||||||
|
|
@ -344,12 +344,6 @@ public:
|
||||||
// Start the main render loop
|
// Start the main render loop
|
||||||
void renderLoop();
|
void renderLoop();
|
||||||
|
|
||||||
// Prepare a submit info structure containing
|
|
||||||
// semaphores and submit buffer info for vkQueueSubmit
|
|
||||||
VkSubmitInfo prepareSubmitInfo(
|
|
||||||
std::vector<VkCommandBuffer> commandBuffers,
|
|
||||||
VkPipelineStageFlags *pipelineStages);
|
|
||||||
|
|
||||||
void updateTextOverlay();
|
void updateTextOverlay();
|
||||||
|
|
||||||
// Called when the text overlay is updating
|
// Called when the text overlay is updating
|
||||||
|
|
|
||||||
|
|
@ -333,11 +333,12 @@ public:
|
||||||
// Get next image in the swap chain (back/front buffer)
|
// Get next image in the swap chain (back/front buffer)
|
||||||
VK_CHECK_RESULT(swapChain.acquireNextImage(presentCompleteSemaphore, ¤tBuffer));
|
VK_CHECK_RESULT(swapChain.acquireNextImage(presentCompleteSemaphore, ¤tBuffer));
|
||||||
|
|
||||||
|
// Pipeline stage at which the queue submission will wait (via pWaitSemaphores)
|
||||||
|
VkPipelineStageFlags waitStageMask = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
|
||||||
// The submit info structure specifices a command buffer queue submission batch
|
// The submit info structure specifices a command buffer queue submission batch
|
||||||
VkPipelineStageFlags pipelineStages = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT;
|
|
||||||
VkSubmitInfo submitInfo = {};
|
VkSubmitInfo submitInfo = {};
|
||||||
submitInfo.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
|
submitInfo.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
|
||||||
submitInfo.pWaitDstStageMask = &pipelineStages;
|
submitInfo.pWaitDstStageMask = &waitStageMask; // Pointer to the list of pipeline stages that the semaphore waits will occur at
|
||||||
submitInfo.pWaitSemaphores = &presentCompleteSemaphore; // Semaphore(s) to wait upon before the submitted command buffer starts executing
|
submitInfo.pWaitSemaphores = &presentCompleteSemaphore; // Semaphore(s) to wait upon before the submitted command buffer starts executing
|
||||||
submitInfo.waitSemaphoreCount = 1; // One wait semaphore
|
submitInfo.waitSemaphoreCount = 1; // One wait semaphore
|
||||||
submitInfo.pSignalSemaphores = &renderCompleteSemaphore; // Semaphore(s) to be signaled when command buffers have completed
|
submitInfo.pSignalSemaphores = &renderCompleteSemaphore; // Semaphore(s) to be signaled when command buffers have completed
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue