title: Can acquire and write to swap chain image be synchronized without a semaphore or fence?
body: <p>Typically, a <code>VkRenderPass</code> that uses a swap chain image waits for a semaphore from <code>vkAcquireNextImageKHR</code> before executing <code>VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT</code>. The same <code>VkRenderPass</code> also defines a subpass dependency to transition the image at the beginning of the same pipeline stage:</p>
  <pre><code>    VkSubpassDependency dependency = {
      .srcSubpass = VK_SUBPASS_EXTERNAL,
      .dstSubpass = 0,
      // .srcStageMask needs to be a part of pWaitDstStageMask in the WSI semaphore.
      .srcStageMask = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT,
      .dstStageMask = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT,
      .srcAccessMask = 0,
      .dstAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT,
      .dependencyFlags = 0};
  
  //source: https://github.com/KhronosGroup/Vulkan-Docs/wiki/Synchronization-Examples#combined-graphicspresent-queue
  </code></pre>
  <p>According to Vulkan standard:</p>
  <blockquote>
  <p>7: Subpass dependencies describe <strong>execution</strong> and memory dependencies between subpasses.</p>
  </blockquote>
  <p>So doesn't this subpass dependency alone enforce that the <code>VkRenderPass</code> color output happens after the presentation engine <code>VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT</code>? What does the semaphore from <code>vkAcquireNextImageKHR</code> wait for, that the dependency does not?</p>
  <p>I couldn't test absence of the semaphore effectively. On my Mesa Linux, render succeeds even without both sync methods.</p>