This issue is similar to the one discussed in https://github.com/Overv/VulkanTutorial/issues/308. The additional multisampled color attachment also needs proper synchronization to prevent write-after-write hazards.
To ensure that the color attachment write operations from previous commands are completed before any subsequent color attachment write operations, add VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT in the srcAccessMask:
When enabling Synchronization Validation in
30_multisampling.cpp
, a validation error is reported:This issue is similar to the one discussed in https://github.com/Overv/VulkanTutorial/issues/308. The additional multisampled color attachment also needs proper synchronization to prevent write-after-write hazards.
To ensure that the color attachment write operations from previous commands are completed before any subsequent color attachment write operations, add
VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT
in thesrcAccessMask
: