File tree Expand file tree Collapse file tree
03_Drawing_a_triangle/03_Drawing Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -204,9 +204,13 @@ subpass also count as implicit "subpasses".
204204There are two built-in dependencies that take care of the transition at the
205205start of the render pass and at the end of the render pass, but the former does
206206not occur at the right time. It assumes that the transition occurs at the start
207- of the pipeline, but we haven't acquired the image yet at that point! The image
208- is not ready until the ` VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT ` stage.
209- Therefore we need to override this dependency with our own dependency.
207+ of the pipeline, but we haven't acquired the image yet at that point! There are
208+ two ways to deal with this problem. We could change the ` waitStages ` for the
209+ ` imageAvailableSemaphore ` to ` VK_PIPELINE_STAGE_TOP_OF_PIPELINE_BIT ` to ensure
210+ that the render passes don't begin until the image is available, or we can make
211+ the render pass wait for the ` VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT `
212+ stage. I've decided to go with the second option here, because it's a good
213+ excuse to have a look at subpass dependencies and how they work.
210214
211215Subpass dependencies are specified in ` VkSubpassDependency ` structs. Go to the
212216` createRenderPass ` function and add one:
You can’t perform that action at this time.
0 commit comments