Avoid WRW hazard in subpass deps

This commit is contained in:
Billy Laws 2022-11-03 22:34:19 +00:00
parent e9313cc291
commit d502adb309

View File

@ -102,11 +102,11 @@ namespace skyline::gpu::interconnect::node {
if (view->format->vkAspect & vk::ImageAspectFlagBits::eColor) {
dependency.srcStageMask = vk::PipelineStageFlagBits::eColorAttachmentOutput;
dependency.srcAccessMask = vk::AccessFlagBits::eColorAttachmentWrite;
dependency.dstAccessMask = vk::AccessFlagBits::eColorAttachmentRead;
dependency.dstAccessMask = vk::AccessFlagBits::eColorAttachmentRead | vk::AccessFlagBits::eColorAttachmentWrite;
} else if (view->format->vkAspect & (vk::ImageAspectFlagBits::eDepth | vk::ImageAspectFlagBits::eStencil)) {
dependency.srcStageMask = vk::PipelineStageFlagBits::eEarlyFragmentTests | vk::PipelineStageFlagBits::eLateFragmentTests;
dependency.srcAccessMask = vk::AccessFlagBits::eDepthStencilAttachmentWrite;
dependency.dstAccessMask = vk::AccessFlagBits::eDepthStencilAttachmentRead;
dependency.dstAccessMask = vk::AccessFlagBits::eDepthStencilAttachmentRead | vk::AccessFlagBits::eDepthStencilAttachmentWrite;
}
if (std::find(subpassDependencies.begin(), subpassDependencies.end(), dependency) == subpassDependencies.end())