Layout transition between multiple subpasses in Vulkan
问题 I am trying to do two simple subpasses, where the second one has a dependency on the first one. //subpass 1 VkAttachmentReference colorReferences = { 0, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL }; VkSubpassDescription subpass1 = {}; subpass1.pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS; subpass1.pColorAttachments = &colorReferences; subpass1.colorAttachmentCount = 1; //subpass 2 VkAttachmentReference inputRefernce = { 0, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL }; VkSubpassDescription