#dst info for image barrier to LAYOUT_PRESENT_SRC

2 messages · Page 1 of 1 (latest)

raven isle
#

I use vkCmdPipelineBarrier to transition a swapchain image layout from TRANSFER_DST_OPTIMAL to PRESENT_SRC_KHR, so that I can present it using vkQueuePresentKHR.

What are the appropriate arguments for dstStageMask and dstAccessMask?

If I use VK_PIPELINE_STAGE_ALL_COMMANDS_BIT and VK_ACCESS_NONE, is the layout guaranteed to have transitioned by the time the submission's pSignalSemaphores are signaled?

#

Here's some pseudocode better describing the scenario

  cmdPipelineBarrier(swapchain_image, undefined -> transfer_dst_optimal)
  cmdCopyImage(rendered_image -> swapchain_image)
  // what dstStageMask and dstAccessMask to use here?
  cmdPipelineBarrier(swapchain_image, transfer_dst_optimal -> present_src)
}
endCommandBuffer()

queueSubmit(pSignalSemaphores = x)
queuePresent(pWaitSemaphores = x)