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);
|
||||
}
|
||||
|
||||
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()
|
||||
{
|
||||
if (!enableTextOverlay)
|
||||
|
|
|
|||
|
|
@ -108,8 +108,8 @@ protected:
|
|||
std::vector<VkCommandBuffer> postPresentCmdBuffers = { VK_NULL_HANDLE };
|
||||
// Command buffers for submitting a pre present image barrier
|
||||
std::vector<VkCommandBuffer> prePresentCmdBuffers = { VK_NULL_HANDLE };
|
||||
// Pipeline stage flags for the submit info structure
|
||||
VkPipelineStageFlags submitPipelineStages = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT;
|
||||
/** @brief Pipeline stages used to wait at for graphics queue submissions */
|
||||
VkPipelineStageFlags submitPipelineStages = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
|
||||
// Contains command buffers and semaphores to be presented to the queue
|
||||
VkSubmitInfo submitInfo;
|
||||
// Command buffers used for rendering
|
||||
|
|
@ -344,12 +344,6 @@ public:
|
|||
// Start the main render loop
|
||||
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();
|
||||
|
||||
// Called when the text overlay is updating
|
||||
|
|
|
|||
|
|
@ -333,11 +333,12 @@ public:
|
|||
// Get next image in the swap chain (back/front buffer)
|
||||
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
|
||||
VkPipelineStageFlags pipelineStages = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT;
|
||||
VkSubmitInfo submitInfo = {};
|
||||
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.waitSemaphoreCount = 1; // One wait semaphore
|
||||
submitInfo.pSignalSemaphores = &renderCompleteSemaphore; // Semaphore(s) to be signaled when command buffers have completed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue