Synchronize color attachment layout transitions with loads

Since we are now loading the world color buffer content before drawing
on them again, we need to make sure the attachment layout transition
from shader-read-optimal to color-attachment-optimal happens before
color attachment read operations.
This commit is contained in:
Ricardo Garcia 2021-02-14 00:03:40 +01:00
parent e0e52de47f
commit b96b3a8d84

View file

@ -648,7 +648,7 @@ static VkResult CreateRenderpasses()
.srcStageMask = VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT,
.dstStageMask = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT,
.srcAccessMask = VK_ACCESS_SHADER_READ_BIT,
.dstAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT,
.dstAccessMask = (VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT | VK_ACCESS_COLOR_ATTACHMENT_READ_BIT),
.dependencyFlags = VK_DEPENDENCY_BY_REGION_BIT
},
{